intervals_api 1.5.3 → 1.5.4
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/intervals_api/request_handler.rb +2 -7
- data/lib/intervals_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d46d76c14a845468151780be7f1a47eda6ce0028
|
|
4
|
+
data.tar.gz: cc51ca467471a81cd4c41fcf7cb833cc12f1b1a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 58c3bf4b2c7e45211f4a5e4cc08c38330856b4a36841f8340834030173e238def62892ef9a67c281c5ab1c368ba1c3f58179d1a712301625b9b67e8a849b01e2
|
|
7
|
+
data.tar.gz: c0a5d3d3652730e42ed99fae5b7d29d89cba689c6733081aac065785d00c9b544710389a046cc3ed8f347fd6d481772a70c01666924220b698abc1e6baaf1f6e
|
|
@@ -6,18 +6,13 @@ module IntervalsAPI
|
|
|
6
6
|
attr_accessor :default_options
|
|
7
7
|
|
|
8
8
|
def initialize(token)
|
|
9
|
-
unless token
|
|
10
|
-
raise <<-MSG
|
|
11
|
-
Must instantiate with a valid Intervals token
|
|
12
|
-
Form: IntervalsAPI::RequestHandler.new(valid_token)
|
|
13
|
-
MSG
|
|
14
|
-
end
|
|
9
|
+
raise "Must instantiate with a valid Intervals API token" unless token
|
|
15
10
|
|
|
16
11
|
@default_options = {
|
|
17
12
|
headers: {
|
|
18
13
|
'Accept' => 'application/json',
|
|
19
14
|
'Content-Type' => 'application/json',
|
|
20
|
-
'Authorization' => "Basic #{Base64.encode64(token + ":X")}"
|
|
15
|
+
'Authorization' => "Basic #{Base64.encode64(token.to_s + ":X")}"
|
|
21
16
|
},
|
|
22
17
|
}
|
|
23
18
|
end
|