README.md in judge_system-0.1.4 vs README.md in judge_system-1.0.0
- old
+ new
@@ -1,27 +1,52 @@
# JudgeSystem
-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.
+Judge_system is a compile and judge system for online judge.
+This system work on [melpon/wandbox](https://github.com/melpon/wandbox).
+That means you don't have to concern about dangerous codes if you use judge_system.
+Judge_system returns four results ('AC', 'WA', 'RE', 'TLE').
+Now, it can compile c, c++, ruby, java.
-TODO: Delete this and the text above, and describe your gem
-
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'judge_system'
```
And then execute:
- $ bundle
+$ bundle
Or install it yourself as:
- $ gem install judge_system
+$ gem install judge_system
## Usage
+
+```ruby
+require 'judge_system'
+
+JudgeSystem.judge_result lang(string text), code(string text), answer(string text), input(string text), time-limit(num sec)
+
+#Lang is the extension of languages (example: c is 'c', c++ is 'cpp', ruby is 'rb', java is 'java').
+#You can't use more than 1M byte code, input, answer.
+
+```
+
+example
+
+```ruby
+require 'judge_system'
+
+p JudgeSystem.judge_result 'rb', "n = gets.to_i\nputs n", "1\n", "1\n", 5 #=> 'AC'
+p JudgeSystem.judge_result 'rb', "n = gets.to_i\nputs n", "1\n", "2\n", 5 #=> 'WA'
+p JudgeSystem.judge_result 'rb', "n = gets.to_i\nputs n", "1\n", "\n", 0.001 #=> 'TLE'
+p JudgeSystem.judge_result 'c', "n = gets.to_i\nputs n", "1\n", "1\n", 5 #=> 'RE'
+```
+
+
## Development