devcycle-ruby-server-sdk 2.3.5 → 2.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3c2aaf794a8af5d3292e13a8c38b76e455f5f7c86eeefa4458a8ce16cde6a49
|
4
|
+
data.tar.gz: 244bc6166f3c7e731f0ebd8ec35a6542c6d04249a6404ffc25021c4505a07a7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdb757f3a1587695a4c632c592de1599492faadfcb6218a65bf4d9ef439bb62590d97c9bd0fc5e5a4d9410dab856160d7561e68c33c8623da7ea300838605219
|
7
|
+
data.tar.gz: 5175738e9469f764871e93cb777ce3ec8cec681e2a1a3b5fd5dbdd178478fa9b021a7bbc8541e74defee711f3ed943975c573563c053aae610835f68844be0fd
|
@@ -158,6 +158,17 @@ module DevCycle
|
|
158
158
|
return data, status_code, headers
|
159
159
|
end
|
160
160
|
|
161
|
+
# Get variable value by key for user data
|
162
|
+
# @param user_data [UserData]
|
163
|
+
# @param key [String] Variable key
|
164
|
+
# @param default Default value for variable if none is retrieved
|
165
|
+
# @param [Hash] opts the optional parameters
|
166
|
+
# @return variable value which can be: string, number, boolean, or JSON
|
167
|
+
def variable_value(user_data, key, default, opts = {})
|
168
|
+
variable_obj = variable(user_data, key, default, opts)
|
169
|
+
variable_obj.value
|
170
|
+
end
|
171
|
+
|
161
172
|
# Get variable by key for user data
|
162
173
|
# @param user_data [UserData]
|
163
174
|
# @param key [String] Variable key
|
@@ -60,8 +60,10 @@ describe 'DVCClient' do
|
|
60
60
|
describe 'get_variable_by_key activate-flag' do
|
61
61
|
it 'should work' do
|
62
62
|
result = @api_instance.variable(@user_data, "activate-flag", false)
|
63
|
-
|
64
63
|
expect(result.isDefaulted).to eq true
|
64
|
+
|
65
|
+
result = @api_instance.variable_value(@user_data, "activate-flag", true)
|
66
|
+
expect(result).to eq true
|
65
67
|
end
|
66
68
|
end
|
67
69
|
|
@@ -74,9 +76,11 @@ describe 'DVCClient' do
|
|
74
76
|
describe 'get_variable_by_key test' do
|
75
77
|
it 'should work' do
|
76
78
|
result = @api_instance.variable(@user_data, "test", false)
|
77
|
-
|
78
79
|
expect(result.isDefaulted).to eq false
|
79
80
|
expect(result.value).to eq true
|
81
|
+
|
82
|
+
result = @api_instance.variable_value(@user_data, "test", true)
|
83
|
+
expect(result).to eq true
|
80
84
|
end
|
81
85
|
end
|
82
86
|
|
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: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DevCycleHQ
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -165,7 +165,7 @@ homepage: https://devcycle.com
|
|
165
165
|
licenses:
|
166
166
|
- MIT
|
167
167
|
metadata: {}
|
168
|
-
post_install_message:
|
168
|
+
post_install_message:
|
169
169
|
rdoc_options: []
|
170
170
|
require_paths:
|
171
171
|
- lib
|
@@ -180,8 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
|
-
rubygems_version: 3.
|
184
|
-
signing_key:
|
183
|
+
rubygems_version: 3.4.10
|
184
|
+
signing_key:
|
185
185
|
specification_version: 4
|
186
186
|
summary: DevCycle Bucketing API Ruby Gem
|
187
187
|
test_files:
|