opencpu 0.12.0 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/lib/opencpu.rb +1 -1
- data/lib/opencpu/client.rb +3 -3
- data/lib/opencpu/delayed_calculation.rb +2 -2
- data/lib/opencpu/version.rb +2 -2
- data/spec/fixtures/vcr_cassettes/multi_part_request.yml +96 -0
- data/spec/fixtures/vcr_cassettes/user_digest_hmac.yml +1 -1
- data/spec/lib/opencpu/client_spec.rb +3 -8
- data/spec/spec_helper.rb +0 -4
- metadata +33 -63
- data/.gitignore +0 -22
- data/.travis.yml +0 -8
- data/CHANGELOG.md +0 -51
- data/Gemfile +0 -13
- data/Guardfile +0 -10
- data/Rakefile +0 -1
- data/circle.yml +0 -5
- data/opencpu.gemspec +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fd4de2214e31540e08f33494e1c3f56898a71952d8569f8e4d348ff8c7762c71
|
4
|
+
data.tar.gz: c6fd9fd8bbd284df6e7627125ede6ae9163025bbc4e890844ebb719aec709c8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66eedb31b53e19cde7d5886ca4ceb9a3bf0c4d755c8072cd47869e9f38f02aa50cd61a2df15bc8739eb580a02542540a30ca4de934f8d1e625a234f6372f9008
|
7
|
+
data.tar.gz: b2dfba4531a59de7c81ea4f924e860e3d32e2e13ad6dfaea1836c662530bf31f9eab76172eaae10055c71c874f9a3b0463ee6600a9caa6039abbe75ac5be2fd5
|
data/README.md
CHANGED
@@ -41,7 +41,7 @@ client = OpenCPU.client
|
|
41
41
|
|
42
42
|
By default we send data using the json format. This format is efficient and safe, but only supports strings and numeric parameters (see [opencpu page](https://www.opencpu.org/api.html#api-arguments))
|
43
43
|
|
44
|
-
If you want to send R code argument, you'll need to specify format: :urlencoded in your request. Note that you need to enclose your string parameters in quotes in that case, since they will be seen as variables otherwise:
|
44
|
+
If you want to send R code argument or files, you'll need to specify format: :urlencoded in your request. Note that you need to enclose your string parameters in quotes in that case, since they will be seen as variables otherwise:
|
45
45
|
|
46
46
|
```Ruby
|
47
47
|
client.execute :digest, :hmac, data: { key: "'foo'", object: "'bar'" }, format: :urlencoded
|
data/lib/opencpu.rb
CHANGED
data/lib/opencpu/client.rb
CHANGED
@@ -3,7 +3,7 @@ require 'opencpu/errors'
|
|
3
3
|
module OpenCPU
|
4
4
|
class Client
|
5
5
|
include Errors
|
6
|
-
include
|
6
|
+
include HTTParty
|
7
7
|
|
8
8
|
def initialize
|
9
9
|
self.class.base_uri OpenCPU.configuration.endpoint_url
|
@@ -94,8 +94,8 @@ module OpenCPU
|
|
94
94
|
when :json
|
95
95
|
options[:body] = data.to_json if data
|
96
96
|
options[:headers] = {"Content-Type" => 'application/json'}
|
97
|
-
|
98
|
-
options[:
|
97
|
+
else # :urlencoded / :multipart if a file is present.
|
98
|
+
options[:body] = data if data
|
99
99
|
end
|
100
100
|
|
101
101
|
if OpenCPU.configuration.username && OpenCPU.configuration.password
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module OpenCPU
|
2
2
|
class UnsupportedFormatError < StandardError; end
|
3
3
|
class ResponseNotAvailableError < StandardError; end
|
4
|
-
|
4
|
+
|
5
5
|
class DelayedCalculation
|
6
|
-
include
|
6
|
+
include HTTParty
|
7
7
|
|
8
8
|
attr_accessor :location
|
9
9
|
attr_accessor :available_resources
|
data/lib/opencpu/version.rb
CHANGED
@@ -0,0 +1,96 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://public.opencpu.org/ocpu/library/utils/R/read.csv/json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: "--------------------------uMeWJC8mkGqpOEXA\r\nContent-Disposition:
|
9
|
+
form-data; name=\"file\"; filename=\"test.csv\"\r\nContent-Type: text/csv\r\n\r\n\"head1\",
|
10
|
+
\"head2\", \"head3\"\n1, 2, 3\n4, 5, 6\n\r\n--------------------------uMeWJC8mkGqpOEXA--\r\n"
|
11
|
+
headers:
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- "*/*"
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
Content-Type:
|
19
|
+
- multipart/form-data; boundary=------------------------uMeWJC8mkGqpOEXA
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Thu, 25 Mar 2021 16:45:28 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json
|
29
|
+
Content-Length:
|
30
|
+
- '68'
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Set-Cookie:
|
34
|
+
- __cfduid=ddcca6afafd864d5be3ebf54be87d3fd81616690728; expires=Sat, 24-Apr-21
|
35
|
+
16:45:28 GMT; path=/; domain=.opencpu.org; HttpOnly; SameSite=Lax
|
36
|
+
Cache-Control:
|
37
|
+
- max-age=300, public
|
38
|
+
X-Ocpu-Session:
|
39
|
+
- x022b0ae9efe318
|
40
|
+
Location:
|
41
|
+
- https://public.opencpu.org/ocpu/tmp/x022b0ae9efe318/
|
42
|
+
Access-Control-Allow-Origin:
|
43
|
+
- "*"
|
44
|
+
Access-Control-Expose-Headers:
|
45
|
+
- Location, X-ocpu-session, Content-Type, Cache-Control
|
46
|
+
Access-Control-Allow-Headers:
|
47
|
+
- Origin, Content-Type, Accept, Accept-Encoding, Cache-Control, Authorization
|
48
|
+
Access-Control-Allow-Credentials:
|
49
|
+
- 'true'
|
50
|
+
X-Ocpu-R:
|
51
|
+
- R version 4.0.4 (2021-02-15)
|
52
|
+
X-Ocpu-Locale:
|
53
|
+
- en_US.UTF-8
|
54
|
+
X-Ocpu-Time:
|
55
|
+
- 2021-03-25 16:45:28 UTC
|
56
|
+
X-Ocpu-Version:
|
57
|
+
- 2.2.2
|
58
|
+
X-Ocpu-Server:
|
59
|
+
- rApache
|
60
|
+
Vary:
|
61
|
+
- Accept-Encoding
|
62
|
+
X-Ocpu-Cache:
|
63
|
+
- MISS
|
64
|
+
Cf-Cache-Status:
|
65
|
+
- DYNAMIC
|
66
|
+
Cf-Request-Id:
|
67
|
+
- '090bdfe60e0000fa74cd15a000000001'
|
68
|
+
Expect-Ct:
|
69
|
+
- max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
|
70
|
+
Report-To:
|
71
|
+
- '{"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=CSE68Tj98VN34FsQ6GxERhvu4VRaA0JzlUz%2BC4SjYpsvmgJnt0QIplPYttApcvWjIGElSwKCQchbvehe0OpnRaaXHiJeYFgodWCihTPBJYt9%2FP4%3D"}]}'
|
72
|
+
Nel:
|
73
|
+
- '{"max_age":604800,"report_to":"cf-nel"}'
|
74
|
+
Server:
|
75
|
+
- cloudflare
|
76
|
+
Cf-Ray:
|
77
|
+
- 63599c1ceefafa74-AMS
|
78
|
+
Alt-Svc:
|
79
|
+
- h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400
|
80
|
+
body:
|
81
|
+
encoding: ASCII-8BIT
|
82
|
+
string: |
|
83
|
+
[
|
84
|
+
{
|
85
|
+
"head1": 1,
|
86
|
+
"head2": 2,
|
87
|
+
"head3": 3
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"head1": 4,
|
91
|
+
"head2": 5,
|
92
|
+
"head3": 6
|
93
|
+
}
|
94
|
+
]
|
95
|
+
recorded_at: Thu, 25 Mar 2021 16:45:28 GMT
|
96
|
+
recorded_with: VCR 6.0.0
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://
|
5
|
+
uri: https://staging.opencpu.roqua.nl/ocpu/user/deploy/library/digest/R/hmac/json
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: '{"key":"foo","object":"bar"}'
|
@@ -9,8 +9,8 @@ describe OpenCPU::Client do
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
it 'initializes with
|
13
|
-
expect(described_class.ancestors).to include
|
12
|
+
it 'initializes with HTTParty' do
|
13
|
+
expect(described_class.ancestors).to include HTTParty
|
14
14
|
end
|
15
15
|
|
16
16
|
it 'defines #execute' do
|
@@ -143,13 +143,8 @@ describe OpenCPU::Client do
|
|
143
143
|
|
144
144
|
context 'multipart form / file uploads' do
|
145
145
|
it "works" do
|
146
|
-
skip # vcr is broken for file uploads https://github.com/vcr/vcr/issues/441
|
147
146
|
VCR.use_cassette :multi_part_request do |cassette|
|
148
|
-
|
149
|
-
# WebMock.disable!
|
150
|
-
response = client.execute(:utils, 'read.csv', format: nil, data: { file: File.new('spec/fixtures/test.csv') })
|
151
|
-
# WebMock.enable!
|
152
|
-
# VCR.turn_on!
|
147
|
+
response = client.execute(:utils, 'read.csv', format: :urlencoded, data: {file: File.new('spec/fixtures/test.csv')})
|
153
148
|
expect(response).to eq [{"head1"=>1, "head2"=>2, "head3"=>3}, {"head1"=>4, "head2"=>5, "head3"=>6}]
|
154
149
|
end
|
155
150
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
require "codeclimate-test-reporter"
|
2
|
-
CodeClimate::TestReporter.start
|
3
|
-
|
4
1
|
require 'vcr'
|
5
2
|
|
6
3
|
require File.expand_path('../../lib/opencpu.rb', __FILE__)
|
@@ -8,5 +5,4 @@ require File.expand_path('../../lib/opencpu.rb', __FILE__)
|
|
8
5
|
VCR.configure do |c|
|
9
6
|
c.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
|
10
7
|
c.hook_into :webmock
|
11
|
-
c.ignore_hosts 'codeclimate.com'
|
12
8
|
end
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opencpu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Malykh
|
8
|
-
|
8
|
+
- Henk van der Veen
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2021-03-25 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: yajl-ruby
|
@@ -31,26 +32,23 @@ dependencies:
|
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: 1.3.1
|
33
34
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
35
|
+
name: httparty
|
35
36
|
requirement: !ruby/object:Gem::Requirement
|
36
37
|
requirements:
|
37
38
|
- - "~>"
|
38
39
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.
|
40
|
+
version: '0.16'
|
40
41
|
type: :runtime
|
41
42
|
prerelease: false
|
42
43
|
version_requirements: !ruby/object:Gem::Requirement
|
43
44
|
requirements:
|
44
45
|
- - "~>"
|
45
46
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
47
|
+
version: '0.16'
|
47
48
|
- !ruby/object:Gem::Dependency
|
48
49
|
name: bundler
|
49
50
|
requirement: !ruby/object:Gem::Requirement
|
50
51
|
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '1.6'
|
54
52
|
- - ">="
|
55
53
|
- !ruby/object:Gem::Version
|
56
54
|
version: 1.6.0
|
@@ -58,9 +56,6 @@ dependencies:
|
|
58
56
|
prerelease: false
|
59
57
|
version_requirements: !ruby/object:Gem::Requirement
|
60
58
|
requirements:
|
61
|
-
- - "~>"
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '1.6'
|
64
59
|
- - ">="
|
65
60
|
- !ruby/object:Gem::Version
|
66
61
|
version: 1.6.0
|
@@ -68,22 +63,16 @@ dependencies:
|
|
68
63
|
name: rake
|
69
64
|
requirement: !ruby/object:Gem::Requirement
|
70
65
|
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: '10.3'
|
74
66
|
- - ">="
|
75
67
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
68
|
+
version: 12.3.3
|
77
69
|
type: :development
|
78
70
|
prerelease: false
|
79
71
|
version_requirements: !ruby/object:Gem::Requirement
|
80
72
|
requirements:
|
81
|
-
- - "~>"
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
version: '10.3'
|
84
73
|
- - ">="
|
85
74
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
75
|
+
version: 12.3.3
|
87
76
|
- !ruby/object:Gem::Dependency
|
88
77
|
name: rspec
|
89
78
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,63 +99,43 @@ dependencies:
|
|
110
99
|
requirements:
|
111
100
|
- - "~>"
|
112
101
|
- !ruby/object:Gem::Version
|
113
|
-
version: '
|
114
|
-
- - ">="
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: 1.17.4
|
102
|
+
version: '3.12'
|
117
103
|
type: :development
|
118
104
|
prerelease: false
|
119
105
|
version_requirements: !ruby/object:Gem::Requirement
|
120
106
|
requirements:
|
121
107
|
- - "~>"
|
122
108
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
124
|
-
- - ">="
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: 1.17.4
|
109
|
+
version: '3.12'
|
127
110
|
- !ruby/object:Gem::Dependency
|
128
111
|
name: vcr
|
129
112
|
requirement: !ruby/object:Gem::Requirement
|
130
113
|
requirements:
|
131
114
|
- - "~>"
|
132
115
|
- !ruby/object:Gem::Version
|
133
|
-
version: '
|
134
|
-
- - ">="
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: 2.9.0
|
116
|
+
version: '6.0'
|
137
117
|
type: :development
|
138
118
|
prerelease: false
|
139
119
|
version_requirements: !ruby/object:Gem::Requirement
|
140
120
|
requirements:
|
141
121
|
- - "~>"
|
142
122
|
- !ruby/object:Gem::Version
|
143
|
-
version: '
|
144
|
-
- - ">="
|
145
|
-
- !ruby/object:Gem::Version
|
146
|
-
version: 2.9.0
|
123
|
+
version: '6.0'
|
147
124
|
description: This gem wraps the OpenCPU REST API.
|
148
125
|
email:
|
149
|
-
-
|
126
|
+
- support@roqua.nl
|
150
127
|
executables: []
|
151
128
|
extensions: []
|
152
129
|
extra_rdoc_files: []
|
153
130
|
files:
|
154
|
-
- ".gitignore"
|
155
|
-
- ".travis.yml"
|
156
|
-
- CHANGELOG.md
|
157
|
-
- Gemfile
|
158
|
-
- Guardfile
|
159
131
|
- LICENSE.txt
|
160
132
|
- README.md
|
161
|
-
- Rakefile
|
162
|
-
- circle.yml
|
163
133
|
- lib/opencpu.rb
|
164
134
|
- lib/opencpu/client.rb
|
165
135
|
- lib/opencpu/configuration.rb
|
166
136
|
- lib/opencpu/delayed_calculation.rb
|
167
137
|
- lib/opencpu/errors.rb
|
168
138
|
- lib/opencpu/version.rb
|
169
|
-
- opencpu.gemspec
|
170
139
|
- spec/fixtures/test.csv
|
171
140
|
- spec/fixtures/vcr_cassettes/animation_flip_coin.yml
|
172
141
|
- spec/fixtures/vcr_cassettes/bad_request.yml
|
@@ -175,6 +144,7 @@ files:
|
|
175
144
|
- spec/fixtures/vcr_cassettes/digest_hmac_no_parameters.yml
|
176
145
|
- spec/fixtures/vcr_cassettes/github_animation_flip_coin.yml
|
177
146
|
- spec/fixtures/vcr_cassettes/github_animation_flip_coin_error.yml
|
147
|
+
- spec/fixtures/vcr_cassettes/multi_part_request.yml
|
178
148
|
- spec/fixtures/vcr_cassettes/prepare.yml
|
179
149
|
- spec/fixtures/vcr_cassettes/response_with_na_values.yml
|
180
150
|
- spec/fixtures/vcr_cassettes/url_encoded_request.yml
|
@@ -188,7 +158,7 @@ homepage: http://roqua.nl
|
|
188
158
|
licenses:
|
189
159
|
- MIT
|
190
160
|
metadata: {}
|
191
|
-
post_install_message:
|
161
|
+
post_install_message:
|
192
162
|
rdoc_options: []
|
193
163
|
require_paths:
|
194
164
|
- lib
|
@@ -196,33 +166,33 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
196
166
|
requirements:
|
197
167
|
- - ">="
|
198
168
|
- !ruby/object:Gem::Version
|
199
|
-
version:
|
169
|
+
version: 2.5.0
|
200
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
171
|
requirements:
|
202
172
|
- - ">="
|
203
173
|
- !ruby/object:Gem::Version
|
204
174
|
version: '0'
|
205
175
|
requirements: []
|
206
|
-
|
207
|
-
|
208
|
-
signing_key:
|
176
|
+
rubygems_version: 3.1.4
|
177
|
+
signing_key:
|
209
178
|
specification_version: 4
|
210
179
|
summary: Wrapper around OpenCPU REST API
|
211
180
|
test_files:
|
181
|
+
- spec/spec_helper.rb
|
182
|
+
- spec/lib/opencpu_spec.rb
|
183
|
+
- spec/lib/opencpu/client_spec.rb
|
184
|
+
- spec/lib/opencpu/configuration_spec.rb
|
185
|
+
- spec/lib/opencpu/delayed_calculation_spec.rb
|
212
186
|
- spec/fixtures/test.csv
|
213
|
-
- spec/fixtures/vcr_cassettes/
|
214
|
-
- spec/fixtures/vcr_cassettes/bad_request.yml
|
215
|
-
- spec/fixtures/vcr_cassettes/description.yml
|
216
|
-
- spec/fixtures/vcr_cassettes/digest_hmac.yml
|
217
|
-
- spec/fixtures/vcr_cassettes/digest_hmac_no_parameters.yml
|
218
|
-
- spec/fixtures/vcr_cassettes/github_animation_flip_coin.yml
|
187
|
+
- spec/fixtures/vcr_cassettes/url_encoded_request.yml
|
219
188
|
- spec/fixtures/vcr_cassettes/github_animation_flip_coin_error.yml
|
220
|
-
- spec/fixtures/vcr_cassettes/
|
189
|
+
- spec/fixtures/vcr_cassettes/digest_hmac_no_parameters.yml
|
190
|
+
- spec/fixtures/vcr_cassettes/description.yml
|
221
191
|
- spec/fixtures/vcr_cassettes/response_with_na_values.yml
|
222
|
-
- spec/fixtures/vcr_cassettes/
|
192
|
+
- spec/fixtures/vcr_cassettes/bad_request.yml
|
193
|
+
- spec/fixtures/vcr_cassettes/prepare.yml
|
194
|
+
- spec/fixtures/vcr_cassettes/github_animation_flip_coin.yml
|
195
|
+
- spec/fixtures/vcr_cassettes/digest_hmac.yml
|
196
|
+
- spec/fixtures/vcr_cassettes/animation_flip_coin.yml
|
223
197
|
- spec/fixtures/vcr_cassettes/user_digest_hmac.yml
|
224
|
-
- spec/
|
225
|
-
- spec/lib/opencpu/configuration_spec.rb
|
226
|
-
- spec/lib/opencpu/delayed_calculation_spec.rb
|
227
|
-
- spec/lib/opencpu_spec.rb
|
228
|
-
- spec/spec_helper.rb
|
198
|
+
- spec/fixtures/vcr_cassettes/multi_part_request.yml
|
data/.gitignore
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
*.swp
|
2
|
-
*.gem
|
3
|
-
*.rbc
|
4
|
-
.DS_Store
|
5
|
-
.bundle
|
6
|
-
.config
|
7
|
-
.yardoc
|
8
|
-
Gemfile.lock
|
9
|
-
InstalledFiles
|
10
|
-
_yardoc
|
11
|
-
coverage
|
12
|
-
doc/
|
13
|
-
lib/bundler/man
|
14
|
-
pkg
|
15
|
-
rdoc
|
16
|
-
spec/reports
|
17
|
-
test/tmp
|
18
|
-
test/version_tmp
|
19
|
-
tmp
|
20
|
-
.byebug-history
|
21
|
-
|
22
|
-
.ruby-version
|
data/.travis.yml
DELETED
data/CHANGELOG.md
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
# 0.11.0
|
2
|
-
|
3
|
-
* BREAKING CHANGE: on unknown failure, it raises OpenCPUError instead of UnknownError
|
4
|
-
|
5
|
-
# 0.10.0
|
6
|
-
|
7
|
-
* BREAKING CHANGE: on request failure, it raises a specific error (BadRequest, InternalServerError or Unknown Error)
|
8
|
-
instead of RuntimeError
|
9
|
-
|
10
|
-
# 0.9.2
|
11
|
-
|
12
|
-
* Added `OpenCPU::Client#description` to retrieve a packages' description file
|
13
|
-
|
14
|
-
# 0.9.1
|
15
|
-
|
16
|
-
* Added `convert_na_to_nil=true/false` option to Client#execute
|
17
|
-
|
18
|
-
# 0.9.0
|
19
|
-
|
20
|
-
* Added support for Github R repos through OpenCPU
|
21
|
-
|
22
|
-
# 0.8.2
|
23
|
-
|
24
|
-
* Added uri.port
|
25
|
-
|
26
|
-
# 0.8.1
|
27
|
-
|
28
|
-
* Better error messages
|
29
|
-
|
30
|
-
# 0.8.0
|
31
|
-
|
32
|
-
* BREAKING CHANGE: verify ssl of opencpu server by default again.
|
33
|
-
* Added configuration option verify_ssl so you can disable it.
|
34
|
-
* Added format: :urlencoded for sending R-code and file parameters.
|
35
|
-
|
36
|
-
# 0.7.8
|
37
|
-
|
38
|
-
* Fixed gem by forcing json again (will add format option in 0.8)
|
39
|
-
|
40
|
-
# 0.7.7 Broken! Do not use!
|
41
|
-
|
42
|
-
* Added support for multipart requests [@amaunz]
|
43
|
-
|
44
|
-
# 0.7.6
|
45
|
-
|
46
|
-
* Made gem compatible with Ruby 1.9.3
|
47
|
-
|
48
|
-
# 0.7.0
|
49
|
-
|
50
|
-
* Added support for user packages [@ivdma]
|
51
|
-
|
data/Gemfile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
group :development do
|
4
|
-
gem 'listen', '~> 3.0.8'
|
5
|
-
gem 'guard-rspec', '~> 4.2'
|
6
|
-
gem 'guard-bundler', '~> 2.0'
|
7
|
-
end
|
8
|
-
|
9
|
-
group :test do
|
10
|
-
gem "codeclimate-test-reporter", require: nil
|
11
|
-
end
|
12
|
-
# Specify your gem's dependencies in opencpu.gemspec
|
13
|
-
gemspec
|
data/Guardfile
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
guard :bundler do
|
2
|
-
watch('Gemfile')
|
3
|
-
watch(/^.+\.gemspec/)
|
4
|
-
end
|
5
|
-
|
6
|
-
guard :rspec, cmd: 'bundle exec rspec --color --format=documentation' do
|
7
|
-
watch(%r{^spec/.+_spec\.rb$})
|
8
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
9
|
-
watch('spec/spec_helper.rb') { "spec" }
|
10
|
-
end
|
data/Rakefile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'bundler/gem_tasks'
|
data/circle.yml
DELETED
data/opencpu.gemspec
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'opencpu/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "opencpu"
|
8
|
-
spec.version = OpenCPU::VERSION
|
9
|
-
spec.authors = ["Ivan Malykh"]
|
10
|
-
spec.email = ["ivan@roqua.nl"]
|
11
|
-
spec.summary = %q{Wrapper around OpenCPU REST API}
|
12
|
-
spec.description = %q{This gem wraps the OpenCPU REST API.}
|
13
|
-
spec.homepage = "http://roqua.nl"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.required_ruby_version = '>= 1.9.3'
|
22
|
-
|
23
|
-
spec.add_dependency 'yajl-ruby', '~> 1.3', '>= 1.3.1'
|
24
|
-
spec.add_dependency 'httmultiparty', '~> 0.3.16'
|
25
|
-
|
26
|
-
spec.add_development_dependency 'bundler', '~> 1.6', '>= 1.6.0'
|
27
|
-
spec.add_development_dependency 'rake', '~> 10.3', '>= 10.3.1'
|
28
|
-
spec.add_development_dependency 'rspec', '~> 2.14', '>= 2.14.1'
|
29
|
-
spec.add_development_dependency 'webmock', '~> 1.17', '>= 1.17.4'
|
30
|
-
spec.add_development_dependency 'vcr', '~> 2.9', '>= 2.9.0'
|
31
|
-
end
|