aoc_rb 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f512d480998f52892cd50b4ab4f2ede65c6a658f05d51d7a94cdc435737f7b3c
4
- data.tar.gz: 36fa102cf29463ec5e66c98683cc4be5b33a055799c94b18370a2158fc373f43
3
+ metadata.gz: 02b8501bb62be5f7f1103b8b7a1b032bdde616ea8ce384bbf9ea6ef95b0974a5
4
+ data.tar.gz: c298a15ee511530586a1189254564383ab1a8bdcc3e8b1edf2d4a012544adf66
5
5
  SHA512:
6
- metadata.gz: 3b51f8cee053e999a534a61076d4884bf4b1a0e02372af6901f51f5057fa16193d2cb269fffa1639ae7ecda36faf2dc0836a73d6c396314ee2a1a06df321c4d5
7
- data.tar.gz: df718b45fde0c6cf0d3510b995158d846ea9d03114b903be7cd18c765ee19715f5dd4699a13a9dbbf0c1db34f064263ff84c536d43cc54a6887060b261d9eaaf
6
+ metadata.gz: 4dee4989b3bd15376712a7dcb2207598c24f8df82ee9d955c130c59dbf2695f0cf5c1413bfe2f1c7aca04f48b947daa0aa63b077e62f619218c3a16d2a6d48d9
7
+ data.tar.gz: ce87654277f3c3ed7e4a7d296790044ec0b6da6de41ef721e35b76ea7c3c2dca6bf66f918951717bb53f7391da272ba82b4862d040bdee5185cf36b45aa7898a
data/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
  ## [Unreleased]
8
8
  - No unreleased changes!
9
9
 
