taggable_cache 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- taggable_cache (0.1.0)
4
+ taggable_cache (0.1.1)
5
5
  redis
6
6
 
7
7
  GEM
@@ -4,7 +4,7 @@ module TaggableCache::Rails::Cache
4
4
  end
5
5
 
6
6
  def write(name, value, options = nil)
7
- if options.has_key?(:depends_on)
7
+ if !options.nil? && options.has_key?(:depends_on)
8
8
  taggable.add(name, *options[:depends_on])
9
9
  #@taggable.
10
10
  options.delete(:depends_on)
@@ -1,3 +1,3 @@
1
1
  module TaggableCache
2
- VERSION = "0.1.0" # This is for the gem and does not conflict with the rest of the functionality
2
+ VERSION = "0.1.1" # This is for the gem and does not conflict with the rest of the functionality
3
3
  end
@@ -22,6 +22,7 @@ describe TaggableCache::Rails::Cache do
22
22
 
23
23
  Rails.cache.read('key').should == 'value'
24
24
 
25
+ #save should trigger deleting depending cache entries
25
26
  @page_object.name = @page_object.name.to_s + '1'
26
27
  @page_object.save!
27
28
 
@@ -37,5 +38,10 @@ describe TaggableCache::Rails::Cache do
37
38
 
38
39
  Rails.cache.read('lorem').should be_nil
39
40
  end
41
+
42
+ it "does simple writes" do
43
+ Rails.cache.write 'ipsum', 'lorem'
44
+ Rails.cache.read('ipsum').should == 'lorem'
45
+ end
40
46
  end
41
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taggable_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
16
- requirement: &72590360 !ruby/object:Gem::Requirement
16
+ requirement: &70787970 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *72590360
24
+ version_requirements: *70787970
25
25
  description: This gem simplifies cache expiration in rails
26
26
  email: brain-geek@yandex.ua
27
27
  executables: []
@@ -38,7 +38,6 @@ files:
38
38
  - LICENSE.txt
39
39
  - README.rdoc
40
40
  - Rakefile
41
- - VERSION
42
41
  - config.ru
43
42
  - lib/taggable_cache.rb
44
43
  - lib/taggable_cache/rails.rb
@@ -73,7 +72,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
72
  version: '0'
74
73
  segments:
75
74
  - 0
76
- hash: 740775313
75
+ hash: 737530259
77
76
  required_rubygems_version: !ruby/object:Gem::Requirement
78
77
  none: false
79
78
  requirements:
@@ -82,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
81
  version: '0'
83
82
  segments:
84
83
  - 0
85
- hash: 740775313
84
+ hash: 737530259
86
85
  requirements: []
87
86
  rubyforge_project:
88
87
  rubygems_version: 1.8.15
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.0