branchable_cdn_assets 0.5.1 → 0.5.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1681d174d7e3443b945cfba8e3400c7c5a48b891
|
4
|
+
data.tar.gz: cd0d194648f0ed2b631610597c4ca742bea4be60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f8c6164de81843f7f769971df63a3d373afa79fb547e33295725cb77550dd41b93c79bda3c790cea54e64660862824b5f05af891f82b1402c3a142951a4c0f6
|
7
|
+
data.tar.gz: b364e24a139bdabe12c2ab47cc19f032d80412b6a9bce473b7e1fc89997a35413b308c5ba21f79fa163eb6b3d360af66afede0a25c9ce333c67fe0fc528405dc
|
@@ -19,7 +19,7 @@ module BranchableCDNAssets
|
|
19
19
|
@config = config
|
20
20
|
@root = config.cdn_dir
|
21
21
|
@branch = branch || config.branch
|
22
|
-
@manifest = Manifest.new( File.join( @root, "#{@branch}.manifest" ) )
|
22
|
+
@manifest = Manifest.new( File.join( @root, "#{@branch.gsub('/','_')}.manifest" ) )
|
23
23
|
end
|
24
24
|
|
25
25
|
# @param where [Symbol] :local, :remote, :all (default)
|
@@ -75,6 +75,23 @@ describe BranchableCDNAssets::FileManager do
|
|
75
75
|
files = described_class.new( @config )
|
76
76
|
expect( files.manifest ).to eq @manifest
|
77
77
|
end
|
78
|
+
it "handles 'bad' filenames and slugs them" do
|
79
|
+
@config_data = {
|
80
|
+
env: 'default',
|
81
|
+
branch: 'branch/oh-noes',
|
82
|
+
cdn_dir: 'cdn',
|
83
|
+
host: 'host',
|
84
|
+
root: 'root',
|
85
|
+
cloudfront: {
|
86
|
+
path_prefix: '/prefix'
|
87
|
+
}
|
88
|
+
}
|
89
|
+
@config = instance_double( "BranchableCDNAssets::Config", @config_data )
|
90
|
+
allow( BranchableCDNAssets::Config ).to receive(:new).and_return( @config )
|
91
|
+
|
92
|
+
expect( BranchableCDNAssets::Manifest ).to receive(:new).with("cdn/branch_oh-noes.manifest")
|
93
|
+
files = described_class.new( @config )
|
94
|
+
end
|
78
95
|
end
|
79
96
|
|
80
97
|
describe "#branch" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: branchable_cdn_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Sloan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.2.
|
131
|
+
rubygems_version: 2.2.2
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Helpers for syncing and finding assets accross multiple remotes
|