roqua-support 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +4 -4
- data/lib/roqua-support/version.rb +1 -1
- data/lib/roqua/core_ext/fabrication/singleton.rb +7 -3
- data/spec/roqua/core_ext/fabrication/singleton_spec.rb +6 -0
- 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: 1991866262608934e88ac4b7d2cd0d794477ec72
|
4
|
+
data.tar.gz: 0eb198caeb8ca15f35086ca0fb66b97611779195
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f695a20d4bf268ec51a62ac3f3535b7078d4e395511df2ceadb81e685eddb2e3d34129fdceee704650fb52f9e39a9061c516ce09d57167c0843d16b58993c0ee
|
7
|
+
data.tar.gz: 19bb1d53157b599e686067628cc0eaaab20a7e648a8a7ffebf90e3a4355afec1107456e356f94ad6906b5ecf6e8cd475ecd0035fd4ad4249ce650a7393d6c6e8
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
roqua-support (0.1.
|
4
|
+
roqua-support (0.1.9)
|
5
5
|
activesupport (>= 3.2, < 5.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (4.1.
|
10
|
+
activesupport (4.1.1)
|
11
11
|
i18n (~> 0.6, >= 0.6.9)
|
12
12
|
json (~> 1.7, >= 1.7.7)
|
13
13
|
minitest (~> 5.1)
|
@@ -43,7 +43,7 @@ GEM
|
|
43
43
|
rb-inotify (>= 0.9)
|
44
44
|
lumberjack (1.0.4)
|
45
45
|
method_source (0.8.2)
|
46
|
-
minitest (5.3.
|
46
|
+
minitest (5.3.5)
|
47
47
|
nio4r (1.0.0)
|
48
48
|
pry (0.9.12.6)
|
49
49
|
coderay (~> 1.0)
|
@@ -66,7 +66,7 @@ GEM
|
|
66
66
|
thor (0.18.1)
|
67
67
|
thread_safe (0.3.4)
|
68
68
|
timers (1.1.0)
|
69
|
-
tzinfo (1.1
|
69
|
+
tzinfo (1.2.1)
|
70
70
|
thread_safe (~> 0.1)
|
71
71
|
|
72
72
|
PLATFORMS
|
@@ -1,8 +1,12 @@
|
|
1
1
|
class Fabricate
|
2
|
-
@singletons = {}
|
3
|
-
|
4
2
|
def self.singleton(name, options={}, &block)
|
5
3
|
@singletons[name] ||= Fabricate(name, options={}, &block)
|
6
4
|
return @singletons[name]
|
7
5
|
end
|
8
|
-
|
6
|
+
|
7
|
+
def self.clear_singletons!
|
8
|
+
@singletons = {}
|
9
|
+
end
|
10
|
+
|
11
|
+
clear_singletons!
|
12
|
+
end
|
@@ -12,5 +12,11 @@ describe Fabricate do
|
|
12
12
|
it 'maintains multiple singletons' do
|
13
13
|
Fabricate.singleton(:one).should_not == Fabricate.singleton(:two)
|
14
14
|
end
|
15
|
+
|
16
|
+
it 'clears singletons' do
|
17
|
+
the_one = Fabricate.singleton(:one)
|
18
|
+
Fabricate.clear_singletons!
|
19
|
+
expect(Fabricate.singleton(:one)).not_to eq(the_one)
|
20
|
+
end
|
15
21
|
end
|
16
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roqua-support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Veldthuis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|