nanoc-cachebuster 0.2.0 → 0.3.0

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.
data/HISTORY.md CHANGED
@@ -1,6 +1,11 @@
1
+ # 0.3.0
2
+
3
+ * Fixed naming collisions with Nanoc3
4
+
1
5
  # 0.2.0
2
6
 
3
7
  * Nanoc 3.3 compatibility (by John Nishinaga)
8
+ * Fixed spec suite (by Robert J Whitney)
4
9
 
5
10
  # 0.1.1
6
11
 
data/README.md CHANGED
@@ -71,6 +71,8 @@ to do is set some far-future expires header in your server configuration.
71
71
  Development
72
72
  ===========
73
73
 
74
+ Development happens in the `develop` branch, with stable code being merged to `master` to be released.
75
+
74
76
  Changes
75
77
  -------
76
78
 
@@ -0,0 +1 @@
1
+ require 'nanoc/cachebuster'
@@ -1,9 +1,10 @@
1
1
  require 'nanoc'
2
2
  require 'digest'
3
3
 
4
+ require 'nanoc/cachebuster/version'
5
+
4
6
  module Nanoc
5
7
  module Cachebuster
6
- autoload :VERSION, 'cachebuster/version'
7
8
 
8
9
  # List of file extensions that the routing system should regard
9
10
  # as needing a fingerprint. These are input file extensions, so
@@ -38,7 +39,8 @@ module Nanoc
38
39
  end
39
40
  end
40
41
 
41
- require File.expand_path('../filters', __FILE__)
42
- require File.expand_path('../helpers', __FILE__)
43
- require File.expand_path('../cachebuster/strategy', __FILE__)
44
42
  end
43
+
44
+ require 'nanoc/cachebuster/strategy'
45
+ require 'nanoc/filters/cache_buster'
46
+ require 'nanoc/helpers/cache_busting'
@@ -110,7 +110,7 @@ module Nanoc
110
110
  if current_item[:content_filename]
111
111
  File.expand_path(File.join(File.dirname(current_item[:content_filename]), path)).sub(/^#{Dir.pwd}/, '').sub(/^\/content/, '')
112
112
  else
113
- File.expand_path(File.dirname(current_item.path), path)
113
+ File.join(File.dirname(current_item.path), path)
114
114
  end
115
115
  end
116
116
  end
@@ -157,4 +157,3 @@ module Nanoc
157
157
  end
158
158
  end
159
159
  end
160
-
@@ -1,5 +1,5 @@
1
1
  module Nanoc
2
2
  module Cachebuster
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
@@ -147,10 +147,7 @@ describe Nanoc::Filters::CacheBuster do
147
147
 
148
148
  it_should_not_filter %Q{background: url(foo.png);}
149
149
  end
150
-
151
- # Needs documentation on what this test is actually testing, and thinking on convention.
152
- # This is currently responding to the else on line 113 of cachebuster#strategy.rb which is not adding the cb hash to the end of the file name.
153
- # Need to discover under what condition does an item has no :content_filename and consider what is best convention to handle this case.
150
+
154
151
  describe 'when the current item has no content path' do
155
152
  let(:target) { MockItem.image_file '/foo.png', '/../images/foo-cb123456789.png' }
156
153
  let(:item) { MockItem.generated_css_file }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-cachebuster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-14 00:00:00.000000000 Z
12
+ date: 2012-02-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nanoc
16
- requirement: &70096428299300 !ruby/object:Gem::Requirement
16
+ requirement: &70312252439040 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.3.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70096428299300
24
+ version_requirements: *70312252439040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &70096428298460 !ruby/object:Gem::Requirement
27
+ requirement: &70312252438620 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70096428298460
35
+ version_requirements: *70312252438620
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70096428297900 !ruby/object:Gem::Requirement
38
+ requirement: &70312252438160 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70096428297900
46
+ version_requirements: *70312252438160
47
47
  description: ! 'Your website should use far-future expires headers on static assets,
48
48
  to make
49
49
 
@@ -81,12 +81,11 @@ files:
81
81
  - LICENSE
82
82
  - README.md
83
83
  - Rakefile
84
+ - lib/nanoc-cachebuster.rb
84
85
  - lib/nanoc/cachebuster.rb
85
86
  - lib/nanoc/cachebuster/strategy.rb
86
87
  - lib/nanoc/cachebuster/version.rb
87
- - lib/nanoc/filters.rb
88
88
  - lib/nanoc/filters/cache_buster.rb
89
- - lib/nanoc/helpers.rb
90
89
  - lib/nanoc/helpers/cache_busting.rb
91
90
  - nanoc-cachebuster.gemspec
92
91
  - spec/nanoc/filters/cache_buster_spec.rb
@@ -106,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
105
  version: '0'
107
106
  segments:
108
107
  - 0
109
- hash: -1070542068596424145
108
+ hash: -1449409011190348151
110
109
  required_rubygems_version: !ruby/object:Gem::Requirement
111
110
  none: false
112
111
  requirements:
@@ -115,10 +114,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
114
  version: '0'
116
115
  segments:
117
116
  - 0
118
- hash: -1070542068596424145
117
+ hash: -1449409011190348151
119
118
  requirements: []
120
119
  rubyforge_project: nanoc-cachebuster
121
- rubygems_version: 1.8.15
120
+ rubygems_version: 1.8.17
122
121
  signing_key:
123
122
  specification_version: 3
124
123
  summary: Adds filters and helpers for cache busting to Nanoc
data/lib/nanoc/filters.rb DELETED
@@ -1,4 +0,0 @@
1
- module Nanoc::Filters
2
- autoload 'CacheBuster', 'nanoc/filters/cache_buster'
3
- Nanoc::Filter.register '::Nanoc::Filters::CacheBuster', :cache_buster
4
- end
data/lib/nanoc/helpers.rb DELETED
@@ -1,3 +0,0 @@
1
- module Nanoc::Helpers
2
- autoload 'CacheBusting', 'nanoc/helpers/cache_busting'
3
- end