unleash 5.0.2 → 5.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d47d4a063a3d6bb76a8a8867882b4cc7bcac17e9f9b3e4c4d7524f1115093e0d
4
- data.tar.gz: bdf1d479d9ce09c34afbfc1ecf08aabb9745f8d74256e096b9fdd30f00e455ad
3
+ metadata.gz: 18d3ceb8b2115e259e3fb2ae66643dafea5009826a25be644ab4c98406b8ef30
4
+ data.tar.gz: 3c22aed38cc800658d422dd41edfd103728e0ebf749110bf510a46259d3c2312
5
5
  SHA512:
6
- metadata.gz: e7a7e91c6016b10445777cf45ec9d914a22467ee0668924e7a960b4779f972436871ba2990a97e6ed7cf9937d285bd6efd07b31b81d05fa01181de84fe507cdb
7
- data.tar.gz: c6ed23eac0a4b91c081eeac6b6a7cc0bbf7c54b26782624714d5a010cd50e2c1390c9bbaf0ea37ea120255b72b7a36787003e9761a5b4b98a7e1e7f8c534b5a7
6
+ metadata.gz: 98a67cbdcee3d72d1aaaf5f54581875c122e58fb3dbd248bbc5c9ab0e7c55f7352dd732b12293a594412f2484535084410984b975400d991dd5b96ce02084a22
7
+ data.tar.gz: a5551b86fc70c7dd6c1b80b8bb7e643524a42dc25220ca962628407a351a6886b95d7115fd77f901ed876033f131d8a112fcbb5a42dfbfa788224867b5d6bc26
data/CHANGELOG.md CHANGED
@@ -13,6 +13,21 @@ Note: These changes are not considered notable:
13
13
 
14
14
  ## [Unreleased]
15
15
 
16
+ ## [5.0.4] - 2024-07-15
17
+ ### Changed
18
+ - Reverted "feat: automatically generated instance_id (#179)" (#185)
19
+
20
+ ## [5.0.3] - 2024-07-10
21
+ ### Fixed
22
+ - Client spec version should be loaded without touching the gemspec
23
+
24
+ ## [5.0.2] - 2024-07-05
25
+ ### Changed
26
+ - metrics data now includes information about the core engine (#178)
27
+ - to_s method on the context object now includes current time (#175)
28
+ - drop support for MRI 2.5 and JRuby 9.2 (#174)
29
+ - current_time property on the context now handles DateTimes as well as strings (#173)
30
+
16
31
  ## [5.0.1] - 2024-03-27
17
32
  ### Changed
18
33
  - make user-agent headers more descriptive (#168)
data/README.md CHANGED
@@ -24,7 +24,7 @@ Leverage the [Unleash Server](https://github.com/Unleash/unleash) for powerful f
24
24
  Add this line to your application's Gemfile:
25
25
 
26
26
  ```ruby
27
- gem 'unleash', '~> 5.0.0'
27
+ gem 'unleash', '~> 5.0.4'
28
28
  ```
29
29
 
30
30
  And then execute:
@@ -1,3 +1,3 @@
1
- require 'rubygems'
2
- gemspec = Gem::Specification.load('unleash-client.gemspec')
3
- puts gemspec.metadata['client-specification-version']
1
+ require_relative 'lib/unleash/spec_version'
2
+
3
+ puts Unleash::CLIENT_SPECIFICATION_VERSION
@@ -3,9 +3,6 @@ require 'tmpdir'
3
3
  require 'unleash/bootstrap/configuration'
4
4
 
5
5
  module Unleash
6
- gemspec = Gem::Specification.load('unleash-client.gemspec')
7
- CLIENT_SPECIFICATION_VERSION = gemspec.metadata['client-specification-version'].freeze
8
-
9
6
  class Configuration
10
7
  attr_accessor \
11
8
  :url,
@@ -0,0 +1,3 @@
1
+ module Unleash
2
+ CLIENT_SPECIFICATION_VERSION = "5.0.2".freeze
3
+ end
@@ -23,7 +23,11 @@ module Unleash
23
23
  end
24
24
 
25
25
  def add(strategy)
26
- @strategies[strategy.name] = strategy
26
+ if default_strategy_names.include?(strategy.name)
27
+ Unleash.logger.error "WARNING: Overriding built in strategy '#{strategy.name}'. OVERIDING BUILT IN STRATEGIES IS \
28
+ DEPRECATED AND WILL BE REMOVED IN A FUTURE RELEASE."
29
+ end
30
+ self.internal_add(strategy)
27
31
  end
28
32
 
29
33
  def []=(key, strategy)
@@ -52,12 +56,20 @@ module Unleash
52
56
  .each do |c|
53
57
  strategy = c.new
54
58
  warn_deprecated_registration(strategy, 'adding custom class into Unleash::Strategy namespace')
55
- self.add(strategy)
59
+ self.internal_add(strategy)
56
60
  end
57
61
  end
58
62
 
59
63
  def register_base_strategies
60
- DEFAULT_STRATEGIES.each{ |c| self.add(c.new) }
64
+ DEFAULT_STRATEGIES.each{ |c| self.internal_add(c.new) }
65
+ end
66
+
67
+ def internal_add(strategy)
68
+ @strategies[strategy.name] = strategy
69
+ end
70
+
71
+ def default_strategy_names
72
+ DEFAULT_STRATEGIES.map{ |strategy_class| strategy_class.new.name }
61
73
  end
62
74
 
63
75
  DEFAULT_STRATEGIES = [
@@ -1,3 +1,3 @@
1
1
  module Unleash
2
- VERSION = "5.0.2".freeze
2
+ VERSION = "5.0.5".freeze
3
3
  end
data/lib/unleash.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'unleash/version'
2
+ require 'unleash/spec_version'
2
3
  require 'unleash/configuration'
3
4
  require 'unleash/strategies'
4
5
  require 'unleash/context'
@@ -31,8 +31,6 @@ Gem::Specification.new do |spec|
31
31
  spec.add_development_dependency "rspec-json_expectations", "~> 2.2"
32
32
  spec.add_development_dependency "webmock", "~> 3.18.1"
33
33
 
34
- spec.metadata["client-specification-version"] = "5.0.2"
35
-
36
34
  # rubocop:disable Gemspec/RubyVersionGlobalsUsage, Style/IfUnlessModifier
37
35
  if Gem::Version.new(RUBY_VERSION) > Gem::Version.new('3.0')
38
36
  spec.add_development_dependency "rubocop", "~> 1.51.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unleash
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 5.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renato Arruda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-05 00:00:00.000000000 Z
11
+ date: 2024-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: murmurhash3
@@ -180,6 +180,7 @@ files:
180
180
  - lib/unleash/metrics.rb
181
181
  - lib/unleash/metrics_reporter.rb
182
182
  - lib/unleash/scheduled_executor.rb
183
+ - lib/unleash/spec_version.rb
183
184
  - lib/unleash/strategies.rb
184
185
  - lib/unleash/strategy/application_hostname.rb
185
186
  - lib/unleash/strategy/base.rb
@@ -201,8 +202,7 @@ files:
201
202
  homepage: https://github.com/unleash/unleash-client-ruby
202
203
  licenses:
203
204
  - Apache-2.0
204
- metadata:
205
- client-specification-version: 5.0.2
205
+ metadata: {}
206
206
  post_install_message:
207
207
  rdoc_options: []
208
208
  require_paths: