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.
Files changed (44) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +3 -2
  3. data/.travis.yml +1 -3
  4. data/CHANGELOG.md +37 -0
  5. data/Gemfile.lock +53 -48
  6. data/README.md +1 -1
  7. data/at_coder_friends.gemspec +5 -7
  8. data/config/default.yml +146 -72
  9. data/docs/CONFIGURATION.md +222 -136
  10. data/lib/at_coder_friends.rb +1 -0
  11. data/lib/at_coder_friends/cli.rb +8 -0
  12. data/lib/at_coder_friends/config_loader.rb +11 -3
  13. data/lib/at_coder_friends/context.rb +10 -6
  14. data/lib/at_coder_friends/emitter.rb +2 -2
  15. data/lib/at_coder_friends/generator/base.rb +3 -2
  16. data/lib/at_coder_friends/generator/main.rb +2 -1
  17. data/lib/at_coder_friends/parser/constraints.rb +1 -0
  18. data/lib/at_coder_friends/parser/input_format.rb +2 -0
  19. data/lib/at_coder_friends/parser/input_type.rb +3 -2
  20. data/lib/at_coder_friends/parser/modulo.rb +1 -1
  21. data/lib/at_coder_friends/parser/sections.rb +3 -3
  22. data/lib/at_coder_friends/path_info.rb +51 -0
  23. data/lib/at_coder_friends/path_util.rb +0 -31
  24. data/lib/at_coder_friends/scraping/agent.rb +11 -2
  25. data/lib/at_coder_friends/scraping/custom_test.rb +5 -6
  26. data/lib/at_coder_friends/scraping/submission.rb +6 -7
  27. data/lib/at_coder_friends/scraping/tasks.rb +8 -3
  28. data/lib/at_coder_friends/test_runner/base.rb +17 -4
  29. data/lib/at_coder_friends/test_runner/judge.rb +7 -9
  30. data/lib/at_coder_friends/test_runner/sample.rb +2 -4
  31. data/lib/at_coder_friends/verifier.rb +2 -3
  32. data/lib/at_coder_friends/version.rb +1 -1
  33. data/templates/cxx_builtin.cxx.erb +26 -35
  34. data/templates/ruby_builtin.rb.erb +17 -18
  35. metadata +7 -16
  36. data/tasks/regression/check_const.rake +0 -137
  37. data/tasks/regression/check_diff.rake +0 -30
  38. data/tasks/regression/check_fmt.rake +0 -45
  39. data/tasks/regression/check_parse.rake +0 -69
  40. data/tasks/regression/list_handler.rb +0 -46
  41. data/tasks/regression/regression.rb +0 -38
  42. data/tasks/regression/report_handler.rb +0 -20
  43. data/tasks/regression/section_list.rake +0 -53
  44. data/tasks/regression/setup.rake +0 -48
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9a7432316e843545fb879309e242139dc2c0405c
4
- data.tar.gz: 9e22a2dcde9e98a171ed393365de8fd308957996
2
+ SHA256:
3
+ metadata.gz: 9f754a47390aa40a5a92a0fa39ba99cc92904788e0d48fb7b73bc41c8be44ba0
4
+ data.tar.gz: dae70f5657afd47a08731daaff6eacbe5f8a5bdf27b5b963f502f78d6cfc084a
5
5
  SHA512:
6
- metadata.gz: 70e350831761899ee4178e65f8563cbd328a0b8e70971e4620015d623484c0297fa60a6a5ce447bb349d3b2fa06799b336fb270913a34b8efb857dc97e9dfaa3
7
- data.tar.gz: ff84c2c7fb80dda6105561d82d94c697c7e5133e91219c9f6530f8e7db083192a5ac8a5148a204fd5740c3cf470d53fd56ac5026b908738f12ccb671d824dd39
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
- TargetRubyVersion: 2.3
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/UncommunicativeMethodParamName:
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.3.8
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.3)
4
+ at_coder_friends (0.6.8)
5
5
  colorize (~> 0.8.1)
6
- launchy (~> 2.4.3)
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.2)
16
- crack (0.4.3)
17
- safe_yaml (~> 1.0.0)
18
- diff-lcs (1.3)
19
- docile (1.3.2)
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.0)
22
+ hashdiff (1.0.1)
23
23
  http-cookie (1.0.3)
24
24
  domain_name (~> 0.5)
25
- json (2.2.0)
26
- launchy (2.4.3)
27
- addressable (~> 2.3)
28
- mechanize (2.7.6)
29
- domain_name (~> 0.5, >= 0.5.1)
30
- http-cookie (~> 1.0)
31
- mime-types (>= 1.17.2)
32
- net-http-digest_auth (~> 1.1, >= 1.1.1)
33
- net-http-persistent (>= 2.5.2)
34
- nokogiri (~> 1.6)
35
- ntlm-http (~> 0.1, >= 0.1.1)
36
- webrobots (>= 0.0.9, < 0.2)
37
- mime-types (3.3)
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.2019.1009)
40
- mini_portile2 (2.4.0)
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 (3.1.0)
43
+ net-http-persistent (4.0.1)
43
44
  connection_pool (~> 2.2)
44
- nokogiri (1.10.5)
45
- mini_portile2 (~> 2.4.0)
46
- ntlm-http (0.1.1)
47
- public_suffix (4.0.1)
48
- rake (13.0.1)
49
- rspec (3.9.0)
50
- rspec-core (~> 3.9.0)
51
- rspec-expectations (~> 3.9.0)
52
- rspec-mocks (~> 3.9.0)
53
- rspec-core (3.9.0)
54
- rspec-support (~> 3.9.0)
55
- rspec-expectations (3.9.0)
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.9.0)
58
- rspec-mocks (3.9.0)
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.9.0)
61
- rspec-support (3.9.0)
62
- safe_yaml (1.0.5)
63
- simplecov (0.17.1)
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
- json (>= 1.8, < 3)
66
- simplecov-html (~> 0.10.0)
67
- simplecov-html (0.10.2)
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.6)
71
- webmock (3.7.6)
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.0.2
95
+ 2.2.18
data/README.md CHANGED
@@ -16,7 +16,7 @@ AtCoderFriends automates tasks about [AtCoder](https://atcoder.jp/) programming
16
16
 
17
17
  ## Dependencies
18
18
 
19
- - Ruby 2.3 or newer
19
+ - Ruby 2.4 or newer
20
20
  - [Mechanize](https://github.com/sparklemotion/mechanize)
21
21
 
22
22
  ## Installation
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
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.3.0'
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' => 'https://github.com/nejiko96/at_coder_friends/blob/master/CHANGELOG.md'
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', '~> 2.4.3'
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: '3506' # Awk (mawk)
9
- 'bf':
10
- submit_lang: '3507' # Brainfuck
11
- 'c':
12
- submit_lang: '3002' # C (GCC)
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: '3526' # COBOL - Free
18
- 'clj':
19
- submit_lang: '3007' # Clojure
20
- 'cr':
21
- submit_lang: '3511' # Crystal
22
- 'cs':
23
- submit_lang: '3006' # C# (Mono)
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: '3003' # C++14 (GCC)
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: '3009' # D (DMD64)
34
- 'f90':
35
- submit_lang: '3012' # Fortran (gfortran)
36
- 'fs':
37
- submit_lang: '3512' # F# (Mono)
38
- 'go':
39
- submit_lang: '3013' # Go
40
- 'hs':
41
- submit_lang: '3014' # Haskell (GHC)
42
- 'java':
43
- submit_lang: '3016' # Java8 (OpenJDK)
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: '3518' # Julia
48
- 'js':
49
- submit_lang: '3017' # JavaScript (node.js)
50
- 'kt':
51
- submit_lang: '3523' # Kotlin
52
- 'lisp':
53
- submit_lang: '3008' # Common Lisp
54
- 'lua':
55
- submit_lang: '3515' # LuaJIT
56
- 'm':
57
- submit_lang: '3519' # Octave
58
- 'ml':
59
- submit_lang: '3018' # OCaml
60
- 'nim':
61
- submit_lang: '3520' # Nim
62
- 'pas':
63
- submit_lang: '3019' # Pascal (FPC)
64
- 'php':
65
- submit_lang: '3524' # PHP7
66
- 'pl':
67
- submit_lang: '3020' # Perl
68
- 'py':
69
- submit_lang: '3023' # Python3
70
- 'rb':
71
- submit_lang: '3024' # Ruby
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: '3504' # Rust
76
- 'scala':
77
- submit_lang: '3025' # Scala
78
- 'scm':
79
- submit_lang: '3026' # Scheme (Gauche)
80
- 'sed':
81
- submit_lang: '3505' # Sed (GNU sed)
82
- 'sh':
83
- submit_lang: '3001' # Bash (GNU bash)
84
- 'swift':
85
- submit_lang: '3503' # Swift
86
- 'ts':
87
- submit_lang: '3521' # TypeScript
88
- 'txt':
89
- submit_lang: '3027' # Text (cat)
90
- 'vb':
91
- submit_lang: '3028' # Visual Basic (Mono)
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'