cache_cow 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/.gitignore.bak +4 -0
- data/.rspec +2 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +176 -0
- data/MIT-LICENSE +20 -0
- data/README.md +48 -0
- data/Rakefile +54 -0
- data/cache_cow.gemspec +32 -0
- data/lib/cache_cow.rb +8 -0
- data/lib/cache_cow/acts_as_cached.rb +172 -0
- data/lib/cache_cow/cacheable.rb +76 -0
- data/lib/cache_cow/cached_id_list.rb +46 -0
- data/lib/cache_cow/version.rb +3 -0
- data/lib/tasks/cache_cow_tasks.rake +4 -0
- data/spec/cache_cow/acts_as_cached_spec.rb +8 -0
- data/spec/cache_cow/cacheable_spec.rb +161 -0
- data/spec/cache_cow/cached_id_list_spec.rb +54 -0
- data/spec/cache_cow_spec.rb +8 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/assets/stylesheets/application.css +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/models/blog_comment.rb +2 -0
- data/spec/dummy/app/models/blog_post.rb +2 -0
- data/spec/dummy/app/models/comment.rb +2 -0
- data/spec/dummy/app/models/post.rb +6 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +49 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +30 -0
- data/spec/dummy/config/environments/production.rb +60 -0
- data/spec/dummy/config/environments/test.rb +39 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +58 -0
- data/spec/dummy/db/migrate/20111026035600_create_posts.rb +11 -0
- data/spec/dummy/db/migrate/20111026035754_create_comments.rb +10 -0
- data/spec/dummy/db/migrate/20111026222959_add_sti_to_posts_and_comments.rb +6 -0
- data/spec/dummy/db/schema.rb +32 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/spec/factories.rb +11 -0
- data/spec/spec_helper.rb +26 -0
- metadata +310 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
dir = File.dirname(File.expand_path(__FILE__))
|
2
|
+
$LOAD_PATH.unshift dir + '/../lib'
|
3
|
+
|
4
|
+
# Configure Rails Environment
|
5
|
+
ENV["RAILS_ENV"] ||= 'test'
|
6
|
+
|
7
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
8
|
+
require 'cache_cow'
|
9
|
+
|
10
|
+
require 'rspec/rails'
|
11
|
+
require "ammeter/init"
|
12
|
+
require 'factory_girl_rails'
|
13
|
+
|
14
|
+
# Load support files
|
15
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
16
|
+
|
17
|
+
RSpec.configure do |config|
|
18
|
+
config.mock_with :rspec
|
19
|
+
config.use_transactional_fixtures = false
|
20
|
+
|
21
|
+
config.before(:each) {
|
22
|
+
Rails.cache.clear
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
Rails.backtrace_cleaner.remove_silencers!
|
metadata
ADDED
@@ -0,0 +1,310 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cache_cow
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Ross Kaffenberger
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-10-26 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
22
|
+
none: false
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
hash: 7
|
27
|
+
segments:
|
28
|
+
- 3
|
29
|
+
- 0
|
30
|
+
version: "3.0"
|
31
|
+
requirement: *id001
|
32
|
+
prerelease: false
|
33
|
+
name: rails
|
34
|
+
type: :runtime
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
hash: 3
|
42
|
+
segments:
|
43
|
+
- 0
|
44
|
+
version: "0"
|
45
|
+
requirement: *id002
|
46
|
+
prerelease: false
|
47
|
+
name: dalli
|
48
|
+
type: :development
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
hash: 3
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
version: "0"
|
59
|
+
requirement: *id003
|
60
|
+
prerelease: false
|
61
|
+
name: rspec
|
62
|
+
type: :development
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
hash: 3
|
70
|
+
segments:
|
71
|
+
- 0
|
72
|
+
version: "0"
|
73
|
+
requirement: *id004
|
74
|
+
prerelease: false
|
75
|
+
name: rspec-rails
|
76
|
+
type: :development
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
79
|
+
none: false
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
hash: 3
|
84
|
+
segments:
|
85
|
+
- 0
|
86
|
+
version: "0"
|
87
|
+
requirement: *id005
|
88
|
+
prerelease: false
|
89
|
+
name: steak
|
90
|
+
type: :development
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
hash: 3
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
version: "0"
|
101
|
+
requirement: *id006
|
102
|
+
prerelease: false
|
103
|
+
name: capybara
|
104
|
+
type: :development
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
hash: 3
|
112
|
+
segments:
|
113
|
+
- 0
|
114
|
+
version: "0"
|
115
|
+
requirement: *id007
|
116
|
+
prerelease: false
|
117
|
+
name: ammeter
|
118
|
+
type: :development
|
119
|
+
- !ruby/object:Gem::Dependency
|
120
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
hash: 3
|
126
|
+
segments:
|
127
|
+
- 0
|
128
|
+
version: "0"
|
129
|
+
requirement: *id008
|
130
|
+
prerelease: false
|
131
|
+
name: database_cleaner
|
132
|
+
type: :development
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
135
|
+
none: false
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
hash: 3
|
140
|
+
segments:
|
141
|
+
- 0
|
142
|
+
version: "0"
|
143
|
+
requirement: *id009
|
144
|
+
prerelease: false
|
145
|
+
name: factory_girl_rails
|
146
|
+
type: :development
|
147
|
+
- !ruby/object:Gem::Dependency
|
148
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
hash: 3
|
154
|
+
segments:
|
155
|
+
- 0
|
156
|
+
version: "0"
|
157
|
+
requirement: *id010
|
158
|
+
prerelease: false
|
159
|
+
name: sqlite3
|
160
|
+
type: :development
|
161
|
+
description: CacheCow provides an api for caching results of methods and associations on ActiveRecord models.
|
162
|
+
email:
|
163
|
+
- rosskaff@gmail.com
|
164
|
+
executables: []
|
165
|
+
|
166
|
+
extensions: []
|
167
|
+
|
168
|
+
extra_rdoc_files: []
|
169
|
+
|
170
|
+
files:
|
171
|
+
- .gitignore
|
172
|
+
- .gitignore.bak
|
173
|
+
- .rspec
|
174
|
+
- CHANGELOG.md
|
175
|
+
- Gemfile
|
176
|
+
- Gemfile.lock
|
177
|
+
- MIT-LICENSE
|
178
|
+
- README.md
|
179
|
+
- Rakefile
|
180
|
+
- cache_cow.gemspec
|
181
|
+
- lib/cache_cow.rb
|
182
|
+
- lib/cache_cow/acts_as_cached.rb
|
183
|
+
- lib/cache_cow/cacheable.rb
|
184
|
+
- lib/cache_cow/cached_id_list.rb
|
185
|
+
- lib/cache_cow/version.rb
|
186
|
+
- lib/tasks/cache_cow_tasks.rake
|
187
|
+
- spec/cache_cow/acts_as_cached_spec.rb
|
188
|
+
- spec/cache_cow/cacheable_spec.rb
|
189
|
+
- spec/cache_cow/cached_id_list_spec.rb
|
190
|
+
- spec/cache_cow_spec.rb
|
191
|
+
- spec/dummy/Rakefile
|
192
|
+
- spec/dummy/app/assets/javascripts/application.js
|
193
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
194
|
+
- spec/dummy/app/controllers/application_controller.rb
|
195
|
+
- spec/dummy/app/helpers/application_helper.rb
|
196
|
+
- spec/dummy/app/mailers/.gitkeep
|
197
|
+
- spec/dummy/app/models/.gitkeep
|
198
|
+
- spec/dummy/app/models/blog_comment.rb
|
199
|
+
- spec/dummy/app/models/blog_post.rb
|
200
|
+
- spec/dummy/app/models/comment.rb
|
201
|
+
- spec/dummy/app/models/post.rb
|
202
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
203
|
+
- spec/dummy/config.ru
|
204
|
+
- spec/dummy/config/application.rb
|
205
|
+
- spec/dummy/config/boot.rb
|
206
|
+
- spec/dummy/config/database.yml
|
207
|
+
- spec/dummy/config/environment.rb
|
208
|
+
- spec/dummy/config/environments/development.rb
|
209
|
+
- spec/dummy/config/environments/production.rb
|
210
|
+
- spec/dummy/config/environments/test.rb
|
211
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
212
|
+
- spec/dummy/config/initializers/inflections.rb
|
213
|
+
- spec/dummy/config/initializers/mime_types.rb
|
214
|
+
- spec/dummy/config/initializers/secret_token.rb
|
215
|
+
- spec/dummy/config/initializers/session_store.rb
|
216
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
217
|
+
- spec/dummy/config/locales/en.yml
|
218
|
+
- spec/dummy/config/routes.rb
|
219
|
+
- spec/dummy/db/migrate/20111026035600_create_posts.rb
|
220
|
+
- spec/dummy/db/migrate/20111026035754_create_comments.rb
|
221
|
+
- spec/dummy/db/migrate/20111026222959_add_sti_to_posts_and_comments.rb
|
222
|
+
- spec/dummy/db/schema.rb
|
223
|
+
- spec/dummy/lib/assets/.gitkeep
|
224
|
+
- spec/dummy/log/.gitkeep
|
225
|
+
- spec/dummy/public/404.html
|
226
|
+
- spec/dummy/public/422.html
|
227
|
+
- spec/dummy/public/500.html
|
228
|
+
- spec/dummy/public/favicon.ico
|
229
|
+
- spec/dummy/script/rails
|
230
|
+
- spec/dummy/spec/factories.rb
|
231
|
+
- spec/spec_helper.rb
|
232
|
+
homepage: ""
|
233
|
+
licenses: []
|
234
|
+
|
235
|
+
post_install_message:
|
236
|
+
rdoc_options: []
|
237
|
+
|
238
|
+
require_paths:
|
239
|
+
- lib
|
240
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
242
|
+
requirements:
|
243
|
+
- - ">="
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
hash: 3
|
246
|
+
segments:
|
247
|
+
- 0
|
248
|
+
version: "0"
|
249
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
|
+
none: false
|
251
|
+
requirements:
|
252
|
+
- - ">="
|
253
|
+
- !ruby/object:Gem::Version
|
254
|
+
hash: 3
|
255
|
+
segments:
|
256
|
+
- 0
|
257
|
+
version: "0"
|
258
|
+
requirements: []
|
259
|
+
|
260
|
+
rubyforge_project: cache_cow
|
261
|
+
rubygems_version: 1.8.10
|
262
|
+
signing_key:
|
263
|
+
specification_version: 3
|
264
|
+
summary: Allows ActiveRecord models to "acts_as_cached"
|
265
|
+
test_files:
|
266
|
+
- spec/cache_cow/acts_as_cached_spec.rb
|
267
|
+
- spec/cache_cow/cacheable_spec.rb
|
268
|
+
- spec/cache_cow/cached_id_list_spec.rb
|
269
|
+
- spec/cache_cow_spec.rb
|
270
|
+
- spec/dummy/Rakefile
|
271
|
+
- spec/dummy/app/assets/javascripts/application.js
|
272
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
273
|
+
- spec/dummy/app/controllers/application_controller.rb
|
274
|
+
- spec/dummy/app/helpers/application_helper.rb
|
275
|
+
- spec/dummy/app/mailers/.gitkeep
|
276
|
+
- spec/dummy/app/models/.gitkeep
|
277
|
+
- spec/dummy/app/models/blog_comment.rb
|
278
|
+
- spec/dummy/app/models/blog_post.rb
|
279
|
+
- spec/dummy/app/models/comment.rb
|
280
|
+
- spec/dummy/app/models/post.rb
|
281
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
282
|
+
- spec/dummy/config.ru
|
283
|
+
- spec/dummy/config/application.rb
|
284
|
+
- spec/dummy/config/boot.rb
|
285
|
+
- spec/dummy/config/database.yml
|
286
|
+
- spec/dummy/config/environment.rb
|
287
|
+
- spec/dummy/config/environments/development.rb
|
288
|
+
- spec/dummy/config/environments/production.rb
|
289
|
+
- spec/dummy/config/environments/test.rb
|
290
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
291
|
+
- spec/dummy/config/initializers/inflections.rb
|
292
|
+
- spec/dummy/config/initializers/mime_types.rb
|
293
|
+
- spec/dummy/config/initializers/secret_token.rb
|
294
|
+
- spec/dummy/config/initializers/session_store.rb
|
295
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
296
|
+
- spec/dummy/config/locales/en.yml
|
297
|
+
- spec/dummy/config/routes.rb
|
298
|
+
- spec/dummy/db/migrate/20111026035600_create_posts.rb
|
299
|
+
- spec/dummy/db/migrate/20111026035754_create_comments.rb
|
300
|
+
- spec/dummy/db/migrate/20111026222959_add_sti_to_posts_and_comments.rb
|
301
|
+
- spec/dummy/db/schema.rb
|
302
|
+
- spec/dummy/lib/assets/.gitkeep
|
303
|
+
- spec/dummy/log/.gitkeep
|
304
|
+
- spec/dummy/public/404.html
|
305
|
+
- spec/dummy/public/422.html
|
306
|
+
- spec/dummy/public/500.html
|
307
|
+
- spec/dummy/public/favicon.ico
|
308
|
+
- spec/dummy/script/rails
|
309
|
+
- spec/dummy/spec/factories.rb
|
310
|
+
- spec/spec_helper.rb
|