intervals_api 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/intervals_api/request_handler.rb +9 -3
- data/lib/intervals_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cce3a3f046b8142d36271b6cf8dfe7466aec18bd
|
4
|
+
data.tar.gz: e5684177e625ec589ecaeccfe036332b91933f0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37ee0995d199062f12f922c874f353925d70a2b88a5e250e826a91993c5ae7996b9bbb5d432084498af926c8fa56571e2096530ee406f7bc0c1e704833d2611f
|
7
|
+
data.tar.gz: c7bda2b717877b2b83178f93bad813cf500d43ba1401e90559af95a2403c9ce373c160910b07208f78b0c25da227e3d08e95c2a072639c76fd9630b0ce73aad8
|
@@ -11,17 +11,23 @@ module IntervalsAPI
|
|
11
11
|
'Accept' => 'application/json',
|
12
12
|
'Content-Type' => 'application/json',
|
13
13
|
'Authorization' => "Basic #{Base64.encode64(token + ":X")}"
|
14
|
-
}
|
14
|
+
},
|
15
|
+
query: {},
|
16
|
+
body: {}
|
15
17
|
}
|
16
18
|
end
|
17
19
|
|
18
20
|
%w(get post put delete options).each do |request_type|
|
19
|
-
define_method request_type do |url,
|
21
|
+
define_method request_type do |url, options = {}|
|
20
22
|
RecursiveOpenStruct.new(
|
21
23
|
self.class.send(
|
22
24
|
request_type,
|
23
25
|
url,
|
24
|
-
|
26
|
+
{
|
27
|
+
headers: @default_options[:headers].merge( options[:headers].to_json),
|
28
|
+
query: @default_options[:query].merge( options[:query].to_json),
|
29
|
+
body: @default_options[:body].merge( options[:body].to_json)
|
30
|
+
}
|
25
31
|
)
|
26
32
|
)
|
27
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intervals_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- interactive@staplegun.us
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: recursive-open-struct
|