nanoc-cachebuster 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2eacd48be939caceeb4fb8683425b6d5f541815d
4
+ data.tar.gz: 1cee033c133254846eac25646f1acbb1827cb8a6
5
+ SHA512:
6
+ metadata.gz: 6cb22010e2e8cb9022e0629d37681158a9f0d1e6864ca31d45948cacba52b16a47af13d0aeb2ffd92618e25b6a78408d20b96babff2f7f3aff48121b871c349a
7
+ data.tar.gz: d91085e36296c3038b366eed4b7c3a0eed5e6a32b17263f7505e23be56d3dd78b68792c97a9d3e2df5fc5ff9c928a35c5392179a09a2a31cc5534aafd759c221
data/HISTORY.md CHANGED
@@ -1,7 +1,3 @@
1
- # 0.3.1
2
-
3
- * Fixed incorrect URL to project homepage in gemspec
4
-
5
1
  # 0.3.0
6
2
 
7
3
  * Fixed naming collisions with Nanoc3
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  A simple Ruby gem that enhances Nanoc with cache-busting capabilities.
2
2
 
3
+ **warning**: this gem is outdated and no longer actively maintained. Proceed with caution.
4
+
3
5
  Description
4
6
  ===========
5
7
 
@@ -9,7 +9,7 @@ module Nanoc
9
9
  # List of file extensions that the routing system should regard
10
10
  # as needing a fingerprint. These are input file extensions, so
11
11
  # we also include the extensions used by popular preprocessors.
12
- FILETYPES_TO_FINGERPRINT = %w[css js scss sass less coffee html htm png jpg jpeg gif]
12
+ FILETYPES_TO_FINGERPRINT = %w[css js scss sass less coffee html htm png jpg jpeg gif svg]
13
13
 
14
14
  # List of file extensions that should be considered css. This is used
15
15
  # to determine what filtering strategy to use when none is explicitly
@@ -35,7 +35,7 @@ module Nanoc
35
35
  end
36
36
 
37
37
  def self.fingerprint_file(filename, length = 8)
38
- CACHEBUSTER_PREFIX + Digest::MD5.hexdigest(File.read(filename))[0..length.to_i]
38
+ CACHEBUSTER_PREFIX + Digest::MD5.hexdigest(File.open(filename, 'rb'){|io| io.read})[0..length.to_i]
39
39
  end
40
40
  end
41
41
 
@@ -1,5 +1,5 @@
1
1
  module Nanoc
2
2
  module Cachebuster
3
- VERSION = '0.3.1'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -24,8 +24,8 @@ module Nanoc
24
24
  # @todo Also allow passing in an item rather than a path
25
25
  # @param <String> filename is the path to the file to fingerprint.
26
26
  # @return <String> file fingerprint
27
- def fingerprint(filename)
28
- Nanoc::Cachebuster.fingerprint_file(filename)
27
+ def fingerprint(filename, length = 8)
28
+ Nanoc::Cachebuster.fingerprint_file(filename, length)
29
29
  end
30
30
  end
31
31
  end
metadata CHANGED
@@ -1,96 +1,78 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-cachebuster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
5
- prerelease:
4
+ version: 0.4.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Arjan van der Gaag
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-05-24 00:00:00.000000000 Z
11
+ date: 2016-07-25 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: nanoc
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: 3.3.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: 3.3.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
- description: ! 'Your website should use far-future expires headers on static assets,
63
- to make
64
-
65
- the best use of client-side caching. But when a file is cached, updates won''t
66
-
55
+ description: |
56
+ Your website should use far-future expires headers on static assets, to make
57
+ the best use of client-side caching. But when a file is cached, updates won't
67
58
  get picked up. Cache busting is the practice of making the filename of a
68
-
69
59
  cached asset unique to its content, so it can be cached without having to
70
-
71
60
  worry about future changes.
72
61
 
73
-
74
62
  This gem adds a filter and some helper methods to Nanoc, the static site
75
-
76
63
  generator, to simplify the process of making asset filenames unique. It helps
77
-
78
64
  you output fingerprinted filenames, and refer to them from your source files.
79
65
 
80
-
81
66
  It works on images, javascripts and stylesheets. It is extracted from the
82
-
83
67
  nanoc-template project at http://github.com/avdgaag/nanoc-template.
84
-
85
- '
86
68
  email:
87
69
  - arjan@arjanvandergaag.nl
88
70
  executables: []
89
71
  extensions: []
90
72
  extra_rdoc_files: []
91
73
  files:
92
- - .gitignore
93
- - .rspec
74
+ - ".gitignore"
75
+ - ".rspec"
94
76
  - Gemfile
95
77
  - HISTORY.md
96
78
  - LICENSE
@@ -108,33 +90,26 @@ files:
108
90
  - spec/spec_helper.rb
109
91
  homepage: https://github.com/avdgaag/nanoc-cachebuster
110
92
  licenses: []
93
+ metadata: {}
111
94
  post_install_message:
112
95
  rdoc_options: []
113
96
  require_paths:
114
97
  - lib
115
98
  required_ruby_version: !ruby/object:Gem::Requirement
116
- none: false
117
99
  requirements:
118
- - - ! '>='
100
+ - - ">="
119
101
  - !ruby/object:Gem::Version
120
102
  version: '0'
121
- segments:
122
- - 0
123
- hash: 1812950939534380671
124
103
  required_rubygems_version: !ruby/object:Gem::Requirement
125
- none: false
126
104
  requirements:
127
- - - ! '>='
105
+ - - ">="
128
106
  - !ruby/object:Gem::Version
129
107
  version: '0'
130
- segments:
131
- - 0
132
- hash: 1812950939534380671
133
108
  requirements: []
134
109
  rubyforge_project: nanoc-cachebuster
135
- rubygems_version: 1.8.24
110
+ rubygems_version: 2.6.4
136
111
  signing_key:
137
- specification_version: 3
112
+ specification_version: 4
138
113
  summary: Adds filters and helpers for cache busting to Nanoc
139
114
  test_files:
140
115
  - spec/nanoc/filters/cache_buster_spec.rb