sdk-reforge 1.9.2 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/README.md +4 -4
- data/VERSION +1 -1
- data/lib/reforge/client.rb +0 -4
- data/lib/reforge/errors/invalid_sdk_key_error.rb +1 -1
- data/lib/reforge/options.rb +2 -2
- data/lib/reforge/reforge.rb +1 -1
- data/lib/reforge/sse_config_client.rb +2 -1
- data/sdk-reforge.gemspec +2 -2
- data/test/support/common_helpers.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8f8071f99c74c0f8b10bebefcb3a15042b2276797e3696be3e8dbf16b0ce446
|
4
|
+
data.tar.gz: d51548a473a3fced6a34ca2f66453572c11c376c209178a5bdcfc3c3581a92b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92a6bbc060c11f39c99c28d6b5577049a8b7a379d6edf29408bdd40a5d78c9c6527922bc62970127cff4d3ad6373109672e4305229f0edd155aaaf5b75debc78
|
7
|
+
data.tar.gz: 4ce7e08d5789756af12148ef0921674f8c5d1bebca92b33100c888d0ee646a87de47fa5ca68a50b0543b76dab69a054eb81bc244bf64e70cda3197fae17544b9
|
data/.github/workflows/ruby.yml
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Ruby Client for Reforge Feature Flags and Config as a Service: https://launch.reforge.com
|
4
4
|
|
5
5
|
```ruby
|
6
|
-
|
6
|
+
Reforge.init
|
7
7
|
|
8
8
|
context = {
|
9
9
|
user: {
|
@@ -14,12 +14,12 @@ context = {
|
|
14
14
|
}
|
15
15
|
}
|
16
16
|
|
17
|
-
result =
|
17
|
+
result = Reforge.enabled? "my-first-feature-flag", context
|
18
18
|
|
19
19
|
puts "my-first-feature-flag is: #{result}"
|
20
20
|
```
|
21
21
|
|
22
|
-
See full documentation https://docs.
|
22
|
+
See full documentation https://docs.reforge.com/docs/sdks/ruby
|
23
23
|
|
24
24
|
## Supports
|
25
25
|
|
@@ -47,7 +47,7 @@ Many ruby web servers fork. When the process is forked, the current realtime upd
|
|
47
47
|
|
48
48
|
```ruby
|
49
49
|
#config/application.rb
|
50
|
-
|
50
|
+
Reforge.init # reads REFORGE_BACKEND_SDK_KEY env var by default
|
51
51
|
```
|
52
52
|
|
53
53
|
```ruby
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.10.0
|
data/lib/reforge/client.rb
CHANGED
@@ -5,7 +5,7 @@ module Reforge
|
|
5
5
|
class InvalidSdkKeyError < Reforge::Error
|
6
6
|
def initialize(key)
|
7
7
|
if key.nil? || key.empty?
|
8
|
-
message = 'No SDK key. Set
|
8
|
+
message = 'No SDK key. Set REFORGE_BACKEND_SDK_KEY env var or use REFORGE_DATAFILE'
|
9
9
|
|
10
10
|
super(message)
|
11
11
|
else
|
data/lib/reforge/options.rb
CHANGED
@@ -46,7 +46,7 @@ module Reforge
|
|
46
46
|
|
47
47
|
private def init(
|
48
48
|
sources: nil,
|
49
|
-
sdk_key: ENV['
|
49
|
+
sdk_key: ENV['REFORGE_BACKEND_SDK_KEY'] || ENV['PREFAB_API_KEY'],
|
50
50
|
namespace: '',
|
51
51
|
reforge_api_url: nil,
|
52
52
|
on_no_default: ON_NO_DEFAULT::RAISE, # options :raise, :warn_and_return_nil,
|
@@ -61,7 +61,7 @@ module Reforge
|
|
61
61
|
collect_evaluation_summaries: true,
|
62
62
|
collect_max_evaluation_summaries: DEFAULT_MAX_EVAL_SUMMARIES,
|
63
63
|
allow_telemetry_in_local_mode: false,
|
64
|
-
datafile: ENV['PREFAB_DATAFILE'],
|
64
|
+
datafile: ENV['REFORGE_DATAFILE'] || ENV['PREFAB_DATAFILE'],
|
65
65
|
x_datafile: nil, # DEPRECATED in favor of `datafile`
|
66
66
|
x_use_local_cache: false,
|
67
67
|
symbolize_json_names: false,
|
data/lib/reforge/reforge.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
require 'base64'
|
2
3
|
|
3
4
|
module Reforge
|
4
|
-
class SSEConfigClient
|
5
|
+
class SSEConfigClient
|
5
6
|
class Options
|
6
7
|
attr_reader :sse_read_timeout, :seconds_between_new_connection,
|
7
8
|
:sse_default_reconnect_time, :sleep_delay_for_new_connection_check,
|
data/sdk-reforge.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
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: sdk-reforge 1.
|
5
|
+
# stub: sdk-reforge 1.10.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "sdk-reforge".freeze
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.10.0"
|
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]
|
@@ -102,7 +102,7 @@ module CommonHelpers
|
|
102
102
|
|
103
103
|
FakeResponse = Struct.new(:status, :body)
|
104
104
|
|
105
|
-
def wait_for(condition, max_wait:
|
105
|
+
def wait_for(condition, max_wait: 10, sleep_time: 0.01)
|
106
106
|
wait_time = 0
|
107
107
|
while !condition.call
|
108
108
|
wait_time += sleep_time
|