actv 2.10.1 → 2.10.2

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: 66f00359b7a93cc805044bc3ef1df2da39c7e15c
4
- data.tar.gz: ef6e01bd374e0bc7f967ef3b97ddd6d15c2e6c80
3
+ metadata.gz: 19961b331311fe391695e5fa077c77ba9bb8c826
4
+ data.tar.gz: 6b4ea77341d2c1bb16e7a9e55ce74a4aa7612eb7
5
5
  SHA512:
6
- metadata.gz: fad59de97ea8da841e753f2a0c4c80304734bc4f3d57c1f4d3b5f6658d8079c7ce315bb0f9b7f030a1879759643957461e416567029ebfaaa56f2a45d52e0d3f
7
- data.tar.gz: e55436eecf6e4affb372436686c959fab7ee152ee5bb675af5c0a1df098e77183ae58c6208b33a60881a36d9aa37d33859f40767f07799e5a4d3a46da3abab1b
6
+ metadata.gz: 25cf1ebfb43c0f68cc3338cb28c0196dc186bb0c4fe92d1de10ccee948f0fcab81bb454fd36fbf6f375bfec9f810869e95e44dc10296bdd3f1e7c1a77bb09af1
7
+ data.tar.gz: b2511e1f4f35429f4a51d3b72b5a90666ba3c0d7feceac75881c621b5acdfc48f6667d48def17305fa0c974b25cbdc601dbdb394988b776175b9e0417c78e9a0
data/lib/actv/event.rb CHANGED
@@ -10,6 +10,10 @@ module ACTV
10
10
  ACTV::EventValidator.new(response).valid?
11
11
  end
12
12
 
13
+ def course_map
14
+ @course_map ||= tag_by_description 'coursemap'
15
+ end
16
+
13
17
  def online_registration_available?
14
18
  if is_present?(self.registrationUrlAdr)
15
19
  if is_present?(self.legacy_data) && is_present?(self.legacy_data.onlineRegistration)
data/lib/actv/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ACTV
2
- VERSION = "2.10.1"
2
+ VERSION = "2.10.2"
3
3
  end
@@ -33,6 +33,21 @@ describe ACTV::Event do
33
33
  end
34
34
  end
35
35
 
36
+ describe '#course_map' do
37
+ let(:map_file) { 'https://commuserui-vip.qa.aw.dev.activenetwork.com/sys/filedownload/0/CourseMap_15260251_1469500165160' }
38
+ let(:response) { {assetGuid: 1, assetTags: [{tag: {tagId: '1801633', tagName: map_file, tagDescription: 'coursemap'}}]} }
39
+ subject(:event) { ACTV::Event.new response }
40
+
41
+ context 'when coursemap tag exists' do
42
+ its(:course_map) { should eq map_file }
43
+ end
44
+
45
+ context 'when coursemap tag does not exists' do
46
+ let(:response) { {assetGuid: 1} }
47
+ its(:course_map) { should be_nil }
48
+ end
49
+ end
50
+
36
51
  describe '#online_registration_available?' do
37
52
  context 'when online_registration_available is true' do
38
53
  before do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actv
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.1
4
+ version: 2.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathaniel Barnes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-29 00:00:00.000000000 Z
11
+ date: 2016-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday