actionpack-page_caching 1.0.0 → 1.0.1
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.
Potentially problematic release.
This version of actionpack-page_caching might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/.travis.yml +8 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +1 -1
- data/README.md +14 -2
- data/actionpack-page_caching.gemspec +2 -2
- data/gemfiles/Gemfile-4-0-stable +5 -0
- data/gemfiles/Gemfile-edge +5 -0
- data/lib/actionpack/page_caching.rb +1 -0
- data/lib/actionpack/page_caching/railtie.rb +11 -0
- metadata +19 -27
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: aec40ddc90cc6e4f0c88a1d041a4e2368e74f590
|
4
|
+
data.tar.gz: 284f9f8a27525401639aa769aca2d832386f1119
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a842015d58450597cce2b09cfb0d72c0646e74633b7ac8f73f0d81beaa3f96745395039791121f23dfc7328fc2bf4b938976fb54135686d1c4362913e145660d
|
7
|
+
data.tar.gz: 842609d530ac853bad6bdf6ef14320c26197421953c3b1af9d0e3711b31166cbad88276874966ea82a90869468eb40c9a8e18498fa31eced78b99dc3cf6c1aa8
|
data/.travis.yml
CHANGED
@@ -3,6 +3,14 @@ before_install:
|
|
3
3
|
- gem install bundler
|
4
4
|
rvm:
|
5
5
|
- 1.9.3
|
6
|
+
- 2.0.0
|
7
|
+
gemfile:
|
8
|
+
- Gemfile
|
9
|
+
- gemfiles/Gemfile-4-0-stable
|
10
|
+
- gemfiles/Gemfile-edge
|
11
|
+
matrix:
|
12
|
+
allow_failures:
|
13
|
+
- gemfile: gemfiles/Gemfile-edge
|
6
14
|
notifications:
|
7
15
|
email: false
|
8
16
|
irc:
|
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
actionpack-page_caching
|
2
2
|
=======================
|
3
3
|
|
4
|
-
Static page caching for Action Pack (removed from core in Rails 4.0)
|
4
|
+
Static page caching for Action Pack (removed from core in Rails 4.0).
|
5
|
+
|
6
|
+
**NOTE:** It will continue to be officially maintained until Rails 4.1.
|
5
7
|
|
6
8
|
Installation
|
7
9
|
------------
|
@@ -30,6 +32,10 @@ treated the same. Content management systems -- including weblogs and wikis --
|
|
30
32
|
have many pages that are a great fit for this approach, but account-based systems
|
31
33
|
where people log in and manipulate their own data are often less likely candidates.
|
32
34
|
|
35
|
+
First you need to set `page_cache_directory` in your configuration file:
|
36
|
+
|
37
|
+
config.action_controller.page_cache_directory = "#{Rails.root.to_s}/public/deploy"
|
38
|
+
|
33
39
|
Specifying which actions to cache is done through the `caches_page` class method:
|
34
40
|
|
35
41
|
class WeblogController < ActionController::Base
|
@@ -56,7 +62,7 @@ and friends:
|
|
56
62
|
end
|
57
63
|
end
|
58
64
|
|
59
|
-
Additionally, you can expire caches using [Sweepers](
|
65
|
+
Additionally, you can expire caches using [Sweepers](https://github.com/rails/rails-observers#action-controller-sweeper)
|
60
66
|
that act on changes in the model to determine when a cache is supposed to be expired.
|
61
67
|
|
62
68
|
Contributing
|
@@ -67,3 +73,9 @@ Contributing
|
|
67
73
|
3. Commit your changes (`git commit -am 'Add some feature'`).
|
68
74
|
4. Push to the branch (`git push origin my-new-feature`).
|
69
75
|
5. Create a new Pull Request.
|
76
|
+
|
77
|
+
Code Status
|
78
|
+
-----------
|
79
|
+
|
80
|
+
* [](https://travis-ci.org/rails/page_caching)
|
81
|
+
* [](https://gemnasium.com/rails/actionpack-page_caching)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = 'actionpack-page_caching'
|
5
|
-
gem.version = '1.0.
|
5
|
+
gem.version = '1.0.1'
|
6
6
|
gem.author = 'David Heinemeier Hansson'
|
7
7
|
gem.email = 'david@loudthinking.com'
|
8
8
|
gem.description = 'Static page caching for Action Pack (removed from core in Rails 4.0)'
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
15
15
|
gem.require_paths = ['lib']
|
16
16
|
|
17
|
-
gem.add_dependency 'actionpack', '>= 4.0.0
|
17
|
+
gem.add_dependency 'actionpack', '>= 4.0.0', '< 5'
|
18
18
|
|
19
19
|
gem.add_development_dependency 'mocha'
|
20
20
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'rails/railtie'
|
2
|
+
|
3
|
+
module ActionPack
|
4
|
+
module PageCaching
|
5
|
+
class Railtie < Rails::Railtie
|
6
|
+
initializer 'action_pack.page_caching.set_config', before: 'action_controller.set_configs' do |app|
|
7
|
+
app.config.action_controller.page_cache_directory ||= app.config.paths['public'].first
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
metadata
CHANGED
@@ -1,52 +1,47 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionpack-page_caching
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- David Heinemeier Hansson
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: actionpack
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 4.0.0
|
19
|
+
version: 4.0.0
|
22
20
|
- - <
|
23
21
|
- !ruby/object:Gem::Version
|
24
|
-
version: '5
|
22
|
+
version: '5'
|
25
23
|
type: :runtime
|
26
24
|
prerelease: false
|
27
25
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
26
|
requirements:
|
30
|
-
- -
|
27
|
+
- - '>='
|
31
28
|
- !ruby/object:Gem::Version
|
32
|
-
version: 4.0.0
|
29
|
+
version: 4.0.0
|
33
30
|
- - <
|
34
31
|
- !ruby/object:Gem::Version
|
35
|
-
version: '5
|
32
|
+
version: '5'
|
36
33
|
- !ruby/object:Gem::Dependency
|
37
34
|
name: mocha
|
38
35
|
requirement: !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
36
|
requirements:
|
41
|
-
- -
|
37
|
+
- - '>='
|
42
38
|
- !ruby/object:Gem::Version
|
43
39
|
version: '0'
|
44
40
|
type: :development
|
45
41
|
prerelease: false
|
46
42
|
version_requirements: !ruby/object:Gem::Requirement
|
47
|
-
none: false
|
48
43
|
requirements:
|
49
|
-
- -
|
44
|
+
- - '>='
|
50
45
|
- !ruby/object:Gem::Version
|
51
46
|
version: '0'
|
52
47
|
description: Static page caching for Action Pack (removed from core in Rails 4.0)
|
@@ -57,46 +52,43 @@ extra_rdoc_files: []
|
|
57
52
|
files:
|
58
53
|
- .gitignore
|
59
54
|
- .travis.yml
|
55
|
+
- CHANGELOG.md
|
60
56
|
- Gemfile
|
61
57
|
- LICENSE.txt
|
62
58
|
- README.md
|
63
59
|
- Rakefile
|
64
60
|
- actionpack-page_caching.gemspec
|
61
|
+
- gemfiles/Gemfile-4-0-stable
|
62
|
+
- gemfiles/Gemfile-edge
|
65
63
|
- lib/action_controller/caching/pages.rb
|
66
64
|
- lib/action_controller/page_caching.rb
|
67
65
|
- lib/actionpack/page_caching.rb
|
66
|
+
- lib/actionpack/page_caching/railtie.rb
|
68
67
|
- test/abstract_unit.rb
|
69
68
|
- test/caching_test.rb
|
70
69
|
- test/log_subscriber_test.rb
|
71
70
|
homepage: https://github.com/rails/actionpack-page_caching
|
72
71
|
licenses: []
|
72
|
+
metadata: {}
|
73
73
|
post_install_message:
|
74
74
|
rdoc_options: []
|
75
75
|
require_paths:
|
76
76
|
- lib
|
77
77
|
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
-
none: false
|
79
78
|
requirements:
|
80
|
-
- -
|
79
|
+
- - '>='
|
81
80
|
- !ruby/object:Gem::Version
|
82
81
|
version: '0'
|
83
|
-
segments:
|
84
|
-
- 0
|
85
|
-
hash: -3221289291449312417
|
86
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
83
|
requirements:
|
89
|
-
- -
|
84
|
+
- - '>='
|
90
85
|
- !ruby/object:Gem::Version
|
91
86
|
version: '0'
|
92
|
-
segments:
|
93
|
-
- 0
|
94
|
-
hash: -3221289291449312417
|
95
87
|
requirements: []
|
96
88
|
rubyforge_project:
|
97
|
-
rubygems_version:
|
89
|
+
rubygems_version: 2.0.6
|
98
90
|
signing_key:
|
99
|
-
specification_version:
|
91
|
+
specification_version: 4
|
100
92
|
summary: Static page caching for Action Pack (removed from core in Rails 4.0)
|
101
93
|
test_files:
|
102
94
|
- test/abstract_unit.rb
|