judge0 0.0.3 → 0.0.7

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -1
  3. data/judge0.gemspec +1 -1
  4. data/lib/submission.rb +11 -4
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3d324e1f01759fd5117f9c48d410f2711e33170d2188b242df515c47ea735e6
4
- data.tar.gz: 6f8ed00a2ab60325fe22dac903378fa028d768df7a900b7cf122bd466327aa1c
3
+ metadata.gz: 545726a9f95c2a9c33f8683225584c494d2b5f4dab7fa6dce81d0d31a676eb4c
4
+ data.tar.gz: df780eb8d9636aa9ba111311771422a7124ef51357da6e5a456ba77792e418c3
5
5
  SHA512:
6
- metadata.gz: 827aff1386d62e758c8338339a20e7e62fa787a74ddf79f052c68ced77624bcd776677a9784d56e4138ab75461f47d4cd74384fdaa8d4b8f175a26fae6c134d9
7
- data.tar.gz: 568b740d9a17ef8d5b3715524cf86dc9ee8ac7d38cb27fb31cee60c183eb5fb5173dc03aa4a201be895a00e82019abbdabb4e7d5f4296e7045bc8a907c27b48f
6
+ metadata.gz: 3782230d10a4446ae5cc2dd0723ccf2df9c360c03d730ea0755eb56fbfbec45475ddd548e51ee416367fc7ef90c7ff9049044b227e7f76772ca17f308d219c61
7
+ data.tar.gz: 7b6f15240c695c02be408855a42ae20defd4fee9819d1b98eae5eb54c74dbc1ec8c04de7ecbdfd1f7389be0fdb5169a390c3d878b13fd76b2ba9c5c6c572e074
data/README.md CHANGED
@@ -107,4 +107,14 @@ pp Judge0::config_info
107
107
  irb -Ilib -r judge0
108
108
  ```
109
109
 
110
- ### deployment
110
+ ### build
111
+
112
+ ```bash
113
+ gem build judge0.gemspec
114
+ ```
115
+
116
+ ### push
117
+
118
+ ```bash
119
+ gem push judge0-x.x.x.gem
120
+ ```
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'judge0'
3
- s.version = '0.0.3'
3
+ s.version = '0.0.7'
4
4
  s.date = '2020-01-20'
5
5
  s.summary = 'ruby interface for judge0 api.'
6
6
  s.description = 'ruby interface for judge0 api.'
@@ -61,13 +61,21 @@ module Judge0
61
61
  compile_out: @compile_out,
62
62
  message: @message,
63
63
  status: {
64
- id: @status_id,
64
+ id: @status_id,
65
65
  description: @status_description
66
66
  }
67
67
  }
68
68
  end
69
69
 
70
- private
70
+ def output
71
+ msg = ''
72
+ msg = @stdout if @stdout
73
+ msg +="ERROR:\n#{@stderr}\n" if @stderr
74
+ msg += "MESSAGE:\n#{@message}\n" if @message
75
+ msg
76
+ end
77
+
78
+ private
71
79
 
72
80
  def to_hash
73
81
  Hash[
@@ -86,8 +94,7 @@ module Judge0
86
94
  begin
87
95
  resp = Faraday.get(Judge0.url("/submissions/#{token}"))
88
96
  body = JSON.parse(resp.body)
89
- p body
90
- puts "waiting: #{token} - #{body['status']['description']}"
97
+ puts "waiting: #{token} - #{body['status']['description']}" unless ENV['RAILS_ENV'] == 'test'
91
98
  end while body['status']['id'] <= 2
92
99
  body
93
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judge0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Breno Nunes