Skip to content

Commit

Permalink
chore: Remove Local Path Gem Dependencies (#1213)
Browse files Browse the repository at this point in the history
* chore: Remove Local Path Gem Dependencies

This is the first of many steps to decouple the contrib packages from the main repo.

See open-telemetry/opentelemetry-ruby-contrib#1

* fix: Relax test assertions for RSpec

RSpec will colorize test results depending on how it is exectued.
I was unable to find the correct incantation that would remove colorized output so I relaxed the test assertions.

cc: @chrishomes

* fix: Non-deterministic test

This test does not use the global tracer provider however it would leak the state to other test cases
causing the global logger to generate unexpected messages.

* chore: Update example gemfiles
  • Loading branch information
arielvalentin authored May 4, 2022
1 parent 46ef191 commit 0f7d785
Show file tree
Hide file tree
Showing 203 changed files with 385 additions and 965 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-without-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Install tools
run: gem install --no-document bundler:2.1.4 toys:0.11.5
run: gem install --no-document toys:0.11.5
- name: Run tests
run: toys ci ${{ matrix.flags }}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Install tools
run: gem install --no-document bundler:2.1.4 toys:0.11.5
run: gem install --no-document bundler toys:0.11.5
- name: Run tests
env:
TEST_KAFKA_HOST: "127.0.0.1"
Expand Down
10 changes: 5 additions & 5 deletions .instrumentation_generator/templates/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

source 'https://rubygems.org'

gemspec
# DO NOT ADD DEPENDENCIES HERE!
# Please declare a minimum development dependency in the gemspec,
# then target specific versions in the Appraisals file.

gem 'opentelemetry-api', path: '../../api'
gemspec

group :test do
gem 'opentelemetry-common', path: '../../common'
gem 'opentelemetry-sdk', path: '../../sdk'
gem 'opentelemetry-semantic_conventions', path: '../../semantic_conventions'
gem 'opentelemetry-instrumentation-base', path: '../base'
end
1 change: 1 addition & 0 deletions .instrumentation_generator/templates/gemspec.tt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'bundler', '>= 1.17'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0'
spec.add_development_dependency 'opentelemetry-test-helpers'
spec.add_development_dependency 'rake', '~> 12.3.3'
spec.add_development_dependency 'rubocop', '~> 0.73.0'
spec.add_development_dependency 'simplecov', '~> 0.17.1'
Expand Down
2 changes: 1 addition & 1 deletion .toys/ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test?(gem_name, has_appraisal)

def handle_gem(gem_name, has_appraisal)
individual_test("#{gem_name}: bundle",
["bundle", "install", "--jobs=3", "--retry=3"])
["bundle", "install", "--jobs=3", "--retry=3", "--quiet"])
unless no_check_tests
if has_appraisal
individual_test("#{gem_name}: appraisal",
Expand Down
47 changes: 0 additions & 47 deletions examples/http/Gemfile.lock

This file was deleted.

7 changes: 0 additions & 7 deletions instrumentation/action_pack/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@ source 'https://rubygems.org'

gemspec

gem 'opentelemetry-api', path: '../../api'

group :test do
gem 'byebug'
gem 'opentelemetry-common', path: '../../common'
gem 'opentelemetry-instrumentation-base', path: '../../instrumentation/base'
gem 'opentelemetry-instrumentation-rack', path: '../../instrumentation/rack'
gem 'opentelemetry-sdk', path: '../../sdk'
gem 'opentelemetry-semantic_conventions', path: '../../semantic_conventions'
gem 'opentelemetry-test-helpers', path: '../../test_helpers'
gem 'pry-byebug'
end
5 changes: 0 additions & 5 deletions instrumentation/action_pack/gemfiles/rails_5.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "rails", "~> 5.2.0"

group :test do
gem "byebug"
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-instrumentation-base", path: "../../../instrumentation/base"
gem "opentelemetry-instrumentation-rack", path: "../../../instrumentation/rack"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "pry-byebug"
end

Expand Down
5 changes: 0 additions & 5 deletions instrumentation/action_pack/gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "rails", "~> 6.0.0"

group :test do
gem "byebug"
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-instrumentation-base", path: "../../../instrumentation/base"
gem "opentelemetry-instrumentation-rack", path: "../../../instrumentation/rack"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "pry-byebug"
end

Expand Down
5 changes: 0 additions & 5 deletions instrumentation/action_pack/gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "rails", "~> 6.1.0"

group :test do
gem "byebug"
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-instrumentation-base", path: "../../../instrumentation/base"
gem "opentelemetry-instrumentation-rack", path: "../../../instrumentation/rack"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "pry-byebug"
end

Expand Down
5 changes: 0 additions & 5 deletions instrumentation/action_pack/gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "rails", "~> 7.0.0"

group :test do
gem "byebug"
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-instrumentation-base", path: "../../../instrumentation/base"
gem "opentelemetry-instrumentation-rack", path: "../../../instrumentation/rack"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "pry-byebug"
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'bundler', '>= 1.17'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0'
spec.add_development_dependency 'opentelemetry-test-helpers'
spec.add_development_dependency 'rails'
spec.add_development_dependency 'rake', '~> 12.3.3'
spec.add_development_dependency 'rubocop', '~> 0.73.0'
Expand Down
11 changes: 2 additions & 9 deletions instrumentation/action_view/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@ source 'https://rubygems.org'

gemspec

gem 'opentelemetry-api', path: '../../api'
gem 'opentelemetry-instrumentation-base', path: '../base'

group :test do
gem 'byebug'
gem 'opentelemetry-common', path: '../../common'
gem 'opentelemetry-instrumentation-active_support', path: '../../instrumentation/active_support'
gem 'opentelemetry-sdk', path: '../../sdk'
gem 'opentelemetry-semantic_conventions', path: '../../semantic_conventions'
gem 'opentelemetry-test-helpers', path: '../../test_helpers'
gem 'opentelemetry-instrumentation-active_support', path: '../active_support'
gem 'opentelemetry-instrumentation-base', path: '../base'
gem 'pry-byebug'
end
9 changes: 2 additions & 7 deletions instrumentation/action_view/gemfiles/rails_5.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "rails", "~> 5.2.0"

group :test do
gem "byebug"
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-instrumentation-active_support", path: "../../../instrumentation/active_support"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "opentelemetry-instrumentation-active_support", path: "../../active_support"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "pry-byebug"
end

Expand Down
9 changes: 2 additions & 7 deletions instrumentation/action_view/gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "rails", "~> 6.0.0"

group :test do
gem "byebug"
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-instrumentation-active_support", path: "../../../instrumentation/active_support"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "opentelemetry-instrumentation-active_support", path: "../../active_support"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "pry-byebug"
end

Expand Down
9 changes: 2 additions & 7 deletions instrumentation/action_view/gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "rails", "~> 6.1.0"

group :test do
gem "byebug"
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-instrumentation-active_support", path: "../../../instrumentation/active_support"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "opentelemetry-instrumentation-active_support", path: "../../active_support"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "pry-byebug"
end

Expand Down
9 changes: 2 additions & 7 deletions instrumentation/action_view/gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "rails", "~> 7.0.0"

group :test do
gem "byebug"
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-instrumentation-active_support", path: "../../../instrumentation/active_support"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "opentelemetry-instrumentation-active_support", path: "../../active_support"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "pry-byebug"
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']
spec.required_ruby_version = '>= 2.5.0'

spec.add_dependency 'opentelemetry-api', '~> 1.0.0'
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.1.0'
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.20.0'
spec.add_dependency 'opentelemetry-api', '~> 1.0'
spec.add_dependency 'opentelemetry-instrumentation-active_support', '~> 0.1'
spec.add_dependency 'opentelemetry-instrumentation-base', '~> 0.20'

spec.add_development_dependency 'appraisal', '~> 2.2.0'
spec.add_development_dependency 'bundler', '>= 1.17'
spec.add_development_dependency 'minitest', '~> 5.0'
spec.add_development_dependency 'opentelemetry-sdk', '~> 1.0'
spec.add_development_dependency 'opentelemetry-test-helpers'
spec.add_development_dependency 'rails'
spec.add_development_dependency 'rake', '~> 12.3.3'
spec.add_development_dependency 'rubocop', '~> 0.73.0'
Expand Down
8 changes: 1 addition & 7 deletions instrumentation/active_job/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ source 'https://rubygems.org'

gemspec

gem 'opentelemetry-api', path: '../../api'
gem 'opentelemetry-instrumentation-base', path: '../base'

group :test do
gem 'opentelemetry-common', path: '../../common'
gem 'opentelemetry-sdk', path: '../../sdk'
gem 'opentelemetry-semantic_conventions', path: '../../semantic_conventions'
gem 'opentelemetry-test-helpers', path: '../../test_helpers'
gem 'opentelemetry-instrumentation-base', path: '../base'
end
6 changes: 3 additions & 3 deletions instrumentation/active_job/example/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
source 'https://rubygems.org'

gem 'activejob'
gem 'opentelemetry-api', path: '../../../api'
gem 'opentelemetry-instrumentation-active_job', path: '../../../instrumentation/active_job'
gem 'opentelemetry-sdk', path: '../../../sdk'
gem 'opentelemetry-api'
gem 'opentelemetry-instrumentation-active_job'
gem 'opentelemetry-sdk'
6 changes: 1 addition & 5 deletions instrumentation/active_job/gemfiles/activejob_5.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "activejob", "~> 5.2.0"

group :test do
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "opentelemetry-instrumentation-base", path: "../../base"
end

gemspec path: "../"
6 changes: 1 addition & 5 deletions instrumentation/active_job/gemfiles/activejob_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "activejob", "~> 6.0.0"

group :test do
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "opentelemetry-instrumentation-base", path: "../../base"
end

gemspec path: "../"
6 changes: 1 addition & 5 deletions instrumentation/active_job/gemfiles/activejob_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "activejob", "~> 6.1.0"

group :test do
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "opentelemetry-instrumentation-base", path: "../../base"
end

gemspec path: "../"
6 changes: 1 addition & 5 deletions instrumentation/active_job/gemfiles/rails_7.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@

source "https://rubygems.org"

gem "opentelemetry-api", path: "../../../api"
gem "opentelemetry-instrumentation-base", path: "../../base"
gem "rails", "~> 7.0.0"

group :test do
gem "opentelemetry-common", path: "../../../common"
gem "opentelemetry-sdk", path: "../../../sdk"
gem "opentelemetry-semantic_conventions", path: "../../../semantic_conventions"
gem "opentelemetry-instrumentation-base", path: "../../base"
end

gemspec path: "../"
Loading

0 comments on commit 0f7d785

Please sign in to comment.