prefab-cloud-ruby 1.8.0 → 1.8.1

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: 9cc77b24b0cabb61c5ffb820116e8cf1a5122ceb4fae6e0d56245be4ab165eb9
4
- data.tar.gz: 11e541dfe23555733292de53b1d3193291b81dd412cea70e6126b0c042f52f12
3
+ metadata.gz: b8b27e64dfd37c521a1d0397cbfa40d0f3c1ce5d1f42e339b116cfb4da7c9f58
4
+ data.tar.gz: 9b4f432823d5653b73cd6f33ccf0a6630f0d69d6ba7ea6e9155254ca3da3e26e
5
5
  SHA512:
6
- metadata.gz: 795e04559f5dab867e30ba1ce58a622c4c651b7214a1dcfadde0d8fcac1825c88699b019fc36a1a88cd56a94dc89fb9564d773262b4a0e4d07247c5bc60a1cd4
7
- data.tar.gz: 2e4718e509231db718a65e18d766a7d481b72e344c9d73d766a17fbe91619a30694799b622a0fdbc419f440c93a449abb1fdc00dfb58ea75c0c5387f190df23e
6
+ metadata.gz: df2e756faf5af90410e442d87d861ee5d6507fb9dd681201bb2c56418f8ddc662cb87d100dde617a501c563a04452d8f712e56ea784a94bc2a67c380a992dfc5
7
+ data.tar.gz: 2883ed43fb3c579d60efed468c7011ac6a76eb40e2f58737b5f8a7525c337ee5cbbbdbc0b5e3cad160e15c0c13c62ae22cdf1bd14827515f58347e5f13b4aa3b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.8.1 - 2024-09-03
4
+
5
+ - Fix SSE reconnection bug (#197)
6
+
3
7
  ## 1.8.0 - 2024-08-22
4
8
 
5
9
  - Load config from belt and failover to suspenders (#195)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.0
1
+ 1.8.1
data/dev/console CHANGED
@@ -17,5 +17,11 @@ spec.require_paths.each do |path|
17
17
  require "./lib/prefab-cloud-ruby"
18
18
  end
19
19
 
20
+ SemanticLogger.add_appender(io: $stdout)
21
+
22
+ if !ENV['PREFAB_LOG_CLIENT_BOOTSTRAP_LOG_LEVEL']
23
+ puts "run with PREFAB_LOG_CLIENT_BOOTSTRAP_LOG_LEVEL=debug (or trace) for more output"
24
+ end
25
+
20
26
  # Start an IRB session
21
27
  IRB.start(__FILE__)
@@ -2,7 +2,8 @@ module Prefab
2
2
  class InternalLogger < SemanticLogger::Logger
3
3
 
4
4
  def initialize(klass)
5
- super(klass, :warn)
5
+ default_level = ENV['PREFAB_LOG_CLIENT_BOOTSTRAP_LOG_LEVEL'] ? ENV['PREFAB_LOG_CLIENT_BOOTSTRAP_LOG_LEVEL'].downcase.to_sym : :warn
6
+ super(klass, default_level)
6
7
  instances << self
7
8
  end
8
9
 
@@ -37,7 +37,7 @@ module Prefab
37
37
 
38
38
  if closed_count > SECONDS_BETWEEN_RECONNECT
39
39
  closed_count = 0
40
- connect(&load_configs)
40
+ @client = connect(&load_configs)
41
41
  end
42
42
  end
43
43
  end
@@ -58,9 +58,10 @@ module Prefab
58
58
  end
59
59
 
60
60
  client.on_error do |error|
61
- LOG.error "SSE Streaming Error: #{error} for url #{url}"
61
+ LOG.error "SSE Streaming Error: #{error.inspect} for url #{url}"
62
62
 
63
63
  if error.is_a?(HTTP::ConnectionError)
64
+ LOG.debug "Closing SSE connection for url #{url}"
64
65
  client.close
65
66
  end
66
67
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: prefab-cloud-ruby 1.8.0 ruby lib
5
+ # stub: prefab-cloud-ruby 1.8.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "prefab-cloud-ruby".freeze
9
- s.version = "1.8.0"
9
+ s.version = "1.8.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Jeff Dwyer".freeze]
14
- s.date = "2024-08-22"
14
+ s.date = "2024-09-03"
15
15
  s.description = "Feature Flags, Live Config, and Dynamic Log Levels as a service".freeze
16
16
  s.email = "jdwyer@prefab.cloud".freeze
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prefab-cloud-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Dwyer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-22 00:00:00.000000000 Z
11
+ date: 2024-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby