roadie-rails 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2588094ced7c8738bf2f1675403a5c35cf33df8b
4
- data.tar.gz: 82db2a24a7b8cbb7b785e4ac5f85c169a31d3158
3
+ metadata.gz: fced095e9fe73e6a92eb55d780a42c06460a3486
4
+ data.tar.gz: dcd230517d07a86435ccf5c0fa861511e22722b4
5
5
  SHA512:
6
- metadata.gz: 3dc670a695f26347f83974fb6e72b58ce80403b5b3a225de4864ffdd0f713cfe2c0a3fcb3169603ffae8a6b44f565feb9f8df62b0fcd81425afaead80f72bad1
7
- data.tar.gz: b240e2a87938cbc0c7089684f769bb78bb4c7ec1b9023255788a7adc83cfa87f6d983bfd5741650f1ac2e01281ff1e736cc507afda83cd20337aceb74ffd8d0e
6
+ metadata.gz: 56363e116f1c696afdeb9acf7cd8b3451de312137cbc92e681d754725ee4e41627c7fefa6b550fcb26e0da1f7fb8df9f19c9969fb491c83ebc95346e886cc6c4
7
+ data.tar.gz: da2dc4683b3f24d4572c43cdcc4f3f427420efc28554f67b156ae24c7d4eb633e41b5abed0bb03c9e89292c521515f4f0f32f33446168602ea197b341d2c1b5d
data/Changelog.md CHANGED
@@ -1,8 +1,13 @@
1
1
  ### development version
2
2
 
3
- [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.5...master)
3
+ [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.6...master)
4
4
 
5
- * Nothing yet.
5
+ ### 1.0.6
6
+
7
+ [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.5...v1.0.6)
8
+
9
+ * Bug fixes:
10
+ * Support Sprockets 3's new hash length (#41)
6
11
 
7
12
  ### 1.0.5
8
13
 
@@ -26,8 +26,17 @@ module Roadie
26
26
  remove_asset_prefix(href.split('?').first)
27
27
  end
28
28
 
29
+ DIGEST_PATTERN = /
30
+ - # Digest comes after a dash
31
+ (?:
32
+ [a-z0-9]{32} | # Old style is 32 character hash
33
+ [a-z0-9]{64} # New style is 64 characters
34
+ )
35
+ \. # Dot for the file extension
36
+ /x.freeze
37
+
29
38
  def remove_asset_digest(path)
30
- path.gsub(/-[a-z0-9]{32}\./, '.')
39
+ path.gsub(DIGEST_PATTERN, '.')
31
40
  end
32
41
 
33
42
  def remove_asset_prefix(path)
@@ -1,5 +1,5 @@
1
1
  module Roadie
2
2
  module Rails
3
- VERSION = "1.0.5"
3
+ VERSION = "1.0.6"
4
4
  end
5
5
  end
@@ -38,7 +38,10 @@ module Roadie
38
38
  it "ignores asset digest" do
39
39
  pipeline.add_asset "good.css", "good.css.scss", ""
40
40
  provider = AssetPipelineProvider.new(pipeline)
41
+ # Old digest length
41
42
  expect(provider.find_stylesheet("/assets/good-a1b605c3ff85456f0bf7bbbe3f59030a.css")).not_to be_nil
43
+ # New digest length
44
+ expect(provider.find_stylesheet("/assets/good-00acbfe0213dff8c5ba7232e3dabb3584c9e216bdb489f69d7aa20e0e101f3e6.css")).not_to be_nil
42
45
  end
43
46
 
44
47
  it "will still find assets actually named with a hash at the end" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roadie-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus Bergmark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-08 00:00:00.000000000 Z
11
+ date: 2015-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roadie