mongo_cache_store 0.2.2 → 0.2.3

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.
@@ -94,7 +94,7 @@ module ActiveSupport
94
94
  def get_collection(options)
95
95
  return options[:collection] if options[:collection].is_a? Mongo::Collection
96
96
 
97
- @db.collection(get_collection_name(options),options[:collection_opts])
97
+ @db.collection(get_collection_name(options),options[:collection_opts] || {})
98
98
  end
99
99
 
100
100
  def safe_rescue
@@ -45,6 +45,7 @@ module ActiveSupport
45
45
  ret = safe_rescue do
46
46
  col.remove
47
47
  end
48
+ @collection = nil
48
49
  ret ? true : false
49
50
  end
50
51
 
@@ -30,6 +30,7 @@ module ActiveSupport
30
30
  ret = safe_rescue do
31
31
  col.remove
32
32
  end
33
+ @collection = nil
33
34
  ret ? true : false
34
35
  end
35
36
 
@@ -81,7 +81,7 @@ module ActiveSupport
81
81
  when defined?(Rails) && Rails.logger
82
82
  @logger = Rails.logger
83
83
  else
84
- @logger = Logger.new(STDOUT)
84
+ #@logger = Logger.new(STDOUT)
85
85
  end
86
86
 
87
87
  @logger
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module MongoCacheStore
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
@@ -29,7 +29,7 @@ module ActiveSupport
29
29
  end
30
30
  @store.exist?("testkey").should == true
31
31
 
32
- sleep 60
32
+ sleep 60
33
33
 
34
34
  response = @store.fetch 'testkey'
35
35
  response.should == "I will expire."
@@ -93,7 +93,7 @@ module ActiveSupport
93
93
  end
94
94
 
95
95
  after(:all) do
96
- @store.clear
96
+ @store.clear.should == true
97
97
  end
98
98
  end
99
99
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_cache_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-23 00:00:00.000000000 Z
12
+ date: 2013-01-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongo