teamsnap_rb 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/teamsnap.rb +1 -1
- data/lib/teamsnap/version.rb +1 -1
- data/spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_plural_relation_is_called/responds_with_an_array_of_objects_when_successful.yml +118 -0
- data/spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_plural_relation_is_called/responds_with_an_empty_array_when_no_objects_exist.yml +112 -0
- data/spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_singular_relation_is_called/responds_with_nil_if_it_does_NOT_exist.yml +112 -0
- data/spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_singular_relation_is_called/responds_with_the_object_if_it_exists.yml +117 -0
- data/spec/teamsnap_spec.rb +30 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 235c0f2ef597b6659d210d4100a42cba129155e9
|
4
|
+
data.tar.gz: 7b34f2aaabec2b09412996910bde4bca69352a90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3382553ff1be861589c7ec981e78ca25a884f7458d13d5c36a4c693d20700bcdb3783998ba68cd0725e193696c7184215a713255214a638f777f33d8dad7b47a
|
7
|
+
data.tar.gz: 9674fa52acac5c654b4b2b3df2063025a2a77744a2644bca3d251fc960d73bac64178eaf73ee62bd53b67aa54c7752e92fc3e065f0a8c619e4ccfdf1de99492d
|
data/lib/teamsnap.rb
CHANGED
data/lib/teamsnap/version.rb
CHANGED
@@ -0,0 +1,118 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/events/search?id=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Authorization:
|
13
|
+
- Bearer 1-classic-dont_tell_the_cops
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- application/vnd.collection+json
|
21
|
+
Content-Length:
|
22
|
+
- '4638'
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
X-Content-Type-Options:
|
28
|
+
- nosniff
|
29
|
+
X-RateLimit-Limit:
|
30
|
+
- '5000'
|
31
|
+
X-RateLimit-Remaining:
|
32
|
+
- '4993'
|
33
|
+
X-RateLimit-Reset:
|
34
|
+
- '1430954308'
|
35
|
+
ETag:
|
36
|
+
- '"cc26ac10a47b12667d5d5a7f569e690f"'
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0, private, must-revalidate
|
39
|
+
X-Request-Id:
|
40
|
+
- 9b2281f7-c68d-4e63-bb04-d1baaa3dc402
|
41
|
+
X-Runtime:
|
42
|
+
- '0.054851'
|
43
|
+
X-Powered-By:
|
44
|
+
- Phusion Passenger 4.0.59
|
45
|
+
Date:
|
46
|
+
- Wed, 06 May 2015 22:18:28 GMT
|
47
|
+
Server:
|
48
|
+
- nginx/1.6.2 + Phusion Passenger 4.0.59
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"collection":{"version":"3.64.0","href":"http://localhost:3000/events","template":{"data":[{"name":"repeating_type_code","value":null},{"name":"is_game","value":null},{"name":"start_date","value":null},{"name":"is_tbd","value":null},{"name":"name","value":null},{"name":"label","value":null},{"name":"game_type_code","value":null},{"name":"icon_color","value":null},{"name":"minutes_to_arrive_early","value":null},{"name":"duration_in_minutes","value":null},{"name":"notes","value":null},{"name":"points_for_team","value":null},{"name":"points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"is_overtime","value":null},{"name":"is_shootout","value":null},{"name":"doesnt_count_towards_record","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"tracks_availability","value":null},{"name":"uniform","value":null},{"name":"is_canceled","value":null},{"name":"notify_team","value":null},{"name":"notify_team_as_member_id","value":null},{"name":"team_id","value":null},{"name":"division_location_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"repeating_until","value":null},{"name":"repeating_include","value":null}]},"links":[{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"division_location","href":"http://localhost:3000/division_locations"},{"rel":"location","href":"http://localhost:3000/locations"},{"rel":"opponent","href":"http://localhost:3000/opponents"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/events/search?id=1"}],"queries":[{"rel":"search","href":"http://localhost:3000/events/search","data":[{"name":"team_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"started_after","value":null},{"name":"started_before","value":null},{"name":"id","value":null}]},{"rel":"search_games","href":"http://localhost:3000/events/search_games","data":[{"name":"team_id","value":null}]}],"commands":[{"rel":"send_availability_reminders","href":"http://localhost:3000/events/send_availability_reminders","prompt":"members_to_notify
|
52
|
+
= (all|unset)","data":[{"name":"id","value":null},{"name":"members_to_notify","value":null},{"name":"notify_team_as_member_id","value":null}]}],"items":[{"href":"http://localhost:3000/events/1","data":[{"name":"id","value":1},{"name":"type","value":"event"},{"name":"arrival_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"division_location_id","value":null},{"name":"doesnt_count_towards_record","value":false},{"name":"duration_in_minutes","value":120},{"name":"end_date","value":"2015-01-01T02:00:00Z","type":"DateTime"},{"name":"formatted_results","value":null},{"name":"game_type","value":"Not
|
53
|
+
Specified"},{"name":"game_type_code","value":null},{"name":"icon_color","value":"blue"},{"name":"is_canceled","value":false},{"name":"is_game","value":false},{"name":"is_overtime","value":false},{"name":"is_shootout","value":false},{"name":"is_tbd","value":false},{"name":"label","value":null},{"name":"location_id","value":1},{"name":"minutes_to_arrive_early","value":null},{"name":"name","value":"March
|
54
|
+
Madness Game 1"},{"name":"notes","value":null},{"name":"opponent_id","value":1},{"name":"points_for_opponent","value":null},{"name":"points_for_team","value":null},{"name":"repeating_type","value":null},{"name":"repeating_type_code","value":null},{"name":"repeating_uuid","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"start_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"team_id","value":1},{"name":"tracks_availability","value":true},{"name":"uniform","value":null},{"name":"is_league_controlled","value":false},{"name":"created_at","value":"2015-05-06T16:54:01Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?event_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?event_id=1"},{"rel":"division_location","href":"http://localhost:3000/division_locations/"},{"rel":"location","href":"http://localhost:3000/locations/1"},{"rel":"opponent","href":"http://localhost:3000/opponents/1"},{"rel":"team","href":"http://localhost:3000/teams/1"}]}]}}'
|
55
|
+
http_version: '1.1'
|
56
|
+
adapter_metadata:
|
57
|
+
effective_url: http://localhost:3000/events/search?id=1
|
58
|
+
recorded_at: Wed, 06 May 2015 22:18:28 GMT
|
59
|
+
- request:
|
60
|
+
method: get
|
61
|
+
uri: http://localhost:3000/availabilities/search?event_id=1
|
62
|
+
body:
|
63
|
+
encoding: US-ASCII
|
64
|
+
string: ''
|
65
|
+
headers:
|
66
|
+
User-Agent:
|
67
|
+
- Faraday v0.9.1
|
68
|
+
Authorization:
|
69
|
+
- Bearer 1-classic-dont_tell_the_cops
|
70
|
+
response:
|
71
|
+
status:
|
72
|
+
code: 200
|
73
|
+
message: OK
|
74
|
+
headers:
|
75
|
+
Content-Type:
|
76
|
+
- application/vnd.collection+json
|
77
|
+
Content-Length:
|
78
|
+
- '9543'
|
79
|
+
Connection:
|
80
|
+
- keep-alive
|
81
|
+
Status:
|
82
|
+
- 200 OK
|
83
|
+
X-Content-Type-Options:
|
84
|
+
- nosniff
|
85
|
+
X-RateLimit-Limit:
|
86
|
+
- '5000'
|
87
|
+
X-RateLimit-Remaining:
|
88
|
+
- '4992'
|
89
|
+
X-RateLimit-Reset:
|
90
|
+
- '1430954308'
|
91
|
+
ETag:
|
92
|
+
- '"7b00ff15374bc37e7426cf20e65c7155"'
|
93
|
+
Cache-Control:
|
94
|
+
- max-age=0, private, must-revalidate
|
95
|
+
X-Request-Id:
|
96
|
+
- 7d74b0f8-35c9-4d88-8ccc-b905ebd8c226
|
97
|
+
X-Runtime:
|
98
|
+
- '0.083750'
|
99
|
+
X-Powered-By:
|
100
|
+
- Phusion Passenger 4.0.59
|
101
|
+
Date:
|
102
|
+
- Wed, 06 May 2015 22:18:28 GMT
|
103
|
+
Server:
|
104
|
+
- nginx/1.6.2 + Phusion Passenger 4.0.59
|
105
|
+
body:
|
106
|
+
encoding: UTF-8
|
107
|
+
string: '{"collection":{"version":"3.64.0","href":"http://localhost:3000/availabilities","template":{"data":[{"name":"status_code","value":null},{"name":"notes","value":null},{"name":"event_id","value":null},{"name":"member_id","value":null},{"name":"notes_author_member_id","value":null}]},"links":[{"rel":"event","href":"http://localhost:3000/events"},{"rel":"member","href":"http://localhost:3000/members"},{"rel":"notes_author_member","href":"http://localhost:3000/members"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/availabilities/search?event_id=1"}],"queries":[{"rel":"search","href":"http://localhost:3000/availabilities/search","data":[{"name":"team_id","value":null},{"name":"event_id","value":null},{"name":"member_id","value":null},{"name":"started_before","value":null},{"name":"started_after","value":null},{"name":"id","value":null}]}],"commands":[{"rel":"bulk_mark_unset_availabilities","href":"http://localhost:3000/availabilities/bulk_mark_unset_availabilities","prompt":"Mark
|
108
|
+
all future unset availabilities to specified status_code for the specified
|
109
|
+
member_id","data":[{"name":"status_code","value":null},{"name":"member_id","value":null},{"name":"started_after","value":null}]}],"items":[{"href":"http://localhost:3000/availabilities/1","data":[{"name":"id","value":1},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":1},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Yes.
|
110
|
+
I will be there."},{"name":"status_code","value":1},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T16:54:01Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T16:54:01Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/1"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/2","data":[{"name":"id","value":2},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":2},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Yes.
|
111
|
+
I will be there."},{"name":"status_code","value":1},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T16:54:01Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T16:54:01Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/2"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/3","data":[{"name":"id","value":3},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":5},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Maybe.
|
112
|
+
I''m not sure yet."},{"name":"status_code","value":2},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T16:54:02Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T16:54:02Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/5"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/4","data":[{"name":"id","value":4},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":6},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"No.
|
113
|
+
I can''t make it."},{"name":"status_code","value":0},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T16:54:02Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T16:54:02Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/6"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/37","data":[{"name":"id","value":37},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":3},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Unknown"},{"name":"status_code","value":null},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T21:08:13Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/3"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/38","data":[{"name":"id","value":38},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":4},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Unknown"},{"name":"status_code","value":null},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T21:08:13Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/4"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/39","data":[{"name":"id","value":39},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":7},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Unknown"},{"name":"status_code","value":null},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T21:08:13Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/7"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/40","data":[{"name":"id","value":40},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":8},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Unknown"},{"name":"status_code","value":null},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T21:08:13Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/8"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/41","data":[{"name":"id","value":41},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":9},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Unknown"},{"name":"status_code","value":null},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T21:08:13Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/9"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/42","data":[{"name":"id","value":42},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":10},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Unknown"},{"name":"status_code","value":null},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T21:08:13Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/10"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/43","data":[{"name":"id","value":43},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":11},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Unknown"},{"name":"status_code","value":null},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T21:08:13Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/11"},{"rel":"team","href":"http://localhost:3000/teams/1"}]},{"href":"http://localhost:3000/availabilities/44","data":[{"name":"id","value":44},{"name":"type","value":"availability"},{"name":"event_id","value":1},{"name":"member_id","value":12},{"name":"notes","value":null},{"name":"notes_author_member_id","value":null},{"name":"status","value":"Unknown"},{"name":"status_code","value":null},{"name":"team_id","value":1},{"name":"created_at","value":"2015-05-06T21:08:13Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"event","href":"http://localhost:3000/events/1"},{"rel":"member","href":"http://localhost:3000/members/12"},{"rel":"team","href":"http://localhost:3000/teams/1"}]}]}}'
|
114
|
+
http_version: '1.1'
|
115
|
+
adapter_metadata:
|
116
|
+
effective_url: http://localhost:3000/availabilities/search?event_id=1
|
117
|
+
recorded_at: Wed, 06 May 2015 22:18:28 GMT
|
118
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,112 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/events/search?id=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Authorization:
|
13
|
+
- Bearer 1-classic-dont_tell_the_cops
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- application/vnd.collection+json
|
21
|
+
Content-Length:
|
22
|
+
- '4638'
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
X-Content-Type-Options:
|
28
|
+
- nosniff
|
29
|
+
X-RateLimit-Limit:
|
30
|
+
- '5000'
|
31
|
+
X-RateLimit-Remaining:
|
32
|
+
- '4995'
|
33
|
+
X-RateLimit-Reset:
|
34
|
+
- '1430954308'
|
35
|
+
ETag:
|
36
|
+
- '"cc26ac10a47b12667d5d5a7f569e690f"'
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0, private, must-revalidate
|
39
|
+
X-Request-Id:
|
40
|
+
- adea4700-08d6-4041-b2ed-fce147645208
|
41
|
+
X-Runtime:
|
42
|
+
- '0.038008'
|
43
|
+
X-Powered-By:
|
44
|
+
- Phusion Passenger 4.0.59
|
45
|
+
Date:
|
46
|
+
- Wed, 06 May 2015 22:18:28 GMT
|
47
|
+
Server:
|
48
|
+
- nginx/1.6.2 + Phusion Passenger 4.0.59
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"collection":{"version":"3.64.0","href":"http://localhost:3000/events","template":{"data":[{"name":"repeating_type_code","value":null},{"name":"is_game","value":null},{"name":"start_date","value":null},{"name":"is_tbd","value":null},{"name":"name","value":null},{"name":"label","value":null},{"name":"game_type_code","value":null},{"name":"icon_color","value":null},{"name":"minutes_to_arrive_early","value":null},{"name":"duration_in_minutes","value":null},{"name":"notes","value":null},{"name":"points_for_team","value":null},{"name":"points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"is_overtime","value":null},{"name":"is_shootout","value":null},{"name":"doesnt_count_towards_record","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"tracks_availability","value":null},{"name":"uniform","value":null},{"name":"is_canceled","value":null},{"name":"notify_team","value":null},{"name":"notify_team_as_member_id","value":null},{"name":"team_id","value":null},{"name":"division_location_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"repeating_until","value":null},{"name":"repeating_include","value":null}]},"links":[{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"division_location","href":"http://localhost:3000/division_locations"},{"rel":"location","href":"http://localhost:3000/locations"},{"rel":"opponent","href":"http://localhost:3000/opponents"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/events/search?id=1"}],"queries":[{"rel":"search","href":"http://localhost:3000/events/search","data":[{"name":"team_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"started_after","value":null},{"name":"started_before","value":null},{"name":"id","value":null}]},{"rel":"search_games","href":"http://localhost:3000/events/search_games","data":[{"name":"team_id","value":null}]}],"commands":[{"rel":"send_availability_reminders","href":"http://localhost:3000/events/send_availability_reminders","prompt":"members_to_notify
|
52
|
+
= (all|unset)","data":[{"name":"id","value":null},{"name":"members_to_notify","value":null},{"name":"notify_team_as_member_id","value":null}]}],"items":[{"href":"http://localhost:3000/events/1","data":[{"name":"id","value":1},{"name":"type","value":"event"},{"name":"arrival_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"division_location_id","value":null},{"name":"doesnt_count_towards_record","value":false},{"name":"duration_in_minutes","value":120},{"name":"end_date","value":"2015-01-01T02:00:00Z","type":"DateTime"},{"name":"formatted_results","value":null},{"name":"game_type","value":"Not
|
53
|
+
Specified"},{"name":"game_type_code","value":null},{"name":"icon_color","value":"blue"},{"name":"is_canceled","value":false},{"name":"is_game","value":false},{"name":"is_overtime","value":false},{"name":"is_shootout","value":false},{"name":"is_tbd","value":false},{"name":"label","value":null},{"name":"location_id","value":1},{"name":"minutes_to_arrive_early","value":null},{"name":"name","value":"March
|
54
|
+
Madness Game 1"},{"name":"notes","value":null},{"name":"opponent_id","value":1},{"name":"points_for_opponent","value":null},{"name":"points_for_team","value":null},{"name":"repeating_type","value":null},{"name":"repeating_type_code","value":null},{"name":"repeating_uuid","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"start_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"team_id","value":1},{"name":"tracks_availability","value":true},{"name":"uniform","value":null},{"name":"is_league_controlled","value":false},{"name":"created_at","value":"2015-05-06T16:54:01Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?event_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?event_id=1"},{"rel":"division_location","href":"http://localhost:3000/division_locations/"},{"rel":"location","href":"http://localhost:3000/locations/1"},{"rel":"opponent","href":"http://localhost:3000/opponents/1"},{"rel":"team","href":"http://localhost:3000/teams/1"}]}]}}'
|
55
|
+
http_version: '1.1'
|
56
|
+
adapter_metadata:
|
57
|
+
effective_url: http://localhost:3000/events/search?id=1
|
58
|
+
recorded_at: Wed, 06 May 2015 22:18:28 GMT
|
59
|
+
- request:
|
60
|
+
method: get
|
61
|
+
uri: http://localhost:3000/assignments/search?event_id=1
|
62
|
+
body:
|
63
|
+
encoding: US-ASCII
|
64
|
+
string: ''
|
65
|
+
headers:
|
66
|
+
User-Agent:
|
67
|
+
- Faraday v0.9.1
|
68
|
+
Authorization:
|
69
|
+
- Bearer 1-classic-dont_tell_the_cops
|
70
|
+
response:
|
71
|
+
status:
|
72
|
+
code: 200
|
73
|
+
message: OK
|
74
|
+
headers:
|
75
|
+
Content-Type:
|
76
|
+
- application/vnd.collection+json
|
77
|
+
Content-Length:
|
78
|
+
- '789'
|
79
|
+
Connection:
|
80
|
+
- keep-alive
|
81
|
+
Status:
|
82
|
+
- 200 OK
|
83
|
+
X-Content-Type-Options:
|
84
|
+
- nosniff
|
85
|
+
X-RateLimit-Limit:
|
86
|
+
- '5000'
|
87
|
+
X-RateLimit-Remaining:
|
88
|
+
- '4994'
|
89
|
+
X-RateLimit-Reset:
|
90
|
+
- '1430954308'
|
91
|
+
ETag:
|
92
|
+
- '"0866ff0eade4cc8af4d1ccdfe62bba5d"'
|
93
|
+
Cache-Control:
|
94
|
+
- max-age=0, private, must-revalidate
|
95
|
+
X-Request-Id:
|
96
|
+
- 9a883c0d-8ea5-4c5d-87e4-d43fafd7cdd6
|
97
|
+
X-Runtime:
|
98
|
+
- '0.028815'
|
99
|
+
X-Powered-By:
|
100
|
+
- Phusion Passenger 4.0.59
|
101
|
+
Date:
|
102
|
+
- Wed, 06 May 2015 22:18:28 GMT
|
103
|
+
Server:
|
104
|
+
- nginx/1.6.2 + Phusion Passenger 4.0.59
|
105
|
+
body:
|
106
|
+
encoding: UTF-8
|
107
|
+
string: '{"collection":{"version":"3.64.0","href":"http://localhost:3000/assignments","template":{"data":[{"name":"description","value":null},{"name":"event_id","value":null},{"name":"member_id","value":null}]},"links":[{"rel":"event","href":"http://localhost:3000/events"},{"rel":"member","href":"http://localhost:3000/members"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/assignments/search?event_id=1"}],"queries":[{"rel":"search","href":"http://localhost:3000/assignments/search","data":[{"name":"team_id","value":null},{"name":"event_id","value":null},{"name":"member_id","value":null},{"name":"started_before","value":null},{"name":"started_after","value":null},{"name":"id","value":null}]}]}}'
|
108
|
+
http_version: '1.1'
|
109
|
+
adapter_metadata:
|
110
|
+
effective_url: http://localhost:3000/assignments/search?event_id=1
|
111
|
+
recorded_at: Wed, 06 May 2015 22:18:28 GMT
|
112
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,112 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/events/search?id=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Authorization:
|
13
|
+
- Bearer 1-classic-dont_tell_the_cops
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- application/vnd.collection+json
|
21
|
+
Content-Length:
|
22
|
+
- '4638'
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
X-Content-Type-Options:
|
28
|
+
- nosniff
|
29
|
+
X-RateLimit-Limit:
|
30
|
+
- '5000'
|
31
|
+
X-RateLimit-Remaining:
|
32
|
+
- '4999'
|
33
|
+
X-RateLimit-Reset:
|
34
|
+
- '1430954308'
|
35
|
+
ETag:
|
36
|
+
- '"cc26ac10a47b12667d5d5a7f569e690f"'
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0, private, must-revalidate
|
39
|
+
X-Request-Id:
|
40
|
+
- f1a74429-3320-477a-8a0b-7ede67af1783
|
41
|
+
X-Runtime:
|
42
|
+
- '0.064824'
|
43
|
+
X-Powered-By:
|
44
|
+
- Phusion Passenger 4.0.59
|
45
|
+
Date:
|
46
|
+
- Wed, 06 May 2015 22:18:28 GMT
|
47
|
+
Server:
|
48
|
+
- nginx/1.6.2 + Phusion Passenger 4.0.59
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"collection":{"version":"3.64.0","href":"http://localhost:3000/events","template":{"data":[{"name":"repeating_type_code","value":null},{"name":"is_game","value":null},{"name":"start_date","value":null},{"name":"is_tbd","value":null},{"name":"name","value":null},{"name":"label","value":null},{"name":"game_type_code","value":null},{"name":"icon_color","value":null},{"name":"minutes_to_arrive_early","value":null},{"name":"duration_in_minutes","value":null},{"name":"notes","value":null},{"name":"points_for_team","value":null},{"name":"points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"is_overtime","value":null},{"name":"is_shootout","value":null},{"name":"doesnt_count_towards_record","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"tracks_availability","value":null},{"name":"uniform","value":null},{"name":"is_canceled","value":null},{"name":"notify_team","value":null},{"name":"notify_team_as_member_id","value":null},{"name":"team_id","value":null},{"name":"division_location_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"repeating_until","value":null},{"name":"repeating_include","value":null}]},"links":[{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"division_location","href":"http://localhost:3000/division_locations"},{"rel":"location","href":"http://localhost:3000/locations"},{"rel":"opponent","href":"http://localhost:3000/opponents"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/events/search?id=1"}],"queries":[{"rel":"search","href":"http://localhost:3000/events/search","data":[{"name":"team_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"started_after","value":null},{"name":"started_before","value":null},{"name":"id","value":null}]},{"rel":"search_games","href":"http://localhost:3000/events/search_games","data":[{"name":"team_id","value":null}]}],"commands":[{"rel":"send_availability_reminders","href":"http://localhost:3000/events/send_availability_reminders","prompt":"members_to_notify
|
52
|
+
= (all|unset)","data":[{"name":"id","value":null},{"name":"members_to_notify","value":null},{"name":"notify_team_as_member_id","value":null}]}],"items":[{"href":"http://localhost:3000/events/1","data":[{"name":"id","value":1},{"name":"type","value":"event"},{"name":"arrival_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"division_location_id","value":null},{"name":"doesnt_count_towards_record","value":false},{"name":"duration_in_minutes","value":120},{"name":"end_date","value":"2015-01-01T02:00:00Z","type":"DateTime"},{"name":"formatted_results","value":null},{"name":"game_type","value":"Not
|
53
|
+
Specified"},{"name":"game_type_code","value":null},{"name":"icon_color","value":"blue"},{"name":"is_canceled","value":false},{"name":"is_game","value":false},{"name":"is_overtime","value":false},{"name":"is_shootout","value":false},{"name":"is_tbd","value":false},{"name":"label","value":null},{"name":"location_id","value":1},{"name":"minutes_to_arrive_early","value":null},{"name":"name","value":"March
|
54
|
+
Madness Game 1"},{"name":"notes","value":null},{"name":"opponent_id","value":1},{"name":"points_for_opponent","value":null},{"name":"points_for_team","value":null},{"name":"repeating_type","value":null},{"name":"repeating_type_code","value":null},{"name":"repeating_uuid","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"start_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"team_id","value":1},{"name":"tracks_availability","value":true},{"name":"uniform","value":null},{"name":"is_league_controlled","value":false},{"name":"created_at","value":"2015-05-06T16:54:01Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?event_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?event_id=1"},{"rel":"division_location","href":"http://localhost:3000/division_locations/"},{"rel":"location","href":"http://localhost:3000/locations/1"},{"rel":"opponent","href":"http://localhost:3000/opponents/1"},{"rel":"team","href":"http://localhost:3000/teams/1"}]}]}}'
|
55
|
+
http_version: '1.1'
|
56
|
+
adapter_metadata:
|
57
|
+
effective_url: http://localhost:3000/events/search?id=1
|
58
|
+
recorded_at: Wed, 06 May 2015 22:18:28 GMT
|
59
|
+
- request:
|
60
|
+
method: get
|
61
|
+
uri: http://localhost:3000/division_locations/
|
62
|
+
body:
|
63
|
+
encoding: US-ASCII
|
64
|
+
string: ''
|
65
|
+
headers:
|
66
|
+
User-Agent:
|
67
|
+
- Faraday v0.9.1
|
68
|
+
Authorization:
|
69
|
+
- Bearer 1-classic-dont_tell_the_cops
|
70
|
+
response:
|
71
|
+
status:
|
72
|
+
code: 200
|
73
|
+
message: OK
|
74
|
+
headers:
|
75
|
+
Content-Type:
|
76
|
+
- application/vnd.collection+json
|
77
|
+
Content-Length:
|
78
|
+
- '416'
|
79
|
+
Connection:
|
80
|
+
- keep-alive
|
81
|
+
Status:
|
82
|
+
- 200 OK
|
83
|
+
X-Content-Type-Options:
|
84
|
+
- nosniff
|
85
|
+
X-RateLimit-Limit:
|
86
|
+
- '5000'
|
87
|
+
X-RateLimit-Remaining:
|
88
|
+
- '4998'
|
89
|
+
X-RateLimit-Reset:
|
90
|
+
- '1430954308'
|
91
|
+
ETag:
|
92
|
+
- '"b523fe5fa45da84bc1ae153d3c7d5c65"'
|
93
|
+
Cache-Control:
|
94
|
+
- max-age=0, private, must-revalidate
|
95
|
+
X-Request-Id:
|
96
|
+
- 210dafb9-7a3c-413d-9ab5-3a7e3ce3c053
|
97
|
+
X-Runtime:
|
98
|
+
- '0.022822'
|
99
|
+
X-Powered-By:
|
100
|
+
- Phusion Passenger 4.0.59
|
101
|
+
Date:
|
102
|
+
- Wed, 06 May 2015 22:18:28 GMT
|
103
|
+
Server:
|
104
|
+
- nginx/1.6.2 + Phusion Passenger 4.0.59
|
105
|
+
body:
|
106
|
+
encoding: UTF-8
|
107
|
+
string: '{"collection":{"version":"3.64.0","href":"http://localhost:3000/division_locations","links":[{"rel":"events","href":"http://localhost:3000/events"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/division_locations"}],"queries":[{"rel":"search","href":"http://localhost:3000/division_locations/search","data":[{"name":"team_id","value":null},{"name":"id","value":null}]}]}}'
|
108
|
+
http_version: '1.1'
|
109
|
+
adapter_metadata:
|
110
|
+
effective_url: http://localhost:3000/division_locations/
|
111
|
+
recorded_at: Wed, 06 May 2015 22:18:28 GMT
|
112
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,117 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/events/search?id=1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.1
|
12
|
+
Authorization:
|
13
|
+
- Bearer 1-classic-dont_tell_the_cops
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Content-Type:
|
20
|
+
- application/vnd.collection+json
|
21
|
+
Content-Length:
|
22
|
+
- '4638'
|
23
|
+
Connection:
|
24
|
+
- keep-alive
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
X-Content-Type-Options:
|
28
|
+
- nosniff
|
29
|
+
X-RateLimit-Limit:
|
30
|
+
- '5000'
|
31
|
+
X-RateLimit-Remaining:
|
32
|
+
- '4997'
|
33
|
+
X-RateLimit-Reset:
|
34
|
+
- '1430954308'
|
35
|
+
ETag:
|
36
|
+
- '"cc26ac10a47b12667d5d5a7f569e690f"'
|
37
|
+
Cache-Control:
|
38
|
+
- max-age=0, private, must-revalidate
|
39
|
+
X-Request-Id:
|
40
|
+
- 0d7da4b6-f1f6-488f-889a-47426e86678f
|
41
|
+
X-Runtime:
|
42
|
+
- '0.041271'
|
43
|
+
X-Powered-By:
|
44
|
+
- Phusion Passenger 4.0.59
|
45
|
+
Date:
|
46
|
+
- Wed, 06 May 2015 22:18:28 GMT
|
47
|
+
Server:
|
48
|
+
- nginx/1.6.2 + Phusion Passenger 4.0.59
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"collection":{"version":"3.64.0","href":"http://localhost:3000/events","template":{"data":[{"name":"repeating_type_code","value":null},{"name":"is_game","value":null},{"name":"start_date","value":null},{"name":"is_tbd","value":null},{"name":"name","value":null},{"name":"label","value":null},{"name":"game_type_code","value":null},{"name":"icon_color","value":null},{"name":"minutes_to_arrive_early","value":null},{"name":"duration_in_minutes","value":null},{"name":"notes","value":null},{"name":"points_for_team","value":null},{"name":"points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"is_overtime","value":null},{"name":"is_shootout","value":null},{"name":"doesnt_count_towards_record","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"tracks_availability","value":null},{"name":"uniform","value":null},{"name":"is_canceled","value":null},{"name":"notify_team","value":null},{"name":"notify_team_as_member_id","value":null},{"name":"team_id","value":null},{"name":"division_location_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"repeating_until","value":null},{"name":"repeating_include","value":null}]},"links":[{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"division_location","href":"http://localhost:3000/division_locations"},{"rel":"location","href":"http://localhost:3000/locations"},{"rel":"opponent","href":"http://localhost:3000/opponents"},{"rel":"team","href":"http://localhost:3000/teams"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/events/search?id=1"}],"queries":[{"rel":"search","href":"http://localhost:3000/events/search","data":[{"name":"team_id","value":null},{"name":"location_id","value":null},{"name":"opponent_id","value":null},{"name":"started_after","value":null},{"name":"started_before","value":null},{"name":"id","value":null}]},{"rel":"search_games","href":"http://localhost:3000/events/search_games","data":[{"name":"team_id","value":null}]}],"commands":[{"rel":"send_availability_reminders","href":"http://localhost:3000/events/send_availability_reminders","prompt":"members_to_notify
|
52
|
+
= (all|unset)","data":[{"name":"id","value":null},{"name":"members_to_notify","value":null},{"name":"notify_team_as_member_id","value":null}]}],"items":[{"href":"http://localhost:3000/events/1","data":[{"name":"id","value":1},{"name":"type","value":"event"},{"name":"arrival_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"division_location_id","value":null},{"name":"doesnt_count_towards_record","value":false},{"name":"duration_in_minutes","value":120},{"name":"end_date","value":"2015-01-01T02:00:00Z","type":"DateTime"},{"name":"formatted_results","value":null},{"name":"game_type","value":"Not
|
53
|
+
Specified"},{"name":"game_type_code","value":null},{"name":"icon_color","value":"blue"},{"name":"is_canceled","value":false},{"name":"is_game","value":false},{"name":"is_overtime","value":false},{"name":"is_shootout","value":false},{"name":"is_tbd","value":false},{"name":"label","value":null},{"name":"location_id","value":1},{"name":"minutes_to_arrive_early","value":null},{"name":"name","value":"March
|
54
|
+
Madness Game 1"},{"name":"notes","value":null},{"name":"opponent_id","value":1},{"name":"points_for_opponent","value":null},{"name":"points_for_team","value":null},{"name":"repeating_type","value":null},{"name":"repeating_type_code","value":null},{"name":"repeating_uuid","value":null},{"name":"results","value":null},{"name":"results_url","value":null},{"name":"shootout_points_for_opponent","value":null},{"name":"shootout_points_for_team","value":null},{"name":"start_date","value":"2015-01-01T00:00:00Z","type":"DateTime"},{"name":"team_id","value":1},{"name":"tracks_availability","value":true},{"name":"uniform","value":null},{"name":"is_league_controlled","value":false},{"name":"created_at","value":"2015-05-06T16:54:01Z","type":"DateTime"},{"name":"updated_at","value":"2015-05-06T21:08:13Z","type":"DateTime"}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?event_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?event_id=1"},{"rel":"division_location","href":"http://localhost:3000/division_locations/"},{"rel":"location","href":"http://localhost:3000/locations/1"},{"rel":"opponent","href":"http://localhost:3000/opponents/1"},{"rel":"team","href":"http://localhost:3000/teams/1"}]}]}}'
|
55
|
+
http_version: '1.1'
|
56
|
+
adapter_metadata:
|
57
|
+
effective_url: http://localhost:3000/events/search?id=1
|
58
|
+
recorded_at: Wed, 06 May 2015 22:18:28 GMT
|
59
|
+
- request:
|
60
|
+
method: get
|
61
|
+
uri: http://localhost:3000/teams/1
|
62
|
+
body:
|
63
|
+
encoding: US-ASCII
|
64
|
+
string: ''
|
65
|
+
headers:
|
66
|
+
User-Agent:
|
67
|
+
- Faraday v0.9.1
|
68
|
+
Authorization:
|
69
|
+
- Bearer 1-classic-dont_tell_the_cops
|
70
|
+
response:
|
71
|
+
status:
|
72
|
+
code: 200
|
73
|
+
message: OK
|
74
|
+
headers:
|
75
|
+
Content-Type:
|
76
|
+
- application/vnd.collection+json
|
77
|
+
Content-Length:
|
78
|
+
- '9685'
|
79
|
+
Connection:
|
80
|
+
- keep-alive
|
81
|
+
Status:
|
82
|
+
- 200 OK
|
83
|
+
X-Content-Type-Options:
|
84
|
+
- nosniff
|
85
|
+
X-RateLimit-Limit:
|
86
|
+
- '5000'
|
87
|
+
X-RateLimit-Remaining:
|
88
|
+
- '4996'
|
89
|
+
X-RateLimit-Reset:
|
90
|
+
- '1430954308'
|
91
|
+
ETag:
|
92
|
+
- '"ccb89a09bd0063284fc293e9805575cf"'
|
93
|
+
Cache-Control:
|
94
|
+
- max-age=0, private, must-revalidate
|
95
|
+
X-Request-Id:
|
96
|
+
- 70b7d5ac-191c-44ef-9e84-880f0ea90470
|
97
|
+
X-Runtime:
|
98
|
+
- '0.044827'
|
99
|
+
X-Powered-By:
|
100
|
+
- Phusion Passenger 4.0.59
|
101
|
+
Date:
|
102
|
+
- Wed, 06 May 2015 22:18:28 GMT
|
103
|
+
Server:
|
104
|
+
- nginx/1.6.2 + Phusion Passenger 4.0.59
|
105
|
+
body:
|
106
|
+
encoding: UTF-8
|
107
|
+
string: '{"collection":{"version":"3.64.0","href":"http://localhost:3000/teams","template":{"data":[{"name":"name","value":null},{"name":"location_country","value":null},{"name":"location_postal_code","value":null},{"name":"time_zone","value":null},{"name":"sport_id","value":null},{"name":"division_name","value":null},{"name":"season_name","value":null},{"name":"league_name","value":null},{"name":"league_url","value":null}]},"links":[{"rel":"active_season_team","href":"http://localhost:3000/teams"},{"rel":"assignments","href":"http://localhost:3000/assignments"},{"rel":"availabilities","href":"http://localhost:3000/availabilities"},{"rel":"broadcast_emails","href":"http://localhost:3000/broadcast_emails"},{"rel":"broadcast_smses","href":"http://localhost:3000/broadcast_smses"},{"rel":"contact_email_addresses","href":"http://localhost:3000/contact_email_addresses"},{"rel":"contact_phone_numbers","href":"http://localhost:3000/contact_phone_numbers"},{"rel":"contacts","href":"http://localhost:3000/contacts"},{"rel":"custom_data","href":"http://localhost:3000/custom_data"},{"rel":"custom_fields","href":"http://localhost:3000/custom_fields"},{"rel":"league_custom_data","href":"http://localhost:3000/league_custom_data"},{"rel":"league_custom_fields","href":"http://localhost:3000/league_custom_fields"},{"rel":"division_locations","href":"http://localhost:3000/division_locations"},{"rel":"division_members","href":"http://localhost:3000/division_members"},{"rel":"events","href":"http://localhost:3000/events"},{"rel":"forum_posts","href":"http://localhost:3000/forum_posts"},{"rel":"forum_subscriptions","href":"http://localhost:3000/forum_subscriptions"},{"rel":"forum_topics","href":"http://localhost:3000/forum_topics"},{"rel":"league_registrant_documents","href":"http://localhost:3000/league_registrant_documents"},{"rel":"locations","href":"http://localhost:3000/locations"},{"rel":"managers","href":"http://localhost:3000/members"},{"rel":"member_email_addresses","href":"http://localhost:3000/member_email_addresses"},{"rel":"member_files","href":"http://localhost:3000/member_files"},{"rel":"member_links","href":"http://localhost:3000/member_links"},{"rel":"member_payments","href":"http://localhost:3000/member_payments"},{"rel":"member_phone_numbers","href":"http://localhost:3000/member_phone_numbers"},{"rel":"members","href":"http://localhost:3000/members"},{"rel":"members_preferences","href":"http://localhost:3000/members_preferences"},{"rel":"opponents","href":"http://localhost:3000/opponents"},{"rel":"opponents_results","href":"http://localhost:3000/opponents_results"},{"rel":"owner","href":"http://localhost:3000/members"},{"rel":"plan","href":"http://localhost:3000/plans"},{"rel":"sponsors","href":"http://localhost:3000/sponsors"},{"rel":"sport","href":"http://localhost:3000/sports"},{"rel":"team_fees","href":"http://localhost:3000/team_fees"},{"rel":"team_preferences","href":"http://localhost:3000/teams_preferences"},{"rel":"team_public_site","href":"http://localhost:3000/team_public_sites"},{"rel":"team_results","href":"http://localhost:3000/teams_results"},{"rel":"tracked_item_statuses","href":"http://localhost:3000/tracked_item_statuses"},{"rel":"tracked_items","href":"http://localhost:3000/tracked_items"},{"rel":"root","href":"http://localhost:3000/"},{"rel":"self","href":"http://localhost:3000/teams/1"}],"queries":[{"rel":"search","href":"http://localhost:3000/teams/search","data":[{"name":"id","value":null},{"name":"team_id","value":null},{"name":"user_id","value":null},{"name":"division_id","value":null}]}],"commands":[{"rel":"invite","href":"http://localhost:3000/teams/invite","prompt":"invite
|
108
|
+
team members or contacts to join TeamSnap.","data":[{"name":"team_id","value":null},{"name":"contact_id","value":null},{"name":"member_id","value":null},{"name":"introduction","value":null},{"name":"notify_as_member_id","value":null}]},{"rel":"update_time_zone","href":"http://localhost:3000/teams/update_time_zone","prompt":"Update
|
109
|
+
team''s time zone.","data":[{"name":"team_id","value":null},{"name":"time_zone","value":null},{"name":"offset_team_times","value":null}]}],"items":[{"href":"http://localhost:3000/teams/1","data":[{"name":"id","value":1},{"name":"type","value":"team"},{"name":"division_name","value":null},{"name":"is_archived_season","value":false},{"name":"league_name","value":null},{"name":"league_url","value":null},{"name":"is_in_league","value":false},{"name":"location_country","value":"United
|
110
|
+
States"},{"name":"location_postal_code","value":"80951"},{"name":"location_latitude","value":""},{"name":"location_longitude","value":""},{"name":"name","value":"Base
|
111
|
+
Team"},{"name":"plan_id","value":14},{"name":"season_name","value":null},{"name":"sport_id","value":1},{"name":"time_zone_description","value":"Mountain
|
112
|
+
Time (US & Canada)"},{"name":"time_zone_iana_name","value":"America/Denver"},{"name":"time_zone_offset","value":"-07:00"},{"name":"updated_at","value":"2015-05-06T16:54:03Z","type":"DateTime"},{"name":"created_at","value":"2015-05-06T16:54:00Z","type":"DateTime"},{"name":"has_reached_roster_limit","value":false},{"name":"roster_limit","value":30},{"name":"has_exportable_media","value":false}],"links":[{"rel":"assignments","href":"http://localhost:3000/assignments/search?team_id=1"},{"rel":"availabilities","href":"http://localhost:3000/availabilities/search?team_id=1"},{"rel":"broadcast_emails","href":"http://localhost:3000/broadcast_emails/search?team_id=1"},{"rel":"broadcast_smses","href":"http://localhost:3000/broadcast_smses/search?team_id=1"},{"rel":"calendar_http","href":"http://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/6ad5ef10-d63e-0132-853f-000c297f8dfc.ics"},{"rel":"calendar_http_games_only","href":"http://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/filter/games/6ad5ef10-d63e-0132-853f-000c297f8dfc.ics"},{"rel":"calendar_webcal","href":"webcal://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/6ad5ef10-d63e-0132-853f-000c297f8dfc.ics"},{"rel":"calendar_webcal_games_only","href":"webcal://86ed2e8eefaaee16c4b7-16391cffaf9272bff70e93998d553c16.r2.cf1.rackcdn.com/team_schedule/filter/games/6ad5ef10-d63e-0132-853f-000c297f8dfc.ics"},{"rel":"contact_email_addresses","href":"http://localhost:3000/contact_email_addresses/search?team_id=1"},{"rel":"contact_phone_numbers","href":"http://localhost:3000/contact_phone_numbers/search?team_id=1"},{"rel":"contacts","href":"http://localhost:3000/contacts/search?team_id=1"},{"rel":"custom_data","href":"http://localhost:3000/custom_data/search?team_id=1"},{"rel":"custom_fields","href":"http://localhost:3000/custom_fields/search?team_id=1"},{"rel":"league_custom_data","href":"http://localhost:3000/league_custom_data/search?team_id=1"},{"rel":"league_custom_fields","href":"http://localhost:3000/league_custom_fields/search?team_id=1"},{"rel":"division_locations","href":"http://localhost:3000/division_locations/search?team_id=1"},{"rel":"division_members","href":"http://localhost:3000/division_members/search?team_id=1"},{"rel":"forum_posts","href":"http://localhost:3000/forum_posts/search?team_id=1"},{"rel":"forum_subscriptions","href":"http://localhost:3000/forum_subscriptions/search?team_id=1"},{"rel":"forum_topics","href":"http://localhost:3000/forum_topics/search?team_id=1"},{"rel":"events","href":"http://localhost:3000/events/search?team_id=1"},{"rel":"events_csv_export","href":"http://localhost:3000/exports/events_csv?hs=YszGJFFtdkxT%252Ba08BS5xyp1dHMOjVVvQPmlGdCebDpZJEIA5ysqcsrI33JZZvAn%252FIn1Oib4Rr4I53n5pSftBsME2FdbuMfYeFFvKSDtIuEk%253D"},{"rel":"league_registrant_documents","href":"http://localhost:3000/league_registrant_documents/search?member_id=1"},{"rel":"locations","href":"http://localhost:3000/locations/search?team_id=1"},{"rel":"managers","href":"http://localhost:3000/members/managers?team_id=1"},{"rel":"member_email_addresses","href":"http://localhost:3000/member_email_addresses/search?team_id=1"},{"rel":"member_files","href":"http://localhost:3000/member_files/search?team_id=1"},{"rel":"member_links","href":"http://localhost:3000/member_links/search?team_id=1"},{"rel":"member_payments","href":"http://localhost:3000/member_payments/search?team_id=1"},{"rel":"member_phone_numbers","href":"http://localhost:3000/member_phone_numbers/search?team_id=1"},{"rel":"members","href":"http://localhost:3000/members/search?team_id=1"},{"rel":"members_csv_export","href":"http://localhost:3000/exports/members_csv?hs=YszGJFFtdkxT%252Ba08BS5xyp1dHMOjVVvQPmlGdCebDpZJEIA5ysqcsrI33JZZvAn%252FIn1Oib4Rr4I53n5pSftBsME2FdbuMfYeFFvKSDtIuEk%253D"},{"rel":"members_preferences","href":"http://localhost:3000/members_preferences/search?team_id=1"},{"rel":"opponents","href":"http://localhost:3000/opponents/search?team_id=1"},{"rel":"opponents_results","href":"http://localhost:3000/opponents_results/search?team_id=1"},{"rel":"owner","href":"http://localhost:3000/members/owner?team_id=1"},{"rel":"plan","href":"http://localhost:3000/plans/14"},{"rel":"sponsors","href":"http://localhost:3000/sponsors/search?team_id=1"},{"rel":"sport","href":"http://localhost:3000/sports/1"},{"rel":"team_fees","href":"http://localhost:3000/team_fees/search?team_id=1"},{"rel":"team_preferences","href":"http://localhost:3000/teams_preferences/1"},{"rel":"team_public_site","href":"http://localhost:3000/team_public_sites/1"},{"rel":"team_results","href":"http://localhost:3000/teams_results/1"},{"rel":"tracked_item_statuses","href":"http://localhost:3000/tracked_item_statuses/search?team_id=1"},{"rel":"tracked_items","href":"http://localhost:3000/tracked_items/search?team_id=1"}]}]}}'
|
113
|
+
http_version: '1.1'
|
114
|
+
adapter_metadata:
|
115
|
+
effective_url: http://localhost:3000/teams/1
|
116
|
+
recorded_at: Wed, 06 May 2015 22:18:28 GMT
|
117
|
+
recorded_with: VCR 2.9.3
|
data/spec/teamsnap_spec.rb
CHANGED
@@ -131,4 +131,34 @@ RSpec.describe "teamsnap_rb", :vcr => true do
|
|
131
131
|
|
132
132
|
expect(m.href).to eq("http://localhost:3000/members/1")
|
133
133
|
end
|
134
|
+
|
135
|
+
context "supports relations with expected behaviors" do
|
136
|
+
let(:event) { TeamSnap::Event.find(1) }
|
137
|
+
|
138
|
+
context "when a plural relation is called" do
|
139
|
+
it "responds with an array of objects when successful" do
|
140
|
+
a = event.availabilities
|
141
|
+
expect(a.size).to be > 0
|
142
|
+
expect(a).to be_an(Array)
|
143
|
+
end
|
144
|
+
|
145
|
+
it "responds with an empty array when no objects exist" do
|
146
|
+
a = event.assignments
|
147
|
+
expect(a.size).to eq(0)
|
148
|
+
expect(a).to be_an(Array)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
context "when a singular relation is called" do
|
153
|
+
it "responds with the object if it exists" do
|
154
|
+
a = event.team
|
155
|
+
expect(a).to be_a(TeamSnap::Team)
|
156
|
+
end
|
157
|
+
|
158
|
+
it "responds with nil if it does NOT exist" do
|
159
|
+
a = event.division_location
|
160
|
+
expect(a).to be_a(NilClass)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
134
164
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teamsnap_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Emmons
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -166,6 +166,10 @@ files:
|
|
166
166
|
- spec/cassettes/teamsnap_rb/handles_fetching_data_via_queries.yml
|
167
167
|
- spec/cassettes/teamsnap_rb/handles_queries_with_no_data.yml
|
168
168
|
- spec/cassettes/teamsnap_rb/raises_an_exception_if_find_returns_nothing.yml
|
169
|
+
- spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_plural_relation_is_called/responds_with_an_array_of_objects_when_successful.yml
|
170
|
+
- spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_plural_relation_is_called/responds_with_an_empty_array_when_no_objects_exist.yml
|
171
|
+
- spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_singular_relation_is_called/responds_with_nil_if_it_does_NOT_exist.yml
|
172
|
+
- spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_singular_relation_is_called/responds_with_the_object_if_it_exists.yml
|
169
173
|
- spec/spec_helper.rb
|
170
174
|
- spec/teamsnap_spec.rb
|
171
175
|
- teamsnap_rb.gemspec
|
@@ -208,5 +212,9 @@ test_files:
|
|
208
212
|
- spec/cassettes/teamsnap_rb/handles_fetching_data_via_queries.yml
|
209
213
|
- spec/cassettes/teamsnap_rb/handles_queries_with_no_data.yml
|
210
214
|
- spec/cassettes/teamsnap_rb/raises_an_exception_if_find_returns_nothing.yml
|
215
|
+
- spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_plural_relation_is_called/responds_with_an_array_of_objects_when_successful.yml
|
216
|
+
- spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_plural_relation_is_called/responds_with_an_empty_array_when_no_objects_exist.yml
|
217
|
+
- spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_singular_relation_is_called/responds_with_nil_if_it_does_NOT_exist.yml
|
218
|
+
- spec/cassettes/teamsnap_rb/supports_relations_with_expected_behaviors/when_a_singular_relation_is_called/responds_with_the_object_if_it_exists.yml
|
211
219
|
- spec/spec_helper.rb
|
212
220
|
- spec/teamsnap_spec.rb
|