10
+ ## [0.2.7]
11
+ ### Added
12
+ - Version command, which outputs the installed version of the gem ([#30](https://github.com/pacso/aoc_rb/pull/30) by [@pacso](https://github.com/pacso))
13
+
10
14
  ## [0.2.6]
11
15
  ### Changed
12
16
  - Updated minimum gem versions for dependencies ([#26](https://github.com/pacso/aoc_rb/pull/26) by [@pacso](https://github.com/pacso))
@@ -62,7 +66,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
62
66
 
63
67
  Initial release.
64
68
 
65
- [Unreleased]: https://github.com/pacso/aoc_rb/compare/v0.2.5...HEAD
69
+ [Unreleased]: https://github.com/pacso/aoc_rb/compare/v0.2.7...HEAD
70
+ [0.2.7]: https://github.com/pacso/aoc_rb/compare/v0.2.6...v0.2.7
71
+ [0.2.6]: https://github.com/pacso/aoc_rb/compare/v0.2.5...v0.2.6
66
72
  [0.2.5]: https://github.com/pacso/aoc_rb/compare/v0.2.4...v0.2.5
67
73
  [0.2.4]: https://github.com/pacso/aoc_rb/compare/v0.2.3...v0.2.4
68
74
  [0.2.3]: https://github.com/pacso/aoc_rb/compare/v0.2.2...v0.2.3
data/README.md CHANGED
@@ -7,6 +7,8 @@ This gem provides a simple way to create a project for solving [Advent of Code](
7
7
 
8
8
  It also provides some handy tools to automate your interactions with the Advent of Code website.
9
9
 
10
+ If you want more help with your puzzles (use with care ... it'll take the fun out of doing it yourself) then take a look at [aoc_rb_helpers](https://github.com/pacso/aoc_rb_helpers).
11
+
10
12
  ## Getting Started
11
13
 
12
14
  First of all, install the gem:
@@ -27,7 +29,7 @@ Before running any commands, you must set up your `AOC_COOKIE` environment varia
27
29
  $ cp .env-template .env
28
30
 
29
31
  You'll need to log in to the [Advent of Code](https://adventofcode.com) website and then grab a copy of your session key from your cookies.
30
- In Chrome you can do this via [chrome settings](chrome://settings/cookies/detail?site=adventofcode.com) by entering `chrome://settings/cookies/detail?site=adventofcode.com` in your address bar. Just click on `session` and copy your key from the `Content` section.
32
+ In Chrome you can do this by opening the `Developer Tools` window (`⌥ ⌘ I` on Mac) when browsing the Advent of Code website. Within the `Application` tab, expand `Cookies` under `Storage` in the side menu and select `https://adventofcode.com`. This will then show you all of the cookies set by the website. You need to select the `session` cookie and copy the value.
31
33
 
32
34
  Now edit the new `.env` file, so that it looks like the following, replacing `ABCDE12345` with the session key you just copied:
33
35
 
@@ -35,9 +37,28 @@ Now edit the new `.env` file, so that it looks like the following, replacing `AB
35
37
 
36
38
  You're now able to run all the `aoc` commands provided by this gem.
37
39
 
38
- You'll see you have a few options when running the `aoc` command within your project.
40
+ You'll see you have a few options when running the `aoc` command within your project. Running `aoc help` will show you all of your options:
41
+
42
+ $ aoc help
43
+ Commands:
44
+ aoc exec # executes and optionally submits the puzzle for today, or the specified date
45
+ aoc help [COMMAND] # Describe available commands or one specific command
46
+ aoc output # outputs results from your solution for the given day
47
+ aoc prep # preps everything you need for a new puzzle
48
+ aoc spec # runs tests for today, or the specified date
49
+ aoc version # prints the current installed version of AocRb
50
+
51
+ If you want to see you options for a given command:
52
+
53
+ $ aoc help prep
54
+ Usage:
55
+ aoc prep
56
+
57
+ Options:
58
+ -y, [--year=N]
59
+ -d, [--day=N]
39
60
 
40
- `prep` will set everything up for a new daily puzzle. It defaults to the puzzle for today, but you can work with older puzzles by passing the year and day:
61
+ Running `aoc prep` will set everything up for a new daily puzzle. It defaults to the puzzle for today, but you can work with older puzzles by passing the year and day:
41
62
 
42
63
  $ aoc prep 2017 12
43
64
 
data/aoc_rb.gemspec CHANGED
@@ -13,7 +13,6 @@ Gem::Specification.new do |spec|
13
13
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
14
 
15
15
  spec.metadata["homepage_uri"] = spec.homepage
16
- spec.metadata["source_code_uri"] = "https://github.com/pacso/aoc_rb"
17
16
  spec.metadata["changelog_uri"] = "https://github.com/pacso/aoc_rb/blob/main/CHANGELOG"
18
17
 
19
18
  # Specify which files should be added to the gem when it is released.
data/exe/aoc CHANGED
@@ -2,3 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "aoc_rb/cli"
5
+
6
+ AocRb::Cli.start
data/lib/aoc_rb/app.rb CHANGED
@@ -142,7 +142,11 @@ module AocRb
142
142
  fetch(year, day)
143
143
  bootstrap(year, day)
144
144
  end
145
+
146
+ desc "version", "prints the current installed version of AocRb"
147
+
148
+ def version
149
+ puts "AocRb version #{AocRb::VERSION}"
150
+ end
145
151
  end
146
152
  end
147
-
148
- AocRb::App.start
data/lib/aoc_rb/cli.rb CHANGED
@@ -47,7 +47,11 @@ module AocRb
47
47
  gemfile_src = File.join(File.dirname(__FILE__), "../../templates/Gemfile")
48
48
  File.open(gemfile_dst, "w") { |f| f.write(File.read(gemfile_src))}
49
49
  end
50
+
51
+ desc "version", "prints the current installed version of AocRb"
52
+
53
+ def version
54
+ puts "AocRb version #{AocRb::VERSION}"
55
+ end
50
56
  end
51
57
  end
52
-
53
- AocRb::Cli.start
@@ -1,3 +1,3 @@
1
1
  module AocRb
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
data/lib/aoc_rb.rb CHANGED
@@ -1,5 +1,3 @@
1
- puts "lib/aoc_rb.rb"
2
-
3
1
  Dir[File.join(File.dirname(__FILE__), "aoc_rb", "**", "*.rb")].each { |file| require file }
4
2
 
5
3
  module AocRb
data/templates/bin/aoc CHANGED
@@ -33,3 +33,5 @@ require "bundler/setup"
33
33
  # load Gem.bin_path("aoc_rb", "aoc")
34
34
 
35
35
  require 'aoc_rb/app'
36
+
37
+ AocRb::App.start
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aoc_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Pascoe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-30 00:00:00.000000000 Z
11
+ date: 2024-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -112,7 +112,6 @@ files:
112
112
  - CODE_OF_CONDUCT.md
113
113
  - Gemfile
114
114
  - LICENSE
115
- - LICENSE.txt
116
115
  - README.md
117
116
  - Rakefile
118
117
  - aoc_rb.gemspec
@@ -141,7 +140,6 @@ licenses:
141
140
  - MIT
142
141
  metadata:
143
142
  homepage_uri: https://github.com/pacso/aoc_rb
144
- source_code_uri: https://github.com/pacso/aoc_rb
145
143
  changelog_uri: https://github.com/pacso/aoc_rb/blob/main/CHANGELOG
146
144
  post_install_message:
147
145
  rdoc_options: []
@@ -158,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
156
  - !ruby/object:Gem::Version
159
157
  version: '0'
160
158
  requirements: []
161
- rubygems_version: 3.5.16
159
+ rubygems_version: 3.5.22
162
160
  signing_key:
163
161
  specification_version: 4
164
162
  summary: A Ruby toolkit for Advent of Code
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2020 TODO: Write your name
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.