db_memoize 0.3.14 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/db_memoize/model.rb +5 -3
  4. metadata +29 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02711b08b08a96a33495f37b69c62efb8191799fd9a9eb118493469ead8d7432
4
- data.tar.gz: 603be57b75810c724d439ebb4fa4cb45e9b0f157a6f687e460c32f0a23e22483
3
+ metadata.gz: e0a0bddc05527ac4a8bb66cd5330c58ca7d3cc943b178db0235b29ac544fd5b7
4
+ data.tar.gz: 6704f56f5332318d98036a6b05f1377827c6da47b3bf7537c0487cf9cef78f3f
5
5
  SHA512:
6
- metadata.gz: 9ee92a4172a3bd44339096499f4d25aab23fad440ca2d155015cb5823e137e7bdf7cf63f24cbae8b69588415e1abb2cf26376febdecc9a69d439343318b4a184
7
- data.tar.gz: 576d3bdfb75370ee5f411ae2e6ddb649ed7ae74599100cef7f9d3d21e72ec36cb7ba00d27f5c7c2d224b77595e2f7f078188715f8226997bc185d53ac028c614
6
+ metadata.gz: abe3ebb60fd927a216b5106b9aa25d4e4919014fc648cf6501473116a3a2a3aa7d46044cb92e78e18c6d838350b208fcfdbbd57963230ee1db6387c9f5156345
7
+ data.tar.gz: d06172b685fc9d8721c0853392689e625037db5c46de3399a1125162b0667f214cf579726d6a82bdc8aeff86dfa9af594fbe813a0e6ee984e5a8dee211ed17fc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.14
1
+ 0.4.0
@@ -107,11 +107,13 @@ module DbMemoize
107
107
 
108
108
  # rubocop:disable Style/EmptyBlockParameter
109
109
  def create_memoized_alias_method(method_name)
110
- define_method "#{method_name}_with_memoize" do ||
111
- memoized_value(method_name)
110
+ unless method_defined?("#{method_name}_without_memoize")
111
+ alias_method "#{method_name}_without_memoize", method_name
112
112
  end
113
113
 
114
- alias_method_chain method_name, :memoize
114
+ define_method method_name do ||
115
+ memoized_value(method_name)
116
+ end
115
117
  end
116
118
 
117
119
  # rubocop:disable Style/GuardClause
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db_memoize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.14
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - johannes-kostas goetzinger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-24 00:00:00.000000000 Z
11
+ date: 2019-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple-sql
@@ -16,48 +16,54 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 0.4.20
19
+ version: 0.5.23
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '0'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 0.4.20
26
+ version: 0.5.23
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: railties
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - "~>"
31
+ - - ">"
38
32
  - !ruby/object:Gem::Version
39
33
  version: '4.2'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '6'
40
37
  type: :development
41
38
  prerelease: false
42
39
  version_requirements: !ruby/object:Gem::Requirement
43
40
  requirements:
44
- - - "~>"
41
+ - - ">"
45
42
  - !ruby/object:Gem::Version
46
43
  version: '4.2'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '6'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: activerecord
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - ">"
52
+ - !ruby/object:Gem::Version
53
+ version: '4.2'
54
+ - - "<"
52
55
  - !ruby/object:Gem::Version
53
- version: 4.2.10
56
+ version: '6'
54
57
  type: :development
55
58
  prerelease: false
56
59
  version_requirements: !ruby/object:Gem::Requirement
57
60
  requirements:
58
- - - "~>"
61
+ - - ">"
62
+ - !ruby/object:Gem::Version
63
+ version: '4.2'
64
+ - - "<"
59
65
  - !ruby/object:Gem::Version
60
- version: 4.2.10
66
+ version: '6'
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: rake
63
69
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +112,14 @@ dependencies:
106
112
  requirements:
107
113
  - - "~>"
108
114
  - !ruby/object:Gem::Version
109
- version: '0.16'
115
+ version: '0.17'
110
116
  type: :development
111
117
  prerelease: false
112
118
  version_requirements: !ruby/object:Gem::Requirement
113
119
  requirements:
114
120
  - - "~>"
115
121
  - !ruby/object:Gem::Version
116
- version: '0.16'
122
+ version: '0.17'
117
123
  - !ruby/object:Gem::Dependency
118
124
  name: rubocop
119
125
  requirement: !ruby/object:Gem::Requirement
@@ -134,28 +140,28 @@ dependencies:
134
140
  requirements:
135
141
  - - "~>"
136
142
  - !ruby/object:Gem::Version
137
- version: 1.5.3
143
+ version: 1.6.2
138
144
  type: :development
139
145
  prerelease: false
140
146
  version_requirements: !ruby/object:Gem::Requirement
141
147
  requirements:
142
148
  - - "~>"
143
149
  - !ruby/object:Gem::Version
144
- version: 1.5.3
150
+ version: 1.6.2
145
151
  - !ruby/object:Gem::Dependency
146
- name: factory_girl
152
+ name: factory_bot
147
153
  requirement: !ruby/object:Gem::Requirement
148
154
  requirements:
149
155
  - - "~>"
150
156
  - !ruby/object:Gem::Version
151
- version: 4.7.0
157
+ version: 4.10.0
152
158
  type: :development
153
159
  prerelease: false
154
160
  version_requirements: !ruby/object:Gem::Requirement
155
161
  requirements:
156
162
  - - "~>"
157
163
  - !ruby/object:Gem::Version
158
- version: 4.7.0
164
+ version: 4.10.0
159
165
  description: library to cache (memoize) method return values in database
160
166
  email:
161
167
  - goetzinger@mediapeers.com