judge_system 0.1.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c73121c4708109516c5cdcafc94d9c3f76d6888d
4
- data.tar.gz: 744db4db054f41ad05d6525814c6916239da0f60
3
+ metadata.gz: 3294a46aaa12f33ed104aceb00d1a36be89735d9
4
+ data.tar.gz: 0fb22e4a345143faa2962a0d8a52f4c94a048f5e
5
5
  SHA512:
6
- metadata.gz: 92cc7bbcf994f7ea2c54643ca4110e22e4ee02bf4c926ba8d2233de12208af0601dd4d97594301b2cf258b0f27732722bd3f2b3f03e6b2884b4bd10fdcd7327c
7
- data.tar.gz: 61b643ba3f4f11a82508af9777fff50ffbe36029ef86474b38f142faa4d104ecc9fef4fa078a0093a38ba583c87b57df455d6e7a701b3b17e1d4192188bbe84e
6
+ metadata.gz: 9dd06c5921d69176d2de37144fa789b1b73089646928e1249cda0bb9febfcc5308b80486715c18a0b9b1e3ae235e1c9e14f7f8b3c93ce7ba9481de195898ddd8
7
+ data.tar.gz: e42df5751978e866a7fcc3b6d2fa015b2ff6143fbe2354b73df65e5de3f6e70883935cd50920723f627193798bf8cade73d47041c82d63328719d59c692f7dd2
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # JudgeSystem
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/judge_system`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Judge_system is a compile and judge system for online judge.
4
+ This system work on [melpon/wandbox](https://github.com/melpon/wandbox).
5
+ That means you don't have to concern about dangerous codes if you use judge_system.
6
+ Judge_system returns four results ('AC', 'WA', 'RE', 'TLE').
7
+ Now, it can compile c, c++, ruby, java.
6
8
 
7
9
  ## Installation
8
10
 
@@ -14,14 +16,37 @@ gem 'judge_system'
14
16
 
15
17
  And then execute:
16
18
 
17
- $ bundle
19
+ $ bundle
18
20
 
19
21
  Or install it yourself as:
20
22
 
21
- $ gem install judge_system
23
+ $ gem install judge_system
22
24
 
23
25
  ## Usage
24
26
 
27
+ ```ruby
28
+ require 'judge_system'
29
+
30
+ JudgeSystem.judge_result lang(string text), code(string text), answer(string text), input(string text), time-limit(num sec)
31
+
32
+ #Lang is the extension of languages (example: c is 'c', c++ is 'cpp', ruby is 'rb', java is 'java').
33
+ #You can't use more than 1M byte code, input, answer.
34
+
35
+ ```
36
+
37
+ example
38
+
39
+ ```ruby
40
+ require 'judge_system'
41
+
42
+ p JudgeSystem.judge_result 'rb', "n = gets.to_i\nputs n", "1\n", "1\n", 5 #=> 'AC'
43
+ p JudgeSystem.judge_result 'rb', "n = gets.to_i\nputs n", "1\n", "2\n", 5 #=> 'WA'
44
+ p JudgeSystem.judge_result 'rb', "n = gets.to_i\nputs n", "1\n", "\n", 0.001 #=> 'TLE'
45
+ p JudgeSystem.judge_result 'c', "n = gets.to_i\nputs n", "1\n", "1\n", 5 #=> 'RE'
46
+ ```
47
+
48
+
49
+
25
50
 
26
51
 
27
52
  ## Development
@@ -1,3 +1,3 @@
1
1
  module JudgeSystem
2
- VERSION = "0.1.4"
2
+ VERSION = "1.0.0"
3
3
  end
data/test.rb CHANGED
@@ -1,2 +0,0 @@
1
- require 'judge_system'
2
- p JudgeSystem.judge_result 'rb', 'puts 2', '2', '', 5
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: judge_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshifumi Kiyono