logical_model 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 969a3c24ae067129a4fbae22ec1624431b62183cd923eafa7daf8792858f9253
4
- data.tar.gz: f4462152db33e76a3d199f116c6c878fde8ddafabbcc7d8c16d3447b603cd0c7
3
+ metadata.gz: e39e999bb8e8bc84b5c5138ff7e00cce49cc36236e2a3d5db824b1b9ff5a42d6
4
+ data.tar.gz: a54435e1300de1680bb3e1570aa42745177d041162d0a8c3ccc3adf5624a62f0
5
5
  SHA512:
6
- metadata.gz: 7cf8df1e147f5dde715e0ab9cae6f9055286015339d3798fe49aa89e708259a1e8aec7dfc510972aa4573488a27ce17513b5d1fe8dc9a709eb6922fd460a62f1
7
- data.tar.gz: 58467154d1c029db9a4b5b85bfac38833809b0dc43b677819e28ebd0ca3169ea43fe41ef4243b3f21095c75b398e4dc8c5f8d19efd54cebe85609e4719aba59e
6
+ metadata.gz: d200e9487a6a3313d5d5d9ac44a80968731efdb6512f8f6a8daed1ede078b1e01774af2a3739d88f174b3be2c40f396f7de6333db6381528d781eec9734b1464
7
+ data.tar.gz: db7008d138444048699f5b09e5fe1c3fe66a0c308ddbd4092a2e18c0fab621ba8f75dcc479acfb8294d6e6d847a6a886338e44149f8747fa1926c5a761421318
@@ -24,7 +24,8 @@ class LogicalModel
24
24
  delete_cached
25
25
  _save_without_cache
26
26
  end
27
- alias_method_chain :_save, :cache
27
+ alias_method :_save_without_cache, :_save
28
+ alias_method :_save, :_save_with_cache
28
29
 
29
30
  def _update(params={})
30
31
  super
@@ -34,7 +35,8 @@ class LogicalModel
34
35
  delete_cached
35
36
  _update_without_cache params
36
37
  end
37
- alias_method_chain :_update, :cache
38
+ alias_method :_update_without_cache, :_update
39
+ alias_method :_update, :_update_with_cache
38
40
 
39
41
  def _destroy(params={})
40
42
  super
@@ -44,7 +46,8 @@ class LogicalModel
44
46
  delete_cached
45
47
  _destroy_without_cache
46
48
  end
47
- alias_method_chain :_destroy, :cache
49
+ alias_method :_destroy_without_cache, :_destroy
50
+ alias_method :_destroy, :_destroy_with_cache
48
51
 
49
52
  def delete_cached
50
53
  model_name = self.class.to_s.pluralize.underscore
@@ -98,7 +101,8 @@ class LogicalModel
98
101
  async_find_without_cache(id, params, &block)
99
102
  end
100
103
  end
101
- alias_method_chain :async_find, :cache
104
+ alias_method :async_find_without_cache, :async_find
105
+ alias_method :async_find, :async_find_with_cache
102
106
 
103
107
  def async_find_response(id, params={}, body)
104
108
  super(id, params, body)
@@ -114,7 +118,8 @@ class LogicalModel
114
118
  self.cache_store.write(cache_key, cache_value, :expires_in => self.expires_in || 10.minutes)
115
119
  cache_value
116
120
  end
117
- alias_method_chain :async_find_response, :cache
121
+ alias_method :async_find_response_without_cache, :async_find_response
122
+ alias_method :async_find_response, :async_find_response_with_cache
118
123
 
119
124
  def delete(id, params={})
120
125
  super(id, params)
@@ -127,7 +132,8 @@ class LogicalModel
127
132
  #TODO: also delete cache for parent (belongs_to)
128
133
  delete_without_cache(id, params)
129
134
  end
130
- alias_method_chain :delete, :cache
135
+ alias_method :delete_without_cache, :delete
136
+ alias_method :delete, :delete_with_cache
131
137
 
132
138
  def delete_multiple(ids, params={})
133
139
  super(ids, params)
@@ -140,7 +146,8 @@ class LogicalModel
140
146
  #TODO: also delete cache for parent (belongs_to)
141
147
  delete_multiple_without_cache(ids, params)
142
148
  end
143
- alias_method_chain :delete_multiple, :cache
149
+ alias_method :delete_multiple_without_cache, :delete_multiple
150
+ alias_method :delete_multiple, :delete_multiple_with_cache
144
151
  end
145
152
  end
146
153
  end
data/lib/logical_model.rb CHANGED
@@ -86,7 +86,8 @@ class LogicalModel
86
86
  initialize_without_callback(attributes)
87
87
  end
88
88
  end
89
- alias_method_chain :initialize, :callback
89
+ alias_method :initialize_without_callback, :initialize
90
+ alias_method :initialize, :initialize_with_callback
90
91
 
91
92
  class << self
92
93
  attr_accessor :timeout, :retries,
@@ -6,7 +6,7 @@
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "logical_model"
9
- s.version = "0.7.1"
9
+ s.version = "0.7.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logical_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dwayne Macgowan