teamsnap_rb 2.0.0 → 2.1.0
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/CHANGELOG.md +5 -0
- data/lib/teamsnap.rb +9 -1
- data/lib/teamsnap/client.rb +12 -14
- data/lib/teamsnap/version.rb +1 -1
- data/spec/cassettes/apiv3-init.yml +431 -490
- data/spec/cassettes/teamsnap__client/when_specifying_a_headers_flag/correctly_sets_the_ghost_header_flag.yml +859 -0
- data/spec/cassettes/teamsnap__client/when_specifying_a_headers_flag/won_t_set_feature_headers_without_the_header_variable_present.yml +858 -0
- data/spec/teamsnap/client_spec.rb +26 -1
- metadata +7 -3
@@ -72,4 +72,29 @@ RSpec.describe "teamsnap__client", :vcr => true do
|
|
72
72
|
TeamSnap.root_client.api(:find, TeamSnap::Team, 1)
|
73
73
|
end
|
74
74
|
end
|
75
|
-
|
75
|
+
|
76
|
+
context "when specifying a headers flag" do
|
77
|
+
it "correctly sets the ghost header flag" do
|
78
|
+
client = TeamSnap.init(
|
79
|
+
:url => ROOT_TEST_URL,
|
80
|
+
:client_id => client_id,
|
81
|
+
:client_secret => client_secret,
|
82
|
+
:headers => {"X-Teamsnap-Api-Features" => "ghost_contact"}
|
83
|
+
)
|
84
|
+
|
85
|
+
headers = TeamSnap.root_client.headers
|
86
|
+
expect(headers["X-Teamsnap-Api-Features"]).to eq("ghost_contact")
|
87
|
+
end
|
88
|
+
|
89
|
+
it "won't set feature headers without the header variable present" do
|
90
|
+
client = TeamSnap.init(
|
91
|
+
:url => ROOT_TEST_URL,
|
92
|
+
:client_id => client_id,
|
93
|
+
:client_secret => client_secret
|
94
|
+
)
|
95
|
+
|
96
|
+
headers = TeamSnap.root_client.headers
|
97
|
+
expect(headers["X-Teamsnap-Api-Features"]).to eq(nil)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
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.
|
4
|
+
version: 2.1.0
|
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: 2017-08-
|
12
|
+
date: 2017-08-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -165,6 +165,8 @@ files:
|
|
165
165
|
- spec/cassettes/apiv3-init.yml
|
166
166
|
- spec/cassettes/teamsnap__client/when_calling_via_s_on_the_client/does_not_raise_an_error_when_the_HTTP_actions_are_called.yml
|
167
167
|
- spec/cassettes/teamsnap__client/when_calling_via_s_on_the_client/passes_them_to_the_faraday_client_using_method_missing.yml
|
168
|
+
- spec/cassettes/teamsnap__client/when_specifying_a_headers_flag/correctly_sets_the_ghost_header_flag.yml
|
169
|
+
- spec/cassettes/teamsnap__client/when_specifying_a_headers_flag/won_t_set_feature_headers_without_the_header_variable_present.yml
|
168
170
|
- spec/cassettes/teamsnap__collection/_items/returns_all_items_for_a_base_collection.yml
|
169
171
|
- spec/cassettes/teamsnap__collection/adds_find_if_search_is_available.yml
|
170
172
|
- spec/cassettes/teamsnap__collection/adds_href_to_items.yml
|
@@ -225,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
227
|
version: '0'
|
226
228
|
requirements: []
|
227
229
|
rubyforge_project:
|
228
|
-
rubygems_version: 2.
|
230
|
+
rubygems_version: 2.5.2
|
229
231
|
signing_key:
|
230
232
|
specification_version: 4
|
231
233
|
summary: A gem to interact with TeamSnap's API
|
@@ -233,6 +235,8 @@ test_files:
|
|
233
235
|
- spec/cassettes/apiv3-init.yml
|
234
236
|
- spec/cassettes/teamsnap__client/when_calling_via_s_on_the_client/does_not_raise_an_error_when_the_HTTP_actions_are_called.yml
|
235
237
|
- spec/cassettes/teamsnap__client/when_calling_via_s_on_the_client/passes_them_to_the_faraday_client_using_method_missing.yml
|
238
|
+
- spec/cassettes/teamsnap__client/when_specifying_a_headers_flag/correctly_sets_the_ghost_header_flag.yml
|
239
|
+
- spec/cassettes/teamsnap__client/when_specifying_a_headers_flag/won_t_set_feature_headers_without_the_header_variable_present.yml
|
236
240
|
- spec/cassettes/teamsnap__collection/_items/returns_all_items_for_a_base_collection.yml
|
237
241
|
- spec/cassettes/teamsnap__collection/adds_find_if_search_is_available.yml
|
238
242
|
- spec/cassettes/teamsnap__collection/adds_href_to_items.yml
|