actv 1.3.0 → 1.3.2
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 +7 -0
- data/lib/actv/asset.rb +6 -0
- data/lib/actv/asset_component.rb +5 -1
- data/lib/actv/client.rb +16 -1
- data/lib/actv/version.rb +1 -1
- data/spec/actv/asset_component_spec.rb +21 -0
- data/spec/actv/asset_spec.rb +21 -0
- data/spec/actv/client_spec.rb +114 -84
- data/spec/fixtures/valid_component_asset.json +190 -0
- data/spec/fixtures/valid_price.json +12 -0
- metadata +50 -78
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8da78447dff9dd1a83e2e9c300f12e28efb5d88c
|
4
|
+
data.tar.gz: dd9d52506820874bc1748868c73383d1a71e2c58
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 38b243b62e5acf54a92b3084b90ba3ae0fee935713836a259a01f00b3d6d38f4dc03d95720d4d8bc06e4682ee740c09eb3096248137f8cd71eedea0b46a44326
|
7
|
+
data.tar.gz: 333af51210a8500a3415e2917e2189a603b63c3037e0a955d037fc2fb78aeed55485be47eaaff8d77b3ec4a7295425ebe910e0bffb657f6a6190ddd6bc10b1c4
|
data/lib/actv/asset.rb
CHANGED
@@ -43,6 +43,12 @@ module ACTV
|
|
43
43
|
alias maximum_age regReqMaxAge
|
44
44
|
alias required_gender regReqGenderCd
|
45
45
|
|
46
|
+
def endurance_id
|
47
|
+
if self.awendurance?
|
48
|
+
Addressable::URI.parse(registrationUrlAdr.to_s).query_values.to_h.fetch 'e', nil
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
46
52
|
def recurrences
|
47
53
|
@recurrences ||= Array(@attrs[:activityRecurrences]).map do | recurrence |
|
48
54
|
ACTV::Recurrence.new(recurrence)
|
data/lib/actv/asset_component.rb
CHANGED
data/lib/actv/client.rb
CHANGED
@@ -123,6 +123,13 @@ module ACTV
|
|
123
123
|
ACTV::Asset.from_response(response)
|
124
124
|
end
|
125
125
|
|
126
|
+
def find_by_endurance_id endurance_id
|
127
|
+
response = get "/v2/search.json", find_by_endurance_id_params(endurance_id)
|
128
|
+
ACTV::SearchResults.from_response(response).results.select do |asset|
|
129
|
+
asset.registrationUrlAdr.end_with?(endurance_id.to_s) and asset.assetParentAsset[:assetGuid].nil?
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
126
133
|
# Returns articles that match a specified query.
|
127
134
|
#
|
128
135
|
# @authentication_required No
|
@@ -366,7 +373,15 @@ module ACTV
|
|
366
373
|
credentials.values.all?
|
367
374
|
end
|
368
375
|
|
369
|
-
|
376
|
+
private
|
377
|
+
|
378
|
+
def find_by_endurance_id_params endurance_id
|
379
|
+
awe_legacy_guid = 'DFAA997A-D591-44CA-9FB7-BF4A4C8984F1'
|
380
|
+
params = {
|
381
|
+
'asset.registrationUrlAdr' => endurance_id.to_s,
|
382
|
+
'asset.sourceSystem.legacyGuid' => awe_legacy_guid
|
383
|
+
}
|
384
|
+
end
|
370
385
|
|
371
386
|
# Credentials hash
|
372
387
|
#
|
data/lib/actv/version.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ACTV::AssetComponent do
|
4
|
+
|
5
|
+
let(:asset_guid) { "6d92a2db-7ea5-4dfb-90e7-2b7d4dc839ae" }
|
6
|
+
subject { ACTV::AssetComponent.new asset_guid: asset_guid }
|
7
|
+
|
8
|
+
describe "#prices" do
|
9
|
+
before(:each) do
|
10
|
+
stub_post("/v2/assets.json").with(:body => {"id"=>true}).
|
11
|
+
to_return(body: fixture("valid_component_asset.json"), headers: { content_type: "application/json; charset=utf-8" })
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'returns the prices associated with the component' do
|
15
|
+
expect(subject.prices).to be_an(Array)
|
16
|
+
expect(subject.prices.first).to be_an(ACTV::AssetPrice)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
data/spec/actv/asset_spec.rb
CHANGED
@@ -3,6 +3,27 @@ require 'pry'
|
|
3
3
|
|
4
4
|
describe ACTV::Asset do
|
5
5
|
|
6
|
+
describe '#endurance_id' do
|
7
|
+
let(:endurance_id) { 'enduranceid' }
|
8
|
+
subject(:asset) { ACTV::Asset.new assetGuid: 'assetguid' }
|
9
|
+
|
10
|
+
context 'when asset is awe' do
|
11
|
+
before do
|
12
|
+
allow(asset).to receive(:registrationUrlAdr).and_return "https://endurancecui-vip.qa.aw.dev.activenetwork.com/event-reg/select-race?e=#{endurance_id}"
|
13
|
+
allow(asset).to receive(:awendurance?).and_return true
|
14
|
+
end
|
15
|
+
it 'returns the endurance id' do
|
16
|
+
expect(asset.endurance_id).to eq endurance_id
|
17
|
+
end
|
18
|
+
end
|
19
|
+
context 'when asset is not awe' do
|
20
|
+
before { allow(asset).to receive(:awendurance?).and_return false }
|
21
|
+
it 'is nil' do
|
22
|
+
expect(asset.endurance_id).to be_nil
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
6
27
|
describe "#==" do
|
7
28
|
it "return true when objects IDs are the same" do
|
8
29
|
asset = ACTV::Asset.new(assetGuid: 1, assetName: "Title 1")
|
data/spec/actv/client_spec.rb
CHANGED
@@ -2,15 +2,70 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe ACTV::Client do
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
let(:configuration) { {} }
|
6
|
+
|
7
|
+
subject(:client) { ACTV::Client.new configuration }
|
8
|
+
|
9
|
+
describe '#find_by_endurance_id' do
|
10
|
+
before { allow(client).to receive(:get).and_return response }
|
11
|
+
|
12
|
+
context 'when there are no results' do
|
13
|
+
let(:response) do
|
14
|
+
{method: :get, body: {results: []}}
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'returns an empty array' do
|
18
|
+
allow(client).to receive(:get).and_return response
|
19
|
+
expect(client.find_by_endurance_id 1234).to eq []
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'when there is one result' do
|
24
|
+
let(:response) do
|
25
|
+
{method: :get, body: {results: [
|
26
|
+
{ assetGuid: "long ass guid",
|
27
|
+
registrationUrlAdr: 'blah?e=1234',
|
28
|
+
assetParentAsset: {} }
|
29
|
+
]}}
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'returns an array with one object' do
|
33
|
+
expect(client.find_by_endurance_id(1234).count).to eq 1
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'returns an array of one asset' do
|
37
|
+
expect(client.find_by_endurance_id(1234).first).to be_an ACTV::Asset
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'when there are more than result' do
|
42
|
+
let(:response) do
|
43
|
+
{method: :get, body: {results: [
|
44
|
+
{ assetGuid: 'child asset guid',
|
45
|
+
registrationUrlAdr: 'blah?e=1234',
|
46
|
+
assetParentAsset: { assetGuid: 'parent asset guid' } },
|
47
|
+
{ assetGuid: 'parent asset guid',
|
48
|
+
registrationUrlAdr: 'blah?e=1234',
|
49
|
+
assetParentAsset: {} }
|
50
|
+
]}}
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'returns an array with one object' do
|
54
|
+
expect(client.find_by_endurance_id(1234).count).to eq 1
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'returns an array of one asset' do
|
58
|
+
expect(client.find_by_endurance_id(1234).first).to be_an ACTV::Asset
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'returns the parent asset' do
|
62
|
+
expect(client.find_by_endurance_id(1234).first.assetGuid).to eq 'parent asset guid'
|
63
|
+
end
|
64
|
+
end
|
9
65
|
end
|
10
66
|
|
11
67
|
context "with module configuration" do
|
12
|
-
|
13
|
-
before do
|
68
|
+
before do
|
14
69
|
ACTV.configure do |config|
|
15
70
|
ACTV::Configurable.keys.each do |key|
|
16
71
|
config.send("#{key}=", key)
|
@@ -18,39 +73,33 @@ describe ACTV::Client do
|
|
18
73
|
end
|
19
74
|
end
|
20
75
|
|
21
|
-
after
|
22
|
-
ACTV.reset!
|
23
|
-
end
|
76
|
+
after { ACTV.reset! }
|
24
77
|
|
25
78
|
it "inherits the module configuration" do
|
26
|
-
client = ACTV::Client.new
|
27
79
|
ACTV::Configurable.keys.each do |key|
|
28
|
-
client.instance_variable_get
|
80
|
+
expect(client.instance_variable_get "@#{key}").to eq key
|
29
81
|
end
|
30
82
|
end
|
31
83
|
|
32
84
|
context "with class configuration" do
|
33
85
|
|
34
|
-
|
35
|
-
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
40
|
-
:
|
41
|
-
:
|
42
|
-
:
|
43
|
-
:
|
44
|
-
:
|
45
|
-
:api_key => 'TEST'
|
46
|
-
}
|
86
|
+
let(:configuration) do
|
87
|
+
{ connection_options: {timeout: 10},
|
88
|
+
consumer_key: 'CK',
|
89
|
+
consumer_secret: 'CS',
|
90
|
+
endpoint: 'http://tumblr.com/',
|
91
|
+
media_endpoint: 'http://upload.twitter.com',
|
92
|
+
middleware: Proc.new{},
|
93
|
+
oauth_token: 'OT',
|
94
|
+
oauth_token_secret: 'OS',
|
95
|
+
search_endpoint: 'http://search.twitter.com',
|
96
|
+
api_key: 'TEST' }
|
47
97
|
end
|
48
98
|
|
49
99
|
context "during initialization" do
|
50
100
|
it "overrides the module configuration" do
|
51
|
-
client = ACTV::Client.new(@configuration)
|
52
101
|
ACTV::Configurable.keys.each do |key|
|
53
|
-
client.instance_variable_get
|
102
|
+
expect(client.instance_variable_get "@#{key}").to eq configuration[key]
|
54
103
|
end
|
55
104
|
end
|
56
105
|
end
|
@@ -59,80 +108,62 @@ describe ACTV::Client do
|
|
59
108
|
it "overrides the module configuration after initialization" do
|
60
109
|
client = ACTV::Client.new
|
61
110
|
client.configure do |config|
|
62
|
-
|
111
|
+
configuration.each do |key, value|
|
63
112
|
config.send("#{key}=", value)
|
64
113
|
end
|
65
114
|
end
|
66
115
|
ACTV::Configurable.keys.each do |key|
|
67
|
-
client.instance_variable_get
|
116
|
+
expect(client.instance_variable_get "@#{key}").to eq configuration[key]
|
68
117
|
end
|
69
118
|
end
|
70
119
|
end
|
71
120
|
|
72
121
|
end
|
73
|
-
|
74
122
|
end
|
75
123
|
|
76
124
|
describe "#credentials?" do
|
77
125
|
it "returns true if all credentials are present" do
|
78
|
-
client = ACTV::Client.new(:
|
79
|
-
client.credentials
|
126
|
+
client = ACTV::Client.new(consumer_key: 'CK', consumer_secret: 'CS', oauth_token: 'OT', oauth_token_secret: 'OS')
|
127
|
+
expect(client.credentials?).to be_true
|
128
|
+
end
|
129
|
+
it "returns false if any credentials are missing" do
|
130
|
+
expect(client.credentials?).to be_false
|
80
131
|
end
|
81
|
-
# it "returns false if any credentials are missing" do
|
82
|
-
# client = ACTV::Client.new(:consumer_key => 'CK', :consumer_secret => 'CS', :oauth_token => 'OT')
|
83
|
-
# client.credentials?.should be_false
|
84
|
-
# end
|
85
132
|
end
|
86
133
|
|
87
134
|
describe "#connection" do
|
88
135
|
it "looks like Faraday connection" do
|
89
|
-
|
136
|
+
expect(client.connection).to respond_to(:run_request)
|
90
137
|
end
|
91
138
|
it "memoizes the connection" do
|
92
|
-
|
93
|
-
c1.object_id.should eq c2.object_id
|
139
|
+
expect(client.connection.object_id).to eq client.connection.object_id
|
94
140
|
end
|
95
141
|
end
|
96
142
|
|
97
143
|
describe "#request" do
|
98
|
-
|
99
|
-
|
144
|
+
let(:configuration) do
|
145
|
+
{ consumer_key: "CK",
|
146
|
+
consumer_secret: "CS",
|
147
|
+
oauth_token: "OT",
|
148
|
+
oauth_token_secret: "OS" }
|
100
149
|
end
|
101
150
|
|
102
|
-
it "
|
151
|
+
it "makes a request" do
|
103
152
|
stub_request(:get, "http://api.amp.active.com/system_health").
|
104
|
-
with(:
|
105
|
-
to_return(:
|
106
|
-
|
107
|
-
|
108
|
-
end
|
109
|
-
|
110
|
-
it "encodes the entire body when no uploaded media is present" do
|
111
|
-
# stub_post("/1/statuses/update.json").
|
112
|
-
# with(:body => {:status => "Update"}).
|
113
|
-
# to_return(:body => fixture("status.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
114
|
-
# @client.update("Update")
|
115
|
-
# a_post("/1/statuses/update.json").
|
116
|
-
# with(:body => {:status => "Update"}).
|
117
|
-
# should have_been_made
|
118
|
-
end
|
119
|
-
# it "encodes none of the body when uploaded media is present" do
|
120
|
-
# stub_post("/1/statuses/update_with_media.json", "https://upload.twitter.com").
|
121
|
-
# to_return(:body => fixture("status_with_media.json"), :headers => {:content_type => "application/json; charset=utf-8"})
|
122
|
-
# @client.update_with_media("Update", fixture("pbjt.gif"))
|
123
|
-
# a_post("/1/statuses/update_with_media.json", "https://upload.twitter.com").
|
124
|
-
# should have_been_made
|
125
|
-
# end
|
126
|
-
# it "catches Faraday errors" do
|
127
|
-
# subject.stub!(:connection).and_raise(Faraday::Error::ClientError.new("Oups"))
|
128
|
-
# lambda do
|
129
|
-
# subject.request(:get, "/path", {}, {})
|
130
|
-
# end.should raise_error(Twitter::Error::ClientError, "Oups")
|
131
|
-
# end
|
153
|
+
with(headers: {'Accept'=>'application/json'}).
|
154
|
+
to_return(status: 200, body: '{"status":"not implemented"}', headers: {})
|
155
|
+
|
156
|
+
expect(client.request(:get, "/system_health", {}, {})[:body]).to eql status: "not implemented"
|
157
|
+
end
|
132
158
|
end
|
133
159
|
|
134
160
|
describe '#event' do
|
135
|
-
let(:
|
161
|
+
let(:configuration) do
|
162
|
+
{ consumer_key: "CK",
|
163
|
+
consumer_secret: "CS",
|
164
|
+
oauth_token: "OT",
|
165
|
+
oauth_token_secret: "OS"}
|
166
|
+
end
|
136
167
|
|
137
168
|
context 'find event' do
|
138
169
|
before do
|
@@ -140,8 +171,8 @@ describe ACTV::Client do
|
|
140
171
|
to_return(body: fixture("valid_asset.json"), headers: { content_type: "application/json; charset=utf-8" })
|
141
172
|
end
|
142
173
|
|
143
|
-
it '
|
144
|
-
client.event
|
174
|
+
it 'makes a normal asset call' do
|
175
|
+
expect(client.event 'asset_id').to be_an ACTV::Event
|
145
176
|
end
|
146
177
|
end
|
147
178
|
|
@@ -151,34 +182,33 @@ describe ACTV::Client do
|
|
151
182
|
to_return(body: fixture("valid_assets.json"), headers: { content_type: "application/json; charset=utf-8" })
|
152
183
|
end
|
153
184
|
|
154
|
-
it 'returns an Array of
|
155
|
-
client.event('asset_ids').
|
156
|
-
|
157
|
-
|
185
|
+
it 'returns an Array of Events' do
|
186
|
+
client.event('asset_ids').each do |asset|
|
187
|
+
expect(asset).to be_an ACTV::Event
|
188
|
+
end
|
158
189
|
end
|
159
|
-
|
160
190
|
end
|
161
191
|
|
162
192
|
context 'preview event' do
|
163
|
-
context 'when
|
193
|
+
context 'when preview is true' do
|
164
194
|
before do
|
165
195
|
stub_request(:get, "http://api.amp.active.com/v2/assets/asset_id/preview.json").
|
166
196
|
to_return(body: fixture("valid_asset.json"), headers: { content_type: "application/json; charset=utf-8" })
|
167
197
|
end
|
168
198
|
|
169
|
-
it '
|
170
|
-
client.event
|
199
|
+
it 'returns an event' do
|
200
|
+
expect(client.event 'asset_id', preview: 'true').to be_an ACTV::Event
|
171
201
|
end
|
172
202
|
end
|
173
203
|
|
174
|
-
context 'when
|
204
|
+
context 'when preview is false' do
|
175
205
|
before do
|
176
206
|
stub_request(:get, "http://api.amp.active.com/v2/assets/asset_id.json").
|
177
207
|
to_return(body: fixture("valid_asset.json"), headers: { content_type: "application/json; charset=utf-8" })
|
178
208
|
end
|
179
209
|
|
180
|
-
it '
|
181
|
-
client.event
|
210
|
+
it 'returns an event' do
|
211
|
+
expect(client.event 'asset_id', preview: 'false').to be_an ACTV::Event
|
182
212
|
end
|
183
213
|
end
|
184
214
|
end
|
@@ -186,7 +216,7 @@ describe ACTV::Client do
|
|
186
216
|
|
187
217
|
ACTV::Configurable::CONFIG_KEYS.each do |key|
|
188
218
|
it "has a default #{key.to_s.gsub('_', ' ')}" do
|
189
|
-
|
219
|
+
expect(client.send key).to eq ACTV::Default.options[key]
|
190
220
|
end
|
191
221
|
end
|
192
222
|
|
@@ -0,0 +1,190 @@
|
|
1
|
+
{
|
2
|
+
"assetStatus": {
|
3
|
+
"assetStatusId": "2",
|
4
|
+
"assetStatusName": "VISIBLE",
|
5
|
+
"isSearchable": "true",
|
6
|
+
"isDeleted": "false",
|
7
|
+
"createdDate": "2012-05-17T18:19:49",
|
8
|
+
"modifiedDate": "2012-05-17T18:19:49"
|
9
|
+
},
|
10
|
+
"organization": {},
|
11
|
+
"place": {
|
12
|
+
"placeGuid": "3993F0DC-2168-4497-943D-C64334CC8714",
|
13
|
+
"placeName": "Kingwood Park New Jersey",
|
14
|
+
"placeDsc": "",
|
15
|
+
"placeUrlAdr": "",
|
16
|
+
"addressLine1Txt": "200 Union Road",
|
17
|
+
"addressLine2Txt": "",
|
18
|
+
"cityName": "Frenchtown",
|
19
|
+
"stateProvinceCode": "",
|
20
|
+
"localityName": "New Jersey",
|
21
|
+
"postalCode": "08825",
|
22
|
+
"countryName": "United States",
|
23
|
+
"countryCode": "",
|
24
|
+
"latitude": "40.504792",
|
25
|
+
"longitude": "-75.001827",
|
26
|
+
"directionsTxt": "",
|
27
|
+
"geoPoint": {
|
28
|
+
"lat": "40.504792",
|
29
|
+
"lon": "-75.001827"
|
30
|
+
}
|
31
|
+
},
|
32
|
+
"evergreenAsset": {},
|
33
|
+
"dma": {
|
34
|
+
"dmaId": "52",
|
35
|
+
"dmaName": "New York"
|
36
|
+
},
|
37
|
+
"sourceSystem": {
|
38
|
+
"sourceSystemName": "RegCenter",
|
39
|
+
"legacyGuid": "EA4E860A-9DCD-4DAA-A7CA-4A77AD194F65"
|
40
|
+
},
|
41
|
+
"assetRootAsset": {},
|
42
|
+
"assetParentAsset": {},
|
43
|
+
"market": {},
|
44
|
+
"assetGuid": "BA288960-2718-4B20-B380-8F939596BB59",
|
45
|
+
"assetName": "Run Daddy Run 5k Race, 2 Mile Walk & Kids Fun Run",
|
46
|
+
"assetDsc": "The Run Daddy Run Event is the HCM Foundation way to bring the community together on Fathers Day Weekend to celebrate Fathers and their families. 100% of the proceeds will go to HCM service & scholarship programs.",
|
47
|
+
"alternateName": "",
|
48
|
+
"timezone": "",
|
49
|
+
"timezoneAbb": "",
|
50
|
+
"timezoneName": "",
|
51
|
+
"currencyCd": "",
|
52
|
+
"localeCd": "",
|
53
|
+
"salesStartDate": null,
|
54
|
+
"salesEndDate": null,
|
55
|
+
"urlAdr": "",
|
56
|
+
"detailPageTemplateId": "",
|
57
|
+
"preferredUrlAdr": "",
|
58
|
+
"logoUrlAdr": "",
|
59
|
+
"activityStartDate": "2012-06-24T00:00:00",
|
60
|
+
"activityStartTime": "9:00:00",
|
61
|
+
"activityEndDate": "2012-06-24T00:00:00",
|
62
|
+
"activityEndTime": "9:00:00",
|
63
|
+
"donationUrlAdr": "",
|
64
|
+
"teamUrlAdr": "",
|
65
|
+
"homePageUrlAdr": "http://www.hcmfoundation.org",
|
66
|
+
"registrationUrlAdr": "",
|
67
|
+
"regReqMinAge": "",
|
68
|
+
"regReqMaxAge": "",
|
69
|
+
"regReqGenderCd": "",
|
70
|
+
"resultsUrlAdr": "",
|
71
|
+
"isRecurring": "false",
|
72
|
+
"contactName": "Mike Marsteller",
|
73
|
+
"contactEmailAdr": "hcmfund@gmail.com",
|
74
|
+
"contactPhone": "484-347-3993",
|
75
|
+
"contactTxt": "",
|
76
|
+
"showContact": "true",
|
77
|
+
"sorId": "",
|
78
|
+
"sorCreateDtm": null,
|
79
|
+
"sorCreateUserId": "",
|
80
|
+
"authorName": "",
|
81
|
+
"publishDate": null,
|
82
|
+
"createdDate": "2012-04-19T18:16:06",
|
83
|
+
"modifiedDate": "2012-05-17T18:29:18",
|
84
|
+
"activityRecurrences": [],
|
85
|
+
"assetQuantity": {},
|
86
|
+
"assetLegacyData": {
|
87
|
+
"assetTypeId": "",
|
88
|
+
"typeName": "",
|
89
|
+
"uploadSearchUrlAdr": "",
|
90
|
+
"authorName": "",
|
91
|
+
"onlineRegistration": "true",
|
92
|
+
"onlineDonation": "",
|
93
|
+
"onlineMembership": "",
|
94
|
+
"onlineMembershipCostAmt": "",
|
95
|
+
"costAmt": "",
|
96
|
+
"avgUserRatingTxt": "",
|
97
|
+
"estParticipantNb": "",
|
98
|
+
"maxTeamNb": "",
|
99
|
+
"minGuaranteedGameNb": "",
|
100
|
+
"multipleStartDate": "",
|
101
|
+
"genderRequirementTxt": "",
|
102
|
+
"participationCriteriaTxt": "",
|
103
|
+
"userCommentTxt": "",
|
104
|
+
"priceExtensionTxt": "",
|
105
|
+
"searchWeight": "",
|
106
|
+
"seoUrl": "http://www.active.com/running/frenchtown-nj/run-daddy-run-5k-race-2-mile-walk-and-kids-fun-run-2012",
|
107
|
+
"substitutionUrl": "2028700",
|
108
|
+
"trackbackUrl": "",
|
109
|
+
"eventCategories": "",
|
110
|
+
"isSearchable": "true",
|
111
|
+
"createdDate": "2012-04-19T18:16:06",
|
112
|
+
"modifiedDate": "2012-05-17T18:29:19"
|
113
|
+
},
|
114
|
+
"assetTags": [],
|
115
|
+
"assetPrices": [{
|
116
|
+
"effectiveUntilDate" : "2970-01-01T00:00:00",
|
117
|
+
"priceAmt" : "75",
|
118
|
+
"maxPriceAmt" : null,
|
119
|
+
"minPriceAmt" : null},
|
120
|
+
{"effectiveUntilDate" : "2014-10-27T05:00:00",
|
121
|
+
"priceAmt" : "75",
|
122
|
+
"maxPriceAmt" : null,
|
123
|
+
"minPriceAmt" : null
|
124
|
+
}],
|
125
|
+
"assetDescriptions": [{
|
126
|
+
"descriptionType": {
|
127
|
+
"descriptionTypeId": "1",
|
128
|
+
"descriptionTypeName": "PRIMARY"
|
129
|
+
},
|
130
|
+
"description": "The Run Daddy Run Event is the HCM Foundation way to bring the community together on Fathers Day Weekend to celebrate Fathers and their families. 100% of the proceeds will go to HCM service & scholarship programs."
|
131
|
+
}],
|
132
|
+
"assetChannels": [{
|
133
|
+
"sequence": "1",
|
134
|
+
"channel": {
|
135
|
+
"channelId": "1020",
|
136
|
+
"channelName": "Running",
|
137
|
+
"channelDsc": "Running"
|
138
|
+
}
|
139
|
+
}, {
|
140
|
+
"sequence": "2",
|
141
|
+
"channel": {
|
142
|
+
"channelId": "1148",
|
143
|
+
"channelName": "Running\\Cross Country",
|
144
|
+
"channelDsc": ""
|
145
|
+
}
|
146
|
+
}],
|
147
|
+
"assetMediaTypes": [{
|
148
|
+
"sequence": "2",
|
149
|
+
"mediaType": {
|
150
|
+
"mediaTypeId": "256",
|
151
|
+
"mediaTypeName": "Event\\5K",
|
152
|
+
"mediaTypeDsc": ""
|
153
|
+
}
|
154
|
+
}, {
|
155
|
+
"sequence": "1",
|
156
|
+
"mediaType": {
|
157
|
+
"mediaTypeId": "2",
|
158
|
+
"mediaTypeName": "Event",
|
159
|
+
"mediaTypeDsc": ""
|
160
|
+
}
|
161
|
+
}],
|
162
|
+
"assetImages": [],
|
163
|
+
"assetTopics": [{
|
164
|
+
"sequence": "3",
|
165
|
+
"topic": {
|
166
|
+
"topicId": "26",
|
167
|
+
"topicTaxonomy": "Endurance/Duathlon",
|
168
|
+
"topicName": "Duathlon"
|
169
|
+
}
|
170
|
+
}],
|
171
|
+
"assetCategories": [],
|
172
|
+
"assetMetaInterests": [],
|
173
|
+
"assetComponents": [
|
174
|
+
{
|
175
|
+
"assetGuid": "63e030f3-3df4-402c-9617-d37f6fb2c11b"
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"assetGuid": "63e030f3-3df4-402c-9617-d37f6fb2c11c"
|
179
|
+
}
|
180
|
+
],
|
181
|
+
"assetServiceHostName": "asset-03",
|
182
|
+
"assetSeoUrls": [
|
183
|
+
{
|
184
|
+
"seoSystemName": "as3",
|
185
|
+
"statusCode": "true",
|
186
|
+
"urlAdr": "http://www.active.com/san-francisco-ca/running/crazy-eight-fall-2013"
|
187
|
+
}
|
188
|
+
]
|
189
|
+
}
|
190
|
+
|
metadata
CHANGED
@@ -1,270 +1,237 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
5
|
-
prerelease:
|
4
|
+
version: 1.3.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Nathaniel Barnes
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-01-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: faraday
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 0.8.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 0.8.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: multi_json
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '1.3'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '1.3'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: simple_oauth
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- - ~>
|
45
|
+
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: 0.1.6
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- - ~>
|
52
|
+
- - "~>"
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: 0.1.6
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: nokogiri
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: json
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: maruku
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - ">="
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - ">="
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: pry
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - ">="
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: rake
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - ">="
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - ">="
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: rspec
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
|
-
- - ~>
|
129
|
+
- - "~>"
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: 2.14.1
|
150
132
|
type: :development
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
|
-
- - ~>
|
136
|
+
- - "~>"
|
156
137
|
- !ruby/object:Gem::Version
|
157
138
|
version: 2.14.1
|
158
139
|
- !ruby/object:Gem::Dependency
|
159
140
|
name: rspec-core
|
160
141
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
142
|
requirements:
|
163
|
-
- -
|
143
|
+
- - ">="
|
164
144
|
- !ruby/object:Gem::Version
|
165
145
|
version: '0'
|
166
146
|
type: :development
|
167
147
|
prerelease: false
|
168
148
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
149
|
requirements:
|
171
|
-
- -
|
150
|
+
- - ">="
|
172
151
|
- !ruby/object:Gem::Version
|
173
152
|
version: '0'
|
174
153
|
- !ruby/object:Gem::Dependency
|
175
154
|
name: simplecov
|
176
155
|
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
156
|
requirements:
|
179
|
-
- -
|
157
|
+
- - ">="
|
180
158
|
- !ruby/object:Gem::Version
|
181
159
|
version: '0'
|
182
160
|
type: :development
|
183
161
|
prerelease: false
|
184
162
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
163
|
requirements:
|
187
|
-
- -
|
164
|
+
- - ">="
|
188
165
|
- !ruby/object:Gem::Version
|
189
166
|
version: '0'
|
190
167
|
- !ruby/object:Gem::Dependency
|
191
168
|
name: timecop
|
192
169
|
requirement: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
170
|
requirements:
|
195
|
-
- -
|
171
|
+
- - ">="
|
196
172
|
- !ruby/object:Gem::Version
|
197
173
|
version: '0'
|
198
174
|
type: :development
|
199
175
|
prerelease: false
|
200
176
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
177
|
requirements:
|
203
|
-
- -
|
178
|
+
- - ">="
|
204
179
|
- !ruby/object:Gem::Version
|
205
180
|
version: '0'
|
206
181
|
- !ruby/object:Gem::Dependency
|
207
182
|
name: webmock
|
208
183
|
requirement: !ruby/object:Gem::Requirement
|
209
|
-
none: false
|
210
184
|
requirements:
|
211
|
-
- -
|
185
|
+
- - ">="
|
212
186
|
- !ruby/object:Gem::Version
|
213
187
|
version: '0'
|
214
188
|
type: :development
|
215
189
|
prerelease: false
|
216
190
|
version_requirements: !ruby/object:Gem::Requirement
|
217
|
-
none: false
|
218
191
|
requirements:
|
219
|
-
- -
|
192
|
+
- - ">="
|
220
193
|
- !ruby/object:Gem::Version
|
221
194
|
version: '0'
|
222
195
|
- !ruby/object:Gem::Dependency
|
223
196
|
name: yard
|
224
197
|
requirement: !ruby/object:Gem::Requirement
|
225
|
-
none: false
|
226
198
|
requirements:
|
227
|
-
- -
|
199
|
+
- - ">="
|
228
200
|
- !ruby/object:Gem::Version
|
229
201
|
version: '0'
|
230
202
|
type: :development
|
231
203
|
prerelease: false
|
232
204
|
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
none: false
|
234
205
|
requirements:
|
235
|
-
- -
|
206
|
+
- - ">="
|
236
207
|
- !ruby/object:Gem::Version
|
237
208
|
version: '0'
|
238
209
|
- !ruby/object:Gem::Dependency
|
239
210
|
name: guard-rspec
|
240
211
|
requirement: !ruby/object:Gem::Requirement
|
241
|
-
none: false
|
242
212
|
requirements:
|
243
|
-
- -
|
213
|
+
- - ">="
|
244
214
|
- !ruby/object:Gem::Version
|
245
215
|
version: '0'
|
246
216
|
type: :development
|
247
217
|
prerelease: false
|
248
218
|
version_requirements: !ruby/object:Gem::Requirement
|
249
|
-
none: false
|
250
219
|
requirements:
|
251
|
-
- -
|
220
|
+
- - ">="
|
252
221
|
- !ruby/object:Gem::Version
|
253
222
|
version: '0'
|
254
223
|
- !ruby/object:Gem::Dependency
|
255
224
|
name: activesupport
|
256
225
|
requirement: !ruby/object:Gem::Requirement
|
257
|
-
none: false
|
258
226
|
requirements:
|
259
|
-
- -
|
227
|
+
- - ">="
|
260
228
|
- !ruby/object:Gem::Version
|
261
229
|
version: '0'
|
262
230
|
type: :development
|
263
231
|
prerelease: false
|
264
232
|
version_requirements: !ruby/object:Gem::Requirement
|
265
|
-
none: false
|
266
233
|
requirements:
|
267
|
-
- -
|
234
|
+
- - ">="
|
268
235
|
- !ruby/object:Gem::Version
|
269
236
|
version: '0'
|
270
237
|
description: A Ruby wrapper for the Active API
|
@@ -274,11 +241,11 @@ executables: []
|
|
274
241
|
extensions: []
|
275
242
|
extra_rdoc_files: []
|
276
243
|
files:
|
277
|
-
- .gitignore
|
278
|
-
- .rspec
|
279
|
-
- .ruby-gemset
|
280
|
-
- .ruby-version
|
281
|
-
- .travis.yml
|
244
|
+
- ".gitignore"
|
245
|
+
- ".rspec"
|
246
|
+
- ".ruby-gemset"
|
247
|
+
- ".ruby-version"
|
248
|
+
- ".travis.yml"
|
282
249
|
- CHANGELOG.md
|
283
250
|
- Gemfile
|
284
251
|
- Guardfile
|
@@ -351,6 +318,7 @@ files:
|
|
351
318
|
- spec/actv/article_search_results_spec.rb
|
352
319
|
- spec/actv/article_spec.rb
|
353
320
|
- spec/actv/asset_channel_spec.rb
|
321
|
+
- spec/actv/asset_component_spec.rb
|
354
322
|
- spec/actv/asset_description_spec.rb
|
355
323
|
- spec/actv/asset_image_spec.rb
|
356
324
|
- spec/actv/asset_price_spec.rb
|
@@ -382,12 +350,14 @@ files:
|
|
382
350
|
- spec/fixtures/valid_article.json
|
383
351
|
- spec/fixtures/valid_asset.json
|
384
352
|
- spec/fixtures/valid_assets.json
|
353
|
+
- spec/fixtures/valid_component_asset.json
|
385
354
|
- spec/fixtures/valid_event.json
|
386
355
|
- spec/fixtures/valid_event_results.json
|
387
356
|
- spec/fixtures/valid_evergreen.json
|
388
357
|
- spec/fixtures/valid_evergreen_child_1.json
|
389
358
|
- spec/fixtures/valid_organizer.json
|
390
359
|
- spec/fixtures/valid_organizers.json
|
360
|
+
- spec/fixtures/valid_price.json
|
391
361
|
- spec/fixtures/valid_search.json
|
392
362
|
- spec/fixtures/valid_search_no_event_results.json
|
393
363
|
- spec/fixtures/valid_search_no_results.json
|
@@ -396,32 +366,32 @@ files:
|
|
396
366
|
homepage: http://developer.active.com
|
397
367
|
licenses:
|
398
368
|
- MIT
|
369
|
+
metadata: {}
|
399
370
|
post_install_message:
|
400
371
|
rdoc_options: []
|
401
372
|
require_paths:
|
402
373
|
- lib
|
403
374
|
required_ruby_version: !ruby/object:Gem::Requirement
|
404
|
-
none: false
|
405
375
|
requirements:
|
406
|
-
- -
|
376
|
+
- - ">="
|
407
377
|
- !ruby/object:Gem::Version
|
408
378
|
version: '0'
|
409
379
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
410
|
-
none: false
|
411
380
|
requirements:
|
412
|
-
- -
|
381
|
+
- - ">="
|
413
382
|
- !ruby/object:Gem::Version
|
414
383
|
version: '0'
|
415
384
|
requirements: []
|
416
385
|
rubyforge_project:
|
417
|
-
rubygems_version:
|
386
|
+
rubygems_version: 2.2.2
|
418
387
|
signing_key:
|
419
|
-
specification_version:
|
388
|
+
specification_version: 4
|
420
389
|
summary: Active API
|
421
390
|
test_files:
|
422
391
|
- spec/actv/article_search_results_spec.rb
|
423
392
|
- spec/actv/article_spec.rb
|
424
393
|
- spec/actv/asset_channel_spec.rb
|
394
|
+
- spec/actv/asset_component_spec.rb
|
425
395
|
- spec/actv/asset_description_spec.rb
|
426
396
|
- spec/actv/asset_image_spec.rb
|
427
397
|
- spec/actv/asset_price_spec.rb
|
@@ -453,12 +423,14 @@ test_files:
|
|
453
423
|
- spec/fixtures/valid_article.json
|
454
424
|
- spec/fixtures/valid_asset.json
|
455
425
|
- spec/fixtures/valid_assets.json
|
426
|
+
- spec/fixtures/valid_component_asset.json
|
456
427
|
- spec/fixtures/valid_event.json
|
457
428
|
- spec/fixtures/valid_event_results.json
|
458
429
|
- spec/fixtures/valid_evergreen.json
|
459
430
|
- spec/fixtures/valid_evergreen_child_1.json
|
460
431
|
- spec/fixtures/valid_organizer.json
|
461
432
|
- spec/fixtures/valid_organizers.json
|
433
|
+
- spec/fixtures/valid_price.json
|
462
434
|
- spec/fixtures/valid_search.json
|
463
435
|
- spec/fixtures/valid_search_no_event_results.json
|
464
436
|
- spec/fixtures/valid_search_no_results.json
|