git-contest 0.2.1 → 0.2.2
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 +8 -8
- data/README.md +3 -1
- data/lib/contest/driver/kattis_driver.rb +22 -12
- data/lib/git/contest/version.rb +1 -1
- data/spec/lib/contest/driver/t010_kattis_spec.rb +7 -7
- data/spec/mock/t010/open_kattis_com_login.html +40 -15
- data/spec/mock/t010/open_kattis_com_submit.html +71 -47
- data/spec/mock/t010/open_kattis_com_user_submissions.html +87 -23
- data/spec/mock/t010/user_submission.html +83 -0
- data/spec/mock/t010/user_submission_111111.html +79 -26
- data/spec/mock/t010/user_submission_222222.html +79 -75
- data/spec/mock/t010/user_submissions.html +105 -36
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmEzY2FlZTZmMzk4YmZmZDBjNWE5MDgwNmUyYTE2NjM0MGYwYTU5OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDFiYmQyYWEyNDdhMjZhODM1Y2EyMWM4YmM2Yzk1ZTZlMmYxNDIwYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTYzMDJhYjBkZGE5NWFlZmNiMmM5N2VlMzgyMjAyOTMzNGU4OGQxODM5OTll
|
10
|
+
Mzk3ZDMzYTFkYjJlMTQ3MmRmOTFhZTg3ZmIyOTZjZjhmMDQzOTViMjU4MDM2
|
11
|
+
Y2RiYTMzYjkzZDY4YmQwYTM3NmU2MjhlZDU3ZWJmNjI5YmFmNjc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTQ1MjZjNzYwNzcwOTU3MzY4OTFjOTVlMjhlNTU3YWNiOWFjNWFhODY2ZDk0
|
14
|
+
NmQ3N2E5ZmUzZGVjN2E0YTBmNmNkZWVkOTc4YWMyMGMxNDhkZTdlYzQ2OWE0
|
15
|
+
ZmNlYzEzYjMwMThhNDQ2Mzk4NWZjNWQwMGEwMDNjMmMwZDc3MTQ=
|
data/README.md
CHANGED
@@ -176,6 +176,7 @@ Available drivers:
|
|
176
176
|
* codeforces
|
177
177
|
* aizu\_online\_judge
|
178
178
|
* uva\_online\_judge
|
179
|
+
* kattis
|
179
180
|
|
180
181
|
You can write driver plugin on `${GIT_CONTEST_HOME}/plugins/driver_***.rb`
|
181
182
|
|
@@ -194,6 +195,8 @@ to be written here.
|
|
194
195
|
|
195
196
|
* [Oskar Sundström](https://github.com/osund)
|
196
197
|
* Added Kattis Driver
|
198
|
+
* [Wei Jianwen](https://github.com/weijianwen)
|
199
|
+
* Fixed gem dependency
|
197
200
|
|
198
201
|
## Author Information
|
199
202
|
|
@@ -237,4 +240,3 @@ THE SOFTWARE.
|
|
237
240
|
* [https://www.ruby-lang.org/](https://www.ruby-lang.org/)
|
238
241
|
* git
|
239
242
|
* [http://git-scm.com/](http://git-scm.com/)
|
240
|
-
|
@@ -2,15 +2,15 @@
|
|
2
2
|
# kattis.rb
|
3
3
|
#
|
4
4
|
# Copyright (c) 2013-2014 Hiroyuki Sano <sh19910711 at gmail.com>
|
5
|
-
# Copyright (c) 2014 Oskar Sundström <oskar.sundstrom
|
5
|
+
# Copyright (c) 2014 Oskar Sundström <oskar.sundstrom at gmail.com>
|
6
6
|
# Licensed under the MIT-License.
|
7
7
|
#
|
8
8
|
# An official Python submission script can be found at
|
9
|
-
# https://open.kattis.com/
|
9
|
+
# https://open.kattis.com/help/submit
|
10
10
|
#
|
11
11
|
# Using the Python script you would write:
|
12
12
|
# $ python3 submit3.py -p aaah Main.java
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# To do the same thing using git-contest you instead write:
|
15
15
|
# $ git contest submit kattis -p aaah -s Main.java
|
16
16
|
|
@@ -52,7 +52,7 @@ module Contest
|
|
52
52
|
|
53
53
|
def get_problem_id(options)
|
54
54
|
"#{options[:problem_id]}"
|
55
|
-
end
|
55
|
+
end
|
56
56
|
|
57
57
|
def resolve_language(label)
|
58
58
|
case label
|
@@ -90,9 +90,9 @@ module Contest
|
|
90
90
|
# Login
|
91
91
|
trigger 'before_login'
|
92
92
|
login_page = @client.get "https://#{subdomain}.kattis.com/login?email_login=true"
|
93
|
-
login_page.form_with(:action => 'login
|
94
|
-
form.user = @config[
|
95
|
-
form.password = @config[
|
93
|
+
login_page.form_with(:action => '/login/email') do |form|
|
94
|
+
form.user = @config["user"]
|
95
|
+
form.password = @config["password"]
|
96
96
|
end.submit
|
97
97
|
trigger 'after_login'
|
98
98
|
|
@@ -121,7 +121,8 @@ module Contest
|
|
121
121
|
(/Problem-id inte funnet i databasen./ =~ error))
|
122
122
|
abort "Problem ID not found in database."
|
123
123
|
end
|
124
|
-
|
124
|
+
sleep 2
|
125
|
+
submissions_page = @client.get "https://#{subdomain}.kattis.com/users/#{user}"
|
125
126
|
submission_id = get_submission_id(submissions_page.body)
|
126
127
|
status = get_status_wait(submission_id, subdomain)
|
127
128
|
trigger(
|
@@ -137,14 +138,23 @@ module Contest
|
|
137
138
|
get_commit_message(status)
|
138
139
|
end
|
139
140
|
|
141
|
+
def is_wait_status(status)
|
142
|
+
case status
|
143
|
+
when "Running", "Compiling", ""
|
144
|
+
true
|
145
|
+
else
|
146
|
+
false
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
140
150
|
def get_status_wait(submission_id, subdomain)
|
141
151
|
submission_id = submission_id.to_s
|
142
152
|
# Wait for result
|
143
153
|
12.times do
|
144
154
|
sleep 10
|
145
|
-
submission_page = @client.get "https://#{subdomain}.kattis.com/
|
155
|
+
submission_page = @client.get "https://#{subdomain}.kattis.com/submissions/#{submission_id}"
|
146
156
|
status = get_submission_status(submission_id, submission_page.body)
|
147
|
-
return status unless status
|
157
|
+
return status unless is_wait_status status
|
148
158
|
trigger 'retry'
|
149
159
|
end
|
150
160
|
trigger 'timeout'
|
@@ -153,12 +163,12 @@ module Contest
|
|
153
163
|
|
154
164
|
def get_submission_id(body)
|
155
165
|
doc = Nokogiri::HTML(body)
|
156
|
-
return doc.xpath('
|
166
|
+
return doc.xpath('//*[@id="wrapper"]/div/div[2]/section/table/tbody/tr[1]/td[1]/a')[0].inner_text().strip
|
157
167
|
end
|
158
168
|
|
159
169
|
def get_submission_status(submission_id, body)
|
160
170
|
doc = Nokogiri::HTML(body)
|
161
|
-
return doc.xpath('
|
171
|
+
return doc.xpath('//*[@id="judge_table"]/tbody/tr[1]/td[4]/span').inner_text().strip
|
162
172
|
end
|
163
173
|
end
|
164
174
|
end
|
data/lib/git/contest/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
describe "T010: Kattis Driver" do
|
3
|
+
describe "T010: Kattis Driver" do
|
4
4
|
before do
|
5
5
|
@driver = Contest::Driver::KattisDriver.new
|
6
6
|
@driver.stub(:sleep).and_return(0)
|
@@ -59,7 +59,7 @@ describe "T010: Kattis Driver" do
|
|
59
59
|
# login
|
60
60
|
WebMock.stub_request(
|
61
61
|
:post,
|
62
|
-
/^https:\/\/open\.kattis\.com\/login
|
62
|
+
/^https:\/\/open\.kattis\.com\/login\/email$/
|
63
63
|
)
|
64
64
|
.to_return(
|
65
65
|
:status => 200,
|
@@ -96,7 +96,7 @@ describe "T010: Kattis Driver" do
|
|
96
96
|
# user submissions
|
97
97
|
WebMock.stub_request(
|
98
98
|
:get,
|
99
|
-
/^https:\/\/open\.kattis\.com\/users\/test_user
|
99
|
+
/^https:\/\/open\.kattis\.com\/users\/test_user$/
|
100
100
|
)
|
101
101
|
.to_return(
|
102
102
|
:status => 200,
|
@@ -109,11 +109,11 @@ describe "T010: Kattis Driver" do
|
|
109
109
|
# submission 999999
|
110
110
|
WebMock.stub_request(
|
111
111
|
:get,
|
112
|
-
/^https:\/\/open\.kattis\.com\/
|
112
|
+
/^https:\/\/open\.kattis\.com\/submissions\/999999$/
|
113
113
|
)
|
114
114
|
.to_return(
|
115
115
|
:status => 200,
|
116
|
-
:body => read_file('/mock/t010/
|
116
|
+
:body => read_file('/mock/t010/user_submission.html'),
|
117
117
|
:headers => {
|
118
118
|
'Content-Type' => 'text/html',
|
119
119
|
},
|
@@ -121,6 +121,7 @@ describe "T010: Kattis Driver" do
|
|
121
121
|
end
|
122
122
|
|
123
123
|
it "should return commit message" do
|
124
|
+
|
124
125
|
@driver.config.merge!(
|
125
126
|
"user" => "test_user",
|
126
127
|
"password" => "password",
|
@@ -129,7 +130,7 @@ describe "T010: Kattis Driver" do
|
|
129
130
|
:problem_id => '333333',
|
130
131
|
:source => 'test_source.go',
|
131
132
|
)
|
132
|
-
@driver.submit.
|
133
|
+
expect(@driver.submit).to include "Kattis 333333: Wrong Answer"
|
133
134
|
end
|
134
135
|
|
135
136
|
it "check events" do
|
@@ -191,4 +192,3 @@ describe "T010: Kattis Driver" do
|
|
191
192
|
end
|
192
193
|
end
|
193
194
|
end
|
194
|
-
|
@@ -1,20 +1,45 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<div class="
|
7
|
-
<
|
8
|
-
<
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
3
|
+
<body class="">
|
4
|
+
<div id="wrapper">
|
5
|
+
<div class="wrap">
|
6
|
+
<div class="page-content boxed clearfix">
|
7
|
+
<section class="box clearfix main-content">
|
8
|
+
<div class="page-headline clearfix">
|
9
|
+
<div style="text-align:center">
|
10
|
+
<h1>Log in or sign up for Kattis</h1>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<br />
|
14
|
+
<div class="login">
|
15
|
+
<div class="login-left">
|
16
|
+
</div>
|
17
|
+
<div class="login-right">
|
18
|
+
<center>
|
19
|
+
<br /><br />
|
20
|
+
<form action="/login/email" method="post">
|
21
|
+
<input type="hidden" name="csrf_token" value="this is dummy" />
|
22
|
+
<div class="form-group">
|
23
|
+
<label for="user_input">Username or e-mail</label>
|
24
|
+
<input id="user_input" name="user" type="text" class="form-control" />
|
25
|
+
</div>
|
26
|
+
<div class="form-group">
|
27
|
+
<label for="password_input">Password</label>
|
28
|
+
<input id="password_input" name="password" type="password" class="form-control" />
|
29
|
+
</div>
|
30
|
+
<input type="submit" name="submit" class="btn btn-default" value="Submit" />
|
31
|
+
</form>
|
32
|
+
<p>
|
33
|
+
<a href="/forgot-password">I have forgotten my Kattis password</a>
|
34
|
+
<br />
|
35
|
+
<a href="/register">Sign up for a Kattis account</a>
|
36
|
+
</p>
|
37
|
+
</center>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</section>
|
17
41
|
</div>
|
18
42
|
</div>
|
19
|
-
</
|
43
|
+
</div>
|
44
|
+
</body>
|
20
45
|
</html>
|
@@ -1,54 +1,78 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<
|
8
|
-
<
|
9
|
-
<
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<div id=
|
3
|
+
<body class="page-submit">
|
4
|
+
<div id="wrapper">
|
5
|
+
<div class="wrap">
|
6
|
+
<form action="/submit" name="upload" method="post" enctype="multipart/form-data">
|
7
|
+
<div class="page-content single clearfix">
|
8
|
+
<div class="page-headline clearfix">
|
9
|
+
<div class="fl">
|
10
|
+
<h1>Submit Solution</h1>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<input type="hidden" name="csrf_token" value="this is dummy" />
|
14
|
+
<div class="row">
|
15
|
+
<div class="col-md-12">
|
16
|
+
<input type="hidden" name="type" value="files" />
|
17
|
+
<div id="file_dialog">
|
18
|
+
<div id="sub_files" class="file_upload">
|
19
|
+
<div class="message">
|
20
|
+
<div class="upper"><span class="dnd">Drag & drop</span> a file here to upload</div>
|
21
|
+
<div class="lower">(Or click and choose file)</div>
|
22
|
+
</div>
|
23
|
+
<div class="file_display">
|
24
|
+
<h3>Your submission will include the following files:</h3>
|
25
|
+
<ul class="file_list">
|
26
|
+
</ul>
|
27
|
+
</div>
|
28
|
+
<input type="file" name="sub_file[]" id="sub_files_input" multiple />
|
29
|
+
</div>
|
30
|
+
<a class="open-ace" href="#" id="show_editor_button_sub_code" name="editor_visible" type="button">
|
31
|
+
<div class="switch_button">
|
32
|
+
<div class="message">
|
33
|
+
<div class="upper"><span class="dnd">Switch to editor</span></div>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
</a>
|
37
|
+
</div>
|
38
|
+
<div id="editor_dialog" style="display: none">
|
39
|
+
<div id='editor_resize' style='display:none'><div class='editor_wrapper' id='sub_code_box' style='display:none'>
|
18
40
|
<div id='sub_code'></div>
|
19
41
|
</div>
|
20
42
|
</div>
|
21
43
|
<input type='hidden' id='sub_code_submit' name='sub_code' value='' />
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
</
|
50
|
-
|
51
|
-
</form>
|
44
|
+
<a class="open-ace" href="#">
|
45
|
+
<div class="switch_button">
|
46
|
+
<div class="message">
|
47
|
+
<div class="upper"><span class="dnd">Switch to file upload</span></div>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
</a>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
<div class="row" style="margin-top:20px">
|
55
|
+
<div class="form-group col-md-3">
|
56
|
+
<label for="problem_select">Problem ID</label>
|
57
|
+
<input class="form-control selectify-style" id="problem_select" name="problem" type="text" />
|
58
|
+
<p style="margin-top:10px"><a href="/problems">List of problems</a></p>
|
59
|
+
</div>
|
60
|
+
<div class="form-group col-md-3">
|
61
|
+
<label for="language_select">Language</label>
|
62
|
+
<input class="form-control selectify-style" id="language_select" name="lang" type="text" value="1" />
|
63
|
+
</div>
|
64
|
+
<div class="col-md-2">
|
65
|
+
<span id="mainBox"></span>
|
66
|
+
</div>
|
67
|
+
<div class="col-md-offset-1 col-md-3" style="text-align:right;margin-top:25px;">
|
68
|
+
<button id="cancel" name="cancel" type="button" class="btn btn-default" disabled>Cancel</button>
|
69
|
+
<input type="submit" name="submit" class="btn btn-default" value="Submit" />
|
70
|
+
<input type="hidden" name="submit_ctr" value="1" />
|
71
|
+
</div>
|
72
|
+
</div>
|
52
73
|
</div>
|
53
|
-
</
|
54
|
-
</
|
74
|
+
</form>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
</body>
|
78
|
+
</html>
|
@@ -1,28 +1,92 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<div
|
7
|
-
<
|
8
|
-
<
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
3
|
+
<body class="page-profile">
|
4
|
+
<div id="wrapper">
|
5
|
+
<div class="wrap">
|
6
|
+
<div class="page-content boxed clearfix">
|
7
|
+
<section class="box clearfix main-content">
|
8
|
+
<div class="page-headline clearfix">
|
9
|
+
<div class="user-info clearfix">
|
10
|
+
<div class="basic-info clearfix">
|
11
|
+
<img class="user-img" src="/images/site/content/default-userpic-outline.png" />
|
12
|
+
<div class="col-md-8">
|
13
|
+
<div class="fullname row no-padding">
|
14
|
+
<h1>test user</h1>
|
15
|
+
</div>
|
16
|
+
<div class="row">
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
<div class="fr score_wrapper">
|
21
|
+
<div class="score clearfix">
|
22
|
+
<span>Score</span>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</section>
|
28
|
+
</div>
|
29
|
+
<div class="page-content boxed clearfix">
|
30
|
+
<section class="box clearfix main-content">
|
31
|
+
<h2>Submissions</h2>
|
32
|
+
<div class="row" style="margin-bottom: 20px;">
|
33
|
+
<div class="col-md-8">
|
34
|
+
</div>
|
35
|
+
<div class="col-md-4">
|
36
|
+
<form action="" method="get" id="filter">
|
37
|
+
<input type="hidden" id="filter_by" name="filter_by" value="all" />
|
38
|
+
<div class="input-group">
|
39
|
+
<div class="input-group-btn">
|
40
|
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span id="main_filter_text">show all</span> <span class="caret"></span></button>
|
41
|
+
<!-- <select name="filter_by"> -->
|
42
|
+
<ul class="dropdown-menu">
|
43
|
+
<!-- <option value="all">show all</option> -->
|
44
|
+
<li data-value="all"><a href="javascript:void(0);">show all</a></li>
|
45
|
+
<!-- <option value="problem"> -->
|
46
|
+
<li data-value="problem"><a href="javascript:void(0);">problem</a></li>
|
47
|
+
<!-- </option> -->
|
48
|
+
<!-- <option value="group"> -->
|
49
|
+
<li data-value="group"><a href="javascript:void(0);">problem group</a></li>
|
50
|
+
<!-- </option> -->
|
51
|
+
</ul>
|
52
|
+
</div>
|
53
|
+
<input class="form-control" id="filter_by_value" type="text" name="value" size="10" disabled />
|
54
|
+
<span class="input-group-btn">
|
55
|
+
<input class="btn btn-default" type="submit" value="Filter"/>
|
56
|
+
</span>
|
57
|
+
</div>
|
58
|
+
</form>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
<table class="table table-responsive table-kattis table-hover table-submissions table-compact">
|
62
|
+
<thead>
|
63
|
+
<tr>
|
64
|
+
<th class="nowrap submission_id" >ID</th>
|
65
|
+
<th class="nowrap">Date</th>
|
66
|
+
<th class="nowrap">Problem</th>
|
67
|
+
<th class="nowrap">Status</th>
|
68
|
+
<th class="nowrap">CPU</th>
|
69
|
+
<th class="nowrap">Lang</th>
|
70
|
+
</tr>
|
71
|
+
</thead>
|
72
|
+
<tbody>
|
73
|
+
<tr>
|
74
|
+
<td class="submission_id"><a href="/submissions/999999">999999</a></td>
|
75
|
+
<td class="middle">00:00:00</td>
|
76
|
+
<td class="middle"><a href="/problems/333333">Problem Name</a></td>
|
77
|
+
<td class="status rejected middle"><span class="rejected"><i class="glyphicon glyphicon-remove"></i>Wrong Answer</span></td>
|
78
|
+
<td class="runtime middle"></td>
|
79
|
+
<td class="middle">C++</td>
|
80
|
+
</tr>
|
81
|
+
</tbody>
|
82
|
+
</table>
|
83
|
+
<div class="dataTables_paginate paging_two_button" id="problem_list_paginate">
|
84
|
+
<a class="paginate_disabled_previous disabled" role="button" id="problem_list_previous">Previous</a><a href="/users/test_user?page=1" class="paginate_enabled_next enabled" role="button" id="problem_list_next">Next</a>
|
85
|
+
</div>
|
86
|
+
<div class="clearfix"></div>
|
87
|
+
</section>
|
25
88
|
</div>
|
26
89
|
</div>
|
27
|
-
</
|
90
|
+
</div>
|
91
|
+
</body>
|
28
92
|
</html>
|
@@ -0,0 +1,83 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<body class="">
|
4
|
+
<div id="wrapper">
|
5
|
+
<div class="wrap">
|
6
|
+
<div class="page-content boxed clearfix">
|
7
|
+
<section class="box clearfix main-content">
|
8
|
+
<div class="page-headline clearfix">
|
9
|
+
<div class="fl">
|
10
|
+
<h1>Submission</h1>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<table id="judge_table" class="table table-responsive table-kattis table-hover">
|
14
|
+
<thead>
|
15
|
+
<tr>
|
16
|
+
<th class="nowrap submission_id" rowspan="2">ID</th>
|
17
|
+
<th class="nowrap">Date</th>
|
18
|
+
<th class="nowrap">Problem</th>
|
19
|
+
<th class="nowrap">Status</th>
|
20
|
+
<th class="nowrap">CPU</th>
|
21
|
+
<th class="nowrap">Lang</th>
|
22
|
+
</tr>
|
23
|
+
<tr>
|
24
|
+
<th class="nowrap" colspan="5">Test cases</th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
27
|
+
<tbody>
|
28
|
+
<tr>
|
29
|
+
<td class="submission_id" rowspan="2"><a href="/submissions/999999">999999</a></td>
|
30
|
+
<td class="middle">04:46:40</td>
|
31
|
+
<td class="middle"><a href="/problems/aaah">Aaah!</a></td>
|
32
|
+
<td class="status rejected middle"><span class="rejected"><i class="glyphicon glyphicon-remove"></i>Wrong Answer</span></td>
|
33
|
+
<td class="runtime middle"></td>
|
34
|
+
<td class="middle">C++</td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td class="middle" colspan="5"><div class="testcases"></div></td>
|
38
|
+
</tr>
|
39
|
+
</tbody>
|
40
|
+
</table>
|
41
|
+
</section>
|
42
|
+
</div>
|
43
|
+
<div class="page-content boxed clearfix">
|
44
|
+
<section class="box clearfix main-content">
|
45
|
+
<div id="extrainfo"></div>
|
46
|
+
<p>
|
47
|
+
<table class="table table-hover table-kattis filelist" id="submission_files">
|
48
|
+
<caption>
|
49
|
+
<p>
|
50
|
+
Submission contains 1 file:
|
51
|
+
<a class="btn btn-default btn-sm" href="/download/submissiondata?id=999999&type=src">download zip archive</a>
|
52
|
+
</p>
|
53
|
+
</caption>
|
54
|
+
<thead>
|
55
|
+
<tr>
|
56
|
+
<th>Filename</th>
|
57
|
+
<th>Filesize</th>
|
58
|
+
<th>SHA-1 sum</th>
|
59
|
+
<th></th>
|
60
|
+
</tr>
|
61
|
+
</thead>
|
62
|
+
<tbody>
|
63
|
+
<tr>
|
64
|
+
<td>main.cc</td>
|
65
|
+
<td>4711 bytes</td>
|
66
|
+
<td><tt>2fd4e1c67a2d28fced849ee1bb76e7391b93eb12</tt></td>
|
67
|
+
<td>
|
68
|
+
<a class="btn btn-default btn-sm" href="/download/submissiondata?id=999999&type=src&file=main.cc">download</a>
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</tbody>
|
72
|
+
</table>
|
73
|
+
</p>
|
74
|
+
<p><a href="/submissions/999999/resubmit">Edit and resubmit</a> this submission.</p>
|
75
|
+
<h3>main.cc</h3>
|
76
|
+
<div class="submission_code_wrapper">
|
77
|
+
</div>
|
78
|
+
</section>
|
79
|
+
</div>
|
80
|
+
</div>
|
81
|
+
</div>
|
82
|
+
</body>
|
83
|
+
</html>
|
@@ -1,30 +1,83 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<
|
7
|
-
<
|
8
|
-
<
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
3
|
+
<body class="">
|
4
|
+
<div id="wrapper">
|
5
|
+
<div class="wrap">
|
6
|
+
<div class="page-content boxed clearfix">
|
7
|
+
<section class="box clearfix main-content">
|
8
|
+
<div class="page-headline clearfix">
|
9
|
+
<div class="fl">
|
10
|
+
<h1>Submission</h1>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<table id="judge_table" class="table table-responsive table-kattis table-hover">
|
14
|
+
<thead>
|
15
|
+
<tr>
|
16
|
+
<th class="nowrap submission_id" rowspan="2">ID</th>
|
17
|
+
<th class="nowrap">Date</th>
|
18
|
+
<th class="nowrap">Problem</th>
|
19
|
+
<th class="nowrap">Status</th>
|
20
|
+
<th class="nowrap">CPU</th>
|
21
|
+
<th class="nowrap">Lang</th>
|
22
|
+
</tr>
|
23
|
+
<tr>
|
24
|
+
<th class="nowrap" colspan="5">Test cases</th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
27
|
+
<tbody>
|
28
|
+
<tr>
|
29
|
+
<td class="submission_id" rowspan="2"><a href="/submissions/111111">111111</a></td>
|
30
|
+
<td class="middle">04:46:40</td>
|
31
|
+
<td class="middle"><a href="/problems/aaah">Aaah!</a></td>
|
32
|
+
<td class="status accepted middle"><span class="accepted"><i class="glyphicon glyphicon-ok"></i>Accepted</span></td>
|
33
|
+
<td class="runtime middle"></td>
|
34
|
+
<td class="middle">C++</td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td class="middle" colspan="5"><div class="testcases"></div></td>
|
38
|
+
</tr>
|
39
|
+
</tbody>
|
40
|
+
</table>
|
41
|
+
</section>
|
42
|
+
</div>
|
43
|
+
<div class="page-content boxed clearfix">
|
44
|
+
<section class="box clearfix main-content">
|
45
|
+
<div id="extrainfo"></div>
|
46
|
+
<p>
|
47
|
+
<table class="table table-hover table-kattis filelist" id="submission_files">
|
48
|
+
<caption>
|
49
|
+
<p>
|
50
|
+
Submission contains 1 file:
|
51
|
+
<a class="btn btn-default btn-sm" href="/download/submissiondata?id=111111&type=src">download zip archive</a>
|
52
|
+
</p>
|
53
|
+
</caption>
|
54
|
+
<thead>
|
55
|
+
<tr>
|
56
|
+
<th>Filename</th>
|
57
|
+
<th>Filesize</th>
|
58
|
+
<th>SHA-1 sum</th>
|
59
|
+
<th></th>
|
60
|
+
</tr>
|
61
|
+
</thead>
|
62
|
+
<tbody>
|
63
|
+
<tr>
|
64
|
+
<td>main.cc</td>
|
65
|
+
<td>4711 bytes</td>
|
66
|
+
<td><tt>2fd4e1c67a2d28fced849ee1bb76e7391b93eb12</tt></td>
|
67
|
+
<td>
|
68
|
+
<a class="btn btn-default btn-sm" href="/download/submissiondata?id=111111&type=src&file=main.cc">download</a>
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</tbody>
|
72
|
+
</table>
|
73
|
+
</p>
|
74
|
+
<p><a href="/submissions/111111/resubmit">Edit and resubmit</a> this submission.</p>
|
75
|
+
<h3>main.cc</h3>
|
76
|
+
<div class="submission_code_wrapper">
|
77
|
+
</div>
|
78
|
+
</section>
|
79
|
+
</div>
|
28
80
|
</div>
|
29
|
-
</
|
81
|
+
</div>
|
82
|
+
</body>
|
30
83
|
</html>
|
@@ -1,79 +1,83 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<
|
7
|
-
<
|
8
|
-
<
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
"
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
</
|
75
|
-
|
76
|
-
|
3
|
+
<body class="">
|
4
|
+
<div id="wrapper">
|
5
|
+
<div class="wrap">
|
6
|
+
<div class="page-content boxed clearfix">
|
7
|
+
<section class="box clearfix main-content">
|
8
|
+
<div class="page-headline clearfix">
|
9
|
+
<div class="fl">
|
10
|
+
<h1>Submission</h1>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<table id="judge_table" class="table table-responsive table-kattis table-hover">
|
14
|
+
<thead>
|
15
|
+
<tr>
|
16
|
+
<th class="nowrap submission_id" rowspan="2">ID</th>
|
17
|
+
<th class="nowrap">Date</th>
|
18
|
+
<th class="nowrap">Problem</th>
|
19
|
+
<th class="nowrap">Status</th>
|
20
|
+
<th class="nowrap">CPU</th>
|
21
|
+
<th class="nowrap">Lang</th>
|
22
|
+
</tr>
|
23
|
+
<tr>
|
24
|
+
<th class="nowrap" colspan="5">Test cases</th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
27
|
+
<tbody>
|
28
|
+
<tr>
|
29
|
+
<td class="submission_id" rowspan="2"><a href="/submissions/222222">222222</a></td>
|
30
|
+
<td class="middle">04:46:40</td>
|
31
|
+
<td class="middle"><a href="/problems/aaah">Aaah!</a></td>
|
32
|
+
<td class="status rejected middle"><span class="rejected"><i class="glyphicon glyphicon-remove"></i>Wrong Answer</span></td>
|
33
|
+
<td class="runtime middle"></td>
|
34
|
+
<td class="middle">C++</td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td class="middle" colspan="5"><div class="testcases"></div></td>
|
38
|
+
</tr>
|
39
|
+
</tbody>
|
40
|
+
</table>
|
41
|
+
</section>
|
42
|
+
</div>
|
43
|
+
<div class="page-content boxed clearfix">
|
44
|
+
<section class="box clearfix main-content">
|
45
|
+
<div id="extrainfo"></div>
|
46
|
+
<p>
|
47
|
+
<table class="table table-hover table-kattis filelist" id="submission_files">
|
48
|
+
<caption>
|
49
|
+
<p>
|
50
|
+
Submission contains 1 file:
|
51
|
+
<a class="btn btn-default btn-sm" href="/download/submissiondata?id=222222&type=src">download zip archive</a>
|
52
|
+
</p>
|
53
|
+
</caption>
|
54
|
+
<thead>
|
55
|
+
<tr>
|
56
|
+
<th>Filename</th>
|
57
|
+
<th>Filesize</th>
|
58
|
+
<th>SHA-1 sum</th>
|
59
|
+
<th></th>
|
60
|
+
</tr>
|
61
|
+
</thead>
|
62
|
+
<tbody>
|
63
|
+
<tr>
|
64
|
+
<td>main.cc</td>
|
65
|
+
<td>4711 bytes</td>
|
66
|
+
<td><tt>2fd4e1c67a2d28fced849ee1bb76e7391b93eb12</tt></td>
|
67
|
+
<td>
|
68
|
+
<a class="btn btn-default btn-sm" href="/download/submissiondata?id=222222&type=src&file=main.cc">download</a>
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</tbody>
|
72
|
+
</table>
|
73
|
+
</p>
|
74
|
+
<p><a href="/submissions/222222/resubmit">Edit and resubmit</a> this submission.</p>
|
75
|
+
<h3>main.cc</h3>
|
76
|
+
<div class="submission_code_wrapper">
|
77
|
+
</div>
|
78
|
+
</section>
|
79
|
+
</div>
|
77
80
|
</div>
|
78
|
-
</
|
81
|
+
</div>
|
82
|
+
</body>
|
79
83
|
</html>
|
@@ -1,39 +1,108 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
</
|
29
|
-
<
|
30
|
-
<
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
3
|
+
<body class="page-profile">
|
4
|
+
<div id="wrapper">
|
5
|
+
<div class="wrap">
|
6
|
+
<div class="page-content boxed clearfix">
|
7
|
+
<section class="box clearfix main-content">
|
8
|
+
<div class="page-headline clearfix">
|
9
|
+
<div class="user-info clearfix">
|
10
|
+
<div class="basic-info clearfix">
|
11
|
+
<img class="user-img" src="/images/site/content/default-userpic-outline.png" />
|
12
|
+
<div class="col-md-8">
|
13
|
+
<div class="fullname row no-padding">
|
14
|
+
<h1>test user</h1>
|
15
|
+
</div>
|
16
|
+
<div class="row">
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
<div class="fr score_wrapper">
|
21
|
+
<div class="score clearfix">
|
22
|
+
<span>Score</span>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</section>
|
28
|
+
</div>
|
29
|
+
<div class="page-content boxed clearfix">
|
30
|
+
<section class="box clearfix main-content">
|
31
|
+
<h2>Submissions</h2>
|
32
|
+
<div class="row" style="margin-bottom: 20px;">
|
33
|
+
<div class="col-md-8">
|
34
|
+
</div>
|
35
|
+
<div class="col-md-4">
|
36
|
+
<form action="" method="get" id="filter">
|
37
|
+
<input type="hidden" id="filter_by" name="filter_by" value="all" />
|
38
|
+
<div class="input-group">
|
39
|
+
<div class="input-group-btn">
|
40
|
+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span id="main_filter_text">show all</span> <span class="caret"></span></button>
|
41
|
+
<!-- <select name="filter_by"> -->
|
42
|
+
<ul class="dropdown-menu">
|
43
|
+
<!-- <option value="all">show all</option> -->
|
44
|
+
<li data-value="all"><a href="javascript:void(0);">show all</a></li>
|
45
|
+
<!-- <option value="problem"> -->
|
46
|
+
<li data-value="problem"><a href="javascript:void(0);">problem</a></li>
|
47
|
+
<!-- </option> -->
|
48
|
+
<!-- <option value="group"> -->
|
49
|
+
<li data-value="group"><a href="javascript:void(0);">problem group</a></li>
|
50
|
+
<!-- </option> -->
|
51
|
+
</ul>
|
52
|
+
</div>
|
53
|
+
<input class="form-control" id="filter_by_value" type="text" name="value" size="10" disabled />
|
54
|
+
<span class="input-group-btn">
|
55
|
+
<input class="btn btn-default" type="submit" value="Filter"/>
|
56
|
+
</span>
|
57
|
+
</div>
|
58
|
+
</form>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
<table class="table table-responsive table-kattis table-hover table-submissions table-compact">
|
62
|
+
<thead>
|
63
|
+
<tr>
|
64
|
+
<th class="nowrap submission_id" >ID</th>
|
65
|
+
<th class="nowrap">Date</th>
|
66
|
+
<th class="nowrap">Problem</th>
|
67
|
+
<th class="nowrap">Status</th>
|
68
|
+
<th class="nowrap">CPU</th>
|
69
|
+
<th class="nowrap">Lang</th>
|
70
|
+
</tr>
|
71
|
+
</thead>
|
72
|
+
<tbody>
|
73
|
+
<tr>
|
74
|
+
<td class="submission_id"><a href="/submissions/111111">111111</a></td>
|
75
|
+
<td class="middle">04:46:40</td>
|
76
|
+
<td class="middle"><a href="/problems/aaah">Aaah!</a></td>
|
77
|
+
<td class="status rejected middle"><span class="accepted"><i class="glyphicon glyphicon-ok"></i>Accepted</span></td>
|
78
|
+
<td class="runtime middle"></td>
|
79
|
+
<td class="middle">C++</td>
|
80
|
+
</tr>
|
81
|
+
<tr>
|
82
|
+
<td class="submission_id"><a href="/submissions/222222">222222</a></td>
|
83
|
+
<td class="middle">04:43:57</td>
|
84
|
+
<td class="middle"><a href="/problems/aaah">Aaah!</a></td>
|
85
|
+
<td class="status rejected middle"><span class="rejected"><i class="glyphicon glyphicon-remove"></i>Wrong Answer</span></td>
|
86
|
+
<td class="runtime middle"></td>
|
87
|
+
<td class="middle">C++</td>
|
88
|
+
</tr>
|
89
|
+
<tr>
|
90
|
+
<td class="submission_id"><a href="/submissions/333333">333333</a></td>
|
91
|
+
<td class="middle">04:42:39</td>
|
92
|
+
<td class="middle"><a href="/problems/aaah">Aaah!</a></td>
|
93
|
+
<td class="status rejected middle"><span class="rejected"><i class="glyphicon glyphicon-remove"></i>Wrong Answer</span></td>
|
94
|
+
<td class="runtime middle"></td>
|
95
|
+
<td class="middle">C++</td>
|
96
|
+
</tr>
|
97
|
+
</tbody>
|
98
|
+
</table>
|
99
|
+
<div class="dataTables_paginate paging_two_button" id="problem_list_paginate">
|
100
|
+
<a class="paginate_disabled_previous disabled" role="button" id="problem_list_previous">Previous</a><a href="/users/test_user?page=1" class="paginate_enabled_next enabled" role="button" id="problem_list_next">Next</a>
|
101
|
+
</div>
|
102
|
+
<div class="clearfix"></div>
|
103
|
+
</section>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
</body>
|
39
108
|
</html>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-contest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroyuki Sano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|
@@ -228,6 +228,7 @@ files:
|
|
228
228
|
- spec/mock/t010/open_kattis_com_login.html
|
229
229
|
- spec/mock/t010/open_kattis_com_submit.html
|
230
230
|
- spec/mock/t010/open_kattis_com_user_submissions.html
|
231
|
+
- spec/mock/t010/user_submission.html
|
231
232
|
- spec/mock/t010/user_submission_111111.html
|
232
233
|
- spec/mock/t010/user_submission_222222.html
|
233
234
|
- spec/mock/t010/user_submissions.html
|
@@ -254,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
255
|
version: '0'
|
255
256
|
requirements: []
|
256
257
|
rubyforge_project:
|
257
|
-
rubygems_version: 2.
|
258
|
+
rubygems_version: 2.3.0
|
258
259
|
signing_key:
|
259
260
|
specification_version: 4
|
260
261
|
summary: The Git Extension for online judges (Codeforces, etc...)
|
@@ -293,6 +294,7 @@ test_files:
|
|
293
294
|
- spec/mock/t010/open_kattis_com_login.html
|
294
295
|
- spec/mock/t010/open_kattis_com_submit.html
|
295
296
|
- spec/mock/t010/open_kattis_com_user_submissions.html
|
297
|
+
- spec/mock/t010/user_submission.html
|
296
298
|
- spec/mock/t010/user_submission_111111.html
|
297
299
|
- spec/mock/t010/user_submission_222222.html
|
298
300
|
- spec/mock/t010/user_submissions.html
|