at_coder_friends 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -2
- data/Gemfile.lock +2 -2
- data/config/default.yml +146 -72
- data/docs/CONFIGURATION.md +215 -73
- data/lib/at_coder_friends/scraping/agent.rb +10 -0
- data/lib/at_coder_friends/scraping/custom_test.rb +4 -3
- data/lib/at_coder_friends/scraping/submission.rb +4 -3
- data/lib/at_coder_friends/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbf2c089d89bcf9e3a8acf248715fdcaf59cb24f
|
4
|
+
data.tar.gz: baa90cc2da792563e25da6f7f33e55d479e3c58e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dc062e9b96728474290d66d65b1434abb4dda89c83004e30dcab3e59045427d260e779ba6117460c0357b13aa002a179c0175d6083e6d77308d2e0f19830624
|
7
|
+
data.tar.gz: 7115e84fda7ec09bb036ad13912c871780149ec91e5ccabfb30be2326e9781006270805767aa55e700d632e9766c00b884a7d5b9f13e9e88287dc9df59cc7453
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,22 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
3
|
## master (unreleased)
|
4
|
-
|
4
|
+
|
5
|
+
## 0.6.5 (2020-04-15)
|
6
|
+
### Added
|
7
|
+
- multiple language version support.
|
8
|
+
|
9
|
+
## 0.6.4 (2020-03-08)
|
10
|
+
### Added
|
5
11
|
- Modulo RegExp pattern.
|
6
|
-
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
- minor changes in ERBs.
|
15
|
+
- allow underscores in problem ID.
|
16
|
+
- allow whitespaces in data file path.
|
17
|
+
|
18
|
+
### Deleted
|
19
|
+
- remove tasks folder from installation
|
7
20
|
|
8
21
|
## 0.6.3 (2020-01-05)
|
9
22
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
at_coder_friends (0.6.
|
4
|
+
at_coder_friends (0.6.5)
|
5
5
|
colorize (~> 0.8.1)
|
6
6
|
launchy (~> 2.4.3)
|
7
7
|
mechanize (~> 2.0)
|
@@ -68,7 +68,7 @@ GEM
|
|
68
68
|
unf (0.1.4)
|
69
69
|
unf_ext
|
70
70
|
unf_ext (0.0.7.6)
|
71
|
-
webmock (3.8.
|
71
|
+
webmock (3.8.3)
|
72
72
|
addressable (>= 2.3.6)
|
73
73
|
crack (>= 0.3.2)
|
74
74
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/config/default.yml
CHANGED
@@ -4,88 +4,162 @@ generators:
|
|
4
4
|
- RubyBuiltin
|
5
5
|
- CxxBuiltin
|
6
6
|
ext_settings:
|
7
|
-
'awk':
|
8
|
-
submit_lang:
|
9
|
-
|
10
|
-
|
11
|
-
'
|
12
|
-
submit_lang:
|
7
|
+
'awk': # Awk (mawk)
|
8
|
+
submit_lang:
|
9
|
+
- '4009'
|
10
|
+
- '3506'
|
11
|
+
'bf': # Brainfuck
|
12
|
+
submit_lang:
|
13
|
+
- '4062'
|
14
|
+
- '3507'
|
15
|
+
'c': # C (GCC)
|
16
|
+
submit_lang:
|
17
|
+
- '4001'
|
18
|
+
- '3002'
|
13
19
|
test_cmd:
|
14
20
|
default: '"{dir}/{base}"'
|
15
21
|
windows: '"{dir}/{base}.exe"'
|
16
|
-
'cbl':
|
17
|
-
submit_lang:
|
18
|
-
|
19
|
-
|
20
|
-
'
|
21
|
-
submit_lang:
|
22
|
-
|
23
|
-
|
22
|
+
'cbl': # COBOL - Free
|
23
|
+
submit_lang:
|
24
|
+
- '4061'
|
25
|
+
- '3526'
|
26
|
+
'clj': # Clojure
|
27
|
+
submit_lang:
|
28
|
+
- '4013'
|
29
|
+
- '3007'
|
30
|
+
'cr': # Crystal
|
31
|
+
submit_lang:
|
32
|
+
- '4014'
|
33
|
+
- '3511'
|
34
|
+
'cs': # C# (Mono-mcs)
|
35
|
+
submit_lang:
|
36
|
+
- '4011'
|
37
|
+
- '3006'
|
24
38
|
test_cmd:
|
25
39
|
default: 'mono "{dir}/{base}.exe"'
|
26
40
|
windows: '"{dir}/{base}.exe"'
|
27
|
-
'cxx':
|
28
|
-
submit_lang:
|
41
|
+
'cxx': # C++ (GCC)
|
42
|
+
submit_lang:
|
43
|
+
- '4003'
|
44
|
+
- '3003'
|
29
45
|
test_cmd:
|
30
46
|
default: '"{dir}/{base}"'
|
31
47
|
windows: '"{dir}/{base}.exe"'
|
32
|
-
'd':
|
33
|
-
submit_lang:
|
34
|
-
|
35
|
-
|
36
|
-
'
|
37
|
-
submit_lang: '
|
38
|
-
'
|
39
|
-
submit_lang:
|
40
|
-
|
41
|
-
|
42
|
-
'
|
43
|
-
submit_lang:
|
48
|
+
'd': # D (DMD64)
|
49
|
+
submit_lang:
|
50
|
+
- '4015'
|
51
|
+
- '3009'
|
52
|
+
'dart': # Dart
|
53
|
+
submit_lang: '4018'
|
54
|
+
'f90': # Fortran (gfortran)
|
55
|
+
submit_lang:
|
56
|
+
- '4025'
|
57
|
+
- '3012'
|
58
|
+
'fs': # F# (Mono)
|
59
|
+
submit_lang:
|
60
|
+
- '4023'
|
61
|
+
- '3512'
|
62
|
+
'go': # Go
|
63
|
+
submit_lang:
|
64
|
+
- '4026'
|
65
|
+
- '3013'
|
66
|
+
'hs': # Haskell (GHC)
|
67
|
+
submit_lang:
|
68
|
+
- '4027'
|
69
|
+
- '3014'
|
70
|
+
'java': # Java (OpenJDK)
|
71
|
+
submit_lang:
|
72
|
+
- '4005'
|
73
|
+
- '3016'
|
44
74
|
test_cmd:
|
45
75
|
default: 'java -cp "{dir}" Main'
|
46
|
-
'jl':
|
47
|
-
submit_lang:
|
48
|
-
|
49
|
-
|
50
|
-
'
|
51
|
-
submit_lang:
|
52
|
-
|
53
|
-
|
54
|
-
'
|
55
|
-
submit_lang:
|
56
|
-
|
57
|
-
|
58
|
-
'
|
59
|
-
submit_lang:
|
60
|
-
|
61
|
-
|
62
|
-
'
|
63
|
-
submit_lang:
|
64
|
-
|
65
|
-
|
66
|
-
'
|
67
|
-
submit_lang:
|
68
|
-
|
69
|
-
|
70
|
-
'
|
71
|
-
submit_lang:
|
76
|
+
'jl': # Julia
|
77
|
+
submit_lang:
|
78
|
+
- '4031'
|
79
|
+
- '3518'
|
80
|
+
'js': # JavaScript (node.js)
|
81
|
+
submit_lang:
|
82
|
+
- '4030'
|
83
|
+
- '3017'
|
84
|
+
'kt': # Kotlin
|
85
|
+
submit_lang:
|
86
|
+
- '4032'
|
87
|
+
- '3523'
|
88
|
+
'lisp': # Common Lisp
|
89
|
+
submit_lang:
|
90
|
+
- '4038'
|
91
|
+
- '3008'
|
92
|
+
'lua': # LuaJIT
|
93
|
+
submit_lang:
|
94
|
+
- '4034'
|
95
|
+
- '3515'
|
96
|
+
'm': # Octave
|
97
|
+
submit_lang:
|
98
|
+
- '4040'
|
99
|
+
- '3519'
|
100
|
+
'ml': # OCaml
|
101
|
+
submit_lang:
|
102
|
+
- '4039'
|
103
|
+
- '3018'
|
104
|
+
'nim': # Nim
|
105
|
+
submit_lang:
|
106
|
+
- '4036'
|
107
|
+
- '3520'
|
108
|
+
'pas': # Pascal (FPC)
|
109
|
+
submit_lang:
|
110
|
+
- '4041'
|
111
|
+
- '3019'
|
112
|
+
'php': # PHP7
|
113
|
+
submit_lang:
|
114
|
+
- '4044'
|
115
|
+
- '3524'
|
116
|
+
'pl': # Perl
|
117
|
+
submit_lang:
|
118
|
+
- '4042'
|
119
|
+
- '3020'
|
120
|
+
'py': # Python3
|
121
|
+
submit_lang:
|
122
|
+
- '4006'
|
123
|
+
- '3023'
|
124
|
+
'rb': # Ruby
|
125
|
+
submit_lang:
|
126
|
+
- '4049'
|
127
|
+
- '3024'
|
72
128
|
test_cmd:
|
73
129
|
default: 'ruby "{dir}/{base}.rb"'
|
74
|
-
'rs':
|
75
|
-
submit_lang:
|
76
|
-
|
77
|
-
|
78
|
-
'
|
79
|
-
submit_lang:
|
80
|
-
|
81
|
-
|
82
|
-
'
|
83
|
-
submit_lang:
|
84
|
-
|
85
|
-
|
86
|
-
'
|
87
|
-
submit_lang:
|
88
|
-
|
89
|
-
|
90
|
-
'
|
91
|
-
submit_lang:
|
130
|
+
'rs': # Rust
|
131
|
+
submit_lang:
|
132
|
+
- '4050'
|
133
|
+
- '3504'
|
134
|
+
'scala': # Scala
|
135
|
+
submit_lang:
|
136
|
+
- '4051'
|
137
|
+
- '3025'
|
138
|
+
'scm': # Scheme (Gauche)
|
139
|
+
submit_lang:
|
140
|
+
- '4053'
|
141
|
+
- '3026'
|
142
|
+
'sed': # Sed (GNU sed)
|
143
|
+
submit_lang:
|
144
|
+
- '4066'
|
145
|
+
- '3505'
|
146
|
+
'sh': # Bash (GNU bash)
|
147
|
+
submit_lang:
|
148
|
+
- '4007'
|
149
|
+
- '3001'
|
150
|
+
'swift': # Swift
|
151
|
+
submit_lang:
|
152
|
+
- '4055'
|
153
|
+
- '3503'
|
154
|
+
'ts': # TypeScript
|
155
|
+
submit_lang:
|
156
|
+
- '4057'
|
157
|
+
- '3521'
|
158
|
+
'txt': # Text (cat)
|
159
|
+
submit_lang:
|
160
|
+
- '4056'
|
161
|
+
- '3027'
|
162
|
+
'vb': # Visual Basic (Mono)
|
163
|
+
submit_lang:
|
164
|
+
- '4058'
|
165
|
+
- '3028'
|
data/docs/CONFIGURATION.md
CHANGED
@@ -29,91 +29,165 @@ generators:
|
|
29
29
|
- RubyBuiltin
|
30
30
|
- CxxBuiltin
|
31
31
|
ext_settings:
|
32
|
-
'awk':
|
33
|
-
submit_lang:
|
34
|
-
|
35
|
-
|
36
|
-
'
|
37
|
-
submit_lang:
|
32
|
+
'awk': # Awk (mawk)
|
33
|
+
submit_lang:
|
34
|
+
- '4009'
|
35
|
+
- '3506'
|
36
|
+
'bf': # Brainfuck
|
37
|
+
submit_lang:
|
38
|
+
- '4062'
|
39
|
+
- '3507'
|
40
|
+
'c': # C (GCC)
|
41
|
+
submit_lang:
|
42
|
+
- '4001'
|
43
|
+
- '3002'
|
38
44
|
test_cmd:
|
39
45
|
default: '"{dir}/{base}"'
|
40
46
|
windows: '"{dir}/{base}.exe"'
|
41
|
-
'cbl':
|
42
|
-
submit_lang:
|
43
|
-
|
44
|
-
|
45
|
-
'
|
46
|
-
submit_lang:
|
47
|
-
|
48
|
-
|
47
|
+
'cbl': # COBOL - Free
|
48
|
+
submit_lang:
|
49
|
+
- '4061'
|
50
|
+
- '3526'
|
51
|
+
'clj': # Clojure
|
52
|
+
submit_lang:
|
53
|
+
- '4013'
|
54
|
+
- '3007'
|
55
|
+
'cr': # Crystal
|
56
|
+
submit_lang:
|
57
|
+
- '4014'
|
58
|
+
- '3511'
|
59
|
+
'cs': # C# (Mono-mcs)
|
60
|
+
submit_lang:
|
61
|
+
- '4011'
|
62
|
+
- '3006'
|
49
63
|
test_cmd:
|
50
64
|
default: 'mono "{dir}/{base}.exe"'
|
51
65
|
windows: '"{dir}/{base}.exe"'
|
52
|
-
'cxx':
|
53
|
-
submit_lang:
|
66
|
+
'cxx': # C++ (GCC)
|
67
|
+
submit_lang:
|
68
|
+
- '4003'
|
69
|
+
- '3003'
|
54
70
|
test_cmd:
|
55
71
|
default: '"{dir}/{base}"'
|
56
72
|
windows: '"{dir}/{base}.exe"'
|
57
|
-
'd':
|
58
|
-
submit_lang:
|
59
|
-
|
60
|
-
|
61
|
-
'
|
62
|
-
submit_lang: '
|
63
|
-
'
|
64
|
-
submit_lang:
|
65
|
-
|
66
|
-
|
67
|
-
'
|
68
|
-
submit_lang:
|
73
|
+
'd': # D (DMD64)
|
74
|
+
submit_lang:
|
75
|
+
- '4015'
|
76
|
+
- '3009'
|
77
|
+
'dart': # Dart
|
78
|
+
submit_lang: '4018'
|
79
|
+
'f90': # Fortran (gfortran)
|
80
|
+
submit_lang:
|
81
|
+
- '4025'
|
82
|
+
- '3012'
|
83
|
+
'fs': # F# (Mono)
|
84
|
+
submit_lang:
|
85
|
+
- '4023'
|
86
|
+
- '3512'
|
87
|
+
'go': # Go
|
88
|
+
submit_lang:
|
89
|
+
- '4026'
|
90
|
+
- '3013'
|
91
|
+
'hs': # Haskell (GHC)
|
92
|
+
submit_lang:
|
93
|
+
- '4027'
|
94
|
+
- '3014'
|
95
|
+
'java': # Java (OpenJDK)
|
96
|
+
submit_lang:
|
97
|
+
- '4005'
|
98
|
+
- '3016'
|
69
99
|
test_cmd:
|
70
100
|
default: 'java -cp "{dir}" Main'
|
71
|
-
'jl':
|
72
|
-
submit_lang:
|
73
|
-
|
74
|
-
|
75
|
-
'
|
76
|
-
submit_lang:
|
77
|
-
|
78
|
-
|
79
|
-
'
|
80
|
-
submit_lang:
|
81
|
-
|
82
|
-
|
83
|
-
'
|
84
|
-
submit_lang:
|
85
|
-
|
86
|
-
|
87
|
-
'
|
88
|
-
submit_lang:
|
89
|
-
|
90
|
-
|
91
|
-
'
|
92
|
-
submit_lang:
|
93
|
-
|
94
|
-
|
95
|
-
'
|
96
|
-
submit_lang:
|
101
|
+
'jl': # Julia
|
102
|
+
submit_lang:
|
103
|
+
- '4031'
|
104
|
+
- '3518'
|
105
|
+
'js': # JavaScript (node.js)
|
106
|
+
submit_lang:
|
107
|
+
- '4030'
|
108
|
+
- '3017'
|
109
|
+
'kt': # Kotlin
|
110
|
+
submit_lang:
|
111
|
+
- '4032'
|
112
|
+
- '3523'
|
113
|
+
'lisp': # Common Lisp
|
114
|
+
submit_lang:
|
115
|
+
- '4038'
|
116
|
+
- '3008'
|
117
|
+
'lua': # LuaJIT
|
118
|
+
submit_lang:
|
119
|
+
- '4034'
|
120
|
+
- '3515'
|
121
|
+
'm': # Octave
|
122
|
+
submit_lang:
|
123
|
+
- '4040'
|
124
|
+
- '3519'
|
125
|
+
'ml': # OCaml
|
126
|
+
submit_lang:
|
127
|
+
- '4039'
|
128
|
+
- '3018'
|
129
|
+
'nim': # Nim
|
130
|
+
submit_lang:
|
131
|
+
- '4036'
|
132
|
+
- '3520'
|
133
|
+
'pas': # Pascal (FPC)
|
134
|
+
submit_lang:
|
135
|
+
- '4041'
|
136
|
+
- '3019'
|
137
|
+
'php': # PHP7
|
138
|
+
submit_lang:
|
139
|
+
- '4044'
|
140
|
+
- '3524'
|
141
|
+
'pl': # Perl
|
142
|
+
submit_lang:
|
143
|
+
- '4042'
|
144
|
+
- '3020'
|
145
|
+
'py': # Python3
|
146
|
+
submit_lang:
|
147
|
+
- '4006'
|
148
|
+
- '3023'
|
149
|
+
'rb': # Ruby
|
150
|
+
submit_lang:
|
151
|
+
- '4049'
|
152
|
+
- '3024'
|
97
153
|
test_cmd:
|
98
154
|
default: 'ruby "{dir}/{base}.rb"'
|
99
|
-
'rs':
|
100
|
-
submit_lang:
|
101
|
-
|
102
|
-
|
103
|
-
'
|
104
|
-
submit_lang:
|
105
|
-
|
106
|
-
|
107
|
-
'
|
108
|
-
submit_lang:
|
109
|
-
|
110
|
-
|
111
|
-
'
|
112
|
-
submit_lang:
|
113
|
-
|
114
|
-
|
115
|
-
'
|
116
|
-
submit_lang:
|
155
|
+
'rs': # Rust
|
156
|
+
submit_lang:
|
157
|
+
- '4050'
|
158
|
+
- '3504'
|
159
|
+
'scala': # Scala
|
160
|
+
submit_lang:
|
161
|
+
- '4051'
|
162
|
+
- '3025'
|
163
|
+
'scm': # Scheme (Gauche)
|
164
|
+
submit_lang:
|
165
|
+
- '4053'
|
166
|
+
- '3026'
|
167
|
+
'sed': # Sed (GNU sed)
|
168
|
+
submit_lang:
|
169
|
+
- '4066'
|
170
|
+
- '3505'
|
171
|
+
'sh': # Bash (GNU bash)
|
172
|
+
submit_lang:
|
173
|
+
- '4007'
|
174
|
+
- '3001'
|
175
|
+
'swift': # Swift
|
176
|
+
submit_lang:
|
177
|
+
- '4055'
|
178
|
+
- '3503'
|
179
|
+
'ts': # TypeScript
|
180
|
+
submit_lang:
|
181
|
+
- '4057'
|
182
|
+
- '3521'
|
183
|
+
'txt': # Text (cat)
|
184
|
+
submit_lang:
|
185
|
+
- '4056'
|
186
|
+
- '3027'
|
187
|
+
'vb': # Visual Basic (Mono)
|
188
|
+
submit_lang:
|
189
|
+
- '4058'
|
190
|
+
- '3028'
|
117
191
|
```
|
118
192
|
|
119
193
|
## Configuration options
|
@@ -205,7 +279,7 @@ ext_settings:
|
|
205
279
|
|---------|-------------|---------|
|
206
280
|
|default_template|Source template file path|[/templates/cxx_builtin.cxx.erb](/templates/cxx_builtin.cxx.erb)|
|
207
281
|
|
208
|
-
### Language ID list (
|
282
|
+
### Language ID list (2020/04/14)
|
209
283
|
|
210
284
|
| Language ID | Description |
|
211
285
|
|-------------|-------------|
|
@@ -265,6 +339,74 @@ ext_settings:
|
|
265
339
|
|3524|PHP7 (7.0.15)|
|
266
340
|
|3525|COBOL - Fixed (OpenCOBOL 1.1.0)|
|
267
341
|
|3526|COBOL - Free (OpenCOBOL 1.1.0)|
|
342
|
+
|4001|C (GCC 9.2.1)|
|
343
|
+
|4002|C (Clang 10.0.0)|
|
344
|
+
|4003|C++ (GCC 9.2.1)|
|
345
|
+
|4004|C++ (Clang 10.0.0)|
|
346
|
+
|4005|Java (OpenJDK 11.0.6)|
|
347
|
+
|4006|Python (3.8.2)|
|
348
|
+
|4007|Bash (5.0.11)|
|
349
|
+
|4008|bc (1.07.1)|
|
350
|
+
|4009|Awk (GNU Awk 4.1.4)|
|
351
|
+
|4010|C# (.NET Core 3.1.201)|
|
352
|
+
|4011|C# (Mono-mcs 6.8.0.105)|
|
353
|
+
|4012|C# (Mono-csc 3.5.0)|
|
354
|
+
|4013|Clojure (1.10.1.536)|
|
355
|
+
|4014|Crystal (0.33.0)|
|
356
|
+
|4015|D (DMD 2.091.0)|
|
357
|
+
|4016|D (GDC 9.2.1)|
|
358
|
+
|4017|D (LDC 1.20.1)|
|
359
|
+
|4018|Dart (2.7.2)|
|
360
|
+
|4019|dc (1.4.1)|
|
361
|
+
|4020|Erlang (22.3)|
|
362
|
+
|4021|Elixir (1.10.2)|
|
363
|
+
|4022|F# (.NET Core 3.1.201)|
|
364
|
+
|4023|F# (Mono 10.2.3)|
|
365
|
+
|4024|Forth (gforth 0.7.3)|
|
366
|
+
|4025|Fortran(GNU Fortran 9.2.1)|
|
367
|
+
|4026|Go (1.14.1)|
|
368
|
+
|4027|Haskell (GHC 8.8.3)|
|
369
|
+
|4028|Haxe (4.0.3); js|
|
370
|
+
|4029|Haxe (4.0.3); Java|
|
371
|
+
|4030|JavaScript (Node.js 12.16.1)|
|
372
|
+
|4031|Julia (1.4.0)|
|
373
|
+
|4032|Kotlin (1.3.71)|
|
374
|
+
|4033|Lua (Lua 5.3.5)|
|
375
|
+
|4034|Lua (LuaJIT 2.1.0)|
|
376
|
+
|4035|Dash (0.5.8)|
|
377
|
+
|4036|Nim (1.0.6)|
|
378
|
+
|4037|Objective-C (Clang 10.0.0)|
|
379
|
+
|4038|Common Lisp (SBCL 2.0.3)|
|
380
|
+
|4039|OCaml (4.10.0)|
|
381
|
+
|4040|Octave (5.2.0)|
|
382
|
+
|4041|Pascal (FPC 3.0.4)|
|
383
|
+
|4042|Perl (5.26.1)|
|
384
|
+
|4043|Raku (Rakudo 2020.02.1)|
|
385
|
+
|4044|PHP (7.4.4)|
|
386
|
+
|4045|Prolog (SWI-Prolog 8.0.3)|
|
387
|
+
|4046|PyPy2 (7.3.0)|
|
388
|
+
|4047|PyPy3 (7.3.0)|
|
389
|
+
|4048|Racket (7.6)|
|
390
|
+
|4049|Ruby (2.7.1)|
|
391
|
+
|4050|Rust (1.42.0)|
|
392
|
+
|4051|Scala (2.13.1)|
|
393
|
+
|4052|Java (OpenJDK 1.8.0)|
|
394
|
+
|4053|Scheme (Gauche 0.9.9)|
|
395
|
+
|4054|Standard ML (MLton 20130715)|
|
396
|
+
|4055|Swift (5.2.1)|
|
397
|
+
|4056|Text (cat 8.28)|
|
398
|
+
|4057|TypeScript (3.8)|
|
399
|
+
|4058|Visual Basic (.NET Core 3.1.101)|
|
400
|
+
|4059|Zsh (5.4.2)|
|
401
|
+
|4060|COBOL - Fixed (OpenCOBOL 1.1.0)|
|
402
|
+
|4061|COBOL - Free (OpenCOBOL 1.1.0)|
|
403
|
+
|4062|Brainfuck (bf 20041219)|
|
404
|
+
|4063|Ada2012 (GNAT 9.2.1)|
|
405
|
+
|4064|Unlambda (2.0.0)|
|
406
|
+
|4065|Cython (0.29.16)|
|
407
|
+
|4066|Sed (4.4)|
|
408
|
+
|4067|Vim (8.2.0460)|
|
409
|
+
|
268
410
|
|
269
411
|
### Variables in test_cmd string
|
270
412
|
|
@@ -40,6 +40,10 @@ module AtCoderFriends
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def lang_id(ext)
|
43
|
+
[lang_id_conf(ext)].flatten
|
44
|
+
end
|
45
|
+
|
46
|
+
def lang_id_conf(ext)
|
43
47
|
ctx.config.dig('ext_settings', ext, 'submit_lang') || (
|
44
48
|
msg = <<~MSG
|
45
49
|
submit_lang for .#{ext} is not specified.
|
@@ -50,6 +54,12 @@ module AtCoderFriends
|
|
50
54
|
)
|
51
55
|
end
|
52
56
|
|
57
|
+
def find_lang(page, langs)
|
58
|
+
langs.find do |lng|
|
59
|
+
page.search("div#select-lang select option[value=#{lng}]")[0]
|
60
|
+
end || langs[0]
|
61
|
+
end
|
62
|
+
|
53
63
|
def lang_list_txt
|
54
64
|
lang_list
|
55
65
|
&.map { |opt| "#{opt[:v]} - #{opt[:t]}" }
|
@@ -8,16 +8,17 @@ module AtCoderFriends
|
|
8
8
|
module CustomTest
|
9
9
|
def code_test(infile)
|
10
10
|
path, _dir, _prg, _base, ext, _q = ctx.path_info.components
|
11
|
-
|
11
|
+
langs = lang_id(ext)
|
12
12
|
src = File.read(path, encoding: Encoding::UTF_8)
|
13
13
|
data = File.read(infile)
|
14
14
|
|
15
|
-
post_custom_test(
|
15
|
+
post_custom_test(langs, src, data)
|
16
16
|
check_custom_test
|
17
17
|
end
|
18
18
|
|
19
|
-
def post_custom_test(
|
19
|
+
def post_custom_test(langs, src, data)
|
20
20
|
page = fetch_with_auth(contest_url('custom_test'))
|
21
|
+
lang = find_lang(page, langs)
|
21
22
|
script = page.search('script').text
|
22
23
|
csrf_token = script.scan(/var csrfToken = "(.*)"/)[0][0]
|
23
24
|
|
@@ -7,14 +7,15 @@ module AtCoderFriends
|
|
7
7
|
def submit
|
8
8
|
path, _dir, prg, _base, ext, q = ctx.path_info.components
|
9
9
|
puts "***** submit #{prg} *****"
|
10
|
-
|
10
|
+
langs = lang_id(ext)
|
11
11
|
src = File.read(path, encoding: Encoding::UTF_8)
|
12
12
|
|
13
|
-
post_submit(q,
|
13
|
+
post_submit(q, langs, src)
|
14
14
|
end
|
15
15
|
|
16
|
-
def post_submit(q,
|
16
|
+
def post_submit(q, langs, src)
|
17
17
|
page = fetch_with_auth(contest_url('submit'))
|
18
|
+
lang = find_lang(page, langs)
|
18
19
|
form = page.forms[1]
|
19
20
|
form.field_with(name: 'data.TaskScreenName') do |sel|
|
20
21
|
option = sel.options.find { |op| op.text.start_with?(q) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: at_coder_friends
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nejiko96
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|