onyx-cache-money 0.2.5.1 → 0.2.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/TODO CHANGED
@@ -4,6 +4,7 @@ REFACTOR
4
4
  * Clarify terminology around cache/key/index, etc.
5
5
 
6
6
  INFRASTRUCTURE
7
+ * currently rake spec will fail with rails 2.3.x
7
8
 
8
9
  NEW FEATURES
9
10
  * transactional get multi isn't really multi
@@ -8,7 +8,7 @@ module Marshal
8
8
  begin
9
9
  Marshal.load_without_constantize value
10
10
  rescue ArgumentError => e
11
- _, class_name = *(/undefined class\/module (\w+)/.match(e.message))
11
+ _, class_name = *(/undefined class\/module ([\w:]*\w)/.match(e.message))
12
12
  raise if !class_name
13
13
  constantize(class_name)
14
14
  Marshal.load value
@@ -15,6 +15,22 @@ describe Marshal do
15
15
  stub(Marshal).constantize(@reference_to_constant.name) { Object.send(:const_set, :Constant, @reference_to_constant) }
16
16
  Marshal.load(@marshaled_object).class.should == @object.class
17
17
  end
18
+
19
+ it 'loads the constant with the scope operator' do
20
+ module Foo; class Bar; end; end
21
+
22
+ reference_to_module = Foo
23
+ reference_to_constant = Foo::Bar
24
+ object = reference_to_constant.new
25
+ marshaled_object = Marshal.dump(object)
26
+
27
+ Foo.send(:remove_const, :Bar)
28
+ Object.send(:remove_const, :Foo)
29
+ stub(Marshal).constantize(reference_to_module.name) { Object.send(:const_set, :Foo, reference_to_module) }
30
+ stub(Marshal).constantize(reference_to_constant.name) { Foo.send(:const_set, :Bar, reference_to_constant) }
31
+
32
+ Marshal.load(marshaled_object).class.should == object.class
33
+ end
18
34
  end
19
35
 
20
36
  describe 'when the constant does not exist' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onyx-cache-money
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5.1
4
+ version: 0.2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Kallen