jerakia 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jerakia/cache.rb +5 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7db60ab44da9734856532ab3507e65bdc2ce81ee
4
- data.tar.gz: 063e0a3386fe6fb6a68095a85d64129e0c8ebc2e
3
+ metadata.gz: ee600c1fbdad02112c0dc0eca8ec525fd3da14c6
4
+ data.tar.gz: 0d6d09801dece2e26e213bf3d8c424f3a211c444
5
5
  SHA512:
6
- metadata.gz: 0d4bbcb6fc23eee976c17404da5dd626fcbc8421785488cbca29b779c5c0f8b515e0af5d2d0cb1c3eb1f9a624b5fd913824d56e9852344177ac90b613dc820b9
7
- data.tar.gz: 66aac7b0a5b6652ccdb2ceabca8511ae88ce7ce2917748a66cc7abe58707239c40e20b52b21842d7d9b698073606acbcbccab7f54f0c7f472ea893d70f8f9c54
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
- @@bucket[index][:content] = data
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
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-09 00:00:00.000000000 Z
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: