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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e7cf6a2e747363e5138b7ab814ff5418b8db4c6329759cddd2b28354bb0a3d9
4
- data.tar.gz: 19c4d6025f3f7978a587ddbc7991511252f69b1a19bd5332c74e549d621502b7
3
+ metadata.gz: b37103165cc47272d718527f01a20fd41e5a4fa851329a1b9ae472d04c561e87
4
+ data.tar.gz: dc33b920301e236e1f4829c3c5b2bfa811c4c7649146d59719aefb81111bded1
5
5
  SHA512:
6
- metadata.gz: 89a5f8636db3ba8f8f969d27c6e91f7c5aef981fda41d884ce83573361e48dfbeecaac2c97509d9359ea2e875dfb1649eea67e2d736ddac380e47efcd068db8e
7
- data.tar.gz: e9b8780ed334ea5a82f15fae0915c11c88c95dcb5c291d720666c20b14bd180a8150dc980e261537c1240d726d0300b187f384f78038b58059c80e3f0e1286b2
6
+ metadata.gz: bd9a35095127bfd7e51a9af0894b7d0244e9d8f494566a85b95b71179c1090f79cf4d757d427a98553aaccbc90bbcb1cd8606f0001b3b09f36dedc3629286588
7
+ data.tar.gz: 5ca612fe98bad4539f5b5d87ac1b3512d0eca2fbb285a3482d5675c1b4cfd52643bd94ff3dbebca585cf5f288e8bb08d7bee5ccee869b45d27e44c08bd472116
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devcycle-ruby-server-sdk (1.1.0)
4
+ devcycle-ruby-server-sdk (1.2.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- devcycle-ruby-server-sdk (1.0.0)
4
+ devcycle-ruby-server-sdk (1.2.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -12,6 +12,7 @@ DevCycle.configure do |config|
12
12
  # Configure API key authorization: bearerAuth
13
13
  config.api_key['bearerAuth'] = token
14
14
  # config.debugging = true
15
+ config.enable_edge_db = false
15
16
  end
16
17
 
17
18
  api_instance = DevCycle::DVCClient.new
@@ -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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.3.0
11
11
  =end
12
12
 
13
13
  module DevCycle
14
- VERSION = '1.1.1'
14
+ VERSION = '1.2.0'
15
15
  end
@@ -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.1.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-13 00:00:00.000000000 Z
11
+ date: 2022-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus