splitclient-rb 4.1.0.pre.rc1 → 4.1.0.pre.rc2
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/Detailed-README.md +12 -0
- data/lib/engine/matchers/equal_to_set_matcher.rb +15 -0
- data/lib/engine/parser/condition.rb +15 -9
- data/lib/splitclient-rb/version.rb +1 -1
- data/lib/splitclient-rb.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '07662888415c5a0ab2459e922fc4b1237fc792c4'
|
4
|
+
data.tar.gz: 13a6280bcd1c5ca9961b4bf7fcc78b5dacaa7f74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b51c5d6a86c3f159187655c28650eea25f9f43d4478d2f7f61f9f85260e14443aeaf20df8ff11a382b7bd2cd949326d7bd782a86f2bcee410689113f72e0f4c0
|
7
|
+
data.tar.gz: e27332ffadcc131d015f5871dbc6e77bf9dde7579e727fc84647139584443f4225e0a47b5f72b211632551d5652d3c7382dd3e1e732cbfe43bdc6104eb9d336f
|
data/Detailed-README.md
CHANGED
@@ -352,6 +352,18 @@ And you should get something like this:
|
|
352
352
|
]
|
353
353
|
```
|
354
354
|
|
355
|
+
### Logging
|
356
|
+
|
357
|
+
Ruby SDK makes use of Ruby stdlib's `Logger` class to log errors/events, default option is: `Logger.new($stdout)`.
|
358
|
+
|
359
|
+
You can configure the following options in the config file:
|
360
|
+
|
361
|
+
```
|
362
|
+
logger: Logger.new('logfile.log'), # you can specify your own Logger class instance here
|
363
|
+
debug_enabled: true, # used for more verbose logging, including more debug information (false is the default)
|
364
|
+
transport_debug_enabled: true # used for log transport data (mostly http requests, false is the default)
|
365
|
+
```
|
366
|
+
|
355
367
|
### SDK Modes
|
356
368
|
|
357
369
|
By default SDK would run alongside with your application and will be run in `standalone` mode, which includes two modes:
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module SplitIoClient
|
2
|
+
class EqualToSetMatcher < SetMatcher
|
3
|
+
def self.matcher_type
|
4
|
+
'EQUAL_TO_SET'.freeze
|
5
|
+
end
|
6
|
+
|
7
|
+
def initialize(attribute, remote_array)
|
8
|
+
super(attribute, remote_array)
|
9
|
+
end
|
10
|
+
|
11
|
+
def match?(_key, data)
|
12
|
+
local_set(data, @attribute) == @remote_set
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -108,23 +108,29 @@ module SplitIoClient
|
|
108
108
|
BetweenMatcher.new(attribute: attribute, start_value: start_value, end_value: end_value, data_type: data_type)
|
109
109
|
end
|
110
110
|
|
111
|
+
def matcher_equal_to_set(params)
|
112
|
+
EqualToSetMatcher.new(
|
113
|
+
params[:matcher][:keySelector][:attribute],
|
114
|
+
params[:matcher][:whitelistMatcherData][:whitelist]
|
115
|
+
)
|
116
|
+
end
|
111
117
|
|
112
|
-
def
|
113
|
-
|
118
|
+
def matcher_contains_any_of_set(params)
|
119
|
+
ContainsAnyMatcher.new(
|
114
120
|
params[:matcher][:keySelector][:attribute],
|
115
121
|
params[:matcher][:whitelistMatcherData][:whitelist]
|
116
122
|
)
|
117
123
|
end
|
118
124
|
|
119
|
-
def
|
125
|
+
def matcher_contains_all_of_set(params)
|
120
126
|
ContainsAllMatcher.new(
|
121
127
|
params[:matcher][:keySelector][:attribute],
|
122
128
|
params[:matcher][:whitelistMatcherData][:whitelist]
|
123
129
|
)
|
124
130
|
end
|
125
131
|
|
126
|
-
def
|
127
|
-
|
132
|
+
def matcher_part_of_set(params)
|
133
|
+
PartOfSetMatcher.new(
|
128
134
|
params[:matcher][:keySelector][:attribute],
|
129
135
|
params[:matcher][:whitelistMatcherData][:whitelist]
|
130
136
|
)
|
@@ -137,15 +143,15 @@ module SplitIoClient
|
|
137
143
|
)
|
138
144
|
end
|
139
145
|
|
140
|
-
def
|
141
|
-
|
146
|
+
def matcher_ends_with(params)
|
147
|
+
EndsWithMatcher.new(
|
142
148
|
params[:matcher][:keySelector][:attribute],
|
143
149
|
params[:matcher][:whitelistMatcherData][:whitelist]
|
144
150
|
)
|
145
151
|
end
|
146
152
|
|
147
|
-
def
|
148
|
-
|
153
|
+
def matcher_contains_string(params)
|
154
|
+
ContainsMatcher.new(
|
149
155
|
params[:matcher][:keySelector][:attribute],
|
150
156
|
params[:matcher][:whitelistMatcherData][:whitelist]
|
151
157
|
)
|
data/lib/splitclient-rb.rb
CHANGED
@@ -53,6 +53,7 @@ require 'engine/matchers/less_than_or_equal_to_matcher'
|
|
53
53
|
require 'engine/matchers/between_matcher'
|
54
54
|
require 'engine/matchers/set_matcher'
|
55
55
|
require 'engine/matchers/part_of_set_matcher'
|
56
|
+
require 'engine/matchers/equal_to_set_matcher'
|
56
57
|
require 'engine/matchers/contains_any_matcher'
|
57
58
|
require 'engine/matchers/contains_all_matcher'
|
58
59
|
require 'engine/matchers/starts_with_matcher'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: splitclient-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.0.pre.
|
4
|
+
version: 4.1.0.pre.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Split Software
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -314,6 +314,7 @@ files:
|
|
314
314
|
- lib/engine/matchers/contains_matcher.rb
|
315
315
|
- lib/engine/matchers/ends_with_matcher.rb
|
316
316
|
- lib/engine/matchers/equal_to_matcher.rb
|
317
|
+
- lib/engine/matchers/equal_to_set_matcher.rb
|
317
318
|
- lib/engine/matchers/greater_than_or_equal_to_matcher.rb
|
318
319
|
- lib/engine/matchers/less_than_or_equal_to_matcher.rb
|
319
320
|
- lib/engine/matchers/negation_matcher.rb
|