asset_cloud 2.5.2 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/asset_cloud.gemspec +1 -2
- data/lib/asset_cloud/base.rb +5 -1
- data/spec/base_spec.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa8b974322c07bc208a54567997c8b49d4cec0c08519458ac4e205cb84f375d1
|
4
|
+
data.tar.gz: 7fa58473c81bed77e11b855e4d153e49fbebd07e53af888f976f6b3dae18fd41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fcec64888039982e1e435d39c8ec50684aeb661eeeebcbbc7471499cb8b5a9ec0d29bc543eeec394fd3f7682064ac9daa1131b671c7f63210803db0bb8dcb00
|
7
|
+
data.tar.gz: c8625f3b8ce74509bb3c54b941c37f016d8bcb0adde0bd4851709f70b1d1deda80565313cc6f2d8255202965f8e686f1116383ee4133264a29afe656ce7f7063
|
data/asset_cloud.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{asset_cloud}
|
5
|
-
s.version = "2.5.
|
5
|
+
s.version = "2.5.3"
|
6
6
|
|
7
7
|
s.authors = %w(Shopify)
|
8
8
|
s.summary = %q{An abstraction layer around arbitrary and diverse asset stores.}
|
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
19
19
|
|
20
20
|
s.add_dependency 'activesupport'
|
21
|
-
s.add_dependency 'addressable'
|
22
21
|
|
23
22
|
s.metadata['allowed_push_host'] = "https://rubygems.org"
|
24
23
|
|
data/lib/asset_cloud/base.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'uri/rfc2396_parser'
|
2
|
+
|
1
3
|
module AssetCloud
|
2
4
|
|
3
5
|
class IllegalPath < StandardError
|
@@ -27,6 +29,8 @@ module AssetCloud
|
|
27
29
|
)\z/x
|
28
30
|
MATCH_BUCKET = /^(\w+)(\/|$)/
|
29
31
|
|
32
|
+
URI_PARSER = URI::RFC2396_Parser.new
|
33
|
+
|
30
34
|
attr_accessor :url, :root
|
31
35
|
|
32
36
|
class_attribute :root_bucket_class
|
@@ -91,7 +95,7 @@ module AssetCloud
|
|
91
95
|
end
|
92
96
|
|
93
97
|
def url_for(key, options={})
|
94
|
-
File.join(@url,
|
98
|
+
File.join(@url, URI_PARSER.escape(key))
|
95
99
|
end
|
96
100
|
|
97
101
|
def path_for(key)
|
data/spec/base_spec.rb
CHANGED
@@ -125,7 +125,7 @@ describe BasicCloud do
|
|
125
125
|
end
|
126
126
|
|
127
127
|
it "should compute complete urls to assets" do
|
128
|
-
@fs.url_for('products/key with spaces.txt?foo=1&bar=2').should == 'http://assets/files/products/key%20with%20spaces.txt?foo=1&bar=2'
|
128
|
+
@fs.url_for('products/[key] with spaces.txt?foo=1&bar=2').should == 'http://assets/files/products/[key]%20with%20spaces.txt?foo=1&bar=2'
|
129
129
|
end
|
130
130
|
|
131
131
|
describe "#find" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asset_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: addressable
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rspec
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|