at_coder_friends 0.6.3 → 0.6.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +3 -2
- data/.travis.yml +1 -3
- data/CHANGELOG.md +37 -0
- data/Gemfile.lock +53 -48
- data/README.md +1 -1
- data/at_coder_friends.gemspec +5 -7
- data/config/default.yml +146 -72
- data/docs/CONFIGURATION.md +222 -136
- data/lib/at_coder_friends.rb +1 -0
- data/lib/at_coder_friends/cli.rb +8 -0
- data/lib/at_coder_friends/config_loader.rb +11 -3
- data/lib/at_coder_friends/context.rb +10 -6
- data/lib/at_coder_friends/emitter.rb +2 -2
- data/lib/at_coder_friends/generator/base.rb +3 -2
- data/lib/at_coder_friends/generator/main.rb +2 -1
- data/lib/at_coder_friends/parser/constraints.rb +1 -0
- data/lib/at_coder_friends/parser/input_format.rb +2 -0
- data/lib/at_coder_friends/parser/input_type.rb +3 -2
- data/lib/at_coder_friends/parser/modulo.rb +1 -1
- data/lib/at_coder_friends/parser/sections.rb +3 -3
- data/lib/at_coder_friends/path_info.rb +51 -0
- data/lib/at_coder_friends/path_util.rb +0 -31
- data/lib/at_coder_friends/scraping/agent.rb +11 -2
- data/lib/at_coder_friends/scraping/custom_test.rb +5 -6
- data/lib/at_coder_friends/scraping/submission.rb +6 -7
- data/lib/at_coder_friends/scraping/tasks.rb +8 -3
- data/lib/at_coder_friends/test_runner/base.rb +17 -4
- data/lib/at_coder_friends/test_runner/judge.rb +7 -9
- data/lib/at_coder_friends/test_runner/sample.rb +2 -4
- data/lib/at_coder_friends/verifier.rb +2 -3
- data/lib/at_coder_friends/version.rb +1 -1
- data/templates/cxx_builtin.cxx.erb +26 -35
- data/templates/ruby_builtin.rb.erb +17 -18
- metadata +7 -16
- data/tasks/regression/check_const.rake +0 -137
- data/tasks/regression/check_diff.rake +0 -30
- data/tasks/regression/check_fmt.rake +0 -45
- data/tasks/regression/check_parse.rake +0 -69
- data/tasks/regression/list_handler.rb +0 -46
- data/tasks/regression/regression.rb +0 -38
- data/tasks/regression/report_handler.rb +0 -20
- data/tasks/regression/section_list.rake +0 -53
- data/tasks/regression/setup.rake +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9f754a47390aa40a5a92a0fa39ba99cc92904788e0d48fb7b73bc41c8be44ba0
|
4
|
+
data.tar.gz: dae70f5657afd47a08731daaff6eacbe5f8a5bdf27b5b963f502f78d6cfc084a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9bb6125db9f14b16f21e351df797a96e17ebcddd116d911507032f62fdd774b529fe1d4447d6bc699f2c7158a64603c49cba5bcf6090249967db454eb3163f0
|
7
|
+
data.tar.gz: 632b7b30d878115331a465d588388cc0983c70daf5d1f1593efa42554837df7afadfaf5aad769c84e73ff358f0d4862ee374ddb5346c8e4138ecc57891d80617
|
data/.rubocop.yml
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
|
3
3
|
AllCops:
|
4
|
+
TargetRubyVersion: 2.4
|
4
5
|
Exclude:
|
5
6
|
- 'templates/**/*'
|
6
7
|
- 'spec/fixtures/**/*'
|
7
8
|
- 'regression/**/*'
|
8
|
-
|
9
|
+
NewCops: enable
|
9
10
|
|
10
11
|
Lint/AmbiguousBlockAssociation:
|
11
12
|
Exclude:
|
@@ -26,5 +27,5 @@ Metrics/ModuleLength:
|
|
26
27
|
Exclude:
|
27
28
|
- 'spec/**/*.rb'
|
28
29
|
|
29
|
-
Naming/
|
30
|
+
Naming/MethodParameterName:
|
30
31
|
MinNameLength: 1
|
data/.travis.yml
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
- 2.
|
4
|
+
- 2.5.8
|
5
5
|
env:
|
6
6
|
global:
|
7
7
|
- CC_TEST_REPORTER_ID=cb942bcc168feb78c43c506364d5344c5ec9a46a0b68dc66acb581e77c981ff1
|
8
8
|
- COVERAGE=true
|
9
|
-
before_install:
|
10
|
-
- gem install bundler -v '2.0.2'
|
11
9
|
before_script:
|
12
10
|
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
13
11
|
- chmod +x ./cc-test-reporter
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,43 @@
|
|
2
2
|
|
3
3
|
## master (unreleased)
|
4
4
|
|
5
|
+
## 0.6.8 (2021-05-27)
|
6
|
+
### Deleted
|
7
|
+
- drop Ruby2.4 from target version.
|
8
|
+
|
9
|
+
## 0.6.7 (2020-12-20)
|
10
|
+
### Changed
|
11
|
+
- replace hspace with ' ' [#85](https://github.com/nejiko96/at_coder_friends/pull/85) ([suzukiapple](https://github.com/suzukiapple))
|
12
|
+
### Deleted
|
13
|
+
- drop Ruby2.3 from target version.
|
14
|
+
|
15
|
+
## 0.6.6 (2020-05-29)
|
16
|
+
### Added
|
17
|
+
- open submission list after submit.
|
18
|
+
- enable -%> in ERBs.
|
19
|
+
- error handling in fetch_problem.
|
20
|
+
- remove \mathrm{...} from expressions.
|
21
|
+
|
22
|
+
### Changed
|
23
|
+
- change task id match pattern on submission.
|
24
|
+
- treat input more than 19 digits as string.
|
25
|
+
|
26
|
+
## 0.6.5 (2020-04-15)
|
27
|
+
### Added
|
28
|
+
- multiple language version support.
|
29
|
+
|
30
|
+
## 0.6.4 (2020-03-08)
|
31
|
+
### Added
|
32
|
+
- Modulo RegExp pattern.
|
33
|
+
|
34
|
+
### Changed
|
35
|
+
- minor changes in ERBs.
|
36
|
+
- allow underscores in problem ID.
|
37
|
+
- allow whitespaces in data file path.
|
38
|
+
|
39
|
+
### Deleted
|
40
|
+
- remove tasks folder from installation
|
41
|
+
|
5
42
|
## 0.6.3 (2020-01-05)
|
6
43
|
### Added
|
7
44
|
- 'vertical array + matrix' input format support.
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
at_coder_friends (0.6.
|
4
|
+
at_coder_friends (0.6.8)
|
5
5
|
colorize (~> 0.8.1)
|
6
|
-
launchy (
|
6
|
+
launchy (>= 2.4.3)
|
7
7
|
mechanize (~> 2.0)
|
8
8
|
|
9
9
|
GEM
|
@@ -12,66 +12,71 @@ GEM
|
|
12
12
|
addressable (2.7.0)
|
13
13
|
public_suffix (>= 2.0.2, < 5.0)
|
14
14
|
colorize (0.8.1)
|
15
|
-
connection_pool (2.2.
|
16
|
-
crack (0.4.
|
17
|
-
|
18
|
-
diff-lcs (1.
|
19
|
-
docile (1.
|
15
|
+
connection_pool (2.2.5)
|
16
|
+
crack (0.4.5)
|
17
|
+
rexml
|
18
|
+
diff-lcs (1.4.4)
|
19
|
+
docile (1.4.0)
|
20
20
|
domain_name (0.5.20190701)
|
21
21
|
unf (>= 0.0.5, < 1.0.0)
|
22
|
-
hashdiff (1.0.
|
22
|
+
hashdiff (1.0.1)
|
23
23
|
http-cookie (1.0.3)
|
24
24
|
domain_name (~> 0.5)
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
domain_name (~> 0.5, >= 0.5.
|
30
|
-
http-cookie (~> 1.0)
|
31
|
-
mime-types (
|
32
|
-
net-http-digest_auth (~> 1.
|
33
|
-
net-http-persistent (>= 2.5.2)
|
34
|
-
nokogiri (~> 1.
|
35
|
-
|
36
|
-
|
37
|
-
|
25
|
+
launchy (2.5.0)
|
26
|
+
addressable (~> 2.7)
|
27
|
+
mechanize (2.8.1)
|
28
|
+
addressable (~> 2.7)
|
29
|
+
domain_name (~> 0.5, >= 0.5.20190701)
|
30
|
+
http-cookie (~> 1.0, >= 1.0.3)
|
31
|
+
mime-types (~> 3.0)
|
32
|
+
net-http-digest_auth (~> 1.4, >= 1.4.1)
|
33
|
+
net-http-persistent (>= 2.5.2, < 5.0.dev)
|
34
|
+
nokogiri (~> 1.11, >= 1.11.2)
|
35
|
+
rubyntlm (~> 0.6, >= 0.6.3)
|
36
|
+
webrick (~> 1.7)
|
37
|
+
webrobots (~> 0.1.2)
|
38
|
+
mime-types (3.3.1)
|
38
39
|
mime-types-data (~> 3.2015)
|
39
|
-
mime-types-data (3.
|
40
|
-
mini_portile2 (2.
|
40
|
+
mime-types-data (3.2021.0225)
|
41
|
+
mini_portile2 (2.5.1)
|
41
42
|
net-http-digest_auth (1.4.1)
|
42
|
-
net-http-persistent (
|
43
|
+
net-http-persistent (4.0.1)
|
43
44
|
connection_pool (~> 2.2)
|
44
|
-
nokogiri (1.
|
45
|
-
mini_portile2 (~> 2.
|
46
|
-
|
47
|
-
public_suffix (4.0.
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
rspec-
|
53
|
-
|
54
|
-
rspec-
|
55
|
-
rspec-
|
45
|
+
nokogiri (1.11.6)
|
46
|
+
mini_portile2 (~> 2.5.0)
|
47
|
+
racc (~> 1.4)
|
48
|
+
public_suffix (4.0.6)
|
49
|
+
racc (1.5.2)
|
50
|
+
rake (13.0.3)
|
51
|
+
rexml (3.2.5)
|
52
|
+
rspec (3.10.0)
|
53
|
+
rspec-core (~> 3.10.0)
|
54
|
+
rspec-expectations (~> 3.10.0)
|
55
|
+
rspec-mocks (~> 3.10.0)
|
56
|
+
rspec-core (3.10.1)
|
57
|
+
rspec-support (~> 3.10.0)
|
58
|
+
rspec-expectations (3.10.1)
|
56
59
|
diff-lcs (>= 1.2.0, < 2.0)
|
57
|
-
rspec-support (~> 3.
|
58
|
-
rspec-mocks (3.
|
60
|
+
rspec-support (~> 3.10.0)
|
61
|
+
rspec-mocks (3.10.2)
|
59
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
60
|
-
rspec-support (~> 3.
|
61
|
-
rspec-support (3.
|
62
|
-
|
63
|
-
simplecov (0.
|
63
|
+
rspec-support (~> 3.10.0)
|
64
|
+
rspec-support (3.10.2)
|
65
|
+
rubyntlm (0.6.3)
|
66
|
+
simplecov (0.21.2)
|
64
67
|
docile (~> 1.1)
|
65
|
-
|
66
|
-
|
67
|
-
simplecov-html (0.
|
68
|
+
simplecov-html (~> 0.11)
|
69
|
+
simplecov_json_formatter (~> 0.1)
|
70
|
+
simplecov-html (0.12.3)
|
71
|
+
simplecov_json_formatter (0.1.3)
|
68
72
|
unf (0.1.4)
|
69
73
|
unf_ext
|
70
|
-
unf_ext (0.0.7.
|
71
|
-
webmock (3.
|
74
|
+
unf_ext (0.0.7.7)
|
75
|
+
webmock (3.13.0)
|
72
76
|
addressable (>= 2.3.6)
|
73
77
|
crack (>= 0.3.2)
|
74
78
|
hashdiff (>= 0.4.0, < 2.0.0)
|
79
|
+
webrick (1.7.0)
|
75
80
|
webrobots (0.1.2)
|
76
81
|
|
77
82
|
PLATFORMS
|
@@ -87,4 +92,4 @@ DEPENDENCIES
|
|
87
92
|
webmock (~> 3.0)
|
88
93
|
|
89
94
|
BUNDLED WITH
|
90
|
-
2.
|
95
|
+
2.2.18
|
data/README.md
CHANGED
data/at_coder_friends.gemspec
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'at_coder_friends/version'
|
3
|
+
require_relative 'lib/at_coder_friends/version'
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
6
|
spec.name = 'at_coder_friends'
|
@@ -23,23 +21,23 @@ Gem::Specification.new do |spec|
|
|
23
21
|
|
24
22
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
23
|
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
-
f.match(%r{^(test|spec|features)/})
|
24
|
+
f.match(%r{^(test|spec|features|tasks)/})
|
27
25
|
end
|
28
26
|
end
|
29
27
|
spec.bindir = 'exe'
|
30
28
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
29
|
spec.require_paths = ['lib']
|
32
30
|
|
33
|
-
spec.required_ruby_version = '>= 2.
|
31
|
+
spec.required_ruby_version = '>= 2.5.0'
|
34
32
|
|
35
33
|
spec.metadata = {
|
36
34
|
'homepage_uri' => spec.homepage,
|
37
35
|
'source_code_uri' => spec.homepage,
|
38
|
-
'changelog_uri' => '
|
36
|
+
'changelog_uri' => spec.homepage + '/blob/master/CHANGELOG.md'
|
39
37
|
}
|
40
38
|
|
41
39
|
spec.add_dependency 'colorize', '~> 0.8.1'
|
42
|
-
spec.add_dependency 'launchy', '
|
40
|
+
spec.add_dependency 'launchy', '>= 2.4.3'
|
43
41
|
spec.add_dependency 'mechanize', '~> 2.0'
|
44
42
|
|
45
43
|
spec.add_development_dependency 'bundler', '~> 2.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'
|