rails_appcache 0.0.1 → 0.0.2
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 +4 -4
- data/lib/generators/appcache_manifest_generator.rb +32 -0
- data/lib/rails_appcache/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cad24b0943612791f9429cc73559029a070622ef
|
4
|
+
data.tar.gz: 2b6ac4a04f968d9828277aaa1e487c0255c571c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c0e81878ce55a2ba6c0130af23cddb51d235dc000920943e3c5f6b783750369dc21a6a7c95c588d65548b2cee28f7a1a9e7e88275a5fcf2fa43d8ead478c486
|
7
|
+
data.tar.gz: 7ba8ff694b56c0ad43db4c04846f5657cd548087b599d5bf99fb9d71f4233183d35075841340f92c3950ff5809e90ae18f94623fb8a6de6f5b47b24387cbd959
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
class AppcacheManifestGenerator < Rails::Generators::NamedBase
|
3
|
+
def create_appcache_manifest
|
4
|
+
create_file "app/views/rails_appcache/manifests/#{file_name}.appcache.erb", <<-FILE
|
5
|
+
CACHE MANIFEST
|
6
|
+
|
7
|
+
# auto-expire appcache in dev
|
8
|
+
# <%= appcache_version_string %>
|
9
|
+
|
10
|
+
CACHE:
|
11
|
+
# by default, only the root path is cached
|
12
|
+
/
|
13
|
+
|
14
|
+
# Cache additional paths by using path helpers:
|
15
|
+
# <%= posts_path %>
|
16
|
+
|
17
|
+
# Cache our JS/CSS bundles
|
18
|
+
<%= stylesheet_cache_path '#{file_name}' %>
|
19
|
+
<%= javascript_cache_path '#{file_name}' %>
|
20
|
+
|
21
|
+
# Cache additional assets by using the asset_cache_path, or any of the Rails built-in asset pipeline helpers
|
22
|
+
# <%= asset_cache_path 'logo.png' %>
|
23
|
+
# or
|
24
|
+
# <%= asset_path 'logo.png' %>
|
25
|
+
|
26
|
+
# Make everything else accessible
|
27
|
+
# WITHOUT THIS LINE, your browser will 404 for anything not explicitly listed under CACHE:
|
28
|
+
NETWORK:
|
29
|
+
*
|
30
|
+
FILE
|
31
|
+
end
|
32
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_appcache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Eagar
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- app/controllers/rails_appcache/application_controller.rb
|
37
37
|
- app/controllers/rails_appcache/manifests_controller.rb
|
38
38
|
- config/routes.rb
|
39
|
+
- lib/generators/appcache_manifest_generator.rb
|
39
40
|
- lib/rails_appcache.rb
|
40
41
|
- lib/rails_appcache/application_helper.rb
|
41
42
|
- lib/rails_appcache/engine.rb
|