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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b1e23c78331e494fb7424655a26eb74993ddfc5
4
- data.tar.gz: 38a165425c92cc6ae19d9ee0784ceb55546705b1
3
+ metadata.gz: fa28322db86635a35c0824e9629d1d65b1cb7e56
4
+ data.tar.gz: 5d493e09e7037f6bbc830c8f2cc7730c6ea05213
5
5
  SHA512:
6
- metadata.gz: ebf40d57f22ddbb3816224d1722cc724c2ab54d13ea8ec945eb00c963abe9970a26e268f8e423f4697ae761654d1fe2695a162f203c72c67ba1df7032d5051f2
7
- data.tar.gz: 24cce0199528c46eee2fbd100f1319b4ce1b459b97ffdbf87669e66b637ce58b3ed7d1ed3bc9915039ab20d1e3016b77059660c8aa2b6752b3964364254a08cd
6
+ metadata.gz: 0423e9ef826f7e230aec6ada6ddf050460ffbb0bf2027feeaabbcdd645897274aa890478ad0d522910fbd704531d98f2f54352114f2f17b21dd05df7c44bd41b
7
+ data.tar.gz: fe6bc175f198b741011d0ab6d6280813e611f8e19da376ed0e6245116a80acb324049954882f6a0fb16631a528be011621714fe072b1575423c15a95a0b6c753
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,5 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
-
3
+ - '1.9'
4
+ - '2.0'
5
+ - '2.1'
@@ -0,0 +1,5 @@
1
+ # Asset Cloud Version History
2
+
3
+ ## Version 2.0.0, 2014-09-26
4
+
5
+ * Change the way methods on asset extensions are invoke so it won't silently swallow exceptions [#3](https://github.com/Shopify/asset_cloud/pull/3).
@@ -2,10 +2,9 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{asset_cloud}
5
- s.version = "1.1.1"
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
 
@@ -165,14 +165,15 @@ module AssetCloud
165
165
  end
166
166
 
167
167
  def method_missing(method, *args)
168
- @extensions.each do |ext|
169
- begin
170
- return ext.send(method, *args)
171
- rescue NoMethodError, NotImplementedError => e
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
- super
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: 1.1.1
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: 2009-08-04 00:00:00.000000000 Z
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.0
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