actv 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/actv/asset.rb +4 -2
- data/lib/actv/version.rb +1 -1
- data/spec/actv/asset_spec.rb +11 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bea8e81657f851a02c8909c1bec72f811998f196
|
4
|
+
data.tar.gz: 9fb73bfed66596a6f38434ce0d231cc8afed1ec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb7c55eb6b2a41a31b8eaf5ab95f6a7e8ad3849a3e5b6fcd22a876ba0ae4a2a170cd1e0f43822eeb721f60e367b108b6d6d9f67627f9467dbe131781c707c57f
|
7
|
+
data.tar.gz: 56ffac050c676d12ecad79fee324b96f1205fa65fe0d4b544882b222537a85e3977b5f095a294ed7d6099b008dce1c4cd33bcf54b85eabe96a2c838dc7c78900
|
data/lib/actv/asset.rb
CHANGED
@@ -45,7 +45,9 @@ module ACTV
|
|
45
45
|
|
46
46
|
def endurance_id
|
47
47
|
if self.awendurance?
|
48
|
-
Addressable::URI.parse(registrationUrlAdr.to_s).query_values
|
48
|
+
query_values = Addressable::URI.parse(registrationUrlAdr.to_s).query_values
|
49
|
+
query_values ||= {}
|
50
|
+
query_values.fetch 'e', nil
|
49
51
|
end
|
50
52
|
end
|
51
53
|
|
@@ -295,7 +297,7 @@ module ACTV
|
|
295
297
|
end
|
296
298
|
|
297
299
|
def first_topic_name
|
298
|
-
topics.first.topic.name
|
300
|
+
topics.first.topic.name unless topics.empty?
|
299
301
|
end
|
300
302
|
|
301
303
|
def sub_topic
|
data/lib/actv/version.rb
CHANGED
data/spec/actv/asset_spec.rb
CHANGED
@@ -357,8 +357,17 @@ describe ACTV::Asset do
|
|
357
357
|
|
358
358
|
|
359
359
|
describe '#first_topic_name' do
|
360
|
-
|
361
|
-
|
360
|
+
context 'when asset has topics' do
|
361
|
+
it "returns the first topics name" do
|
362
|
+
asset.first_topic_name.should == "Running"
|
363
|
+
end
|
364
|
+
end
|
365
|
+
|
366
|
+
context 'when asset has empty topics' do
|
367
|
+
let(:assetTopics) {[]}
|
368
|
+
it 'returns nil' do
|
369
|
+
expect(asset.first_topic_name).to be_nil
|
370
|
+
end
|
362
371
|
end
|
363
372
|
end
|
364
373
|
|