find_cache 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGE-LOG +8 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +80 -0
- data/Rakefile +38 -0
- data/lib/find_cache.rb +5 -0
- data/lib/find_cache/cacheable.rb +88 -0
- data/lib/find_cache/init.rb +1 -0
- data/lib/find_cache/key_gen.rb +27 -0
- data/lib/find_cache/version.rb +3 -0
- data/lib/tasks/find_cache_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/models/comment.rb +6 -0
- data/test/dummy/app/models/post.rb +7 -0
- data/test/dummy/app/models/user.rb +13 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +39 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/counter_cache_patch.rb +19 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20120824210455_create_users.rb +10 -0
- data/test/dummy/db/migrate/20120824210731_create_comments.rb +11 -0
- data/test/dummy/db/migrate/20120824210927_create_posts.rb +13 -0
- data/test/dummy/db/schema.rb +43 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +498 -0
- data/test/dummy/log/test.log +224 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/comments.yml +9 -0
- data/test/dummy/test/fixtures/posts.yml +13 -0
- data/test/dummy/test/fixtures/users.yml +9 -0
- data/test/dummy/test/unit/comment_test.rb +7 -0
- data/test/dummy/test/unit/post_test.rb +7 -0
- data/test/dummy/test/unit/user_test.rb +7 -0
- data/test/dummy/tmp/cache/26E/540/User%2F1 +0 -0
- data/test/dummy/tmp/cache/26F/550/User%2F2 +0 -0
- data/test/dummy/tmp/cache/270/560/User%2F3 +0 -0
- data/test/dummy/tmp/cache/271/570/User%2F4 +0 -0
- data/test/dummy/tmp/cache/272/580/User%2F5 +0 -0
- data/test/dummy/tmp/cache/273/590/User%2F6 +0 -0
- data/test/dummy/tmp/cache/275/6E0/Post%2F1 +0 -0
- data/test/dummy/tmp/cache/276/6F0/Post%2F2 +0 -0
- data/test/dummy/tmp/cache/277/700/Post%2F3 +0 -0
- data/test/dummy/tmp/cache/3A8/070/Comment%2F7 +0 -0
- data/test/dummy/tmp/cache/3A9/080/Comment%2F8 +0 -0
- data/test/dummy/tmp/cache/3AA/090/Comment%2F9 +0 -0
- data/test/dummy/tmp/cache/3D2/D30/Comment%2F10 +0 -0
- data/test/dummy/tmp/cache/3D4/D50/Comment%2F12 +0 -0
- data/test/dummy/tmp/cache/3D5/D60/Comment%2F13 +0 -0
- data/test/dummy/tmp/cache/3D6/D70/Comment%2F14 +0 -0
- data/test/dummy/tmp/cache/3D7/D80/Comment%2F15 +0 -0
- data/test/dummy/tmp/cache/58D/B70/Post%2Fuser_id-1 +1 -0
- data/test/find_cache_test.rb +51 -0
- data/test/test_helper.rb +15 -0
- metadata +261 -0
data/test/test_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require "rails/test_help"
|
6
|
+
|
7
|
+
Rails.backtrace_cleaner.remove_silencers!
|
8
|
+
|
9
|
+
# Load support files
|
10
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
11
|
+
|
12
|
+
# Load fixtures from the engine
|
13
|
+
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
14
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,261 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: find_cache
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Mustafa Turan
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-08-24 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.1.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.1.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: simple_uuid
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: dalli
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: sqlite3
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
description: ! 'Makes ActiveRecord ''find_by_id, find_by_(attr)'' methods and ''has_one,
|
79
|
+
belongs_to relations'' cacheable by id or any referenced columns using Rails.cache
|
80
|
+
methods. It also supports fetching multiple records using ids with find_all_cache
|
81
|
+
method(if cache store supports multiple reads [hint: memcache_store, dalli_store
|
82
|
+
supports.]).'
|
83
|
+
email:
|
84
|
+
- mustafaturan.net@gmail.com
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files: []
|
88
|
+
files:
|
89
|
+
- lib/find_cache/cacheable.rb
|
90
|
+
- lib/find_cache/init.rb
|
91
|
+
- lib/find_cache/key_gen.rb
|
92
|
+
- lib/find_cache/version.rb
|
93
|
+
- lib/find_cache.rb
|
94
|
+
- lib/tasks/find_cache_tasks.rake
|
95
|
+
- CHANGE-LOG
|
96
|
+
- MIT-LICENSE
|
97
|
+
- Rakefile
|
98
|
+
- README.rdoc
|
99
|
+
- test/dummy/app/assets/javascripts/application.js
|
100
|
+
- test/dummy/app/assets/stylesheets/application.css
|
101
|
+
- test/dummy/app/controllers/application_controller.rb
|
102
|
+
- test/dummy/app/helpers/application_helper.rb
|
103
|
+
- test/dummy/app/models/comment.rb
|
104
|
+
- test/dummy/app/models/post.rb
|
105
|
+
- test/dummy/app/models/user.rb
|
106
|
+
- test/dummy/app/views/layouts/application.html.erb
|
107
|
+
- test/dummy/config/application.rb
|
108
|
+
- test/dummy/config/boot.rb
|
109
|
+
- test/dummy/config/database.yml
|
110
|
+
- test/dummy/config/environment.rb
|
111
|
+
- test/dummy/config/environments/development.rb
|
112
|
+
- test/dummy/config/environments/production.rb
|
113
|
+
- test/dummy/config/environments/test.rb
|
114
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
115
|
+
- test/dummy/config/initializers/counter_cache_patch.rb
|
116
|
+
- test/dummy/config/initializers/inflections.rb
|
117
|
+
- test/dummy/config/initializers/mime_types.rb
|
118
|
+
- test/dummy/config/initializers/secret_token.rb
|
119
|
+
- test/dummy/config/initializers/session_store.rb
|
120
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
121
|
+
- test/dummy/config/locales/en.yml
|
122
|
+
- test/dummy/config/routes.rb
|
123
|
+
- test/dummy/config.ru
|
124
|
+
- test/dummy/db/development.sqlite3
|
125
|
+
- test/dummy/db/migrate/20120824210455_create_users.rb
|
126
|
+
- test/dummy/db/migrate/20120824210731_create_comments.rb
|
127
|
+
- test/dummy/db/migrate/20120824210927_create_posts.rb
|
128
|
+
- test/dummy/db/schema.rb
|
129
|
+
- test/dummy/db/test.sqlite3
|
130
|
+
- test/dummy/log/development.log
|
131
|
+
- test/dummy/log/test.log
|
132
|
+
- test/dummy/public/404.html
|
133
|
+
- test/dummy/public/422.html
|
134
|
+
- test/dummy/public/500.html
|
135
|
+
- test/dummy/public/favicon.ico
|
136
|
+
- test/dummy/Rakefile
|
137
|
+
- test/dummy/README.rdoc
|
138
|
+
- test/dummy/script/rails
|
139
|
+
- test/dummy/test/fixtures/comments.yml
|
140
|
+
- test/dummy/test/fixtures/posts.yml
|
141
|
+
- test/dummy/test/fixtures/users.yml
|
142
|
+
- test/dummy/test/unit/comment_test.rb
|
143
|
+
- test/dummy/test/unit/post_test.rb
|
144
|
+
- test/dummy/test/unit/user_test.rb
|
145
|
+
- test/dummy/tmp/cache/26E/540/User%2F1
|
146
|
+
- test/dummy/tmp/cache/26F/550/User%2F2
|
147
|
+
- test/dummy/tmp/cache/270/560/User%2F3
|
148
|
+
- test/dummy/tmp/cache/271/570/User%2F4
|
149
|
+
- test/dummy/tmp/cache/272/580/User%2F5
|
150
|
+
- test/dummy/tmp/cache/273/590/User%2F6
|
151
|
+
- test/dummy/tmp/cache/275/6E0/Post%2F1
|
152
|
+
- test/dummy/tmp/cache/276/6F0/Post%2F2
|
153
|
+
- test/dummy/tmp/cache/277/700/Post%2F3
|
154
|
+
- test/dummy/tmp/cache/3A8/070/Comment%2F7
|
155
|
+
- test/dummy/tmp/cache/3A9/080/Comment%2F8
|
156
|
+
- test/dummy/tmp/cache/3AA/090/Comment%2F9
|
157
|
+
- test/dummy/tmp/cache/3D2/D30/Comment%2F10
|
158
|
+
- test/dummy/tmp/cache/3D4/D50/Comment%2F12
|
159
|
+
- test/dummy/tmp/cache/3D5/D60/Comment%2F13
|
160
|
+
- test/dummy/tmp/cache/3D6/D70/Comment%2F14
|
161
|
+
- test/dummy/tmp/cache/3D7/D80/Comment%2F15
|
162
|
+
- test/dummy/tmp/cache/58D/B70/Post%2Fuser_id-1
|
163
|
+
- test/find_cache_test.rb
|
164
|
+
- test/test_helper.rb
|
165
|
+
homepage: https://github.com/mustafaturan/findcache
|
166
|
+
licenses: []
|
167
|
+
post_install_message:
|
168
|
+
rdoc_options: []
|
169
|
+
require_paths:
|
170
|
+
- lib
|
171
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
172
|
+
none: false
|
173
|
+
requirements:
|
174
|
+
- - ! '>='
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
segments:
|
178
|
+
- 0
|
179
|
+
hash: -1945955979138925529
|
180
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
|
+
none: false
|
182
|
+
requirements:
|
183
|
+
- - ! '>='
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '0'
|
186
|
+
segments:
|
187
|
+
- 0
|
188
|
+
hash: -1945955979138925529
|
189
|
+
requirements: []
|
190
|
+
rubyforge_project:
|
191
|
+
rubygems_version: 1.8.24
|
192
|
+
signing_key:
|
193
|
+
specification_version: 3
|
194
|
+
summary: Cache for ActiveRecord find_by_id and find_by_(attr) methods.
|
195
|
+
test_files:
|
196
|
+
- test/dummy/app/assets/javascripts/application.js
|
197
|
+
- test/dummy/app/assets/stylesheets/application.css
|
198
|
+
- test/dummy/app/controllers/application_controller.rb
|
199
|
+
- test/dummy/app/helpers/application_helper.rb
|
200
|
+
- test/dummy/app/models/comment.rb
|
201
|
+
- test/dummy/app/models/post.rb
|
202
|
+
- test/dummy/app/models/user.rb
|
203
|
+
- test/dummy/app/views/layouts/application.html.erb
|
204
|
+
- test/dummy/config/application.rb
|
205
|
+
- test/dummy/config/boot.rb
|
206
|
+
- test/dummy/config/database.yml
|
207
|
+
- test/dummy/config/environment.rb
|
208
|
+
- test/dummy/config/environments/development.rb
|
209
|
+
- test/dummy/config/environments/production.rb
|
210
|
+
- test/dummy/config/environments/test.rb
|
211
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
212
|
+
- test/dummy/config/initializers/counter_cache_patch.rb
|
213
|
+
- test/dummy/config/initializers/inflections.rb
|
214
|
+
- test/dummy/config/initializers/mime_types.rb
|
215
|
+
- test/dummy/config/initializers/secret_token.rb
|
216
|
+
- test/dummy/config/initializers/session_store.rb
|
217
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
218
|
+
- test/dummy/config/locales/en.yml
|
219
|
+
- test/dummy/config/routes.rb
|
220
|
+
- test/dummy/config.ru
|
221
|
+
- test/dummy/db/development.sqlite3
|
222
|
+
- test/dummy/db/migrate/20120824210455_create_users.rb
|
223
|
+
- test/dummy/db/migrate/20120824210731_create_comments.rb
|
224
|
+
- test/dummy/db/migrate/20120824210927_create_posts.rb
|
225
|
+
- test/dummy/db/schema.rb
|
226
|
+
- test/dummy/db/test.sqlite3
|
227
|
+
- test/dummy/log/development.log
|
228
|
+
- test/dummy/log/test.log
|
229
|
+
- test/dummy/public/404.html
|
230
|
+
- test/dummy/public/422.html
|
231
|
+
- test/dummy/public/500.html
|
232
|
+
- test/dummy/public/favicon.ico
|
233
|
+
- test/dummy/Rakefile
|
234
|
+
- test/dummy/README.rdoc
|
235
|
+
- test/dummy/script/rails
|
236
|
+
- test/dummy/test/fixtures/comments.yml
|
237
|
+
- test/dummy/test/fixtures/posts.yml
|
238
|
+
- test/dummy/test/fixtures/users.yml
|
239
|
+
- test/dummy/test/unit/comment_test.rb
|
240
|
+
- test/dummy/test/unit/post_test.rb
|
241
|
+
- test/dummy/test/unit/user_test.rb
|
242
|
+
- test/dummy/tmp/cache/26E/540/User%2F1
|
243
|
+
- test/dummy/tmp/cache/26F/550/User%2F2
|
244
|
+
- test/dummy/tmp/cache/270/560/User%2F3
|
245
|
+
- test/dummy/tmp/cache/271/570/User%2F4
|
246
|
+
- test/dummy/tmp/cache/272/580/User%2F5
|
247
|
+
- test/dummy/tmp/cache/273/590/User%2F6
|
248
|
+
- test/dummy/tmp/cache/275/6E0/Post%2F1
|
249
|
+
- test/dummy/tmp/cache/276/6F0/Post%2F2
|
250
|
+
- test/dummy/tmp/cache/277/700/Post%2F3
|
251
|
+
- test/dummy/tmp/cache/3A8/070/Comment%2F7
|
252
|
+
- test/dummy/tmp/cache/3A9/080/Comment%2F8
|
253
|
+
- test/dummy/tmp/cache/3AA/090/Comment%2F9
|
254
|
+
- test/dummy/tmp/cache/3D2/D30/Comment%2F10
|
255
|
+
- test/dummy/tmp/cache/3D4/D50/Comment%2F12
|
256
|
+
- test/dummy/tmp/cache/3D5/D60/Comment%2F13
|
257
|
+
- test/dummy/tmp/cache/3D6/D70/Comment%2F14
|
258
|
+
- test/dummy/tmp/cache/3D7/D80/Comment%2F15
|
259
|
+
- test/dummy/tmp/cache/58D/B70/Post%2Fuser_id-1
|
260
|
+
- test/find_cache_test.rb
|
261
|
+
- test/test_helper.rb
|