ocean-rails 2.11.5 → 2.11.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean/api.rb +8 -3
- data/lib/ocean/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: f58e347b481f9358e53120685469b9d165264544
|
4
|
+
data.tar.gz: 0d327d008703fd2a37dc0e71504e0af97b7cee49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 484f59b7ac5b17c1344acdf6c165ab8a9bab3bab31d80d6eec6d635658c08822900c296e2ec847e29991ff0180ab08854bb5f5fa4a4612a77695abf86d69c3d3
|
7
|
+
data.tar.gz: 30201ed7b641c786031d6675ee84eaa56659e33d0c28c5146c072d85f80f42e44698ce7e64d1277cec0bd18d0efe00866e611c33872504896752d03573fbfc02
|
data/lib/ocean/api.rb
CHANGED
@@ -130,9 +130,10 @@ class Api
|
|
130
130
|
# +headers+, if given, is a hash of extra HTTP headers for the request.
|
131
131
|
# +body+, if given, is the body of the request (:post, :put) as a string.
|
132
132
|
# +x_api_token+, if given, is a string which will be used as an X-API-Token header.
|
133
|
+
# +ssl_verifypeer+ (true by default), controls SSL peer verification.
|
133
134
|
#
|
134
135
|
def self.request(url, http_method, args: nil, headers: {}, body: nil,
|
135
|
-
x_api_token: headers['X-API-Token'])
|
136
|
+
x_api_token: headers['X-API-Token'], ssl_verifypeer: true)
|
136
137
|
# Set up the request
|
137
138
|
headers['Accept'] = "application/json"
|
138
139
|
headers['Content-Type'] = "application/json"
|
@@ -140,8 +141,12 @@ class Api
|
|
140
141
|
headers['X-API-Token'] = x_api_token if x_api_token
|
141
142
|
|
142
143
|
while (true) do
|
143
|
-
request = Typhoeus::Request.new(url,
|
144
|
-
|
144
|
+
request = Typhoeus::Request.new(url,
|
145
|
+
method: http_method,
|
146
|
+
headers: headers,
|
147
|
+
params: args,
|
148
|
+
body: body,
|
149
|
+
ssl_verifypeer: ssl_verifypeer)
|
145
150
|
# Run it
|
146
151
|
response = Response.new(request.run)
|
147
152
|
# If successful, return
|
data/lib/ocean/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocean-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.11.
|
4
|
+
version: 2.11.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|