jerakia 0.1.4 → 0.1.5
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/lib/jerakia/cache.rb +5 -1
- 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: ee600c1fbdad02112c0dc0eca8ec525fd3da14c6
|
4
|
+
data.tar.gz: 0d6d09801dece2e26e213bf3d8c424f3a211c444
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87d13fce2376b9ea5593e2b6a8bf2e1084045db6f8bfe9854060e2d53243a2cbc1ed46552240c5af5be64dcfbddc82a7087ef1bb0e65f74564bedfc96af21b0f
|
7
|
+
data.tar.gz: d81bea981e0a7571ea1be73424608cadea44066459845eac0d78f7931bfedfed62926f8903bebec6444b03a4a4e5fbfe98c4991839af8469d046a59387bbec82
|
data/lib/jerakia/cache.rb
CHANGED
@@ -11,7 +11,11 @@ class Jerakia::Cache
|
|
11
11
|
|
12
12
|
def add(index,data)
|
13
13
|
@@bucket[index] ||= {}
|
14
|
-
|
14
|
+
## The cache bucket is a global class object, therefore we should
|
15
|
+
## always store a copy of the data object, not the actual object
|
16
|
+
## to ensure that it is not referenced and tainted by the lookup
|
17
|
+
#
|
18
|
+
@@bucket[index][:content] = Marshal::load(Marshal.dump(data))
|
15
19
|
data
|
16
20
|
end
|
17
21
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jerakia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig Dunn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Extendable and flexible data lookup system
|
14
14
|
email:
|