Skip to content

Commit

Permalink
Release 0.2.7 (#31)
Browse files Browse the repository at this point in the history
* Update version

* Update changelog

* Update readme with chrome instructions for accessing the session cookie

* Update readme with command help examples
  • Loading branch information
pacso authored Dec 5, 2024
1 parent f65866f commit 8f231f5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- No unreleased changes!

## [0.2.7]
### Added
- 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))

Expand Down Expand Up @@ -63,7 +66,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Initial release.

[Unreleased]: https://github.com/pacso/aoc_rb/compare/v0.2.6...HEAD
[Unreleased]: https://github.com/pacso/aoc_rb/compare/v0.2.7...HEAD
[0.2.7]: https://github.com/pacso/aoc_rb/compare/v0.2.6...v0.2.7
[0.2.6]: https://github.com/pacso/aoc_rb/compare/v0.2.5...v0.2.6
[0.2.5]: https://github.com/pacso/aoc_rb/compare/v0.2.4...v0.2.5
[0.2.4]: https://github.com/pacso/aoc_rb/compare/v0.2.3...v0.2.4
Expand Down
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,36 @@ Before running any commands, you must set up your `AOC_COOKIE` environment varia
$ cp .env-template .env

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.
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.
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.

Now edit the new `.env` file, so that it looks like the following, replacing `ABCDE12345` with the session key you just copied:

AOC_COOKIE=ABCDE12345

You're now able to run all the `aoc` commands provided by this gem.

You'll see you have a few options when running the `aoc` command within your project.
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:

$ aoc help
Commands:
aoc exec # executes and optionally submits the puzzle for today, or the specified date
aoc help [COMMAND] # Describe available commands or one specific command
aoc output # outputs results from your solution for the given day
aoc prep # preps everything you need for a new puzzle
aoc spec # runs tests for today, or the specified date
aoc version # prints the current installed version of AocRb

If you want to see you options for a given command:

$ aoc help prep
Usage:
aoc prep

Options:
-y, [--year=N]
-d, [--day=N]

`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:
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:

$ aoc prep 2017 12

Expand Down
2 changes: 1 addition & 1 deletion lib/aoc_rb/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module AocRb
VERSION = "0.2.6"
VERSION = "0.2.7"
end
2 changes: 1 addition & 1 deletion spec/lib/aoc_rb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

RSpec.describe AocRb do
it "has the expected version number" do
expect(AocRb::VERSION).to eq "0.2.6"
expect(AocRb::VERSION).to eq "0.2.7"
end
end

0 comments on commit 8f231f5

Please sign in to comment.