httparty-icebox-delooks 0.0.4 → 0.0.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.
@@ -1,5 +1,5 @@
1
1
  module Httparty
2
2
  module Icebox
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -208,11 +208,11 @@ module HTTParty #:nodoc:
208
208
  end
209
209
  def set(key, value)
210
210
  Cache.logger.info("Cache: set (#{key})")
211
- File.open( @path.join(key), 'w' ) { |file| file << Marshal.dump(value) }
211
+ File.open( @path.join(key), 'w' ) { |file| file << Base64.encode64(Marshal.dump(value)) }
212
212
  true
213
213
  end
214
214
  def get(key)
215
- data = Marshal.load(File.read( @path.join(key)))
215
+ data = Marshal.load(Base64.decode64(File.read( @path.join(key))))
216
216
  Cache.logger.info("Cache: #{data.nil? ? "miss" : "hit"} (#{key})")
217
217
  data
218
218
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httparty-icebox-delooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ date: 2012-06-06 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
17
- requirement: &70275493267740 !ruby/object:Gem::Requirement
17
+ requirement: &70256018570380 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: 0.8.1
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70275493267740
25
+ version_requirements: *70256018570380
26
26
  description: Cache responses in HTTParty models
27
27
  email:
28
28
  - kristoffer@sachse.nu