togls 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -0
- data/lib/togls/feature_repository_drivers/in_memory_driver.rb +6 -2
- data/lib/togls/rule_repository_drivers/in_memory_driver.rb +6 -2
- data/lib/togls/toggle_repository_drivers/in_memory_driver.rb +9 -3
- data/lib/togls/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e07a68d3fc95321858fb09e282d568faa8957588
|
4
|
+
data.tar.gz: 6af7cd9bd40afb53d6d367b232e690d34e2d675d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d66393fb05305227911e1a9fd56e2b651cddd9e7efec9e6980ac37eae888fa16fa2fc6542ffdb5d5fa016be099c1566ff345f6b7e1b470f37a885433cab7de0
|
7
|
+
data.tar.gz: ef4b6e18ba83c0ab616a853daf405f606ce5b56db09e76a04c1230399e8feaa67ff13dae6b06361275d3d34a45e38280caf2becdd88cd694531e5f370f41507b
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,11 @@ versions, as well as provide a rough history.
|
|
6
6
|
|
7
7
|
#### Next Release
|
8
8
|
|
9
|
+
### v2.2.1
|
10
|
+
|
11
|
+
* Added: in-memory driver `set`, `get`, `all` Marshaling to correct a threading
|
12
|
+
reference based collision. Fixes issue #35
|
13
|
+
|
9
14
|
### v2.2.0
|
10
15
|
|
11
16
|
* Changed Togls to be thread-safe
|
data/README.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
[![Code Climate](https://codeclimate.com/github/codebreakdown/togls/badges/gpa.svg)](https://codeclimate.com/github/codebreakdown/togls)
|
4
4
|
[![Test Coverage](https://codeclimate.com/github/codebreakdown/togls/badges/coverage.svg)](https://codeclimate.com/github/codebreakdown/togls/coverage)
|
5
5
|
[![Dependency Status](https://gemnasium.com/codebreakdown/togls.svg)](https://gemnasium.com/codebreakdown/togls)
|
6
|
+
[![Inline docs](http://inch-ci.org/github/codebreakdown/togls.svg?branch=master)](http://inch-ci.org/github/codebreakdown/togls)
|
6
7
|
|
7
8
|
# Togls
|
8
9
|
|
@@ -14,13 +14,17 @@ module Togls
|
|
14
14
|
|
15
15
|
def store(feature_id, feature_data)
|
16
16
|
@features_lock.synchronize do
|
17
|
-
@features[feature_id] = feature_data
|
17
|
+
@features[feature_id] = Marshal.dump(feature_data)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
def get(feature_id)
|
22
22
|
@features_lock.synchronize do
|
23
|
-
@features
|
23
|
+
if @features.has_key?(feature_id)
|
24
|
+
Marshal.load(@features[feature_id])
|
25
|
+
else
|
26
|
+
nil
|
27
|
+
end
|
24
28
|
end
|
25
29
|
end
|
26
30
|
end
|
@@ -14,13 +14,17 @@ module Togls
|
|
14
14
|
|
15
15
|
def store(rule_id, rule_data)
|
16
16
|
@rules_lock.synchronize do
|
17
|
-
@rules[rule_id] = rule_data
|
17
|
+
@rules[rule_id] = Marshal.dump(rule_data)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
def get(rule_id)
|
22
22
|
@rules_lock.synchronize do
|
23
|
-
@rules
|
23
|
+
if @rules.has_key?(rule_id)
|
24
|
+
Marshal.load(@rules[rule_id])
|
25
|
+
else
|
26
|
+
nil
|
27
|
+
end
|
24
28
|
end
|
25
29
|
end
|
26
30
|
end
|
@@ -14,20 +14,26 @@ module Togls
|
|
14
14
|
|
15
15
|
def store(toggle_id, toggle_data)
|
16
16
|
@toggles_lock.synchronize do
|
17
|
-
@toggles[toggle_id] = toggle_data
|
17
|
+
@toggles[toggle_id] = Marshal.dump(toggle_data)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
21
|
def get(toggle_id)
|
22
22
|
@toggles_lock.synchronize do
|
23
|
-
@toggles
|
23
|
+
if @toggles.has_key?(toggle_id)
|
24
|
+
Marshal.load(@toggles[toggle_id])
|
25
|
+
else
|
26
|
+
nil
|
27
|
+
end
|
24
28
|
end
|
25
29
|
end
|
26
30
|
|
27
31
|
def all
|
32
|
+
result = {}
|
28
33
|
@toggles_lock.synchronize do
|
29
|
-
@toggles
|
34
|
+
@toggles.each_pair { |k, v| result[k] = Marshal.load(v) }
|
30
35
|
end
|
36
|
+
result
|
31
37
|
end
|
32
38
|
end
|
33
39
|
end
|
data/lib/togls/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: togls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Miller
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-03-
|
13
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -145,4 +145,3 @@ signing_key:
|
|
145
145
|
specification_version: 4
|
146
146
|
summary: An ultra light weight yet ridiculously powerfulruby feature toggle gem.
|
147
147
|
test_files: []
|
148
|
-
has_rdoc:
|