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: e26d161a2f90baf7eccfd0196b73ad4960e44999
4
- data.tar.gz: 3c5283f4b6a357efc58247b639bc0176da4f402d
3
+ metadata.gz: 1681d174d7e3443b945cfba8e3400c7c5a48b891
4
+ data.tar.gz: cd0d194648f0ed2b631610597c4ca742bea4be60
5
5
  SHA512:
6
- metadata.gz: f63978ead84a55ce26f39193527e8e54b9b54a87c7987bdc2569ce0e4ff7409971ab2b5e146262f397c6a630232718cc4b248d1005a822924a93bc14f43f3925
7
- data.tar.gz: 61852b9411fedcfbf00a1c69bdb2a4f00de1e3805fe0de800c7ed7576be9e871acd44f0e4fc70d16b0e1af89cc02c62a43af4b2587f5ef02a9a5952c550adbec
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)
@@ -1,3 +1,3 @@
1
1
  module BranchableCDNAssets
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -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.1
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-01-03 00:00:00.000000000 Z
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.0
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