devcycle-ruby-server-sdk 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/examples/sinatra/Gemfile.lock +1 -1
- data/examples/sinatra/app.rb +1 -0
- data/lib/devcycle-ruby-server-sdk/api_client.rb +4 -0
- data/lib/devcycle-ruby-server-sdk/configuration.rb +11 -0
- data/lib/devcycle-ruby-server-sdk/version.rb +1 -1
- data/spec/api_client_spec.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b37103165cc47272d718527f01a20fd41e5a4fa851329a1b9ae472d04c561e87
|
4
|
+
data.tar.gz: dc33b920301e236e1f4829c3c5b2bfa811c4c7649146d59719aefb81111bded1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd9a35095127bfd7e51a9af0894b7d0244e9d8f494566a85b95b71179c1090f79cf4d757d427a98553aaccbc90bbcb1cd8606f0001b3b09f36dedc3629286588
|
7
|
+
data.tar.gz: 5ca612fe98bad4539f5b5d87ac1b3512d0eca2fbb285a3482d5675c1b4cfd52643bd94ff3dbebca585cf5f288e8bb08d7bee5ccee869b45d27e44c08bd472116
|
data/Gemfile.lock
CHANGED
data/examples/sinatra/app.rb
CHANGED
@@ -94,6 +94,10 @@ module DevCycle
|
|
94
94
|
query_params = opts[:query_params] || {}
|
95
95
|
form_params = opts[:form_params] || {}
|
96
96
|
|
97
|
+
if @config.enable_edge_db
|
98
|
+
query_params.store("enableEdgeDB", true)
|
99
|
+
end
|
100
|
+
|
97
101
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
98
102
|
|
99
103
|
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
@@ -137,6 +137,10 @@ module DevCycle
|
|
137
137
|
|
138
138
|
attr_accessor :force_ending_format
|
139
139
|
|
140
|
+
# Define if EdgeDB is Enabled (Boolean)
|
141
|
+
# Default to false
|
142
|
+
attr_accessor :enable_edge_db
|
143
|
+
|
140
144
|
def initialize
|
141
145
|
@scheme = 'https'
|
142
146
|
@host = 'bucketing-api.devcycle.com'
|
@@ -158,6 +162,7 @@ module DevCycle
|
|
158
162
|
@inject_format = false
|
159
163
|
@force_ending_format = false
|
160
164
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
165
|
+
@enable_edge_db = false
|
161
166
|
|
162
167
|
yield(self) if block_given?
|
163
168
|
end
|
@@ -274,5 +279,11 @@ module DevCycle
|
|
274
279
|
url
|
275
280
|
end
|
276
281
|
|
282
|
+
def enable_edge_db=(enable_edge_db = false)
|
283
|
+
if(enable_edge_db)
|
284
|
+
@enable_edge_db = true
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
277
288
|
end
|
278
289
|
end
|
data/spec/api_client_spec.rb
CHANGED
@@ -49,6 +49,23 @@ describe DevCycle::ApiClient do
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
52
|
+
|
53
|
+
context 'Enabled Edge DB' do
|
54
|
+
it 'defaults the enable_edge_db value to false when no value is provided' do
|
55
|
+
DevCycle.configure { }
|
56
|
+
expect(DevCycle::Configuration.default.enable_edge_db).to eq(false)
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'sets the enable_edge_db value to false when false is provided' do
|
60
|
+
DevCycle.configure { |c| c.enable_edge_db = false }
|
61
|
+
expect(DevCycle::Configuration.default.enable_edge_db).to eq(false)
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'sets the enable_edge_db value to true when true is provided' do
|
65
|
+
DevCycle.configure { |c| c.enable_edge_db = true }
|
66
|
+
expect(DevCycle::Configuration.default.enable_edge_db).to eq(true)
|
67
|
+
end
|
68
|
+
end
|
52
69
|
end
|
53
70
|
|
54
71
|
describe 'params_encoding in #build_request' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devcycle-ruby-server-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DevCycleHQ
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|