Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require:
plugins:
- rubocop-performance
- rubocop-rake
- rubocop-rspec
Expand Down Expand Up @@ -291,7 +291,7 @@ Style/PerlBackrefs:
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
Enabled: false

Naming/PredicateName:
Naming/PredicatePrefix:
Description: 'Check the names of predicate methods.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
ForbiddenPrefixes:
Expand Down Expand Up @@ -890,8 +890,11 @@ Style/WhileUntilDo:
Style/ZeroLengthPredicate:
Enabled: false

RSpec/FilePath:
SpecSuffixOnly: true
RSpec/SpecFilePathFormat:
Enabled: false

RSpec/SpecFilePathSuffix:
Enabled: true

RSpec/ExampleLength:
Enabled: false
Expand Down
9 changes: 0 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,3 @@ source "https://rubygems.org"

# Specify your gem's dependencies in launchdarkly-server-sdk-otel.gemspec
gemspec

gem "rake", "~> 13.0"

gem "rspec", "~> 3.0"

gem "rubocop", "~> 1.21"
gem "rubocop-performance", "~> 1.15"
gem "rubocop-rake", "~> 0.6"
gem "rubocop-rspec", "~> 2.27"
7 changes: 7 additions & 0 deletions launchdarkly-server-sdk-otel.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency "launchdarkly-server-sdk", "~> 8.4.0"
spec.add_runtime_dependency "opentelemetry-sdk", "~> 1.4.0"

spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rubocop', '~> 1.21'
spec.add_development_dependency 'rubocop-performance', '~> 1.15'
spec.add_development_dependency 'rubocop-rake', '~> 0.6'
spec.add_development_dependency 'rubocop-rspec', '~> 3.6'

# For more information and examples about making a new gem, check out our
# guide at: https://bundler.io/guides/creating_gem.html
end
2 changes: 1 addition & 1 deletion spec/ldclient_otel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

RSpec.describe LaunchDarkly::Otel do
it 'has a version number' do
expect(LaunchDarkly::Otel::VERSION).not_to be nil
expect(LaunchDarkly::Otel::VERSION).not_to be_nil
end
end
8 changes: 4 additions & 4 deletions spec/tracing_hook_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
expect(event.attributes['feature_flag.key']).to eq 'boolean'
expect(event.attributes['feature_flag.provider_name']).to eq 'LaunchDarkly'
expect(event.attributes['feature_flag.context.key']).to eq 'org:org-key'
expect(event.attributes['feature_flag.variant']).to eq nil
expect(event.attributes['feature_flag.variant']).to be_nil
end
end

Expand Down Expand Up @@ -109,7 +109,7 @@
expect(event.attributes['feature_flag.key']).to eq 'boolean'
expect(event.attributes['feature_flag.provider_name']).to eq 'LaunchDarkly'
expect(event.attributes['feature_flag.context.key']).to eq 'org:org-key'
expect(event.attributes['feature_flag.variant']).to eq nil
expect(event.attributes['feature_flag.variant']).to be_nil
end

it 'hook makes its span active' do
Expand Down Expand Up @@ -140,13 +140,13 @@
expect(middle.events[0].attributes['feature_flag.key']).to eq 'boolean'
expect(middle.events[0].attributes['feature_flag.provider_name']).to eq 'LaunchDarkly'
expect(middle.events[0].attributes['feature_flag.context.key']).to eq 'org:org-key'
expect(middle.events[0].attributes['feature_flag.variant']).to eq nil
expect(middle.events[0].attributes['feature_flag.variant']).to be_nil

expect(top.events[0].name).to eq 'feature_flag'
expect(top.events[0].attributes['feature_flag.key']).to eq 'boolean'
expect(top.events[0].attributes['feature_flag.provider_name']).to eq 'LaunchDarkly'
expect(top.events[0].attributes['feature_flag.context.key']).to eq 'org:org-key'
expect(top.events[0].attributes['feature_flag.variant']).to eq nil
expect(top.events[0].attributes['feature_flag.variant']).to be_nil
end
end
end