frozen_record 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/frozen_record.gemspec +1 -0
- data/lib/frozen_record/base.rb +2 -2
- data/lib/frozen_record/version.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c789eb24300d5ed1ad38c6e5e97a113456436e4f
|
4
|
+
data.tar.gz: 6984bcf978e209e3fd3c0f3a0b53a5aac9228449
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c90cbe7410bf3e7da6a652e61c677ba35bce7993f14782337094b15015350584781df430d2e111b6027dc3edd979c9b64d1af003488ee6d42e178868b66259dd
|
7
|
+
data.tar.gz: 6c6d7524d6ab890ffb4816599c45b3482c972036446abe94747687c99fab969f527ad6abe9abf5e4120ad81fb6277465fc12a232985031a1efe13f3a0541e080
|
data/frozen_record.gemspec
CHANGED
@@ -21,5 +21,6 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_development_dependency 'bundler', '~> 1.5'
|
22
22
|
spec.add_development_dependency 'rake'
|
23
23
|
spec.add_development_dependency 'rspec'
|
24
|
+
spec.add_development_dependency 'pry'
|
24
25
|
spec.add_development_dependency 'coveralls'
|
25
26
|
end
|
data/lib/frozen_record/base.rb
CHANGED
@@ -21,7 +21,7 @@ module FrozenRecord
|
|
21
21
|
class ThreadSafeStorage
|
22
22
|
|
23
23
|
def initialize(key)
|
24
|
-
@thread_key = key
|
24
|
+
@thread_key = "#{ self.object_id }-#{ key }"
|
25
25
|
end
|
26
26
|
|
27
27
|
def [](key)
|
@@ -64,7 +64,7 @@ module FrozenRecord
|
|
64
64
|
private
|
65
65
|
|
66
66
|
def store
|
67
|
-
@store
|
67
|
+
@store ||= ThreadSafeStorage.new(name)
|
68
68
|
end
|
69
69
|
|
70
70
|
def method_missing(name, *args)
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frozen_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: coveralls
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|