unleash 6.0.8 → 6.0.10

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: 795f2cdeba55d85baf94fee834f6b762b0604a791af36544c475dc36904216e2
4
- data.tar.gz: e8ba0c478e30176ca081fbdee4eb4d404bf104f23b4616bae55b8b131bd0025d
3
+ metadata.gz: 5a23662fb04c5a20dc6e463557eb69b6de11fcc1366517e8e29f58197b1bcc06
4
+ data.tar.gz: c49a8688177f6cf8b1c5bac670eeb7ea99b2c3722d483cf6c7e497ece05d38bc
5
5
  SHA512:
6
- metadata.gz: 1bda530824a27a3feffa74649f70b3b416e5fac2f986f44b9eacaca85d5e705fa0ecbcd199272589e7e1ba79be3a04d18ef9912beee163777e3d393937696711
7
- data.tar.gz: 4aa0ff5d8adfa74442e75f585394443132e662e135fcac865c1324f05bc9e76cf60c9d470ecf35e028afe945186e8757bd997036f75fac7f2e38d6ee5097f52c
6
+ metadata.gz: 36055d7ac9511cb35a299350ae80f094c97f3fe8121699bda8f94142383af27442bf89b232c745e9b86074770dd9f235d361479974b6f62bae9b4ea2fe421af2
7
+ data.tar.gz: 5b18ad9294bdd8d037ee40effe51ccb49599aadcdf9659b113bb4fb01ee922a6483af155ecf6a6c25ebb9c63783aabfbc95fb0011673f65554a04f35343ea3a9
data/CHANGELOG.md CHANGED
@@ -13,6 +13,18 @@ Note: These changes are not considered notable:
13
13
 
14
14
  ## [Unreleased]
15
15
 
16
+ ## [6.0.10] - 2024-12-19
17
+ ### Fixed
18
+ - Fixed an edge case issue where the client was failing to send metrics after 10 minutes of not having metrics (#219)
19
+
20
+ ## [6.0.9] - 2024-11-21
21
+ ### Fixed
22
+ - Fixed an issue where the server not sending the encoding would break file saving (#215)
23
+
24
+ ## [6.0.8] - 2024-11-13
25
+ ### Fixed
26
+ - Fixed an issue where the SDK running on aarch64 wouldn't load the binary correctly
27
+
16
28
  ## [6.0.7] - 2024-10-24
17
29
  #### Fixed
18
30
  - Context object correctly dumps to JSON
data/README.md CHANGED
@@ -25,7 +25,7 @@ Ruby client for the [Unleash](https://github.com/Unleash/unleash) feature manage
25
25
  Add this line to your application's Gemfile:
26
26
 
27
27
  ```ruby
28
- gem 'unleash', '~> 6.0.7'
28
+ gem 'unleash', '~> 6.0.10'
29
29
  ```
30
30
 
31
31
  And then execute:
@@ -534,7 +534,7 @@ end
534
534
  ## Development
535
535
 
536
536
  After checking out the repo, run `bin/setup` to install dependencies.
537
- Then, run `rake spec` to run the tests.
537
+ Then, run `bundle exec rake spec` to run the tests.
538
538
  You can also run `bin/console` for an interactive prompt that will allow you to experiment.
539
539
 
540
540
  This SDK is also built against the Unleash Client Specification tests.
@@ -542,7 +542,7 @@ To run the Ruby SDK against this test suite, you'll need to have a copy on your
542
542
 
543
543
  `git clone --branch v$(ruby echo_client_spec_version.rb) https://github.com/Unleash/client-specification.git`
544
544
 
545
- After doing this, `rake spec` will also run the client specification tests.
545
+ After doing this, `bundle exec rake spec` will also run the client specification tests.
546
546
 
547
547
  To install this gem onto your local machine, run `bundle exec rake install`.
548
548
 
@@ -15,7 +15,6 @@ module Unleash
15
15
 
16
16
  def generate_report
17
17
  metrics = Unleash&.engine&.get_metrics()
18
- return nil if metrics.nil? || metrics.empty?
19
18
 
20
19
  {
21
20
  'platformName': RUBY_ENGINE,
@@ -24,21 +23,21 @@ module Unleash
24
23
  'specVersion': Unleash::CLIENT_SPECIFICATION_VERSION,
25
24
  'appName': Unleash.configuration.app_name,
26
25
  'instanceId': Unleash.configuration.instance_id,
27
- 'bucket': metrics
26
+ 'bucket': metrics || {}
28
27
  }
29
28
  end
30
29
 
31
30
  def post
32
31
  Unleash.logger.debug "post() Report"
33
32
 
34
- bucket = self.generate_report
35
- if bucket.nil? && (Time.now - self.last_time < LONGEST_WITHOUT_A_REPORT) # and last time is less then 10 minutes...
36
- Unleash.logger.debug "Report not posted to server, as it would have been empty. (and has been empty for up to 10 min)"
33
+ report = self.generate_report
37
34
 
35
+ if report[:bucket].empty? && (Time.now - self.last_time < LONGEST_WITHOUT_A_REPORT) # and last time is less then 10 minutes...
36
+ Unleash.logger.debug "Report not posted to server, as it would have been empty. (and has been empty for up to 10 min)"
38
37
  return
39
38
  end
40
39
 
41
- response = Unleash::Util::Http.post(Unleash.configuration.client_metrics_uri, bucket.to_json)
40
+ response = Unleash::Util::Http.post(Unleash.configuration.client_metrics_uri, report.to_json)
42
41
 
43
42
  if ['200', '202'].include? response.code
44
43
  Unleash.logger.debug "Report sent to unleash server successfully. Server responded with http code #{response.code}"
@@ -24,6 +24,7 @@ module Unleash
24
24
  def self.http_connection(uri)
25
25
  http = Net::HTTP.new(uri.host, uri.port)
26
26
  http.use_ssl = true if uri.scheme == 'https'
27
+ http.response_body_encoding = 'UTF-8' if http.respond_to?(:response_body_encoding=)
27
28
  http.open_timeout = Unleash.configuration.timeout # in seconds
28
29
  http.read_timeout = Unleash.configuration.timeout # in seconds
29
30
 
@@ -1,3 +1,3 @@
1
1
  module Unleash
2
- VERSION = "6.0.8".freeze
2
+ VERSION = "6.0.10".freeze
3
3
  end
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: 6.0.8
4
+ version: 6.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renato Arruda
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-13 00:00:00.000000000 Z
11
+ date: 2024-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yggdrasil-engine
@@ -188,7 +188,7 @@ homepage: https://github.com/unleash/unleash-client-ruby
188
188
  licenses:
189
189
  - Apache-2.0
190
190
  metadata: {}
191
- post_install_message:
191
+ post_install_message:
192
192
  rdoc_options: []
193
193
  require_paths:
194
194
  - lib
@@ -203,8 +203,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  - !ruby/object:Gem::Version
204
204
  version: '0'
205
205
  requirements: []
206
- rubygems_version: 3.5.6
207
- signing_key:
206
+ rubygems_version: 3.4.20
207
+ signing_key:
208
208
  specification_version: 4
209
209
  summary: Unleash feature toggle client.
210
210
  test_files: []