Skip to content

Commit

Permalink
fix: use existing convention for sdk name (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew authored Jan 21, 2025
1 parent f4b07df commit 208cab5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/unleash/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def http_headers
'UNLEASH-APPNAME' => self.app_name,
'X-UNLEASH-APPNAME' => self.app_name,
'X-UNLEASH-CONNECTION-ID' => @connection_id,
'X-UNLEASH-SDK' => "unleash-ruby@#{Unleash::VERSION}",
'X-UNLEASH-SDK' => "unleash-client-ruby:#{Unleash::VERSION}",
'Unleash-Client-Spec' => CLIENT_SPECIFICATION_VERSION
}.merge!(generate_custom_http_headers)
end
Expand Down
22 changes: 11 additions & 11 deletions spec/unleash/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'Content-Type' => 'application/json',
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}",
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}",
'X-Api-Key' => '123'
}
)
Expand All @@ -29,7 +29,7 @@
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'Content-Type' => 'application/json',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}"
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}"
}
)
.to_return(status: 200, body: "", headers: {})
Expand All @@ -56,7 +56,7 @@
'Unleash-Instanceid' => 'rspec/test',
'X-Unleash-Connection-Id' => fixed_uuid,
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}",
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}",
'X-Api-Key' => '123'
}
)
Expand Down Expand Up @@ -137,7 +137,7 @@
'X-Unleash-Appname' => 'my-test-app',
'Unleash-Instanceid' => 'rspec/test',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}",
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}",
'X-Api-Key' => '123'
}
)
Expand Down Expand Up @@ -180,7 +180,7 @@
'X-Unleash-Appname' => 'my-test-app',
'Unleash-Instanceid' => 'rspec/test',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}",
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}",
'X-Api-Key' => '123'
}
)
Expand Down Expand Up @@ -279,7 +279,7 @@
'Content-Type' => 'application/json',
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}",
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}",
'X-Api-Key' => '123'
}
)
Expand All @@ -295,7 +295,7 @@
'X-Unleash-Appname' => 'my-test-app',
'Unleash-Instanceid' => 'rspec/test',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}",
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}",
'X-Api-Key' => '123'
}
)
Expand Down Expand Up @@ -330,7 +330,7 @@
'Content-Type' => 'application/json',
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}",
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}",
'X-Api-Key' => '123'
}
)
Expand All @@ -356,7 +356,7 @@
'X-Unleash-Appname' => 'my-test-app',
'Unleash-Instanceid' => 'rspec/test',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}",
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}",
'X-Api-Key' => '123'
}
)
Expand Down Expand Up @@ -636,7 +636,7 @@
'X-Unleash-Appname' => 'my-test-app',
'Unleash-Instanceid' => 'rspec/test',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}",
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}",
'X-Api-Key' => '123'
}
)
Expand All @@ -652,7 +652,7 @@
'X-Unleash-Appname' => 'my-test-app',
'Unleash-Instanceid' => 'rspec/test',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}",
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}",
'X-Api-Key' => '123'
}
)
Expand Down
2 changes: 1 addition & 1 deletion spec/unleash/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
'X-UNLEASH-APPNAME' => 'test-app',
'UNLEASH-INSTANCEID' => config.instance_id,
'X-UNLEASH-CONNECTION-ID' => fixed_uuid,
'X-UNLEASH-SDK' => "unleash-ruby@#{Unleash::VERSION}",
'X-UNLEASH-SDK' => "unleash-client-ruby:#{Unleash::VERSION}",
'Unleash-Client-Spec' => '5.1.9',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]"
}
Expand Down
2 changes: 1 addition & 1 deletion spec/unleash/metrics_reporter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
'X-Unleash-Appname' => 'my-test-app',
'Unleash-Instanceid' => 'rspec/test',
'User-Agent' => "UnleashClientRuby/#{Unleash::VERSION} #{RUBY_ENGINE}/#{RUBY_VERSION} [#{RUBY_PLATFORM}]",
'X-Unleash-Sdk' => "unleash-ruby@#{Unleash::VERSION}"
'X-Unleash-Sdk' => "unleash-client-ruby:#{Unleash::VERSION}"
}
)
.to_return(status: 200, body: "", headers: {})
Expand Down

0 comments on commit 208cab5

Please sign in to comment.