routific 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/routific.rb +5 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 340ed36c4db7569fd0679c3e58431486ecfaeaf9
|
4
|
+
data.tar.gz: f4b9bc9f9b6b9dd71a7a4224e6d375838e1df543
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e7e5acc2e1c239251fc6cf0dae6898a1b47a2b3870500f1df6d068ed61a73bc1e252a92f5ed896b35862e115def1638750d15baaf89e162c7ce74741f09f4e6
|
7
|
+
data.tar.gz: ddde157979fa350588935653e8ae63e2197fe685e5352f65c4c6e76cedfbf0b3fb4b79d7de5519daa1bfe28377b30b474382e47236fc800161c90256e83f9ef6
|
data/lib/routific.rb
CHANGED
@@ -70,11 +70,14 @@ class Routific
|
|
70
70
|
raise ArgumentError, "access token must be set"
|
71
71
|
end
|
72
72
|
|
73
|
-
#
|
73
|
+
# Prefix the token with "bearer " if missing during assignment
|
74
|
+
prefixed_token = (/bearer /.match(token).nil?) ? "bearer #{token}" : token
|
75
|
+
|
74
76
|
begin
|
77
|
+
# Sends HTTP request to Routific API server
|
75
78
|
response = RestClient.post('https://routific.com/api/vrp',
|
76
79
|
data.to_json,
|
77
|
-
'Authorization' =>
|
80
|
+
'Authorization' => prefixed_token,
|
78
81
|
content_type: :json,
|
79
82
|
accept: :json
|
80
83
|
)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: routific
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Kuo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-01-
|
12
|
+
date: 2015-01-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
146
|
rubyforge_project:
|
147
|
-
rubygems_version: 2.
|
147
|
+
rubygems_version: 2.4.5
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: routific API
|