advent 0.1.7 → 0.1.9

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: ab18c0d8a6206b03d6b070b406f4e746d6a0e312fabfe5aaa799a53399036b41
4
- data.tar.gz: 12ba2ad51722b2f67edfcc3025e595b094492afdded74b49e4e3487a3994a8ee
3
+ metadata.gz: fdcfa795a04fd42065602ed2e03f832c71cf23ddda7def8866ddd13d2e40e93c
4
+ data.tar.gz: 4ec1d2ae984ade4acfac011f6bed47aa5de43bf50f118fb8d9651fb71cc52c6b
5
5
  SHA512:
6
- metadata.gz: ded4631baad2a0f0d30897fd9ae8a58d88c1874c40cedbc9c8599f5e2d639cd650d78e88c4a0e204f4ef88ac4b41238b5357aa1234ec13952ed84125e0449e74
7
- data.tar.gz: 05b6cb034169d7b1fa6e4b6a4f52fd6a09a4c3e7394882df99438a064b99251e698e4991361bede9d57a6ef83dafd8ba536e74a53d0229d918e8d88a558661d9
6
+ metadata.gz: 6eaac6614eee3b4d1c44058fe909e30e803a3c5e04f4dd29f23bf86eb45ccf651767bb4e79fd34c1bcc896f5fa14cba5be021eca5135ee1fc260f451f0536e88
7
+ data.tar.gz: 77709b3b0e46a7281cec2f93fc7c1e292adf0f84c421b933c6142b2a81401b55596570466aa8a8c2b9451097840d23d6c89b476e4f85201deb7d280f53c11344
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/advent.svg)](https://badge.fury.io/rb/advent)
4
4
 
5
- Have fun with the [Advent of Code](https://rubygems.org) using Ruby.
5
+ Have fun with the [Advent of Code](https://adventofcode.com) using Ruby.
6
6
 
7
7
  ## Installation
8
8
 
@@ -16,77 +16,57 @@ If bundler is not being used to manage dependencies, install the gem by executin
16
16
 
17
17
  ## Usage
18
18
 
19
- Initialise a new project somewhere:
20
-
21
- ```bash
22
- mkdir advent_of_code && cd advent_of_code
23
-
24
- # create a blank advent.yml config file
25
- advent init
26
- ```
27
-
28
- Configuration values and format are explained in the [Config](#config) section.
29
-
30
19
  Advent expects you to have a working directory resembling something like:
31
20
 
32
21
  $ tree
33
22
  .
34
23
  ├── 2015
35
- ├── 2016
36
- └── advent.yml
24
+ └── 2016
37
25
 
38
- You can run commands from anywhere under this directory.
26
+ `advent` commands should be run from the root of this directory tree.
39
27
 
40
- The typical flow for tackling a daily challenge would be:
41
-
42
- $ advent generate 2015 1 # generate files to work in
43
- $ advent download 2015 1 # download the input file
28
+ If you want to use `advent` for downloading challenge inputs, first auth:
44
29
 
45
- $ vim 2015/day1.rb 2015/day1_test.rb # do your work
30
+ $ advent auth
46
31
 
47
- $ ruby 2015/day1_test.rb # run any tests you may have
48
- $ advent solve 2015/day1.rb # get your answers to submit
32
+ It will prompt you for your session cookie from
33
+ [adventofcode.com](https://adventofcode.com). Log in to the website and look
34
+ at your cookies, grab the `session` value and paste it into the prompt (it's
35
+ hidden). This will be saved in `.advent_session` which should also have been
36
+ added to your `.gitignore` if you're in a git repo.
49
37
 
50
- A list of commands and help is available using `advent`:
51
-
52
- $ advent help
53
-
54
- ## Config
38
+ The typical flow for tackling a daily challenge would be:
55
39
 
56
- The config file should be at the root of your working directory called
57
- `advent.yml`. The default values if you don't provide an override are:
40
+ $ advent new 2015 1 # generates working files
41
+ $ advent download 2015 1 # downloads the input file
58
42
 
59
- ```yaml
60
- download_when_generating: true
61
- remember_session: true
62
- ```
43
+ $ vim 2015/day1.rb test/2015/day1_test.rb # do your work
63
44
 
64
- ### Config explained
45
+ $ ruby test/2015/day1_test.rb # run any tests you may have
46
+ $ advent solve 2015/day1.rb # get your answers to submit on adventofcode.com
65
47
 
66
- <dl>
67
- <dt>download_when_generating</dt>
68
- <dd>
69
- When you run `advent generate` it will automatically download the input file to
70
- go with it
71
- </dd>
48
+ A list of commands and help is available using `advent`:
72
49
 
73
- <dt>remember_session</dt>
74
- <dd>
75
- Save your session cookie in `.advent_session` when prompted so you don't need to
76
- find it again
77
- </dd>
78
- </dl>
50
+ $ advent help
79
51
 
80
52
  ## Development
81
53
 
82
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
54
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
55
+ `rake test` to run the tests. You can also run `bin/console` for an interactive
56
+ prompt that will allow you to experiment.
83
57
 
84
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
58
+ To install this gem onto your local machine, run `bundle exec rake install`. To
59
+ release a new version, update the version number in `version.rb`, and then run
60
+ `bundle exec rake release`, which will create a git tag for the version, push
61
+ git commits and the created tag, and push the `.gem` file to
62
+ [rubygems.org](https://rubygems.org).
85
63
 
86
64
  ## Contributing
87
65
 
88
- Bug reports and pull requests are welcome on GitHub at https://github.com/dnlgrv/advent-rb.
66
+ Bug reports and pull requests are welcome on GitHub at
67
+ [https://github.com/dnlgrv/advent-rb](https://github.com/dnlgrv/advent-rb).
89
68
 
90
69
  ## License
91
70
 
92
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
71
+ The gem is available as open source under the terms of the [MIT
72
+ License](https://opensource.org/licenses/MIT).
@@ -1,18 +1,18 @@
1
1
  require "advent"
2
2
  require "minitest/autorun"
3
3
 
4
- require_relative "../day<%= day %>"
4
+ require_relative "../../<%= year %>/day<%= day %>"
5
5
 
6
6
  class Day<%= day %>Test < Advent::TestCase
7
7
  def setup
8
8
  @solution = Day<%= day %>.new
9
9
  end
10
10
 
11
- # def test_part1
12
- # assert_equal 123, @solution.part1
11
+ # def test_part_1
12
+ # assert_equal 123, @solution.part_1
13
13
  # end
14
14
 
15
- # def test_part2
16
- # assert_equal 123, @solution.part2
15
+ # def test_part_2
16
+ # assert_equal 123, @solution.part_2
17
17
  # end
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module Advent
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: advent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Grieve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-02 00:00:00.000000000 Z
11
+ date: 2023-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport