logical_model 0.7.0 → 0.7.2
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.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Gemfile.lock +31 -26
- data/lib/logical_model/cache.rb +14 -7
- data/lib/logical_model.rb +2 -1
- data/logical_model.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e39e999bb8e8bc84b5c5138ff7e00cce49cc36236e2a3d5db824b1b9ff5a42d6
|
|
4
|
+
data.tar.gz: a54435e1300de1680bb3e1570aa42745177d041162d0a8c3ccc3adf5624a62f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d200e9487a6a3313d5d5d9ac44a80968731efdb6512f8f6a8daed1ede078b1e01774af2a3739d88f174b3be2c40f396f7de6333db6381528d781eec9734b1464
|
|
7
|
+
data.tar.gz: db7008d138444048699f5b09e5fe1c3fe66a0c308ddbd4092a2e18c0fab621ba8f75dcc479acfb8294d6e6d847a6a886338e44149f8747fa1926c5a761421318
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: http://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
actionview (
|
|
5
|
-
activesupport (=
|
|
4
|
+
actionview (4.2.8)
|
|
5
|
+
activesupport (= 4.2.8)
|
|
6
6
|
builder (~> 3.1)
|
|
7
|
-
|
|
8
|
-
rails-dom-testing (~>
|
|
9
|
-
rails-html-sanitizer (~> 1.
|
|
10
|
-
activemodel (
|
|
11
|
-
activesupport (=
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
erubis (~> 2.7.0)
|
|
8
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
|
9
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
|
10
|
+
activemodel (4.2.8)
|
|
11
|
+
activesupport (= 4.2.8)
|
|
12
|
+
builder (~> 3.1)
|
|
13
|
+
activerecord (4.2.8)
|
|
14
|
+
activemodel (= 4.2.8)
|
|
15
|
+
activesupport (= 4.2.8)
|
|
16
|
+
arel (~> 6.0)
|
|
17
|
+
activesupport (4.2.8)
|
|
18
|
+
i18n (~> 0.7)
|
|
19
|
+
minitest (~> 5.1)
|
|
20
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
|
21
|
+
tzinfo (~> 1.1)
|
|
22
|
+
arel (6.0.4)
|
|
21
23
|
backports (3.21.0)
|
|
22
24
|
builder (3.2.4)
|
|
23
25
|
coderay (1.1.3)
|
|
24
26
|
concurrent-ruby (1.1.9)
|
|
25
27
|
crass (1.0.6)
|
|
26
28
|
diff-lcs (1.1.3)
|
|
27
|
-
|
|
29
|
+
erubis (2.7.0)
|
|
28
30
|
ethon (0.6.3)
|
|
29
31
|
ffi (>= 1.3.0)
|
|
30
32
|
mime-types (~> 1.18)
|
|
@@ -44,7 +46,7 @@ GEM
|
|
|
44
46
|
thor (>= 0.18.1)
|
|
45
47
|
guard-rspec (1.2.2)
|
|
46
48
|
guard (>= 1.1)
|
|
47
|
-
i18n (
|
|
49
|
+
i18n (0.9.5)
|
|
48
50
|
concurrent-ruby (~> 1.0)
|
|
49
51
|
jeweler (1.6.4)
|
|
50
52
|
bundler (~> 1.0)
|
|
@@ -88,9 +90,12 @@ GEM
|
|
|
88
90
|
method_source (~> 1.0)
|
|
89
91
|
racc (1.5.2)
|
|
90
92
|
rack (1.4.7)
|
|
91
|
-
rails-
|
|
92
|
-
activesupport (>= 4.2.0)
|
|
93
|
-
|
|
93
|
+
rails-deprecated_sanitizer (1.0.4)
|
|
94
|
+
activesupport (>= 4.2.0.alpha)
|
|
95
|
+
rails-dom-testing (1.0.9)
|
|
96
|
+
activesupport (>= 4.2.0, < 5.0)
|
|
97
|
+
nokogiri (~> 1.6)
|
|
98
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
|
94
99
|
rails-html-sanitizer (1.4.2)
|
|
95
100
|
loofah (~> 2.3)
|
|
96
101
|
rake (13.0.6)
|
|
@@ -121,20 +126,20 @@ GEM
|
|
|
121
126
|
tilt (>= 1.2.2, < 2.0)
|
|
122
127
|
sqlite3 (1.4.2)
|
|
123
128
|
thor (1.1.0)
|
|
129
|
+
thread_safe (0.3.6)
|
|
124
130
|
tilt (1.4.1)
|
|
125
131
|
typhoeus (0.6.4)
|
|
126
132
|
ethon (~> 0.6.0)
|
|
127
|
-
tzinfo (2.
|
|
128
|
-
|
|
129
|
-
zeitwerk (2.4.2)
|
|
133
|
+
tzinfo (1.2.9)
|
|
134
|
+
thread_safe (~> 0.1)
|
|
130
135
|
|
|
131
136
|
PLATFORMS
|
|
132
137
|
ruby
|
|
133
138
|
|
|
134
139
|
DEPENDENCIES
|
|
135
|
-
activemodel
|
|
140
|
+
activemodel (= 4.2.8)
|
|
136
141
|
activerecord
|
|
137
|
-
activesupport
|
|
142
|
+
activesupport (= 4.2.8)
|
|
138
143
|
bundler (>= 1.2.2)
|
|
139
144
|
ethon (= 0.6.3)
|
|
140
145
|
gemcutter
|
data/lib/logical_model/cache.rb
CHANGED
|
@@ -24,7 +24,8 @@ class LogicalModel
|
|
|
24
24
|
delete_cached
|
|
25
25
|
_save_without_cache
|
|
26
26
|
end
|
|
27
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
data/logical_model.gemspec
CHANGED