asset_cloud 2.3.0 → 2.3.1
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 -1
- data/lib/asset_cloud/asset.rb +1 -7
- data/spec/asset_spec.rb +5 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f22a2b32e4f1e13f4743603220642baf85b8d1b3ddb30191c5851e84a0e12239
|
4
|
+
data.tar.gz: 3e5aece0ed39d47752f86be2f5da8a78a388db4b5f686df6eb100059f2435d6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f2d1ccf6ad860ab28e84aa67046bf45b0b8bd9e5a47b4c1973e8bbb23c8b686d040a85420d260e47aaa68ee22d0ced688c52383f0f02e46e97edaf3d773a3f5
|
7
|
+
data.tar.gz: 0e53e2aab25cc6dbeb0b7de72d94f5a8f3c671850451948577f9f6d876229fdd0cefc3bbace06561145dde8b838f7fc8688aa484e2fdd8c89a6b19403a8fc610
|
data/asset_cloud.gemspec
CHANGED
data/lib/asset_cloud/asset.rb
CHANGED
@@ -34,13 +34,7 @@ module AssetCloud
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def <=>(other)
|
37
|
-
|
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?
|
data/spec/asset_spec.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2020-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|