judge_system 1.2.4 → 1.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 662d669a246e811c0d7ad5ccb0877e92d0493988
4
- data.tar.gz: 397e0e990b5e53dc8d61b24b4d9c9e056757c532
3
+ metadata.gz: 3f505eaee971526fa46596b7e58f0f7f5c55341e
4
+ data.tar.gz: ebd03907d6da971f3bbc69cf314c2ea018f314f2
5
5
  SHA512:
6
- metadata.gz: d870b019d441c938d9f2af119f28350e81b020032d07f148a44d7644e5ced9a08a5dacfed99740eaa7c645cb53759bf2648ad5226b6484477856045a7c241fab
7
- data.tar.gz: b9b8c234da8eb0afda196f98acfbf3131a7bb6ae0928d2bdc86e3b398b4b3a82f05e897741fa8c7cfd3612e9282514825b63c5bb0f1b5e48dc2cf7bfe94d1bbb
6
+ metadata.gz: 695713b0782ef6220f85393871b4bba4bcbdd41231d104369ac3dfdbb713ae35ee85816d964e433b774283015898bb58340e725e3d94bb2ba6a4c861fdf45c8b
7
+ data.tar.gz: f91f6cd62cde9dee6a9484a916333008f19d940f0ca537685f5498069a222dcc41e700cf919c68a97581b7a6cf95480c21e3a48aa372d7972c3102ea24339f30
data/README.md CHANGED
@@ -4,7 +4,7 @@ Judge_system is a compile and judge system for online judge.
4
4
  This system work on [melpon/wandbox](https://github.com/melpon/wandbox).
5
5
  That means you don't have to concern about dangerous codes if you use judge_system.
6
6
  Judge_system returns four results ('AC', 'WA', 'RE', 'TLE').
7
- Now, it can compile c, c++, ruby, java.
7
+ Now, it can compile c, c++, ruby, go.
8
8
 
9
9
  ## Installation
10
10
 
@@ -29,7 +29,7 @@ require 'judge_system'
29
29
 
30
30
  JudgeSystem.judge_result lang: (string text), code: (string text), answer: (string text), stdin: (string text), time: (num sec)
31
31
 
32
- #Lang is the extension of languages (example: c is 'c', c++ is 'cpp', ruby is 'rb', java is 'java').
32
+ #Lang is the extension of languages (example: c is 'c', c++ is 'cpp', ruby is 'rb', go is 'go').
33
33
  #You can't use more than 1M byte code, input, answer.
34
34
 
35
35
  ```
@@ -0,0 +1,28 @@
1
+ #include <iostream>
2
+ #include <fstream>
3
+ using namespace std;
4
+
5
+ char command[1024];
6
+
7
+ int main(int argc, char const *argv[])
8
+ {
9
+ ofstream ofs;
10
+ ofs.open("main.go",ios::binary);
11
+ string buf;
12
+ string splitter="<$><*><$>";
13
+ string time;
14
+ while(getline(cin,buf)){
15
+ if(buf==splitter)break;
16
+ ofs<<buf<<endl;
17
+ }
18
+ ofs.close();
19
+ ofs.open("test.in",ios::binary);
20
+ while(getline(cin,buf)){
21
+ if(buf==splitter)break;
22
+ ofs<<buf<<endl;
23
+ }
24
+ ofs.close();
25
+ cin>>time;
26
+ system(("timeout -s 9 " + time + " /opt/wandbox/go-head/bin/go run main.go < test.in ").c_str());
27
+ return 0;
28
+ }
@@ -1,3 +1,3 @@
1
1
  module JudgeSystem
2
- VERSION = "1.2.4"
2
+ VERSION = "1.3.0"
3
3
  end
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: 1.2.4
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - getty104
@@ -73,6 +73,7 @@ files:
73
73
  - judge_system.gemspec
74
74
  - lib/compile_systems/c_system.cpp
75
75
  - lib/compile_systems/cpp_system.cpp
76
+ - lib/compile_systems/go_system.cpp
76
77
  - lib/compile_systems/java_system.cpp
77
78
  - lib/compile_systems/rb_system.cpp
78
79
  - lib/judge_system.rb