advent_of_code_cli 0.1.0 → 0.1.2
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: 35f78ceadc5e206cc38c1384188d68b60fd1e7c747836493f65ff140f771946f
|
4
|
+
data.tar.gz: 811234a1a95f4e87fb93f5b842ab057c1c5a9f5e0b3a8eb19a05aeaa350e72e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d95a59af2fcc9fda9ecc953e8156edb826329637ba6c5093af53ddd118e4becff8b65c92a41868a9612e79512cb54e15411a6c6a664c65b75b84e59e1ddd7411
|
7
|
+
data.tar.gz: c469d86e56cbf45d67b3f28966a724f7c6036ed642d30ca218f3d1908429e62929491fed86da69ae1eb6eecb80168720ec8d3c992c94aa7e7e013f48a4d1c3b3
|
data/Gemfile.lock
CHANGED
data/lib/advent_of_code_cli.rb
CHANGED
@@ -20,11 +20,6 @@ module AdventOfCode
|
|
20
20
|
rescue_invalid_day_error
|
21
21
|
end
|
22
22
|
|
23
|
-
desc "cookie VALUE", "store your Advent of Code cookie with value VALUE in the cookie.txt file"
|
24
|
-
def cookie(value)
|
25
|
-
AdventOfCode::Commands::Cookie.new(value: value).execute
|
26
|
-
end
|
27
|
-
|
28
23
|
desc "download DAY", "download your input for day DAY"
|
29
24
|
option :year, default: Time.now.year.to_s
|
30
25
|
def download(day)
|
@@ -32,7 +27,7 @@ module AdventOfCode
|
|
32
27
|
rescue AdventOfCode::InvalidDayError
|
33
28
|
rescue_invalid_day_error
|
34
29
|
rescue AdventOfCode::MissingCookieError
|
35
|
-
say "Error: Cannot find cookie in
|
30
|
+
say "Error: Cannot find cookie in the AOC_COOKIE environment variable.", :red
|
36
31
|
end
|
37
32
|
|
38
33
|
desc "solve DAY", "run your solutions for day DAY"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emily Samp
|
@@ -9,7 +9,21 @@ autorequire:
|
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
11
|
date: 2022-12-01 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.2.0
|
13
27
|
description:
|
14
28
|
email:
|
15
29
|
- emily.samp@icloud.com
|
@@ -30,7 +44,6 @@ files:
|
|
30
44
|
- lib/advent_of_code_cli.rb
|
31
45
|
- lib/advent_of_code_cli/commands.rb
|
32
46
|
- lib/advent_of_code_cli/commands/command.rb
|
33
|
-
- lib/advent_of_code_cli/commands/cookie.rb
|
34
47
|
- lib/advent_of_code_cli/commands/download.rb
|
35
48
|
- lib/advent_of_code_cli/commands/scaffold.rb
|
36
49
|
- lib/advent_of_code_cli/commands/solve.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module AdventOfCode
|
4
|
-
module Commands
|
5
|
-
class Cookie
|
6
|
-
def initialize(value:)
|
7
|
-
@value = value
|
8
|
-
end
|
9
|
-
|
10
|
-
def execute
|
11
|
-
say "Creating cookie.txt file..."
|
12
|
-
File.open("cookie.txt", "w") do |file|
|
13
|
-
file.puts @value
|
14
|
-
end
|
15
|
-
|
16
|
-
say "Done!", :green
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|