sphere_engine 1.0.0.pre → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +157 -4
- data/bin/console +1 -1
- data/lib/sphere_engine/client.rb +12 -0
- data/lib/sphere_engine/error.rb +52 -0
- data/lib/sphere_engine/rest/access.rb +2 -2
- data/lib/sphere_engine/rest/api.rb +13 -1
- data/lib/sphere_engine/rest/compilers.rb +11 -0
- data/lib/sphere_engine/rest/judges.rb +28 -0
- data/lib/sphere_engine/rest/languages.rb +11 -0
- data/lib/sphere_engine/rest/problems.rb +30 -0
- data/lib/sphere_engine/rest/request.rb +51 -18
- data/lib/sphere_engine/rest/submissions.rb +29 -0
- data/lib/sphere_engine/rest/test_cases.rb +33 -0
- data/lib/sphere_engine/rest/utils.rb +20 -4
- data/lib/sphere_engine/version.rb +1 -1
- data/sphere_engine.gemspec +3 -3
- metadata +14 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb4c0b4802e0142d313d57835ca9e61df92b74dd
|
4
|
+
data.tar.gz: 7faa61513560ef2f210603f7a8d08723b07eba2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99ffaa5b7d41ffb32c1940e0e9af831bb5dcde4cc4eae54cbaff7f1d5bf3547b8dd1429e2e2a666bc0317dbb2a5883372b6f0e9569b28ef838a62e097dc5794e
|
7
|
+
data.tar.gz: 72d6196504a31309d15f0b97beb3932d167a54057d11c7e5cb3fa5ea70be088bb9ab328b84e7508841c5c0e9ad4c159209d1991c558430681953feaf714684d1
|
data/README.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# SphereEngine
|
2
2
|
|
3
|
-
|
3
|
+
A Ruby interface to SphereEngine API. This gem was made as an interface to the SphereEngine API. It abstract in the best way all his methods that SphereEngine give us. This gem separates the requests into two types (compilers and problems), according to the SphereEngine documentation. For more information about SphereEngine visit this [Link](http://sphere-engine.com)
|
4
|
+
|
5
|
+
## Prerequisites
|
6
|
+
|
7
|
+
You need the following tokens:
|
8
|
+
|
9
|
+
* Token for Compilers API
|
10
|
+
* Token for problems API
|
11
|
+
|
12
|
+
[SphereEngine Tokens](http://sphere-engine.com/tokens)
|
4
13
|
|
5
14
|
## Installation
|
6
15
|
|
@@ -18,9 +27,153 @@ Or install it yourself as:
|
|
18
27
|
|
19
28
|
$ gem install sphere_engine
|
20
29
|
|
21
|
-
##
|
30
|
+
## Configuration
|
31
|
+
|
32
|
+
SphereEngine provide two services, one for compilers and another for problems. To start using a SpherEengine client do the following:
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
client = SphereEngine::REST::Client.new do |config|
|
36
|
+
config.access_token_compilers = "YOUR_ACCESS_TOKEN_COMPILERS"
|
37
|
+
config.access_token_problems = "YOUR_ACCESS_TOKEN_PROBLEMS"
|
38
|
+
end
|
39
|
+
```
|
40
|
+
|
41
|
+
## Usage Examples
|
42
|
+
After configuring a client, you can do the following things:
|
43
|
+
|
44
|
+
### Compilers Service
|
45
|
+
|
46
|
+
#### Get languages
|
47
|
+
```ruby
|
48
|
+
client.all_languages
|
49
|
+
```
|
50
|
+
|
51
|
+
#### Get compilers
|
52
|
+
```ruby
|
53
|
+
client.all_compilers
|
54
|
+
```
|
55
|
+
|
56
|
+
#### Create a submission
|
57
|
+
|
58
|
+
This method return a submission_id
|
59
|
+
```ruby
|
60
|
+
client.create_submission_compiler(
|
61
|
+
language: 11, #LanguageID
|
62
|
+
sourceCode: "#include <iostream>\n using namespace std;\n int main()\n {\n cout << \"Hello World\" << endl;\n return 0;\n }" #Code example
|
63
|
+
)
|
64
|
+
```
|
65
|
+
|
66
|
+
*Other params: input [string]*
|
67
|
+
|
68
|
+
#### Fetch a submission
|
69
|
+
```ruby
|
70
|
+
client.fetch_submission_compilers(submission_id)
|
71
|
+
```
|
72
|
+
|
73
|
+
### Problems service
|
74
|
+
|
75
|
+
#### Create a problem
|
76
|
+
|
77
|
+
This method return a "code" is like a problem_id
|
78
|
+
```ruby
|
79
|
+
client.create_problem(
|
80
|
+
code: "RUBY_001", # Unique problem code. consist of 3 up to 16 capital letters. numbers and underscore
|
81
|
+
name: "Problem_Name", #String
|
82
|
+
body: "Write the fibonacci sequence" #String
|
83
|
+
)
|
84
|
+
```
|
85
|
+
|
86
|
+
#### Create testcase to problem
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
client.create_problem_testcase(
|
90
|
+
"PROBLEM_ID",
|
91
|
+
input: "input content",
|
92
|
+
timelimit: 10,
|
93
|
+
output: "output content"
|
94
|
+
)
|
95
|
+
```
|
96
|
+
|
97
|
+
#### Update a problem
|
98
|
+
|
99
|
+
```ruby
|
100
|
+
client.update_problem("PROBLEM_ID", name: "NEW_NAME")
|
101
|
+
```
|
102
|
+
|
103
|
+
*Other params: type [string], interactive [boolean], masterjudgeId [integer], activeTestcases [array]*
|
104
|
+
|
105
|
+
#### Get a list testcases of a problem
|
22
106
|
|
23
|
-
|
107
|
+
```ruby
|
108
|
+
client.list_testcases("PROBLEM_ID")
|
109
|
+
```
|
110
|
+
|
111
|
+
#### Get a testcase of a problem
|
112
|
+
|
113
|
+
```ruby
|
114
|
+
client.get_testcase("PROBLEM_ID", "TESTCASE_ID")
|
115
|
+
```
|
116
|
+
|
117
|
+
#### Get a file testcases of a problem
|
118
|
+
```ruby
|
119
|
+
client.get_testcase_file("PROBLEM_ID", "TESTCASE_ID", "FILENAME")
|
120
|
+
```
|
121
|
+
|
122
|
+
*Filename is obtained from get_testcase request in uri params*
|
123
|
+
|
124
|
+
#### Get judge list
|
125
|
+
|
126
|
+
```ruby
|
127
|
+
client.all_judges()
|
128
|
+
```
|
129
|
+
|
130
|
+
*Other params: limit [Integer], offset [Integer], type [String]*
|
131
|
+
|
132
|
+
#### Create judge
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
client.create_judge(
|
136
|
+
name: "NameJudge",
|
137
|
+
source: "<source code>"
|
138
|
+
)
|
139
|
+
```
|
140
|
+
|
141
|
+
*Other params: type [String], compilerId [Integer]*
|
142
|
+
|
143
|
+
#### Get judge details
|
144
|
+
|
145
|
+
```ruby
|
146
|
+
client..get_judge("JUDGE_ID")
|
147
|
+
```
|
148
|
+
|
149
|
+
#### Update judge
|
150
|
+
|
151
|
+
```ruby
|
152
|
+
client.update_judge(
|
153
|
+
"JUDGE_ID",
|
154
|
+
name: "NewNameJudge",
|
155
|
+
)
|
156
|
+
```
|
157
|
+
|
158
|
+
*Other params: source [String], compilerId [Integer]*
|
159
|
+
|
160
|
+
#### Create a submission
|
161
|
+
|
162
|
+
```ruby
|
163
|
+
client.create_submission_problem(
|
164
|
+
problemCode: "RUBY_001", #problem_id
|
165
|
+
compilerId: 1, # get of all_request
|
166
|
+
source: "#include <iostream>\n using namespace std;\n int main()\n {\n cout << \"Hello World\" << endl;\n return 0;\n }" #Example
|
167
|
+
)
|
168
|
+
```
|
169
|
+
|
170
|
+
*Other params: userId [Integer]*
|
171
|
+
|
172
|
+
#### Fetch a submission
|
173
|
+
|
174
|
+
```ruby
|
175
|
+
client.fetch_submission_problems("SUBMISSION_ID")
|
176
|
+
```
|
24
177
|
|
25
178
|
## Development
|
26
179
|
|
@@ -32,8 +185,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
185
|
|
33
186
|
Bug reports and pull requests are welcome on GitHub at https://github.com/14tinchov/sphere_engine. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
34
187
|
|
35
|
-
|
36
188
|
## License
|
37
189
|
|
38
190
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
39
191
|
|
192
|
+
|
data/bin/console
CHANGED
data/lib/sphere_engine/client.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'sphere_engine/error'
|
2
|
+
|
1
3
|
module SphereEngine
|
2
4
|
class Client
|
3
5
|
attr_accessor :access_token_compilers, :access_token_problems
|
@@ -25,5 +27,15 @@ module SphereEngine
|
|
25
27
|
def credentials?
|
26
28
|
credentials.values.all?
|
27
29
|
end
|
30
|
+
|
31
|
+
# @return[String]
|
32
|
+
def get_token(service)
|
33
|
+
return case service
|
34
|
+
when :compilers
|
35
|
+
access_token_compilers
|
36
|
+
when :problems
|
37
|
+
access_token_problems
|
38
|
+
end
|
39
|
+
end
|
28
40
|
end
|
29
41
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module SphereEngine
|
2
|
+
# Custom error class for rescuing from all SphereEngine errors
|
3
|
+
class Error < StandardError
|
4
|
+
# @return [Integer]
|
5
|
+
attr_reader :code
|
6
|
+
|
7
|
+
# Initializes a new Error object
|
8
|
+
#
|
9
|
+
# @param message [Exception, String]
|
10
|
+
# @param code [Integer]
|
11
|
+
# @return [SphereEngine::Error]
|
12
|
+
def initialize(message = '', code = nil)
|
13
|
+
super(message)
|
14
|
+
@code = code
|
15
|
+
end
|
16
|
+
|
17
|
+
# ClientErrors(Raised when SphereEngine returns a 4xx HTTP status code)
|
18
|
+
#
|
19
|
+
# Raised when SphereEngine returns the HTTP status code 400
|
20
|
+
BadRequest = Class.new(self)
|
21
|
+
|
22
|
+
# Raised when SphereEngine returns the HTTP status code 401
|
23
|
+
Unauthorized = Class.new(self)
|
24
|
+
|
25
|
+
ERRORS = {
|
26
|
+
400 => SphereEngine::Error::BadRequest,
|
27
|
+
401 => SphereEngine::Error::Unauthorized
|
28
|
+
}
|
29
|
+
|
30
|
+
class << self
|
31
|
+
# Create a new error from an HTTP response
|
32
|
+
#
|
33
|
+
# @param body [String]
|
34
|
+
# @param headers [Hash]
|
35
|
+
# @return [SphereEngine::Error]
|
36
|
+
def from_response(body)
|
37
|
+
message, code = parse_error(body)
|
38
|
+
new(message, code)
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def parse_error(body)
|
44
|
+
if body.nil? || body.empty?
|
45
|
+
['', nil]
|
46
|
+
elsif body["message"] || body[:message]
|
47
|
+
[ body["message"] || body[:message], nil]
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -1,10 +1,22 @@
|
|
1
1
|
require 'sphere_engine/rest/access'
|
2
|
+
require 'sphere_engine/rest/languages'
|
3
|
+
require 'sphere_engine/rest/compilers'
|
4
|
+
require 'sphere_engine/rest/submissions'
|
5
|
+
require 'sphere_engine/rest/problems'
|
6
|
+
require 'sphere_engine/rest/test_cases'
|
7
|
+
require 'sphere_engine/rest/judges'
|
2
8
|
|
3
9
|
module SphereEngine
|
4
10
|
module REST
|
5
11
|
# @note All methods have been separated into modules and follow the same grouping used in {http://sphere-engine.com/services the SphereEngine API Documentation}.
|
6
12
|
module API
|
7
13
|
include SphereEngine::REST::Access
|
14
|
+
include SphereEngine::REST::Languages
|
15
|
+
include SphereEngine::REST::Compilers
|
16
|
+
include SphereEngine::REST::Submissions
|
17
|
+
include SphereEngine::REST::Problems
|
18
|
+
include SphereEngine::REST::TestCases
|
19
|
+
include SphereEngine::REST::Judges
|
8
20
|
end
|
9
21
|
end
|
10
|
-
end
|
22
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module SphereEngine
|
2
|
+
module REST
|
3
|
+
module Judges
|
4
|
+
include SphereEngine::REST::Utils
|
5
|
+
|
6
|
+
# @options [Hash]
|
7
|
+
def all_judges(options = {})
|
8
|
+
perform_get_requests_of_problems_service("/judges", options)
|
9
|
+
end
|
10
|
+
|
11
|
+
# @options [Hash]
|
12
|
+
def create_judge(options = {})
|
13
|
+
perform_post_requests_of_problems_service("/judges", options)
|
14
|
+
end
|
15
|
+
|
16
|
+
# @judge_id [String]
|
17
|
+
def get_judge(judge_id)
|
18
|
+
perform_get_requests_of_problems_service("/judges/#{judge_id}")
|
19
|
+
end
|
20
|
+
|
21
|
+
# @judge_id [String]
|
22
|
+
# @options [Hash]
|
23
|
+
def update_judge(judge_id, options = {})
|
24
|
+
perform_put_requests_of_problems_service("/judges/#{judge_id}", options)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module SphereEngine
|
2
|
+
module REST
|
3
|
+
module Problems
|
4
|
+
include SphereEngine::REST::Utils
|
5
|
+
|
6
|
+
# @param options [Hash]
|
7
|
+
# This request you could send a limit and offset
|
8
|
+
def all_problems(options = {})
|
9
|
+
perform_get_requests_of_problems_service('/problems', options)
|
10
|
+
end
|
11
|
+
|
12
|
+
# @param options [Hash]
|
13
|
+
# This request you could send a limit and offset
|
14
|
+
def create_problem(options = {})
|
15
|
+
perform_post_requests_of_problems_service('/problems', options)
|
16
|
+
end
|
17
|
+
|
18
|
+
# @param code [String]
|
19
|
+
def get_problem(code)
|
20
|
+
perform_get_requests_of_problems_service("/problems/#{code}")
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param code [String]
|
24
|
+
# @param options [Hash]
|
25
|
+
def update_problem(code, options = {})
|
26
|
+
perform_put_requests_of_problems_service("/problems/#{code}", options)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -1,48 +1,81 @@
|
|
1
1
|
require 'addressable/uri'
|
2
2
|
require 'http'
|
3
|
+
require 'json'
|
3
4
|
|
4
5
|
module SphereEngine
|
5
6
|
module REST
|
6
7
|
class Request
|
7
|
-
|
8
|
-
|
8
|
+
BASE_URL_COMPILERS_SERVICE = 'https://09de42b6.compilers.sphere-engine.com/api/V3'.freeze
|
9
|
+
BASE_URL_PROBLEMS_SERVICE = 'https://09de42b6.problems.sphere-engine.com/api/v3'.freeze
|
10
|
+
attr_accessor :client, :headers, :options, :service, :path, :request_method, :uri
|
9
11
|
|
10
12
|
# @param client [SphereEngine::Client]
|
11
13
|
# @param request_method [String, Symbol]
|
12
14
|
# @param path [String]
|
13
15
|
# @param options [Hash]
|
14
16
|
# @return [SphereEngine::REST::Request]
|
15
|
-
def initialize(client, request_method, path, options = {})
|
17
|
+
def initialize(client, request_method, service, path, options = {})
|
16
18
|
@client = client
|
17
|
-
@
|
19
|
+
@token = client.get_token(service)
|
20
|
+
@service = service
|
21
|
+
@request_method = request_method
|
22
|
+
@uri = Addressable::URI.parse(path.start_with?('http') ? path : build_base_url + path)
|
18
23
|
@path = uri.path
|
19
24
|
@options = options
|
20
25
|
end
|
21
26
|
|
22
27
|
# @return [Array, Hash]
|
23
28
|
def perform
|
24
|
-
response =
|
25
|
-
response_body = response.body.empty? ? '' :
|
29
|
+
response = build_http_request
|
30
|
+
response_body = response.body.empty? ? '' : format_to_response(response)
|
26
31
|
fail_or_return_response_body(response.code, response_body)
|
27
32
|
end
|
28
33
|
|
34
|
+
def format_to_response(response)
|
35
|
+
begin
|
36
|
+
JSON.parse(response.to_s)
|
37
|
+
rescue JSON::ParserError
|
38
|
+
response.to_s
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
29
42
|
def fail_or_return_response_body(code, body)
|
30
|
-
|
31
|
-
|
43
|
+
error = error(code, body)
|
44
|
+
raise(error) if error
|
32
45
|
body
|
33
46
|
end
|
34
47
|
|
35
|
-
def
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
48
|
+
def error(code, body)
|
49
|
+
klass = SphereEngine::Error::ERRORS[code]
|
50
|
+
if klass
|
51
|
+
klass.from_response(body)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def build_base_url
|
56
|
+
return case @service
|
57
|
+
when :compilers
|
58
|
+
BASE_URL_COMPILERS_SERVICE
|
59
|
+
when :problems
|
60
|
+
BASE_URL_PROBLEMS_SERVICE
|
44
61
|
end
|
45
|
-
|
62
|
+
end
|
63
|
+
|
64
|
+
def build_http_request
|
65
|
+
return case @request_method
|
66
|
+
when :get
|
67
|
+
HTTP.get(uri, params: build_request_params)
|
68
|
+
when :post
|
69
|
+
HTTP.post(uri, params: build_request_params)
|
70
|
+
when :put
|
71
|
+
HTTP.put(uri, params: build_request_params)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def build_request_params
|
76
|
+
{
|
77
|
+
access_token: @token
|
78
|
+
}.merge(options)
|
46
79
|
end
|
47
80
|
end
|
48
81
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module SphereEngine
|
2
|
+
module REST
|
3
|
+
module Submissions
|
4
|
+
include SphereEngine::REST::Utils
|
5
|
+
|
6
|
+
# @param options [Hash]
|
7
|
+
# This request you should send a compilerId and source
|
8
|
+
def create_submission_compiler(options = {})
|
9
|
+
perform_post_requests_of_compílers_service('/submissions', options)
|
10
|
+
end
|
11
|
+
|
12
|
+
# @param options [Hash]
|
13
|
+
# This request you should send a submissionId
|
14
|
+
def fetch_submission_compilers(submission_id, options = {})
|
15
|
+
perform_get_requests_of_compílers_service("/submissions/#{submission_id}")
|
16
|
+
end
|
17
|
+
|
18
|
+
# @param options [Hash]
|
19
|
+
def create_submission_problem(options = {})
|
20
|
+
perform_post_requests_of_problems_service('/submissions', options)
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param options [Hash]
|
24
|
+
def fetch_submission_problems(submission_id)
|
25
|
+
perform_get_requests_of_problems_service("/submissions/#{submission_id}")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module SphereEngine
|
2
|
+
module REST
|
3
|
+
module TestCases
|
4
|
+
include SphereEngine::REST::Utils
|
5
|
+
|
6
|
+
# @param problem_id [String]
|
7
|
+
def list_testcases(problem_id)
|
8
|
+
perform_get_requests_of_problems_service("/problems/#{problem_id}/testcases")
|
9
|
+
end
|
10
|
+
|
11
|
+
# @param problem_id [String]
|
12
|
+
# @options [Hash]
|
13
|
+
def create_problem_testcase(problem_id, options = {})
|
14
|
+
perform_post_requests_of_problems_service("/problems/#{problem_id}/testcases", options)
|
15
|
+
end
|
16
|
+
|
17
|
+
# @param problem_id [String]
|
18
|
+
# @param testcase_id [String]
|
19
|
+
def get_testcase(problem_id, testcase_id)
|
20
|
+
perform_get_requests_of_problems_service("/problems/#{problem_id}/testcases/#{testcase_id}")
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param problem_id [String]
|
24
|
+
# @param testcase_id [String]
|
25
|
+
# @param filename [String]
|
26
|
+
def get_testcase_file(problem_id, testcase_id, filename)
|
27
|
+
perform_get_requests_of_problems_service(
|
28
|
+
"/problems/#{problem_id}/testcases/#{testcase_id}/#{filename}"
|
29
|
+
)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -4,12 +4,28 @@ module SphereEngine
|
|
4
4
|
module REST
|
5
5
|
module Utils
|
6
6
|
private
|
7
|
-
def
|
8
|
-
perform_request(:get, path, options)
|
7
|
+
def perform_get_requests_of_problems_service(path, options = {})
|
8
|
+
perform_request(:get, :problems, path, options)
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
12
|
-
|
11
|
+
def perform_get_requests_of_compílers_service(path, options = {})
|
12
|
+
perform_request(:get, :compilers, path, options)
|
13
|
+
end
|
14
|
+
|
15
|
+
def perform_post_requests_of_problems_service(path, options = {})
|
16
|
+
perform_request(:post, :problems, path, options)
|
17
|
+
end
|
18
|
+
|
19
|
+
def perform_post_requests_of_compílers_service(path, options = {})
|
20
|
+
perform_request(:post, :compilers, path, options)
|
21
|
+
end
|
22
|
+
|
23
|
+
def perform_put_requests_of_problems_service(path, options = {})
|
24
|
+
perform_request(:put, :problems, path, options)
|
25
|
+
end
|
26
|
+
|
27
|
+
def perform_request(request_method, service, path, options = {})
|
28
|
+
SphereEngine::REST::Request.new(self, request_method, service, path, options).perform
|
13
29
|
end
|
14
30
|
end
|
15
31
|
end
|
data/sphere_engine.gemspec
CHANGED
@@ -15,9 +15,9 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.authors = ["Martin Villalba"]
|
16
16
|
spec.email = ["14tinchov@gmail.com"]
|
17
17
|
|
18
|
-
spec.
|
19
|
-
spec.
|
20
|
-
spec.homepage = "https://github.com/14tinchov/sphere-engine
|
18
|
+
spec.summary = %q{A Ruby interface to the SphereEngine API.}
|
19
|
+
spec.description = %q{This gem was made as an interface to the SphereEngine API. I try to abstract in the best way all his methods that SphereEngine give us.}
|
20
|
+
spec.homepage = "https://github.com/14tinchov/sphere-engine"
|
21
21
|
spec.license = "MIT"
|
22
22
|
|
23
23
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sphere_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Villalba
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -80,7 +80,8 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '2.0'
|
83
|
-
description:
|
83
|
+
description: This gem was made as an interface to the SphereEngine API. I try to abstract
|
84
|
+
in the best way all his methods that SphereEngine give us.
|
84
85
|
email:
|
85
86
|
- 14tinchov@gmail.com
|
86
87
|
executables: []
|
@@ -99,14 +100,21 @@ files:
|
|
99
100
|
- bin/setup
|
100
101
|
- lib/sphere_engine.rb
|
101
102
|
- lib/sphere_engine/client.rb
|
103
|
+
- lib/sphere_engine/error.rb
|
102
104
|
- lib/sphere_engine/rest/access.rb
|
103
105
|
- lib/sphere_engine/rest/api.rb
|
104
106
|
- lib/sphere_engine/rest/client.rb
|
107
|
+
- lib/sphere_engine/rest/compilers.rb
|
108
|
+
- lib/sphere_engine/rest/judges.rb
|
109
|
+
- lib/sphere_engine/rest/languages.rb
|
110
|
+
- lib/sphere_engine/rest/problems.rb
|
105
111
|
- lib/sphere_engine/rest/request.rb
|
112
|
+
- lib/sphere_engine/rest/submissions.rb
|
113
|
+
- lib/sphere_engine/rest/test_cases.rb
|
106
114
|
- lib/sphere_engine/rest/utils.rb
|
107
115
|
- lib/sphere_engine/version.rb
|
108
116
|
- sphere_engine.gemspec
|
109
|
-
homepage: https://github.com/14tinchov/sphere-engine
|
117
|
+
homepage: https://github.com/14tinchov/sphere-engine
|
110
118
|
licenses:
|
111
119
|
- MIT
|
112
120
|
metadata:
|
@@ -122,9 +130,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
130
|
version: '0'
|
123
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
132
|
requirements:
|
125
|
-
- - "
|
133
|
+
- - ">="
|
126
134
|
- !ruby/object:Gem::Version
|
127
|
-
version:
|
135
|
+
version: '0'
|
128
136
|
requirements: []
|
129
137
|
rubyforge_project:
|
130
138
|
rubygems_version: 2.6.10
|