aoc_cli 0.2.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/.rubocop.yml +88 -0
- data/.ruby-version +1 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +187 -0
- data/README.md +88 -282
- data/Rakefile +9 -2
- data/Steepfile +13 -0
- data/aoc_cli.gemspec +36 -26
- data/db/migrate/1_create_events.rb +14 -0
- data/db/migrate/2_create_puzzles.rb +21 -0
- data/db/migrate/3_create_stats.rb +19 -0
- data/db/migrate/4_create_attempts.rb +19 -0
- data/db/migrate/5_create_locations.rb +17 -0
- data/db/migrate/6_create_puzzle_dir_sync_logs.rb +18 -0
- data/exe/aoc +5 -0
- data/lib/aoc_cli/components/attempts_table.erb +5 -0
- data/lib/aoc_cli/components/attempts_table.rb +58 -0
- data/lib/aoc_cli/components/docs_component.erb +19 -0
- data/lib/aoc_cli/components/docs_component.rb +41 -0
- data/lib/aoc_cli/components/errors_component.erb +8 -0
- data/lib/aoc_cli/components/errors_component.rb +36 -0
- data/lib/aoc_cli/components/progress_table.erb +1 -0
- data/lib/aoc_cli/components/progress_table.rb +43 -0
- data/lib/aoc_cli/components/puzzle_sync_component.erb +2 -0
- data/lib/aoc_cli/components/puzzle_sync_component.rb +26 -0
- data/lib/aoc_cli/configurators/session_configurator.rb +7 -0
- data/lib/aoc_cli/controllers/application_controller.rb +27 -0
- data/lib/aoc_cli/controllers/concerns/error_concern.rb +17 -0
- data/lib/aoc_cli/controllers/concerns/location_concern.rb +79 -0
- data/lib/aoc_cli/controllers/default_controller.rb +9 -0
- data/lib/aoc_cli/controllers/event_controller.rb +35 -0
- data/lib/aoc_cli/controllers/help/event_controller.rb +11 -0
- data/lib/aoc_cli/controllers/help/puzzle_controller.rb +13 -0
- data/lib/aoc_cli/controllers/puzzle_controller.rb +39 -0
- data/lib/aoc_cli/core/attempt_parser.rb +69 -0
- data/lib/aoc_cli/core/processor.rb +32 -0
- data/lib/aoc_cli/core/repository.rb +74 -0
- data/lib/aoc_cli/core/request.rb +37 -0
- data/lib/aoc_cli/core/resource.rb +39 -0
- data/lib/aoc_cli/core/stats_parser.rb +43 -0
- data/lib/aoc_cli/helpers/table_generator.rb +64 -0
- data/lib/aoc_cli/helpers/view_helper.rb +35 -0
- data/lib/aoc_cli/models/attempt.rb +67 -0
- data/lib/aoc_cli/models/event.rb +9 -0
- data/lib/aoc_cli/models/location.rb +24 -0
- data/lib/aoc_cli/models/puzzle.rb +28 -0
- data/lib/aoc_cli/models/puzzle_dir_sync_log.rb +14 -0
- data/lib/aoc_cli/models/stats.rb +43 -0
- data/lib/aoc_cli/presenters/attempt_presenter.rb +29 -0
- data/lib/aoc_cli/presenters/puzzle_presenter.rb +29 -0
- data/lib/aoc_cli/presenters/stats_presenter.rb +32 -0
- data/lib/aoc_cli/processors/event_initialiser.rb +64 -0
- data/lib/aoc_cli/processors/puzzle_dir_synchroniser.rb +80 -0
- data/lib/aoc_cli/processors/puzzle_initialiser.rb +91 -0
- data/lib/aoc_cli/processors/puzzle_refresher.rb +27 -0
- data/lib/aoc_cli/processors/resource_attacher.rb +22 -0
- data/lib/aoc_cli/processors/solution_poster.rb +72 -0
- data/lib/aoc_cli/processors/stats_initialiser.rb +36 -0
- data/lib/aoc_cli/processors/stats_refresher.rb +23 -0
- data/lib/aoc_cli/validators/collection_type_validator.rb +57 -0
- data/lib/aoc_cli/validators/event_year_validator.rb +42 -0
- data/lib/aoc_cli/validators/included_validator.rb +21 -0
- data/lib/aoc_cli/validators/integer_validator.rb +32 -0
- data/lib/aoc_cli/validators/path_validator.rb +39 -0
- data/lib/aoc_cli/validators/type_validator.rb +54 -0
- data/lib/aoc_cli/version.rb +1 -1
- data/lib/aoc_cli/views/event/attach.erb +3 -0
- data/lib/aoc_cli/views/event/init.erb +3 -0
- data/lib/aoc_cli/views/help/event/attach.erb +32 -0
- data/lib/aoc_cli/views/help/event/init.erb +38 -0
- data/lib/aoc_cli/views/help/event/progress.erb +12 -0
- data/lib/aoc_cli/views/help/puzzle/attempts.erb +12 -0
- data/lib/aoc_cli/views/help/puzzle/init.erb +31 -0
- data/lib/aoc_cli/views/help/puzzle/solve.erb +33 -0
- data/lib/aoc_cli/views/help/puzzle/sync.erb +32 -0
- data/lib/aoc_cli/views/puzzle/init.erb +3 -0
- data/lib/aoc_cli/views/puzzle/solve.erb +10 -0
- data/lib/aoc_cli.rb +32 -16
- data/rbs_collection.lock.yaml +168 -0
- data/rbs_collection.yaml +28 -0
- data/sig/aoc_cli/components/attempts_table.rbs +29 -0
- data/sig/aoc_cli/components/docs_component.rbs +15 -0
- data/sig/aoc_cli/components/errors_component.rbs +19 -0
- data/sig/aoc_cli/components/progress_table.rbs +28 -0
- data/sig/aoc_cli/components/puzzle_sync_component.rbs +19 -0
- data/sig/aoc_cli/configurators/session_configurator.rbs +7 -0
- data/sig/aoc_cli/controllers/application_controller.rbs +12 -0
- data/sig/aoc_cli/controllers/concerns/error_concern.rbs +9 -0
- data/sig/aoc_cli/controllers/concerns/location_concern.rbs +35 -0
- data/sig/aoc_cli/controllers/default_controller.rbs +7 -0
- data/sig/aoc_cli/controllers/event_controller.rbs +18 -0
- data/sig/aoc_cli/controllers/help/event_controller.rbs +11 -0
- data/sig/aoc_cli/controllers/help/puzzle_controller.rbs +13 -0
- data/sig/aoc_cli/controllers/puzzle_controller.rbs +15 -0
- data/sig/aoc_cli/core/attempt_parser.rbs +41 -0
- data/sig/aoc_cli/core/processor.rbs +25 -0
- data/sig/aoc_cli/core/repository.rbs +25 -0
- data/sig/aoc_cli/core/request.rbs +29 -0
- data/sig/aoc_cli/core/resource.rbs +25 -0
- data/sig/aoc_cli/core/stats_parser.rbs +23 -0
- data/sig/aoc_cli/helpers/table_generator.rbs +36 -0
- data/sig/aoc_cli/helpers/view_helper.rbs +15 -0
- data/sig/aoc_cli/models/attempt.rbs +35 -0
- data/sig/aoc_cli/models/event.rbs +17 -0
- data/sig/aoc_cli/models/location.rbs +19 -0
- data/sig/aoc_cli/models/puzzle.rbs +28 -0
- data/sig/aoc_cli/models/puzzle_dir_sync_log.rbs +11 -0
- data/sig/aoc_cli/models/stats.rbs +53 -0
- data/sig/aoc_cli/presenters/attempt_presenter.rbs +13 -0
- data/sig/aoc_cli/presenters/puzzle_presenter.rbs +19 -0
- data/sig/aoc_cli/presenters/stats_presenter.rbs +19 -0
- data/sig/aoc_cli/processors/event_initialiser.rbs +26 -0
- data/sig/aoc_cli/processors/puzzle_dir_synchroniser.rbs +40 -0
- data/sig/aoc_cli/processors/puzzle_initialiser.rbs +37 -0
- data/sig/aoc_cli/processors/puzzle_refresher.rbs +21 -0
- data/sig/aoc_cli/processors/resource_attacher.rbs +16 -0
- data/sig/aoc_cli/processors/solution_poster.rbs +34 -0
- data/sig/aoc_cli/processors/stats_initialiser.rbs +15 -0
- data/sig/aoc_cli/processors/stats_refresher.rbs +19 -0
- data/sig/aoc_cli/validators/collection_type_validator.rbs +24 -0
- data/sig/aoc_cli/validators/event_year_validator.rbs +19 -0
- data/sig/aoc_cli/validators/included_validator.rbs +11 -0
- data/sig/aoc_cli/validators/integer_validator.rbs +15 -0
- data/sig/aoc_cli/validators/path_validator.rbs +17 -0
- data/sig/aoc_cli/validators/type_validator.rbs +22 -0
- data/sig/aoc_cli.rbs +6 -0
- data/sig/http.rbs +3 -0
- data/sig/kangaru.rbs +5 -0
- data/sig/nokogiri.rbs +3 -0
- data/sig/reverse_markdown.rbs +3 -0
- metadata +142 -34
- data/.gitignore +0 -5
- data/bin/aoc +0 -4
- data/bin/console +0 -15
- data/bin/setup +0 -7
- data/lib/aoc_cli/commands.rb +0 -232
- data/lib/aoc_cli/database.rb +0 -224
- data/lib/aoc_cli/day.rb +0 -124
- data/lib/aoc_cli/db/reddit.db +0 -0
- data/lib/aoc_cli/errors.rb +0 -275
- data/lib/aoc_cli/files.rb +0 -163
- data/lib/aoc_cli/help.rb +0 -77
- data/lib/aoc_cli/interface.rb +0 -81
- data/lib/aoc_cli/paths.rb +0 -101
- data/lib/aoc_cli/solve.rb +0 -104
- data/lib/aoc_cli/tables.rb +0 -138
- data/lib/aoc_cli/tools.rb +0 -120
- data/lib/aoc_cli/year.rb +0 -116
- data/sample/aoc.rc +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 523ec81af92a97e0d60f5e7490d29feb336e2c1577eecb00c7510c47171dfb87
|
4
|
+
data.tar.gz: 6c6f424ee15d996c12d9552d6a7681fd946b0f0724c5803f3344bfdb41eaad72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd1fd05753d8fc593f37b6f28db96bb58cb9eae931a8b28852513ed25bf6cdcc300c44f4963a1581207dd8001b4d9fc0115ac582b6d79d49e1766c54dc17fbe7
|
7
|
+
data.tar.gz: 1a5a042be37b1e4b661c05417a94312701c26eb794895cfc58455099ef9cd16f3c6df57ac74d096d20f5298019415b6beea15acc875f465728ef7314ad5dd031
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rspec
|
3
|
+
|
4
|
+
AllCops:
|
5
|
+
NewCops: enable
|
6
|
+
SuggestExtensions: false
|
7
|
+
|
8
|
+
Gemspec/RequireMFA:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Layout/ExtraSpacing:
|
12
|
+
AllowForAlignment: true
|
13
|
+
Layout/LineLength:
|
14
|
+
Max: 80
|
15
|
+
Layout/MultilineMethodCallIndentation:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Lint/AmbiguousBlockAssociation:
|
19
|
+
Enabled: false
|
20
|
+
Lint/ConstantDefinitionInBlock:
|
21
|
+
Exclude:
|
22
|
+
- spec/spec_helper.rb
|
23
|
+
Lint/MissingSuper:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Metrics/BlockLength:
|
27
|
+
Exclude:
|
28
|
+
- db/migrate/**/*.rb
|
29
|
+
|
30
|
+
Naming/MethodParameterName:
|
31
|
+
AllowedNames:
|
32
|
+
- by
|
33
|
+
- to
|
34
|
+
- id
|
35
|
+
Naming/VariableNumber:
|
36
|
+
EnforcedStyle: snake_case
|
37
|
+
|
38
|
+
Style/ArgumentsForwarding:
|
39
|
+
Enabled: false
|
40
|
+
Style/CharacterLiteral:
|
41
|
+
Enabled: false
|
42
|
+
Style/Documentation:
|
43
|
+
Enabled: false
|
44
|
+
Style/ExplicitBlockArgument:
|
45
|
+
Enabled: false
|
46
|
+
Style/FormatStringToken:
|
47
|
+
EnforcedStyle: template
|
48
|
+
Style/FrozenStringLiteralComment:
|
49
|
+
Enabled: false
|
50
|
+
Style/RescueStandardError:
|
51
|
+
EnforcedStyle: implicit
|
52
|
+
Style/StringLiterals:
|
53
|
+
EnforcedStyle: double_quotes
|
54
|
+
|
55
|
+
RSpec/AnyInstance:
|
56
|
+
Enabled: false
|
57
|
+
RSpec/ContextWording:
|
58
|
+
Prefixes:
|
59
|
+
- when
|
60
|
+
- with
|
61
|
+
- without
|
62
|
+
- if
|
63
|
+
- unless
|
64
|
+
- and
|
65
|
+
- but
|
66
|
+
RSpec/DescribeClass:
|
67
|
+
Exclude:
|
68
|
+
- spec/aoc_cli/controllers/**/*.rb
|
69
|
+
RSpec/DescribedClass:
|
70
|
+
SkipBlocks: true
|
71
|
+
RSpec/ExpectChange:
|
72
|
+
EnforcedStyle: block
|
73
|
+
RSpec/FilePath:
|
74
|
+
Exclude:
|
75
|
+
- spec/aoc_cli/models/**/*.rb
|
76
|
+
- spec/aoc_cli/controllers/**/*.rb
|
77
|
+
RSpec/LetSetup:
|
78
|
+
Enabled: false
|
79
|
+
RSpec/MultipleMemoizedHelpers:
|
80
|
+
Max: 15
|
81
|
+
RSpec/NestedGroups:
|
82
|
+
Enabled: false
|
83
|
+
RSpec/SharedExamples:
|
84
|
+
Enabled: false
|
85
|
+
RSpec/SpecFilePathFormat:
|
86
|
+
Exclude:
|
87
|
+
- spec/aoc_cli/models/**/*.rb
|
88
|
+
- spec/aoc_cli/controllers/**/*.rb
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.0
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,187 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
aoc_cli (1.0.0)
|
5
|
+
http
|
6
|
+
kangaru
|
7
|
+
nokogiri
|
8
|
+
reverse_markdown
|
9
|
+
sequel_polymorphic
|
10
|
+
terminal-table
|
11
|
+
|
12
|
+
GEM
|
13
|
+
remote: https://rubygems.org/
|
14
|
+
specs:
|
15
|
+
abbrev (0.1.1)
|
16
|
+
activesupport (7.1.2)
|
17
|
+
base64
|
18
|
+
bigdecimal
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
20
|
+
connection_pool (>= 2.2.5)
|
21
|
+
drb
|
22
|
+
i18n (>= 1.6, < 2)
|
23
|
+
minitest (>= 5.1)
|
24
|
+
mutex_m
|
25
|
+
tzinfo (~> 2.0)
|
26
|
+
addressable (2.8.5)
|
27
|
+
public_suffix (>= 2.0.2, < 6.0)
|
28
|
+
ast (2.4.2)
|
29
|
+
base64 (0.2.0)
|
30
|
+
bigdecimal (3.1.5)
|
31
|
+
cgi (0.4.1)
|
32
|
+
colorize (1.1.0)
|
33
|
+
concurrent-ruby (1.2.2)
|
34
|
+
connection_pool (2.4.1)
|
35
|
+
crack (0.4.5)
|
36
|
+
rexml
|
37
|
+
csv (3.2.8)
|
38
|
+
diff-lcs (1.5.0)
|
39
|
+
domain_name (0.6.20231109)
|
40
|
+
drb (2.2.0)
|
41
|
+
ruby2_keywords
|
42
|
+
erb (4.0.3)
|
43
|
+
cgi (>= 0.3.3)
|
44
|
+
factory_bot (6.4.2)
|
45
|
+
activesupport (>= 5.0.0)
|
46
|
+
ffi (1.16.3)
|
47
|
+
ffi-compiler (1.0.1)
|
48
|
+
ffi (>= 1.0.0)
|
49
|
+
rake
|
50
|
+
fileutils (1.7.2)
|
51
|
+
hashdiff (1.0.1)
|
52
|
+
http (5.1.1)
|
53
|
+
addressable (~> 2.8)
|
54
|
+
http-cookie (~> 1.0)
|
55
|
+
http-form_data (~> 2.2)
|
56
|
+
llhttp-ffi (~> 0.4.0)
|
57
|
+
http-cookie (1.0.5)
|
58
|
+
domain_name (~> 0.5)
|
59
|
+
http-form_data (2.3.0)
|
60
|
+
i18n (1.14.1)
|
61
|
+
concurrent-ruby (~> 1.0)
|
62
|
+
json (2.6.3)
|
63
|
+
kangaru (0.2.4)
|
64
|
+
colorize (~> 1.1)
|
65
|
+
erb (~> 4.0)
|
66
|
+
sequel (~> 5.72)
|
67
|
+
sqlite3 (~> 1.6)
|
68
|
+
zeitwerk (~> 2.6)
|
69
|
+
language_server-protocol (3.17.0.3)
|
70
|
+
listen (3.8.0)
|
71
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
72
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
73
|
+
llhttp-ffi (0.4.0)
|
74
|
+
ffi-compiler (~> 1.0)
|
75
|
+
rake (~> 13.0)
|
76
|
+
logger (1.6.0)
|
77
|
+
minitest (5.20.0)
|
78
|
+
mutex_m (0.2.0)
|
79
|
+
nokogiri (1.15.5-arm64-darwin)
|
80
|
+
racc (~> 1.4)
|
81
|
+
nokogiri (1.15.5-x86_64-linux)
|
82
|
+
racc (~> 1.4)
|
83
|
+
parallel (1.23.0)
|
84
|
+
parser (3.2.2.4)
|
85
|
+
ast (~> 2.4.1)
|
86
|
+
racc
|
87
|
+
public_suffix (5.0.4)
|
88
|
+
racc (1.7.3)
|
89
|
+
rainbow (3.1.1)
|
90
|
+
rake (13.1.0)
|
91
|
+
rb-fsevent (0.11.2)
|
92
|
+
rb-inotify (0.10.1)
|
93
|
+
ffi (~> 1.0)
|
94
|
+
rbs (3.3.2)
|
95
|
+
abbrev
|
96
|
+
regexp_parser (2.8.2)
|
97
|
+
reverse_markdown (2.1.1)
|
98
|
+
nokogiri
|
99
|
+
rexml (3.2.6)
|
100
|
+
rspec (3.12.0)
|
101
|
+
rspec-core (~> 3.12.0)
|
102
|
+
rspec-expectations (~> 3.12.0)
|
103
|
+
rspec-mocks (~> 3.12.0)
|
104
|
+
rspec-core (3.12.2)
|
105
|
+
rspec-support (~> 3.12.0)
|
106
|
+
rspec-expectations (3.12.3)
|
107
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
108
|
+
rspec-support (~> 3.12.0)
|
109
|
+
rspec-mocks (3.12.6)
|
110
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
111
|
+
rspec-support (~> 3.12.0)
|
112
|
+
rspec-support (3.12.1)
|
113
|
+
rubocop (1.57.2)
|
114
|
+
json (~> 2.3)
|
115
|
+
language_server-protocol (>= 3.17.0)
|
116
|
+
parallel (~> 1.10)
|
117
|
+
parser (>= 3.2.2.4)
|
118
|
+
rainbow (>= 2.2.2, < 4.0)
|
119
|
+
regexp_parser (>= 1.8, < 3.0)
|
120
|
+
rexml (>= 3.2.5, < 4.0)
|
121
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
122
|
+
ruby-progressbar (~> 1.7)
|
123
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
124
|
+
rubocop-ast (1.30.0)
|
125
|
+
parser (>= 3.2.1.0)
|
126
|
+
rubocop-capybara (2.19.0)
|
127
|
+
rubocop (~> 1.41)
|
128
|
+
rubocop-factory_bot (2.24.0)
|
129
|
+
rubocop (~> 1.33)
|
130
|
+
rubocop-rspec (2.25.0)
|
131
|
+
rubocop (~> 1.40)
|
132
|
+
rubocop-capybara (~> 2.17)
|
133
|
+
rubocop-factory_bot (~> 2.22)
|
134
|
+
ruby-progressbar (1.13.0)
|
135
|
+
ruby2_keywords (0.0.5)
|
136
|
+
securerandom (0.3.0)
|
137
|
+
sequel (5.75.0)
|
138
|
+
bigdecimal
|
139
|
+
sequel_polymorphic (0.5.0)
|
140
|
+
sequel (>= 4.0.0, < 6)
|
141
|
+
sqlite3 (1.6.9-arm64-darwin)
|
142
|
+
sqlite3 (1.6.9-x86_64-linux)
|
143
|
+
steep (1.6.0)
|
144
|
+
activesupport (>= 5.1)
|
145
|
+
concurrent-ruby (>= 1.1.10)
|
146
|
+
csv (>= 3.0.9)
|
147
|
+
fileutils (>= 1.1.0)
|
148
|
+
json (>= 2.1.0)
|
149
|
+
language_server-protocol (>= 3.15, < 4.0)
|
150
|
+
listen (~> 3.0)
|
151
|
+
logger (>= 1.3.0)
|
152
|
+
parser (>= 3.1)
|
153
|
+
rainbow (>= 2.2.2, < 4.0)
|
154
|
+
rbs (>= 3.1.0)
|
155
|
+
securerandom (>= 0.1)
|
156
|
+
strscan (>= 1.0.0)
|
157
|
+
terminal-table (>= 2, < 4)
|
158
|
+
strscan (3.0.7)
|
159
|
+
terminal-table (3.0.2)
|
160
|
+
unicode-display_width (>= 1.1.1, < 3)
|
161
|
+
tzinfo (2.0.6)
|
162
|
+
concurrent-ruby (~> 1.0)
|
163
|
+
unicode-display_width (2.5.0)
|
164
|
+
vcr (6.2.0)
|
165
|
+
webmock (3.19.1)
|
166
|
+
addressable (>= 2.8.0)
|
167
|
+
crack (>= 0.3.2)
|
168
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
169
|
+
zeitwerk (2.6.12)
|
170
|
+
|
171
|
+
PLATFORMS
|
172
|
+
arm64-darwin-21
|
173
|
+
x86_64-linux
|
174
|
+
|
175
|
+
DEPENDENCIES
|
176
|
+
aoc_cli!
|
177
|
+
factory_bot
|
178
|
+
rake (~> 13.0)
|
179
|
+
rspec (~> 3.0)
|
180
|
+
rubocop (~> 1.21)
|
181
|
+
rubocop-rspec
|
182
|
+
steep
|
183
|
+
vcr
|
184
|
+
webmock
|
185
|
+
|
186
|
+
BUNDLED WITH
|
187
|
+
2.4.1
|