asset_cloud 1.1.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.travis.yml +3 -3
- data/History.md +5 -0
- data/asset_cloud.gemspec +1 -2
- data/lib/asset_cloud/asset.rb +8 -7
- data/spec/asset_extension_spec.rb +11 -0
- metadata +4 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa28322db86635a35c0824e9629d1d65b1cb7e56
|
4
|
+
data.tar.gz: 5d493e09e7037f6bbc830c8f2cc7730c6ea05213
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0423e9ef826f7e230aec6ada6ddf050460ffbb0bf2027feeaabbcdd645897274aa890478ad0d522910fbd704531d98f2f54352114f2f17b21dd05df7c44bd41b
|
7
|
+
data.tar.gz: fe6bc175f198b741011d0ab6d6280813e611f8e19da376ed0e6245116a80acb324049954882f6a0fb16631a528be011621714fe072b1575423c15a95a0b6c753
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
data/History.md
ADDED
data/asset_cloud.gemspec
CHANGED
@@ -2,10 +2,9 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{asset_cloud}
|
5
|
-
s.version = "
|
5
|
+
s.version = "2.0.0"
|
6
6
|
|
7
7
|
s.authors = %w(Shopify)
|
8
|
-
s.date = %q{2009-08-04}
|
9
8
|
s.summary = %q{An abstraction layer around arbitrary and diverse asset stores.}
|
10
9
|
s.description = %q{An abstraction layer around arbitrary and diverse asset stores.}
|
11
10
|
|
data/lib/asset_cloud/asset.rb
CHANGED
@@ -165,14 +165,15 @@ module AssetCloud
|
|
165
165
|
end
|
166
166
|
|
167
167
|
def method_missing(method, *args)
|
168
|
-
@extensions.
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
nil
|
173
|
-
end
|
168
|
+
if extension = @extensions.find { |e| e.respond_to?(method) }
|
169
|
+
extension.public_send(method, *args)
|
170
|
+
else
|
171
|
+
super
|
174
172
|
end
|
175
|
-
|
173
|
+
end
|
174
|
+
|
175
|
+
def respond_to_missing?(method, include_all)
|
176
|
+
@extensions.any? { |extension| extension.respond_to?(method, include_all) } || super
|
176
177
|
end
|
177
178
|
|
178
179
|
private
|
@@ -98,6 +98,17 @@ describe "AssetExtension" do
|
|
98
98
|
asset.turn_into_xml
|
99
99
|
asset.value.should == '<xml>dogs</xml>'
|
100
100
|
end
|
101
|
+
|
102
|
+
it "does not swallow NotImplementedError" do
|
103
|
+
XmlAssetExtension.send(:define_method, :my_unimplemented_extension) do
|
104
|
+
raise NotImplementedError
|
105
|
+
end
|
106
|
+
|
107
|
+
asset = @cloud['dog_pound/dogs.xml']
|
108
|
+
|
109
|
+
expect(asset).to respond_to(:my_unimplemented_extension)
|
110
|
+
expect { asset.my_unimplemented_extension }.to raise_error(NotImplementedError)
|
111
|
+
end
|
101
112
|
end
|
102
113
|
|
103
114
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asset_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
fl3hbtVFTqbOlwL9vy1fudXcolIE/ZTcxQ+er07ZFZdKCXayR9PPs64heamfn0fp
|
31
31
|
TConQSX2BnZdhIEYW+cKzEC/bLc=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
33
|
+
date: 2014-09-26 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: activesupport
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- ".gitignore"
|
98
98
|
- ".travis.yml"
|
99
99
|
- Gemfile
|
100
|
+
- History.md
|
100
101
|
- LICENSE
|
101
102
|
- README.rdoc
|
102
103
|
- Rakefile
|
@@ -152,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
153
|
version: '0'
|
153
154
|
requirements: []
|
154
155
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.2.
|
156
|
+
rubygems_version: 2.2.2
|
156
157
|
signing_key:
|
157
158
|
specification_version: 4
|
158
159
|
summary: An abstraction layer around arbitrary and diverse asset stores.
|
metadata.gz.sig
CHANGED
Binary file
|