asset_cloud 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9915f9ae949c5a943ba524a2816df249c3e6ab3cc295786fc0cbbad6dd1690c4
4
- data.tar.gz: e0b47f11c95a23903c702ed9f1c8b41fdb4115a459ae83937448902efb22ff56
3
+ metadata.gz: f22a2b32e4f1e13f4743603220642baf85b8d1b3ddb30191c5851e84a0e12239
4
+ data.tar.gz: 3e5aece0ed39d47752f86be2f5da8a78a388db4b5f686df6eb100059f2435d6e
5
5
  SHA512:
6
- metadata.gz: dd7caa8ab93936dfa3dc2a8823eaa3d8e6de5fc53a1c81928946595dbac5a67e67f2d925385494e30dcbfca18a16b3de805d2e6aab0ae32effa1b8abe063efdf
7
- data.tar.gz: 59a74007e74f62b823d902414f6275ad26974f55fa0fb75f15a5bdef09ec104dee5ad2a673d5c8a6cb73fe94527ffce07783cd0ce3598721b66a0d8086672d9f
6
+ metadata.gz: 2f2d1ccf6ad860ab28e84aa67046bf45b0b8bd9e5a47b4c1973e8bbb23c8b686d040a85420d260e47aaa68ee22d0ced688c52383f0f02e46e97edaf3d773a3f5
7
+ data.tar.gz: 0e53e2aab25cc6dbeb0b7de72d94f5a8f3c671850451948577f9f6d876229fdd0cefc3bbace06561145dde8b838f7fc8688aa484e2fdd8c89a6b19403a8fc610
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{asset_cloud}
5
- s.version = "2.3.0"
5
+ s.version = "2.3.1"
6
6
 
7
7
  s.authors = %w(Shopify)
8
8
  s.summary = %q{An abstraction layer around arbitrary and diverse asset stores.}
@@ -34,13 +34,7 @@ module AssetCloud
34
34
  end
35
35
 
36
36
  def <=>(other)
37
- return 1 unless other.is_a?(Asset)
38
- compare_cloud = cloud.object_id <=> other.cloud.object_id
39
- if compare_cloud == 0
40
- key <=> other.key
41
- else
42
- compare_cloud
43
- end
37
+ key <=> other.try(:key)
44
38
  end
45
39
 
46
40
  def new_asset?
@@ -186,13 +186,6 @@ describe "Asset" do
186
186
  expect(@asset == other_asset).to eq(true)
187
187
  end
188
188
 
189
- it "is not equal if cloud of both assets are not equal" do
190
- other_cloud = double('Cloud2', :asset_extension_classes_for_bucket => [], :object_id => 999)
191
- other_asset = AssetCloud::Asset.new(other_cloud, @key)
192
-
193
- expect(@asset == other_asset).to eq(false)
194
- end
195
-
196
189
  it "is not equal if key of both assets are not equal" do
197
190
  other_key = "products/other_key.txt"
198
191
  other_asset = AssetCloud::Asset.new(@cloud, other_key)
@@ -209,6 +202,11 @@ describe "Asset" do
209
202
  expect(@asset == :some_symbol).to eq(false)
210
203
  expect(@asset == []).to eq(false)
211
204
  expect(@asset == nil).to eq(false)
205
+
206
+ expect(@asset <=> "some_string").to eq(nil)
207
+ expect(@asset <=> :some_symbol).to eq(nil)
208
+ expect(@asset <=> []).to eq(nil)
209
+ expect(@asset <=> nil).to eq(nil)
212
210
  end
213
211
  end
214
212
  end
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.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-14 00:00:00.000000000 Z
11
+ date: 2020-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport