ideone-ruby-api 2.1.0 → 2.1.1
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/ideone-ruby-api.gemspec +2 -2
- data/lib/ideone.rb +6 -6
- data/lib/ideone/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: fe66c0214bb53eac469fc0310a3b9e4feeb7b332
|
4
|
+
data.tar.gz: 432c3df8fee8bccaca2cadd2851c31404dc8a97b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b2b0b316f5058b52ed0189cd84a9aea54b6c0706e65b2f95cb361199d37f6f266659e29a991fc4fa6383b108563f4e75d369934ec80c3823f3d4fb22b7b9337
|
7
|
+
data.tar.gz: f645f9a9103acc6d6e5fe79658d393742ca7c372870a1ed9440e45a3fdf7a12393d35b52b8b7d2b6b5c2ba95abc8f2451b70dacfb7f0e8da24fe221492dbad39
|
data/ideone-ruby-api.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: ideone-ruby-api 2.1.
|
5
|
+
# stub: ideone-ruby-api 2.1.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "ideone-ruby-api"
|
9
|
-
s.version = "2.1.
|
9
|
+
s.version = "2.1.1"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
data/lib/ideone.rb
CHANGED
@@ -33,7 +33,7 @@ module Ideone
|
|
33
33
|
request_body[:run] = run
|
34
34
|
request_body[:private] = is_private
|
35
35
|
|
36
|
-
response = call_request(:create_submission
|
36
|
+
response = call_request(:create_submission)
|
37
37
|
|
38
38
|
return response.to_hash[:create_submission_response][:return][:item][1][:value]
|
39
39
|
end
|
@@ -42,7 +42,7 @@ module Ideone
|
|
42
42
|
request_body = @request_body
|
43
43
|
request_body[:link] = link
|
44
44
|
|
45
|
-
response = call_request(:get_submission_status
|
45
|
+
response = call_request(:get_submission_status)
|
46
46
|
|
47
47
|
status = response.to_hash[:get_submission_status_response][:return][:item][1][:value].to_i
|
48
48
|
result = response.to_hash[:get_submission_status_response][:return][:item][2][:value].to_i
|
@@ -78,7 +78,7 @@ module Ideone
|
|
78
78
|
# Get a list of supported languages and cache it.
|
79
79
|
def languages
|
80
80
|
unless @languages_cache
|
81
|
-
response = call_request(:get_languages
|
81
|
+
response = call_request(:get_languages)
|
82
82
|
|
83
83
|
languages = response.to_hash[:get_languages_response][:return][:item][1][:value][:item]
|
84
84
|
# Create a sorted hash
|
@@ -89,7 +89,7 @@ module Ideone
|
|
89
89
|
|
90
90
|
# A test function that always returns the same thing.
|
91
91
|
def test
|
92
|
-
response = call_request(:test_function
|
92
|
+
response = call_request(:test_function)
|
93
93
|
|
94
94
|
items = response.to_hash[:test_function_response][:return][:item]
|
95
95
|
|
@@ -105,9 +105,9 @@ module Ideone
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
|
-
def call_request(api_endpoint
|
108
|
+
def call_request(api_endpoint)
|
109
109
|
begin
|
110
|
-
response = @client.call(api_endpoint,
|
110
|
+
response = @client.call(api_endpoint, :message => @request_body)
|
111
111
|
rescue Exception => e
|
112
112
|
raise e
|
113
113
|
end
|
data/lib/ideone/version.rb
CHANGED