takeout 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/takeout/client.rb +4 -6
- data/lib/takeout/version.rb +1 -1
- metadata +2 -6
- data/spec/.DS_Store +0 -0
- data/spec/support/.DS_Store +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ec3cff238a42aa8206efd0dac0a9654357bab6e
|
4
|
+
data.tar.gz: 40f64a3daadb3f431b66b9a6ce158c7065f24d45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 378aeaa4430c736c0a4365260659e98b2588bc08fc08d6c3b292cee7ecf3cb32dee946cd773c39252770de5eba250f401e020cf7be8fd290129bd1a32b9f5771
|
7
|
+
data.tar.gz: cd18d141eebaac058aae2f671d8bf78f790c2596994b23f77ad4e68b8d6c41600fb9104cfa76d6d48b354b6402c1d82a65f5a2db1225e9f6a78e27431ed4fcef
|
data/lib/takeout/client.rb
CHANGED
@@ -29,8 +29,8 @@ module Takeout
|
|
29
29
|
|
30
30
|
attr_accessor :port
|
31
31
|
|
32
|
-
# A constant specifying the kind of event callbacks
|
33
|
-
|
32
|
+
# A constant specifying the kind of event callbacks and if they should or should not raise an error
|
33
|
+
CALLBACKS = {failure: true, missing: true, redirect: false, success: false}
|
34
34
|
|
35
35
|
# The main client initialization method.
|
36
36
|
# ==== Attributes
|
@@ -123,10 +123,7 @@ module Takeout
|
|
123
123
|
curl.password = options[:password]
|
124
124
|
end
|
125
125
|
|
126
|
-
curl.
|
127
|
-
curl.on_redirect {|response| @parsed_body, @failure = Takeout::Response.new(headers: parse_response_headers(response.head), body: Oj.load(response.body_str), response: response), false}
|
128
|
-
|
129
|
-
FAILURES.each { |failure_type| curl.send("on_#{failure_type}") {|response| @parsed_body, @failure = Takeout::Response.new(headers: parse_response_headers(response.head), body: Oj.load(response.body_str), response: response), true} }
|
126
|
+
CALLBACKS.each { |callback_type,failure| curl.send("on_#{callback_type}") {|response| @parsed_body, @failure = Takeout::Response.new(headers: parse_response_headers(response.head), body: Oj.load(response.body_str), response: response), failure} }
|
130
127
|
end
|
131
128
|
|
132
129
|
raise Takeout::EndpointFailureError.new(curl, request_type, @parsed_body) if @failure
|
@@ -199,6 +196,7 @@ module Takeout
|
|
199
196
|
|
200
197
|
return perform_curl_request(request_type, request_url, options, headers)
|
201
198
|
end
|
199
|
+
|
202
200
|
self.send(method_sym, *attributes, &block)
|
203
201
|
else
|
204
202
|
super
|
data/lib/takeout/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: takeout
|
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
|
- Kyle Lucas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -157,10 +157,8 @@ files:
|
|
157
157
|
- lib/takeout/endpoint_failure_error.rb
|
158
158
|
- lib/takeout/response.rb
|
159
159
|
- lib/takeout/version.rb
|
160
|
-
- spec/.DS_Store
|
161
160
|
- spec/client_spec.rb
|
162
161
|
- spec/spec_helper.rb
|
163
|
-
- spec/support/.DS_Store
|
164
162
|
- spec/support/fake_test_api.rb
|
165
163
|
- spec/support/fixtures/post.json
|
166
164
|
- spec/support/fixtures/posts.json
|
@@ -190,10 +188,8 @@ signing_key:
|
|
190
188
|
specification_version: 4
|
191
189
|
summary: A powerful little tool for generating on-the-fly API clients.
|
192
190
|
test_files:
|
193
|
-
- spec/.DS_Store
|
194
191
|
- spec/client_spec.rb
|
195
192
|
- spec/spec_helper.rb
|
196
|
-
- spec/support/.DS_Store
|
197
193
|
- spec/support/fake_test_api.rb
|
198
194
|
- spec/support/fixtures/post.json
|
199
195
|
- spec/support/fixtures/posts.json
|
data/spec/.DS_Store
DELETED
Binary file
|
data/spec/support/.DS_Store
DELETED
Binary file
|