teamsnap_rb 2.0.0.beta3 → 2.0.0.beta4
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/.travis.yml +0 -6
- data/lib/teamsnap.rb +1 -1
- data/lib/teamsnap/item.rb +1 -0
- data/lib/teamsnap/response.rb +11 -4
- data/lib/teamsnap/version.rb +1 -1
- data/spec/cassettes/apiv3-error.yml +841 -0
- data/spec/cassettes/teamsnap_rb/_server_error/Specifies_call_and_endpoint_that_was_unsuccessful.yml +4989 -0
- data/spec/teamsnap_spec.rb +25 -1
- metadata +6 -2
data/spec/teamsnap_spec.rb
CHANGED
@@ -224,7 +224,7 @@ RSpec.describe "teamsnap_rb", :vcr => true do
|
|
224
224
|
TeamSnap.bulk_load
|
225
225
|
}.to raise_error(
|
226
226
|
ArgumentError,
|
227
|
-
"wrong number of arguments (0
|
227
|
+
"wrong number of arguments (given 0, expected 1+)"
|
228
228
|
)
|
229
229
|
end
|
230
230
|
|
@@ -249,4 +249,28 @@ RSpec.describe "teamsnap_rb", :vcr => true do
|
|
249
249
|
)
|
250
250
|
end
|
251
251
|
end
|
252
|
+
|
253
|
+
describe "_server_error" do
|
254
|
+
before(:all) do
|
255
|
+
VCR.use_cassette("apiv3-error") do
|
256
|
+
TeamSnap.init(
|
257
|
+
:url => ROOT_TEST_URL,
|
258
|
+
:client_id => "classic",
|
259
|
+
:client_secret => "dont_tell_the_cops"
|
260
|
+
)
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
it "Specifies call and endpoint that was unsuccessful" do
|
265
|
+
expect {
|
266
|
+
TeamSnap
|
267
|
+
.root_client
|
268
|
+
.api(:search, TeamSnap::DivisionLocation, {:division_id => 0})
|
269
|
+
}.to raise_error(
|
270
|
+
TeamSnap::Error,
|
271
|
+
"`get` call with arguments {:division_id=>0} was unsuccessful. " +
|
272
|
+
"The server returned a status of 500."
|
273
|
+
)
|
274
|
+
end
|
275
|
+
end
|
252
276
|
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: 2.0.0.
|
4
|
+
version: 2.0.0.beta4
|
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: 2016-
|
12
|
+
date: 2016-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -162,6 +162,7 @@ files:
|
|
162
162
|
- lib/teamsnap/response.rb
|
163
163
|
- lib/teamsnap/structure.rb
|
164
164
|
- lib/teamsnap/version.rb
|
165
|
+
- spec/cassettes/apiv3-error.yml
|
165
166
|
- spec/cassettes/apiv3-init.yml
|
166
167
|
- spec/cassettes/teamsnap__client/when_calling_via_s_on_the_client/does_not_raise_an_error_when_the_HTTP_actions_are_called.yml
|
167
168
|
- spec/cassettes/teamsnap__client/when_calling_via_s_on_the_client/passes_them_to_the_faraday_client_using_method_missing.yml
|
@@ -190,6 +191,7 @@ files:
|
|
190
191
|
- spec/cassettes/teamsnap_rb/_client_send/when_sent_a_known_via_/calls_PATCH_on_the_given_client.yml
|
191
192
|
- spec/cassettes/teamsnap_rb/_client_send/when_sent_a_known_via_/calls_POST_on_the_given_client.yml
|
192
193
|
- spec/cassettes/teamsnap_rb/_run/processes_the_response.yml
|
194
|
+
- spec/cassettes/teamsnap_rb/_server_error/Specifies_call_and_endpoint_that_was_unsuccessful.yml
|
193
195
|
- spec/spec_helper.rb
|
194
196
|
- spec/teamsnap/client_spec.rb
|
195
197
|
- spec/teamsnap/collection_spec.rb
|
@@ -223,6 +225,7 @@ signing_key:
|
|
223
225
|
specification_version: 4
|
224
226
|
summary: A gem to interact with TeamSnap's API
|
225
227
|
test_files:
|
228
|
+
- spec/cassettes/apiv3-error.yml
|
226
229
|
- spec/cassettes/apiv3-init.yml
|
227
230
|
- spec/cassettes/teamsnap__client/when_calling_via_s_on_the_client/does_not_raise_an_error_when_the_HTTP_actions_are_called.yml
|
228
231
|
- spec/cassettes/teamsnap__client/when_calling_via_s_on_the_client/passes_them_to_the_faraday_client_using_method_missing.yml
|
@@ -251,6 +254,7 @@ test_files:
|
|
251
254
|
- spec/cassettes/teamsnap_rb/_client_send/when_sent_a_known_via_/calls_PATCH_on_the_given_client.yml
|
252
255
|
- spec/cassettes/teamsnap_rb/_client_send/when_sent_a_known_via_/calls_POST_on_the_given_client.yml
|
253
256
|
- spec/cassettes/teamsnap_rb/_run/processes_the_response.yml
|
257
|
+
- spec/cassettes/teamsnap_rb/_server_error/Specifies_call_and_endpoint_that_was_unsuccessful.yml
|
254
258
|
- spec/spec_helper.rb
|
255
259
|
- spec/teamsnap/client_spec.rb
|
256
260
|
- spec/teamsnap/collection_spec.rb
|