splitclient-rb 1.0.4.wip2 → 1.0.4.wip3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +29 -1
- data/lib/splitclient-engine/matchers/between_matcher.rb +1 -1
- data/lib/splitclient-engine/matchers/equal_to_matcher.rb +1 -1
- data/lib/splitclient-engine/matchers/greater_than_or_equal_to_matcher.rb +1 -1
- data/lib/splitclient-engine/matchers/less_than_or_equal_to_matcher.rb +1 -1
- data/lib/splitclient-rb/version.rb +1 -1
- data/lib/splitclient-rb_utilitites.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8c8e7c280b82d43903f46131c9b4d530c785f1f
|
4
|
+
data.tar.gz: de31a50b8d5f7ea0a17463eb4822d008fbc65e47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08fd11c0ed081a9f97eea977eb4290b48e715781c4841176410ad863b5e3a3180cccb45595294a75013bc7f68653ae1fcc270a13d751a05d1457113b9daa7f58
|
7
|
+
data.tar.gz: b0fbe687ee32bbd9bf9e1a8d1d29cf87bf32da876924049d47fc585d3aaf8e583a96152d292ed6b47cc4b588d9a9c9f91c4a86824bbdec1cf883955024f63691
|
data/README.md
CHANGED
@@ -136,7 +136,9 @@ The gem uses rspec for unit testing. Under the default `/spec` folder you will f
|
|
136
136
|
|
137
137
|
To run the suite of unit tests a rake task is provided. It's executed with the following command:
|
138
138
|
|
139
|
-
|
139
|
+
```bash
|
140
|
+
$ rake spec
|
141
|
+
```
|
140
142
|
|
141
143
|
Also, simplecov is used for coverage reporting. After the execution of the rake task it will create the `/coverage` folder with coverage reports in pretty HTML format.
|
142
144
|
Right now, the code coverage of the gem is at about 95%.
|
@@ -146,6 +148,32 @@ Right now, the code coverage of the gem is at about 95%.
|
|
146
148
|
|
147
149
|
Bug reports and pull requests are welcome on GitHub at https://github.com/splitio/ruby-client.
|
148
150
|
|
151
|
+
## Gem version publish
|
152
|
+
|
153
|
+
To build a new version of the gem, after you have finished the desired changes, documented the CHANGES.txt and the NEWS, as well as named it properly in the version.rb. This steps assume that all of your new cool features and fixes have been merged into development, and into master branches of the ruby-client repo. Once that is ready to go, you will have to run the build command to obtain a .gem file:
|
154
|
+
|
155
|
+
```bash
|
156
|
+
gem build splitclient-rb.gemspec
|
157
|
+
```
|
158
|
+
|
159
|
+
That will generate a splitclient-rb-x.x.x.gem file, with the corresponding version information on it.
|
160
|
+
To publish this new version of the gem at rubygems.org you must run the following command:
|
161
|
+
|
162
|
+
```bash
|
163
|
+
gem push splitclient-rb-x.x.x.gem
|
164
|
+
```
|
165
|
+
|
166
|
+
A valid rubygems username and password will be required.
|
167
|
+
|
168
|
+
After this action, the new splitclient-rb-x.x.x version is available for its use from any ruby app.
|
169
|
+
|
170
|
+
So for instance in a rails app Gemfile, you could add the:
|
171
|
+
|
172
|
+
```ruby
|
173
|
+
gem 'splitclient-rb', '~> x.x.x'
|
174
|
+
```
|
175
|
+
|
176
|
+
line to have the latest version of the gem ready to be used.
|
149
177
|
|
150
178
|
## License
|
151
179
|
|
@@ -16,7 +16,7 @@ module SplitIoClient
|
|
16
16
|
matches = false
|
17
17
|
if (!attributes.nil? && attributes.key?(@attribute.to_sym))
|
18
18
|
param_value = get_formatted_value(attributes[@attribute.to_sym])
|
19
|
-
matches = ((param_value >= @start_value) && (param_value <= @end_value))
|
19
|
+
matches = param_value.is_a?(Integer) ? ((param_value >= @start_value) && (param_value <= @end_value)) : false
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -15,7 +15,7 @@ module SplitIoClient
|
|
15
15
|
matches = false
|
16
16
|
if (!attributes.nil? && attributes.key?(@attribute.to_sym))
|
17
17
|
param_value = get_formatted_value(attributes[@attribute.to_sym])
|
18
|
-
matches = (param_value == @value)
|
18
|
+
matches = param_value.is_a?(Integer) ? (param_value == @value) : false
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -15,7 +15,7 @@ module SplitIoClient
|
|
15
15
|
matches = false
|
16
16
|
if (!attributes.nil? && attributes.key?(@attribute.to_sym))
|
17
17
|
param_value = get_formatted_value(attributes[@attribute.to_sym])
|
18
|
-
matches = (param_value >= @value)
|
18
|
+
matches = param_value.is_a?(Integer) ? (param_value >= @value) : false
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -15,7 +15,7 @@ module SplitIoClient
|
|
15
15
|
matches = false
|
16
16
|
if (!attributes.nil? && attributes.key?(@attribute.to_sym))
|
17
17
|
param_value = get_formatted_value(attributes[@attribute.to_sym])
|
18
|
-
matches = (param_value <= @value)
|
18
|
+
matches = param_value.is_a?(Integer) ? (param_value <= @value) : false
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -18,7 +18,7 @@ module Utilities
|
|
18
18
|
zeroed = Time.new(parsed_value.year, parsed_value.month, parsed_value.day, parsed_value.hour, parsed_value.min, 0, 0)
|
19
19
|
return zeroed.to_i*1000
|
20
20
|
rescue
|
21
|
-
return
|
21
|
+
return :non_valid_date_info
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -28,7 +28,7 @@ module Utilities
|
|
28
28
|
zeroed = Time.new(parsed_value.year, parsed_value.month, parsed_value.day, 0, 0, 0, 0)
|
29
29
|
return zeroed.to_i*1000
|
30
30
|
rescue
|
31
|
-
return
|
31
|
+
return :non_valid_date_info
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
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: 1.0.4.
|
4
|
+
version: 1.0.4.wip3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Split Software
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|