advent_of_code_cli 0.1.5 → 0.1.7
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e99e30130801298c54dc4fe7e79088c257bd7a2591f82ffaf20b64f70c0135e2
|
4
|
+
data.tar.gz: eeba2b9eb878ba526f92c96d7a02c15b89239715ef864f2fd3b1d434c2ecbf04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bdff2486e12240e0f7fb939fac4250cd81c2664ab9059013f732c30198a6177aa98792844342dda53600716bec69650627994b27a1c5adff2f40e50af9e9223
|
7
|
+
data.tar.gz: f827594163b990ca24f5c0f535e196fc50a4663a5a5adb3b4ff0e4c144b720d5e7bbbfef921fc29f7cd1cdd6449fa1b2db1c2bd131a4f781b28ad05a36ce6c30
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -20,7 +20,7 @@ Run `bundle install`.
|
|
20
20
|
|
21
21
|
### Scaffold
|
22
22
|
|
23
|
-
This command will set up the files for any day of Advent of Code. It takes a
|
23
|
+
This command will set up the files for any day of Advent of Code. It takes a number between 1 and 25 as an argument.
|
24
24
|
|
25
25
|
```bash
|
26
26
|
bundle exec aoc_cli scaffold 1
|
@@ -65,6 +65,7 @@ In order for this to work, you must provide your Advent of Code session cookie t
|
|
65
65
|
```bash
|
66
66
|
export AOC_COOKIE=your-cookie
|
67
67
|
```
|
68
|
+
To obtain the cookie, sign into Advent of Code through your browser, then use the developer tools to examine the headers for a page request. The `cookie:` header should contain a value like `session=a1b2c3...`. The part from `a1b2c3...` onwards is what your need for `AOC_COOKIE`.
|
68
69
|
|
69
70
|
Once the environment variable is set, you can request your personal input for any day.
|
70
71
|
|
@@ -4,16 +4,21 @@ module AdventOfCode
|
|
4
4
|
module Commands
|
5
5
|
class Scaffold < Command
|
6
6
|
def execute
|
7
|
-
|
8
|
-
|
7
|
+
|
8
|
+
unless File.exist?(solution_file_name)
|
9
|
+
say("Creating file: #{solution_file_name}...")
|
10
|
+
create_file(solution_file_name, solution_file_contents)
|
11
|
+
end
|
9
12
|
|
10
13
|
unless Dir.exist?("inputs")
|
11
14
|
say("Creating inputs directory...")
|
12
15
|
Dir.mkdir("inputs")
|
13
16
|
end
|
14
17
|
|
15
|
-
|
16
|
-
|
18
|
+
unless File.exist?(input_file_name)
|
19
|
+
say("Creating file: #{input_file_name}...")
|
20
|
+
create_file(input_file_name)
|
21
|
+
end
|
17
22
|
|
18
23
|
unless Dir.exist?("examples")
|
19
24
|
say("Creating examples directory...")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: advent_of_code_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emily Samp
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|