asset_cloud 2.2.2 → 2.2.4

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
  SHA1:
3
- metadata.gz: c234877222854a009ce8f3cd01cc47e3827ce575
4
- data.tar.gz: d0cfa40ee942e449c59b9bb6f2b362a7565e9ed1
3
+ metadata.gz: c59ff21099481c73d18d20f5d12267538bfe5537
4
+ data.tar.gz: b0b9d91f667a39da9848609af1e44d2f087b71bc
5
5
  SHA512:
6
- metadata.gz: 71784bf57b3a79dd4cbe76a6d5921617ae368a62871e3289f9a50bef1273901d985c0553fa8868f742a1959f39c578f1b8e33f64c6625fae686e1ceb629fac1b
7
- data.tar.gz: b520683f21e5fafacac076b20fee73d08744589b9631e5176d1e48edf9744d24b0e3bd6f5693f850b99e68a9abd0bf2ce256ed50c6831a3287ce99c22a5498ea
6
+ metadata.gz: e468ea841dcfc001541a7b117335e435c9500c464cde5a7239d73bd0340c8400401906f442d8e3ac22aeaa50d3afd3120b3a30e8a09ceb4f4289445a1419a5d9
7
+ data.tar.gz: 41818a6fa8cbddfb504baf4c8e9a7866e320901487744c1d926f1bbedbedb4ec96b8ef8384293d048aa443da33b21c5c42f6b74079dc7c39ad5e199520436ea8
@@ -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.2"
5
+ s.version = "2.2.4"
6
6
 
7
7
  s.authors = %w(Shopify)
8
8
  s.summary = %q{An abstraction layer around arbitrary and diverse asset stores.}
@@ -42,12 +42,18 @@ AssetCloud::Asset.class_eval do
42
42
  @extensions.each {|ext| ext.execute_callbacks(symbol, args)}
43
43
  end
44
44
 
45
+ protected
46
+
47
+ def valid_key_path?(key)
48
+ key =~ AssetCloud::Base::VALID_PATHS
49
+ end
50
+
45
51
  private
46
52
 
47
53
  def valid_key
48
54
  if key.blank?
49
55
  add_error "key cannot be empty"
50
- elsif key !~ AssetCloud::Base::VALID_PATHS
56
+ elsif !valid_key_path?(key)
51
57
  add_error "#{key.inspect} contains illegal characters"
52
58
  end
53
59
  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.2.2
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-11 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport