judge_system 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/README.md +1 -1
- data/lib/compile_systems/hs_system.rb +25 -0
- data/lib/judge_system/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a0ae37e4bd7f32f39c5aa442a0bda38d4e4934c
|
4
|
+
data.tar.gz: 3cbb9f348b28dfc1c13c799c51d97156bd68d706
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a87564556cfb3e293e383ebe8e54fe46dcad66a62ac8c85a3a9c38914696bf52d04bbd3503a1b04dca8e7fa78a53c98842291a6106ed5800d0686837a882027f
|
7
|
+
data.tar.gz: c3d17b3314938c0f705585aab855fd115da606abc8943f3bed382bb7f44a046765a8b48abf235887746160bd97f149cd3173d49b4335339db3d03f35e759b2a8
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.3
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ Judge_system is a compile and judge system for online judge.
|
|
5
5
|
This system work on [melpon/wandbox](https://github.com/melpon/wandbox).
|
6
6
|
That means you don't have to concern about dangerous codes if you use judge_system.
|
7
7
|
Judge_system returns four results ('AC', 'WA', 'RE', 'TLE').
|
8
|
-
Now, it can compile c, c++, ruby, go, python3, swift.
|
8
|
+
Now, it can compile c, c++, ruby, go, python3, swift, haskell.
|
9
9
|
|
10
10
|
## Installation
|
11
11
|
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'base64'
|
2
|
+
|
3
|
+
File.open("stdin.txt.bz2", "wb") do |file|
|
4
|
+
file.write Base64.decode64 $stdin.read
|
5
|
+
file.close
|
6
|
+
end
|
7
|
+
|
8
|
+
system("bunzip2 stdin.txt.bz2")
|
9
|
+
|
10
|
+
stdin = File.open("stdin.txt").read.split("\n<$><*><$>\n")
|
11
|
+
code = stdin[0]
|
12
|
+
input = stdin[1]
|
13
|
+
time = stdin[2]
|
14
|
+
|
15
|
+
File.open("./main.hs", "w") do |file|
|
16
|
+
file.puts code
|
17
|
+
file.close
|
18
|
+
end
|
19
|
+
|
20
|
+
File.open("./test.in", "w") do |file|
|
21
|
+
file.puts input
|
22
|
+
file.close
|
23
|
+
end
|
24
|
+
|
25
|
+
system "timeout -s 9 " + time + " /opt/wandbox/ghc-head/bin/runghc main.hs < test.in"
|
data/lib/judge_system/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: judge_system
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- getty104
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbzip2
|
@@ -90,6 +90,7 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- ".gitignore"
|
92
92
|
- ".rspec"
|
93
|
+
- ".ruby-version"
|
93
94
|
- ".travis.yml"
|
94
95
|
- CODE_OF_CONDUCT.md
|
95
96
|
- Gemfile
|
@@ -102,6 +103,7 @@ files:
|
|
102
103
|
- lib/compile_systems/c_system.rb
|
103
104
|
- lib/compile_systems/cpp_system.rb
|
104
105
|
- lib/compile_systems/go_system.rb
|
106
|
+
- lib/compile_systems/hs_system.rb
|
105
107
|
- lib/compile_systems/py_system.rb
|
106
108
|
- lib/compile_systems/rb_system.rb
|
107
109
|
- lib/compile_systems/swift_system.rb
|