bbc_redux 0.4.4.pre → 0.4.5.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -107,10 +107,12 @@ module BBC
107
107
  # @see BBC::Redux::Asset
108
108
  # @return [BBC::Redux::Asset, nil] the asset
109
109
  def asset(identifier)
110
- if identifier =~ /^\d{19}$/
111
- params = { :reference => identifier }
112
- else
110
+ rex = /\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\Z/
111
+
112
+ if identifier =~ rex
113
113
  params = { :uuid => identifier }
114
+ else
115
+ params = { :reference => identifier }
114
116
  end
115
117
 
116
118
  build :asset, :using => data_for(:asset, params)
@@ -2,7 +2,7 @@ module BBC
2
2
  module Redux
3
3
 
4
4
  # Library version
5
- VERSION = '0.4.4.pre'
5
+ VERSION = '0.4.5.pre'
6
6
 
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bbc_redux
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4.pre
4
+ version: 0.4.5.pre
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-05-28 00:00:00.000000000 Z
14
+ date: 2015-02-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec
@@ -200,7 +200,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
200
200
  version: '0'
201
201
  segments:
202
202
  - 0
203
- hash: 4200921616866606374
203
+ hash: -2431091401732504293
204
204
  required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  none: false
206
206
  requirements: