sequel-cacheable 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -7,3 +7,4 @@ language: ruby
7
7
  rvm:
8
8
  - 1.8.7
9
9
  - 1.9.3
10
+ - 2.0.0
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gem 'bundler'
4
4
  gem 'rake'
@@ -10,6 +10,12 @@ require 'sequel-cacheable/dataset_methods'
10
10
 
11
11
  module Sequel::Plugins
12
12
  module Cacheable
13
+ def self.apply(model, store, options = {})
14
+ model.instance_eval do
15
+ plugin :after_initialize
16
+ end
17
+ end
18
+
13
19
  def self.configure(model, store, options = {})
14
20
  model.instance_eval do
15
21
  @cache_options = {
@@ -18,11 +18,6 @@ module Sequel::Plugins
18
18
  super
19
19
  end
20
20
 
21
- def destory(*args)
22
- uncache!
23
- super(*args)
24
- end
25
-
26
21
  def cache!
27
22
  model.cache_set(cache_key, self)
28
23
  end
@@ -1,7 +1,7 @@
1
1
  module Sequel
2
2
  module Plugins
3
3
  module Cacheable
4
- VERSION = '1.0.1'
4
+ VERSION = '1.1.0'
5
5
  end
6
6
  end
7
7
  end
@@ -116,7 +116,7 @@ shared_examples :cacheable do
116
116
  end
117
117
  end
118
118
 
119
- describe '#destory' do
119
+ describe '#destroy' do
120
120
  it 'should call #uncache!' do
121
121
  instance.should_receive(:uncache!)
122
122
  instance.destroy
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-cacheable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
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-12 00:00:00.000000000 Z
12
+ date: 2013-06-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sequel
@@ -102,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  segments:
104
104
  - 0
105
- hash: -3930861181546816959
105
+ hash: -2632164670776576366
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  segments:
113
113
  - 0
114
- hash: -3930861181546816959
114
+ hash: -2632164670776576366
115
115
  requirements: []
116
116
  rubyforge_project:
117
117
  rubygems_version: 1.8.23