asset_cloud 2.2.0 → 2.2.1

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: 2e9519f3cbd8f6ae164aafbbb96052e36eddf225
4
- data.tar.gz: 887d20cd493e498d371e51e827118daa19a01f0e
3
+ metadata.gz: 4d836e4ffccd7ef2587c6d9059f2d3cbf27945e8
4
+ data.tar.gz: b3a39486d765695ba72331d9094ca5c8e6fc27c0
5
5
  SHA512:
6
- metadata.gz: bdaa546e8d1bd72f68b16456aa490ab15acb166c0655c8f8d78748e4ba428029af55275e3bbbfdd689d21c5f12490e793d03d86c02a6d84fffcfb750ccf2f873
7
- data.tar.gz: 48e53d85b4d4681524d98a6701b7a2420d316d25b925f42da7d29c6dfa52c2ad7725662e457a3c384bfb2bf28b84694d7340ed95d67f1285a7652f7f2d7a9402
6
+ metadata.gz: bfc48a05fd7bdc09cef91ff32882d667cd6774ef72e550a0dd772f7c5bf320955f4040d9bd52142c3941b094751bca6a8bc6d6e3a4c2f7714a1b4340e92b2689
7
+ data.tar.gz: 2fd7ff5b0d9e0036de07b8feb7953845a4d4063185bc9f460bfab7bf5f64ac39aeabd499a565251b11bbf656b277ecac937b15180bc837a0c63926f1c49d703a
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ .bundle
1
2
  .DS_Store
2
3
  Gemfile.lock
3
4
  *.orig
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.2.0"
5
+ s.version = "2.2.1"
6
6
 
7
7
  s.authors = %w(Shopify)
8
8
  s.summary = %q{An abstraction layer around arbitrary and diverse asset stores.}
@@ -118,7 +118,7 @@ module AssetCloud
118
118
  end
119
119
 
120
120
  def store!
121
- store or raise AssetNotSaved
121
+ store or raise(AssetNotSaved, "Validation failed: #{errors.join(', ')}")
122
122
  end
123
123
 
124
124
  def to_param
@@ -6,7 +6,7 @@ module AssetCloud
6
6
  Error = "No such namespace: %s".freeze
7
7
 
8
8
  def ls(namespace)
9
- raise InvalidBucketError, Error % key
9
+ raise InvalidBucketError, Error % namespace
10
10
  end
11
11
 
12
12
  def read(key)
@@ -39,6 +39,16 @@ describe ValidatedAsset do
39
39
  end
40
40
  end
41
41
 
42
+ describe "#store!" do
43
+ it "should raise AssetNotFound with error message when validation fails" do
44
+ expect { @cat.store! }.to raise_error(AssetCloud::AssetNotSaved, "Validation failed: no cats allowed!")
45
+ end
46
+
47
+ it "should return true when validations pass" do
48
+ @dog.store!.should == true
49
+ end
50
+ end
51
+
42
52
  describe "#valid?" do
43
53
  it "should clear errors, run validations, and return validity" do
44
54
  @cat.store
metadata CHANGED
@@ -1,36 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asset_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ8wDQYDVQQDDAZhZG1p
14
- bnMxFzAVBgoJkiaJk/IsZAEZFgdzaG9waWZ5MRMwEQYKCZImiZPyLGQBGRYDY29t
15
- MB4XDTE0MDUxNTIwMzM0OFoXDTE1MDUxNTIwMzM0OFowPzEPMA0GA1UEAwwGYWRt
16
- aW5zMRcwFQYKCZImiZPyLGQBGRYHc2hvcGlmeTETMBEGCgmSJomT8ixkARkWA2Nv
17
- bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL0/81O3e1vh5smcwp2G
18
- MpLQ6q0kejQLa65bPYPxdzWA1SYOKyGfw+yR9LdFzsuKpwWzKq6zX35lj1IckWS4
19
- bNBEQzxmufUxU0XPM02haFB8fOfDJzdXsWte9Ge4IFwahwn68gpMqN+BvxL+KMYz
20
- Iut9YmN44d4LZdsENEIO5vmybuG2vYDz7R56qB0PA+Q2P2CdhymsBad2DQs69FBo
21
- uico9V6VMYYctL9lCYdzu9IXrOYNTt88suKIVzzAlHOKeN0Ng5qdztFoTR8sfxDr
22
- Ydg3KHl5n47wlpgd8R0f/4b5gGxW+v9pyJCgQnLlRu7DedVSvv7+GMtj3g9r3nhJ
23
- KqECAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFI/o
24
- maf34HXbUOQsdoLHacEKQgunMB0GA1UdEQQWMBSBEmFkbWluc0BzaG9waWZ5LmNv
25
- bTAdBgNVHRIEFjAUgRJhZG1pbnNAc2hvcGlmeS5jb20wDQYJKoZIhvcNAQEFBQAD
26
- ggEBADkK9aj5T0HPExsov4EoMWFnO+G7RQ28C30VAfKxnL2UxG6i4XMHVs6Xi94h
27
- qXFw1ec9Y2eDUqaolT3bviOk9BB197+A8Vz/k7MC6ci2NE+yDDB7HAC8zU6LAx8Y
28
- Iqvw7B/PSZ/pz4bUVFlTATif4mi1vO3lidRkdHRtM7UePSn2rUpOi0gtXBP3bLu5
29
- YjHJN7wx5cugMEyroKITG5gL0Nxtu21qtOlHX4Hc4KdE2JqzCPOsS4zsZGhgwhPs
30
- fl3hbtVFTqbOlwL9vy1fudXcolIE/ZTcxQ+er07ZFZdKCXayR9PPs64heamfn0fp
31
- TConQSX2BnZdhIEYW+cKzEC/bLc=
32
- -----END CERTIFICATE-----
33
- date: 2015-03-17 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2015-11-24 00:00:00.000000000 Z
34
12
  dependencies:
35
13
  - !ruby/object:Gem::Dependency
36
14
  name: activesupport
@@ -200,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
178
  version: '0'
201
179
  requirements: []
202
180
  rubyforge_project:
203
- rubygems_version: 2.2.2
181
+ rubygems_version: 2.2.3
204
182
  signing_key:
205
183
  specification_version: 4
206
184
  summary: An abstraction layer around arbitrary and diverse asset stores.
checksums.yaml.gz.sig DELETED
Binary file
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- \)I0J$n�����A}�\�2�?.Җ�3,��%�����Ϫڎ�gZW��JK_7�$jz)����l�����=j5��8�W.x�P����#��ۘ�k~
2
- ��I���x