actv 2.10.3 → 2.10.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 +4 -4
- data/lib/actv/event.rb +1 -1
- data/lib/actv/version.rb +1 -1
- data/spec/actv/event_spec.rb +45 -31
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55c88c17c63b10181b8a35f05e531ffbddaa8c28
|
4
|
+
data.tar.gz: 87bd4de570957919a559ff3672580cb46d0cbebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f2736832dc34099aeedea6c39f78ab2fd3fc08e675e735b1b63368ef675639fd289dbe74410eaa3aa2d6032d7eb8521a0543bfb5beeba5da627426045ac2386
|
7
|
+
data.tar.gz: ec1a37dd4b19b1b4a0b47d87fad327fed310ae3525e15259f2e2e8423b77a7793acf4db865d906ff262a46e28324bd1b7906240a005dd21e5407cfe946dd73ee
|
data/lib/actv/event.rb
CHANGED
@@ -16,7 +16,7 @@ module ACTV
|
|
16
16
|
|
17
17
|
def online_registration_available?
|
18
18
|
if is_present?(self.registrationUrlAdr)
|
19
|
-
if is_present?(self.legacy_data) && is_present?(self.legacy_data.onlineRegistration)
|
19
|
+
if is_present?(self.legacy_data) && is_present?(self.legacy_data.onlineRegistration.to_s)
|
20
20
|
self.legacy_data.onlineRegistration.to_s.downcase == 'true'
|
21
21
|
else
|
22
22
|
true
|
data/lib/actv/version.rb
CHANGED
data/spec/actv/event_spec.rb
CHANGED
@@ -49,50 +49,64 @@ describe ACTV::Event do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
describe '#online_registration_available?' do
|
52
|
-
context
|
53
|
-
before
|
54
|
-
subject.legacy_data.stub(:onlineRegistration).and_return("true")
|
55
|
-
subject.stub(:registrationUrlAdr).and_return("something")
|
56
|
-
end
|
52
|
+
context "when registrationUrlAdr is present" do
|
53
|
+
before { subject.stub(:registrationUrlAdr).and_return("something") }
|
57
54
|
|
58
|
-
|
59
|
-
|
55
|
+
context "when legacy_data is present" do
|
56
|
+
context "when online_registration field is string value 'true'" do
|
57
|
+
before { subject.legacy_data.stub(:onlineRegistration).and_return("true") }
|
58
|
+
its(:online_registration_available?) { should be_true }
|
59
|
+
end
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
end
|
61
|
+
context 'when online_registration field is bool value true' do
|
62
|
+
before { subject.legacy_data.stub(:onlineRegistration).and_return(true) }
|
63
|
+
its(:online_registration_available?) { should be_true }
|
64
|
+
end
|
66
65
|
|
67
|
-
|
68
|
-
|
66
|
+
context "when online_registration field is string value 'false'" do
|
67
|
+
before { subject.legacy_data.stub(:onlineRegistration).and_return("false") }
|
68
|
+
its(:online_registration_available?) { should be_false }
|
69
|
+
end
|
69
70
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
context "when online_registration field is bool value false" do
|
72
|
+
before { subject.legacy_data.stub(:onlineRegistration).and_return(false) }
|
73
|
+
its(:online_registration_available?) { should be_false }
|
74
|
+
end
|
74
75
|
|
75
|
-
|
76
|
-
|
77
|
-
|
76
|
+
context "when online_registration field is blank" do
|
77
|
+
before { subject.legacy_data.stub(:onlineRegistration).and_return('') }
|
78
|
+
its(:online_registration_available?) { should be_true }
|
79
|
+
end
|
80
|
+
|
81
|
+
context "when online_registration field is not present" do
|
82
|
+
before { subject.legacy_data.stub(:onlineRegistration).and_return(nil) }
|
83
|
+
its(:online_registration_available?) { should be_true }
|
84
|
+
end
|
78
85
|
end
|
79
86
|
|
80
|
-
context "when
|
81
|
-
before { subject.stub(:
|
82
|
-
its(:online_registration_available?) { should
|
87
|
+
context "when legacy_data is not present" do
|
88
|
+
before { subject.stub(:legacy_data).and_return(nil) }
|
89
|
+
its(:online_registration_available?) { should be_true }
|
83
90
|
end
|
84
91
|
end
|
85
92
|
|
86
|
-
context "when
|
87
|
-
before { subject.stub(:
|
93
|
+
context "when registrationUrlAdr is not present" do
|
94
|
+
before { subject.stub(:registrationUrlAdr).and_return(nil) }
|
88
95
|
|
89
|
-
context "when
|
90
|
-
|
91
|
-
|
96
|
+
context "when legacy_data is present" do
|
97
|
+
context "when online_registration field is true" do
|
98
|
+
before { subject.legacy_data.stub(:onlineRegistration).and_return(true) }
|
99
|
+
its(:online_registration_available?) { should be_false }
|
100
|
+
end
|
101
|
+
|
102
|
+
context "when online_registration field is false" do
|
103
|
+
before { subject.legacy_data.stub(:onlineRegistration).and_return(false) }
|
104
|
+
its(:online_registration_available?) { should be_false }
|
105
|
+
end
|
92
106
|
end
|
93
107
|
|
94
|
-
context "when
|
95
|
-
before { subject.stub(:
|
108
|
+
context "when legacy_data is not present" do
|
109
|
+
before { subject.stub(:legacy_data).and_return(nil) }
|
96
110
|
its(:online_registration_available?) { should be_false }
|
97
111
|
end
|
98
112
|
end
|
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.
|
4
|
+
version: 2.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathaniel Barnes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -407,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
407
407
|
version: '0'
|
408
408
|
requirements: []
|
409
409
|
rubyforge_project:
|
410
|
-
rubygems_version: 2.
|
410
|
+
rubygems_version: 2.5.1
|
411
411
|
signing_key:
|
412
412
|
specification_version: 4
|
413
413
|
summary: Active API
|