rack-page_caching 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d512ec2d01b351510c2eab8a6d5b4e8c0c3845f
4
- data.tar.gz: b344ee2c32bc6a88fa0922543545ba5830e0253c
3
+ metadata.gz: 21eb17443ad18bf94e84f24780751458a3dd65f0
4
+ data.tar.gz: e8c38b6013a424a5493a51045d10be48b8b51e96
5
5
  SHA512:
6
- metadata.gz: d70c1cabe8b6f026a3bddb12899dad0c5ae682a6a2631495019367c85bdb0fbc1cb366bfd3834cbc76f378c1c6f16ad554c39c839fba9ee297bffa35d3176e8d
7
- data.tar.gz: 86d5bbf8106230f079c168e835cd7ff4354f92f3144bf5c9e06e3c1a7400c6bb664e845465123722cf91677300faa90269f55784b27f94527201b396aaef96a6
6
+ metadata.gz: 79dfeb508fcffeed8938a168fc057c8a1adbad0673c586e92d2c87875de3f48353cd557282dadd5f34455dd7497d04778f30ba63f2413d689f3415cd4326f3d9
7
+ data.tar.gz: b4598781e277ab092032a6c084170110ffa0cb41788c4bf988d08ff505db0d7b899a939bf8d6f2da38b6ccd137f7ff75249a00d29bb895b6a86b89178692876c
data/README.md CHANGED
@@ -6,8 +6,8 @@
6
6
  [![Dependency Status](https://gemnasium.com/weynsee/rack-page_caching.svg)](https://gemnasium.com/weynsee/rack-page_caching)
7
7
 
8
8
  Rack::PageCaching is a Rack middleware that aids in static page caching. It serves
9
- the same purpose as [page caching in Rails](https://github.com/rails/actionpack-page_caching)
10
- and was designed to be a drop-in replacement to Rails page caching.
9
+ the same purpose as [Rails page caching](https://github.com/rails/actionpack-page_caching)
10
+ and was designed to be a drop-in replacement for it.
11
11
 
12
12
  Rack::PageCaching provides a few differences from Rails page caching. It is
13
13
  implemented as a Rack middleware, which means transformations done on the
@@ -70,7 +70,7 @@ config.middleware.use Rack::PageCaching,
70
70
  # e.g. :best_speed and :best_compression. To turn off gzip, pass in false.
71
71
  gzip: :best_speed,
72
72
  # Hostnames can be included in the path of the page cache. Default is false.
73
- include_hostname: false
73
+ include_hostname: true
74
74
  ```
75
75
  Rack::PageCaching respects `config.action_controller.perform_caching` and
76
76
  will skip cache generation if it is false.
@@ -105,6 +105,18 @@ class WeblogController < ActionController::Base
105
105
  end
106
106
  end
107
107
  ```
108
+ You can delete pages manually (e.g. in a rake task) using the following command:
109
+ ```ruby
110
+ Rack::PageCaching::Cache.delete 'weblog/*.html'
111
+ # if you have hostnames enabled, use '**/weblog/*.html' to delete regardless
112
+ # of which hostname the files are nested in
113
+ ```
114
+
115
+ ## Acknowledgements
116
+
117
+ Tests for compatibility with Rails page caching and ActionController integration
118
+ were heavily inspired by code in the
119
+ [Rails page caching gem](https://github.com/rails/actionpack-page_caching).
108
120
 
109
121
  ## Contributing
110
122
 
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class PageCaching
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.required_ruby_version = '>= 1.9.2'
21
+ spec.required_ruby_version = '>= 1.9.3'
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.6"
24
24
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-page_caching
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne See
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-15 00:00:00.000000000 Z
11
+ date: 2014-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -155,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
- version: 1.9.2
158
+ version: 1.9.3
159
159
  required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  requirements:
161
161
  - - ">="