launchdarkly_api_helper 0.3.0 → 0.5.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: b32c8619c0d002bd0974ae86f4172b4caa5733633919373d74956df9016a02f8
|
4
|
+
data.tar.gz: aa4328e4904f808b0588c02ecaf04068cc2a6d6a523500dd56a9acda0d872efd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f411f430c4c844dbb4845d678ab77d0fffbc1a0f34cec14246de70e80d1f8ab787e6e3497678abaf85fb1fea61e3f6a296f7f8892f597864724d40ab13190542
|
7
|
+
data.tar.gz: f851657526a6d3efb998159ef78920882dedfab9f71bdd10597c0db0fe49a3885cdfc5b963ac6e244a32a074ddad0112904ad7199e9f6912f4967b917748f234
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
# LaunchdarklyApiHelper
|
1
|
+
# LaunchdarklyApiHelper ![alt_text](https://badge.fury.io/rb/launchdarkly_api_helper.svg)
|
2
2
|
|
3
|
-
|
3
|
+
[LaunchDarklyApiHelper](https://rubygems.org/gems/launchdarkly_api_helper) provides you a way to access your [Launch Darkly](https://apidocs.launchdarkly.com/) account using [API token](https://app.launchdarkly.com/settings/authorization/tokens/new) to view, edit or delete them accordingly.
|
4
4
|
|
5
|
-
|
5
|
+
![alt text](https://docs.launchdarkly.com/static/de107a76f0cd388da14d5bd650ec1f5c/b8471/settings-access-tokens-obscured-callout.png)
|
6
|
+
|
7
|
+
[Launch Darkly API Documentation](https://apidocs.launchdarkly.com/)
|
6
8
|
|
7
9
|
## Installation
|
8
10
|
|
@@ -16,7 +18,289 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
16
18
|
|
17
19
|
## Usage
|
18
20
|
|
19
|
-
|
21
|
+
add `require 'launchdarkly_api_helper'` line at the beginning of your Ruby file
|
22
|
+
|
23
|
+
add `include LaunchdarklyApiHelper` line to access LaunchdarklyApiHelper module in gem _launchdarkly_api_helper_
|
24
|
+
|
25
|
+
To perform any operations such as add, remove, replace, move, copy, test you should have a working knowledge of [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902)
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
parameters:
|
29
|
+
access_token (*required): this token will be used to send all requests to LaunchDarkly (string)
|
30
|
+
project_name: provide project name of your organistaion (NOTE: for most, it should be `default` unless you have made some explicit changes)
|
31
|
+
log_file: all logs will be written to file 'launchdarkly.log' by default if no file name specified (string)
|
32
|
+
|
33
|
+
# set your LD API token and log file to capture logs
|
34
|
+
def ld_access_token(access_token, project_name = 'default', log_file = 'launchdarkly.log')
|
35
|
+
# code ...
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
[Get feature flag](https://apidocs.launchdarkly.com/tag/Feature-flags#operation/getFeatureFlag)
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
GET REQUEST
|
43
|
+
https://app.launchdarkly.com/api/v2/flags/default/developer_flag_for_regression
|
44
|
+
|
45
|
+
Here, 'developer_flag_for_regression' is the feature flag name and `default` is our Project name - eg. AmitSinghBisht
|
46
|
+
By default, this returns the configurations for all environments
|
47
|
+
You can filter environments with the env query parameter. For example, setting env=staging restricts the returned configurations to just the staging environment
|
48
|
+
https://app.launchdarkly.com/api/v2/flags/default/developer_flag_for_regression?env=staging
|
49
|
+
|
50
|
+
parameters:
|
51
|
+
env (*required): name of the environment for which you want to get the details (string)
|
52
|
+
flag (*required): name of the feature flag for which you want to get the details (string)
|
53
|
+
|
54
|
+
# this method will give you entire details about a flag for that particular environment
|
55
|
+
def ld_fetch_flag_details(env, flag)
|
56
|
+
# code ...
|
57
|
+
end
|
58
|
+
|
59
|
+
@return parameter: (response of feature flag details)
|
60
|
+
response = "https://app.launchdarkly.com/api/v2/flags/default/#{flag}?env=#{env}" (string)
|
61
|
+
```
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
Get toggle status feature flag
|
65
|
+
|
66
|
+
parameters:
|
67
|
+
env (*required): name of the environment for which you want to get the details (string)
|
68
|
+
flag (*required): name of the feature flag for which you want to get the details (string)
|
69
|
+
|
70
|
+
# this method will return the status of the flag, whether it is on or off viz set to true or false
|
71
|
+
def ld_fetch_flag_toggle_status(env, flag)
|
72
|
+
# code ...
|
73
|
+
end
|
74
|
+
|
75
|
+
@return parameter: (response of feature flag toggle status)
|
76
|
+
response = "https://app.launchdarkly.com/api/v2/flags/default/#{flag}?env=#{env}"
|
77
|
+
response['environments'][env]['on'] (boolean)
|
78
|
+
```
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
Create a feature flag
|
82
|
+
https://apidocs.launchdarkly.com/tag/Feature-flags/#operation/postFeatureFlag
|
83
|
+
|
84
|
+
POST REQUEST
|
85
|
+
https://app.launchdarkly.com/api/v2/flags/default
|
86
|
+
|
87
|
+
Here, default is our Project name - eg. AmitSinghBisht
|
88
|
+
|
89
|
+
parameters:
|
90
|
+
key (*required): A unique key used to reference the feature flag in your code (string)
|
91
|
+
name (*required): A human-friendly name for the feature flag (string)
|
92
|
+
description: Description of the feature flag. Defaults to an empty string (string)
|
93
|
+
tags: Tags for the feature flag. Defaults to an empty array (Array of strings)
|
94
|
+
variations: An array of possible variations for the flag. The variation values must be unique. If omitted, two boolean variations of true and false will be used (Array of objects)
|
95
|
+
|
96
|
+
defaults
|
97
|
+
* onVariation (*required): The index, from the array of variations for this flag, of the variation to serve by default when targeting is on (integer)
|
98
|
+
* offVariation (*required): The index, from the array of variations for this flag, of the variation to serve by default when targeting is off (integer)
|
99
|
+
|
100
|
+
{
|
101
|
+
"key": "developer_flag_for_regression",
|
102
|
+
"name": "developer_flag_for_regression",
|
103
|
+
"description": "developer_flag_for_regression is created via regression api on 18_10_2022",
|
104
|
+
"tags": [
|
105
|
+
"created_via_regression_api_on_18_10_2022"
|
106
|
+
],
|
107
|
+
"variations": [
|
108
|
+
{
|
109
|
+
"age": 10
|
110
|
+
},
|
111
|
+
{
|
112
|
+
"age": 20
|
113
|
+
}
|
114
|
+
],
|
115
|
+
"defaults": {
|
116
|
+
"onVariation": 1,
|
117
|
+
"offVariation": 0
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
Above code will create a key 'developer_flag_for_regression' with name as 'developer_flag_for_regression' and description as 'developer_flag_for_regression is created via regression api on 18_10_2022'
|
122
|
+
|
123
|
+
Variations are provided while creating key, by default variation is a boolean value (true and false). once flag with a specific variation is created, its type cannot be modified later, hence choose your variation type smartly (Boolean, String, Number, JSON) In above example we are creating a flag with JSON type and its two values are 'age': 10 and 'age': 20
|
124
|
+
|
125
|
+
Also, variation has by default two values, and you must also define two variations while creating your own custom feature flag
|
126
|
+
|
127
|
+
Default will specify which variation to serve when flag is on or off. In above example when flag is turned on, '1' variation is served [Note: 0 and 1 are index position], so variations at first index ie variations[1] will be served when flag is turned on ie 'age': 20
|
128
|
+
|
129
|
+
# this method will create a new feature flag, NOTE: feature falg are created at global level and environment resides inside feature flag
|
130
|
+
def ld_create_flag(key, name = key, description = key, tags = ['created_via_regression_api'])
|
131
|
+
# code ...
|
132
|
+
end
|
133
|
+
```
|
134
|
+
|
135
|
+
```ruby
|
136
|
+
Update feature flag
|
137
|
+
https://apidocs.launchdarkly.com/tag/Feature-flags#operation/patchFeatureFlag
|
138
|
+
|
139
|
+
PATCH REQUEST
|
140
|
+
https://app.launchdarkly.com/api/v2/flags/default/developer_flag_for_regression
|
141
|
+
|
142
|
+
Here, 'developer_flag_for_regression' is the flag key and `default` is our Project name - eg. AmitSinghBisht
|
143
|
+
You can update any parameter of feature flag using this method
|
144
|
+
|
145
|
+
parameters:
|
146
|
+
env (*required): name of the environment for which you want to get the details (string)
|
147
|
+
flag (*required): name of the feature flag for which you want to get the details (string)
|
148
|
+
flag_value: status of the feature flag that you want to set either on (true) or off (false) (boolean)
|
149
|
+
|
150
|
+
# this method will be used to toggle status of feature flag either on / off for a particular environment
|
151
|
+
def ld_toggle_specific_environment(env, flag, flag_value = true)
|
152
|
+
# code ...
|
153
|
+
end
|
154
|
+
|
155
|
+
@return parameter: (response of feature flag toggle status)
|
156
|
+
response = "https://app.launchdarkly.com/api/v2/flags/default/#{flag}?env=#{env}"
|
157
|
+
response['environments'][env]['on'] (boolean)
|
158
|
+
```
|
159
|
+
|
160
|
+
```ruby
|
161
|
+
Get status of feature flag
|
162
|
+
https://apidocs.launchdarkly.com/tag/Feature-flags#operation/patchFeatureFlag
|
163
|
+
|
164
|
+
parameters:
|
165
|
+
env (*required): name of the environment for which you want to get the details (string)
|
166
|
+
flag (*required): name of the feature flag for which you want to get the details (string)
|
167
|
+
|
168
|
+
# this method will get important parameters from the response
|
169
|
+
def flag_variation_served(env, flag)
|
170
|
+
# code ...
|
171
|
+
end
|
172
|
+
|
173
|
+
@returns: [fetch_flag_toggle_status_response, feature_flag_variation_index_response, feature_flag_variation_value_response, feature_flag_variation_name_response]
|
174
|
+
@return parameter:
|
175
|
+
response = "https://app.launchdarkly.com/api/v2/flags/default/#{flag}?env=#{env}"
|
176
|
+
fetch_flag_toggle_status_response: response['environments'][env]['on'] (boolean)
|
177
|
+
feature_flag_variation_index_response: response (integer)
|
178
|
+
feature_flag_variation_value_response: response['variations'][feature_flag_variation_index_response]['value'] (string)
|
179
|
+
feature_flag_variation_name_response: response['variations'][feature_flag_variation_index_response]['name'] (string)
|
180
|
+
```
|
181
|
+
|
182
|
+
```ruby
|
183
|
+
|
184
|
+
"rules": [
|
185
|
+
{ # rules/0
|
186
|
+
"variation": 0,
|
187
|
+
"clauses": [
|
188
|
+
{ # rules/0/clauses/0
|
189
|
+
"attribute": "groups",
|
190
|
+
"op": "in",
|
191
|
+
"values": ["Top Customers"],
|
192
|
+
"negate": false
|
193
|
+
},
|
194
|
+
{ # rules/0/clauses/1
|
195
|
+
"attribute": "email",
|
196
|
+
"op": "endsWith",
|
197
|
+
"values": ["gmail.com"],
|
198
|
+
"negate": false
|
199
|
+
}
|
200
|
+
]
|
201
|
+
},
|
202
|
+
{ # rules/1
|
203
|
+
"variation": 1,
|
204
|
+
"clauses": [
|
205
|
+
{ # rules/1/clauses/0
|
206
|
+
"attribute": "country",
|
207
|
+
"op": "in",
|
208
|
+
"values": [
|
209
|
+
"in", # rules/1/clauses/0/values/0
|
210
|
+
"eu" # rules/1/clauses/0/values/1
|
211
|
+
],
|
212
|
+
"negate": false
|
213
|
+
}
|
214
|
+
]
|
215
|
+
}
|
216
|
+
]
|
217
|
+
|
218
|
+
parameters:
|
219
|
+
env (*required): name of the environment for which you want to get the details (string)
|
220
|
+
flag (*required): name of the feature flag for which you want to get the details (string)
|
221
|
+
clause_name (*required): name of clause that you want to search for in response
|
222
|
+
|
223
|
+
# this method will return the index of rules and clauses by searching for clause_name in response
|
224
|
+
def ld_rules_clauses_index(env, flag, clause_name)
|
225
|
+
# code ...
|
226
|
+
end
|
227
|
+
|
228
|
+
@returns: [rule_at_index, clause_at_index]
|
229
|
+
@return parameter:
|
230
|
+
response = "https://app.launchdarkly.com/api/v2/flags/default/#{flag}?env=#{env}" ['environments'][env]['rules']
|
231
|
+
rule_at_index = response[rule_index] (integer) # index at which rule is found
|
232
|
+
clause_at_index = response[rule_index]['clauses'][clause_index] (integer) # index at which clause is found
|
233
|
+
```
|
234
|
+
|
235
|
+
```ruby
|
236
|
+
parameters:
|
237
|
+
env (*required): name of the environment for which you want to get the details (string)
|
238
|
+
flag (*required): name of the feature flag for which you want to get the details (string)
|
239
|
+
clause_name (*required): name of clause that you want to search for in response
|
240
|
+
|
241
|
+
# this method will return values inside a particular clause by searching for clause_name in response
|
242
|
+
def ld_get_values_from_clauses(env, flag, clause_name)
|
243
|
+
# code ...
|
244
|
+
end
|
245
|
+
|
246
|
+
@return parameter: values_for_clause_name
|
247
|
+
response = "https://app.launchdarkly.com/api/v2/flags/default/#{flag}?env=#{env}" ['environments'][env]['rules']
|
248
|
+
values_for_clause_name = response[rule_at_index]['clauses'][clause_at_index]['values'] (string)
|
249
|
+
```
|
250
|
+
|
251
|
+
```ruby
|
252
|
+
parameters:
|
253
|
+
env (*required): name of the environment for which you want to get the details (string)
|
254
|
+
flag (*required): name of the feature flag for which you want to get the details (string)
|
255
|
+
clause_name (*required): name of clause that you want to search for in response
|
256
|
+
clause_value (*required): value that you want to add to a particular clause (NOTE: it will be appened at zeroth 0th index)
|
257
|
+
|
258
|
+
# this method will help you to add a value to a particular clause by searching for clause_name in response
|
259
|
+
def ld_add_values_to_clause(env, flag, clause_name, clause_value)
|
260
|
+
# code ...
|
261
|
+
end
|
262
|
+
|
263
|
+
@return parameter: (response of feature flag details)
|
264
|
+
response = "https://app.launchdarkly.com/api/v2/flags/default/#{flag}?env=#{env}" (string)
|
265
|
+
```
|
266
|
+
|
267
|
+
```ruby
|
268
|
+
parameters:
|
269
|
+
env (*required): name of the environment for which you want to get the details (string)
|
270
|
+
flag (*required): name of the feature flag for which you want to get the details (string)
|
271
|
+
clause_name (*required): name of clause that you want to search for in response
|
272
|
+
clause_value (*required): value that you want to add to a particular clause (NOTE: it will be appened at zeroth 0th index)
|
273
|
+
|
274
|
+
# this method will help you to remove a value to a particular clause by searching for clause_name in response
|
275
|
+
def ld_remove_values_from_clause(env, flag, clause_name, clause_value)
|
276
|
+
# code ...
|
277
|
+
end
|
278
|
+
|
279
|
+
@return parameter: (response of feature flag details)
|
280
|
+
response = "https://app.launchdarkly.com/api/v2/flags/default/#{flag}?env=#{env}" (string)
|
281
|
+
```
|
282
|
+
|
283
|
+
```ruby
|
284
|
+
Delete feature flag
|
285
|
+
https://apidocs.launchdarkly.com/tag/Feature-flags#operation/deleteFeatureFlag
|
286
|
+
|
287
|
+
DELETE REQUEST
|
288
|
+
https://app.launchdarkly.com/api/v2/flags/default/developer_flag_for_regression
|
289
|
+
|
290
|
+
Here, 'developer_flag_for_regression' is the flag key and default is our Project name - eg. AmitSinghBisht
|
291
|
+
You can delete any feature flag using this method
|
292
|
+
|
293
|
+
parameters:
|
294
|
+
flag (*required): name of the feature flag for which you want to get the details (string)
|
295
|
+
|
296
|
+
# this method will delete a feature flag in launchdarkly (NOTE: env resided inside flag which means flag is parent, so deleting a feature flag will delete it from all environment)
|
297
|
+
def ld_delete_flag(flag)
|
298
|
+
# code ...
|
299
|
+
end
|
300
|
+
|
301
|
+
@return parameter: (response of feature flag details)
|
302
|
+
response = "https://app.launchdarkly.com/api/v2/flags/default/#{flag}?env=#{env}" (string)
|
303
|
+
```
|
20
304
|
|
21
305
|
## Development
|
22
306
|
|
@@ -1,5 +1,3 @@
|
|
1
|
-
LAUNCH_DARKLY_FLAGS = 'https://app.launchdarkly.com/api/v2/flags/default'.freeze
|
2
|
-
LAUNCH_DARKLY_PROJECTS = 'https://app.launchdarkly.com/api/v2/projects/default'.freeze
|
3
1
|
REQUEST_CLASSES = {
|
4
2
|
get: {
|
5
3
|
'method' => Net::HTTP::Get,
|
@@ -21,4 +19,4 @@ REQUEST_CLASSES = {
|
|
21
19
|
'code' => 204,
|
22
20
|
'message' => 'No Content'
|
23
21
|
}
|
24
|
-
}.freeze
|
22
|
+
}.freeze
|
@@ -8,8 +8,12 @@ require_relative 'constants'
|
|
8
8
|
|
9
9
|
# All methods related to launch darkly api are defined here
|
10
10
|
class LaunchdarklyApiHelperClass
|
11
|
-
|
11
|
+
|
12
|
+
@launch_darkly_flags = 'https://app.launchdarkly.com/api/v2/flags/project_name'
|
13
|
+
|
14
|
+
def initialize(access_token, project_name, log_file)
|
12
15
|
@access_token = access_token
|
16
|
+
@launch_darkly_flags.gsub! 'project_name', project_name
|
13
17
|
@logger = Logger.new(log_file)
|
14
18
|
end
|
15
19
|
|
@@ -43,7 +47,7 @@ class LaunchdarklyApiHelperClass
|
|
43
47
|
end
|
44
48
|
|
45
49
|
def fetch_flag_details(env, flag)
|
46
|
-
request_url = "#{
|
50
|
+
request_url = "#{@launch_darkly_flags}/#{flag}?env=#{env}"
|
47
51
|
ld_request(:get, request_url)
|
48
52
|
end
|
49
53
|
|
@@ -53,14 +57,14 @@ class LaunchdarklyApiHelperClass
|
|
53
57
|
end
|
54
58
|
|
55
59
|
def create_flag(key, name, description, tags)
|
56
|
-
request_url =
|
60
|
+
request_url = @launch_darkly_flags
|
57
61
|
request_body = {}
|
58
62
|
request_body.merge!(key: key, name: name, description: description, tags: tags)
|
59
63
|
ld_request(:post, request_url, request_body)
|
60
64
|
end
|
61
65
|
|
62
66
|
def toggle_specific_environment(env, flag, flag_value)
|
63
|
-
request_url = "#{
|
67
|
+
request_url = "#{@launch_darkly_flags}/#{flag}"
|
64
68
|
request_body = { 'op' => 'replace', 'path' => "/environments/#{env}/on", 'value' => flag_value }
|
65
69
|
response_body = ld_request(:patch, request_url, [request_body])
|
66
70
|
response_body['environments'][env]['on']
|
@@ -86,7 +90,7 @@ class LaunchdarklyApiHelperClass
|
|
86
90
|
details_response['variations'][index_response]['name']
|
87
91
|
end
|
88
92
|
|
89
|
-
def
|
93
|
+
def flag_variation_served(env, flag)
|
90
94
|
details_response = fetch_flag_details(env, flag)
|
91
95
|
toggle_status_response = fetch_flag_toggle_status(env, flag)
|
92
96
|
variation_index_response = feature_flag_variation_index(toggle_status_response, details_response) # ['environments'][env]['fallthrough']['variation']
|
@@ -130,29 +134,29 @@ class LaunchdarklyApiHelperClass
|
|
130
134
|
end
|
131
135
|
|
132
136
|
def get_values_from_clauses(env, flag, clause_name)
|
133
|
-
rule_at_index, clause_at_index =
|
137
|
+
rule_at_index, clause_at_index = rules_clauses_index(env, flag, clause_name)
|
134
138
|
@feature_flag_rules_list[rule_at_index]['clauses'][clause_at_index]['values']
|
135
139
|
end
|
136
140
|
|
137
141
|
def add_values_to_clause(env, flag, clause_name, clause_value)
|
138
|
-
rule_at_index, clause_at_index =
|
139
|
-
request_url = "#{
|
142
|
+
rule_at_index, clause_at_index = rules_clauses_index(env, flag, clause_name)
|
143
|
+
request_url = "#{@launch_darkly_flags}/#{flag}"
|
140
144
|
request_body = { 'op' => 'add', 'path' => "/environments/#{env}/rules/#{rule_at_index}/clauses/#{clause_at_index}/values/0", 'value' => clause_value }
|
141
145
|
ld_request(:patch, request_url, [request_body])
|
142
146
|
end
|
143
147
|
|
144
148
|
def remove_values_from_clause(env, flag, clause_name, clause_value)
|
145
|
-
rule_at_index, clause_at_index =
|
149
|
+
rule_at_index, clause_at_index = rules_clauses_index(env, flag, clause_name)
|
146
150
|
value_at_index = search_value_index(rule_at_index, clause_at_index, clause_value)
|
147
151
|
puts "value_index: #{value_at_index}"
|
148
|
-
request_url = "#{
|
152
|
+
request_url = "#{@launch_darkly_flags}/#{flag}"
|
149
153
|
request_body = { 'op' => 'test', 'path' => "/environments/#{env}/rules/#{rule_at_index}/clauses/#{clause_at_index}/values/#{value_at_index}", 'value' => clause_value },
|
150
154
|
{ 'op' => 'remove', 'path' => "/environments/#{env}/rules/#{rule_at_index}/clauses/#{clause_at_index}/values/#{value_at_index}" }
|
151
155
|
ld_request(:patch, request_url, request_body)
|
152
156
|
end
|
153
157
|
|
154
158
|
def delete_flag(flag)
|
155
|
-
request_url = "#{
|
159
|
+
request_url = "#{@launch_darkly_flags}/#{flag}"
|
156
160
|
ld_request(:delete, request_url)
|
157
161
|
end
|
158
162
|
end
|
@@ -34,8 +34,8 @@ module LaunchdarklyApiHelper
|
|
34
34
|
# == To perform any operations such as add, remove, replace, move, copy, test you should have a working knowledge of JSON Patch
|
35
35
|
# https://datatracker.ietf.org/doc/html/rfc6902
|
36
36
|
|
37
|
-
def ld_access_token(access_token, log_file = 'launchdarkly.log')
|
38
|
-
@launchdarkly_helper = LaunchdarklyApiHelperClass.new(access_token, log_file)
|
37
|
+
def ld_access_token(access_token, project_name = 'default', log_file = 'launchdarkly.log')
|
38
|
+
@launchdarkly_helper = LaunchdarklyApiHelperClass.new(access_token, project_name, log_file)
|
39
39
|
end
|
40
40
|
|
41
41
|
# == Get feature flag
|
@@ -144,8 +144,8 @@ module LaunchdarklyApiHelper
|
|
144
144
|
#
|
145
145
|
# [fetch_flag_toggle_status_response, feature_flag_variation_index_response, feature_flag_variation_value_response, feature_flag_variation_name_response]
|
146
146
|
|
147
|
-
def
|
148
|
-
@launchdarkly_helper.
|
147
|
+
def ld_flag_variation_served(env, flag)
|
148
|
+
@launchdarkly_helper.flag_variation_served(env, flag)
|
149
149
|
end
|
150
150
|
|
151
151
|
def ld_rules_clauses_index(env, flag, clause_name)
|
@@ -160,7 +160,7 @@ module LaunchdarklyApiHelper
|
|
160
160
|
@launchdarkly_helper.add_values_to_clause(env, flag, clause_name, clause_value)
|
161
161
|
end
|
162
162
|
|
163
|
-
def
|
163
|
+
def ld_remove_values_from_clause(env, flag, clause_name, clause_value)
|
164
164
|
@launchdarkly_helper.remove_values_from_clause(env, flag, clause_name, clause_value)
|
165
165
|
end
|
166
166
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: launchdarkly_api_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- amit-singh-bisht
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Write a longer description or delete this line.
|
14
14
|
email:
|
@@ -33,7 +33,7 @@ metadata:
|
|
33
33
|
allowed_push_host: https://rubygems.org
|
34
34
|
homepage_uri: https://github.com/amit-singh-bisht/launchdarkly_api_helper_ruby
|
35
35
|
source_code_uri: https://github.com/amit-singh-bisht/launchdarkly_api_helper_ruby
|
36
|
-
changelog_uri: https://github.com/amit-singh-bisht/launchdarkly_api_helper_ruby/blob/
|
36
|
+
changelog_uri: https://github.com/amit-singh-bisht/launchdarkly_api_helper_ruby/blob/master/README.md
|
37
37
|
post_install_message:
|
38
38
|
rdoc_options: []
|
39
39
|
require_paths:
|