aoc_rb 0.2.5 → 0.2.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: 9221e43617852ea0a93f97cc13df1dc604b7e597030dffced06b24ee3e3810a6
4
- data.tar.gz: 943e273cf7026634f134ae3cc4914187a9ec7f28af2cbdc203d401915a9e66b3
3
+ metadata.gz: 02b8501bb62be5f7f1103b8b7a1b032bdde616ea8ce384bbf9ea6ef95b0974a5
4
+ data.tar.gz: c298a15ee511530586a1189254564383ab1a8bdcc3e8b1edf2d4a012544adf66
5
5
  SHA512:
6
- metadata.gz: 76b52a53c7a2cf3e81b0ab3d84c55ab6c12733ebe2586921999d9a728cdc172deea72389d29439cdb6b9bc752938a81a2152d3d4f15d6a536231b7c0f8ca0068
7
- data.tar.gz: db4138ca832aaee0996101a3b2efa5e2facd617c4253e7ef1853912f9062f985da7091caca3af6f29498f5aaa53f908512967d105decfaca19a5cef6185d07c0
6
+ metadata.gz: 4dee4989b3bd15376712a7dcb2207598c24f8df82ee9d955c130c59dbf2695f0cf5c1413bfe2f1c7aca04f48b947daa0aa63b077e62f619218c3a16d2a6d48d9
7
+ data.tar.gz: ce87654277f3c3ed7e4a7d296790044ec0b6da6de41ef721e35b76ea7c3c2dca6bf66f918951717bb53f7391da272ba82b4862d040bdee5185cf36b45aa7898a
@@ -0,0 +1,26 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3
+ {
4
+ "name": "Advent of Code Ruby Gem",
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "image": "mcr.microsoft.com/devcontainers/ruby:1-3.3-bookworm",
7
+
8
+ // Features to add to the dev container. More info: https://containers.dev/features.
9
+ // "features": {},
10
+
11
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
12
+ // "forwardPorts": [],
13
+
14
+ // Use 'postCreateCommand' to run commands after the container is created.
15
+ // "postCreateCommand": "ruby --version",
16
+
17
+ // Configure tool-specific properties.
18
+ "customizations" : {
19
+ "jetbrains" : {
20
+ "backend" : "RubyMine"
21
+ }
22
+ },
23
+
24
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
25
+ // "remoteUser": "root"
26
+ }
@@ -24,7 +24,7 @@ jobs:
24
24
  changelog:
25
25
  runs-on: ubuntu-latest
26
26
  steps:
27
- - uses: actions/checkout@v2
27
+ - uses: actions/checkout@v4
28
28
  - id: read-version
29
29
  run: |
30
30
  echo "::set-output name=VERSION::`cat lib/aoc_rb/version.rb | grep -i version | awk '{ print $3 }' | sed -e 's/\"//g'`"
@@ -36,14 +36,14 @@ jobs:
36
36
  runs-on: ubuntu-latest
37
37
  strategy:
38
38
  matrix:
39
- ruby-version: ['2.6', '2.7', '3.0', '3.1']
39
+ ruby-version: ['3.1', '3.2', '3.3']
40
40
  steps:
41
- - uses: actions/checkout@v2
41
+ - uses: actions/checkout@v4
42
42
  - name: Set up Ruby
43
43
  # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
44
44
  # change this to (see https://github.com/ruby/setup-ruby#versioning):
45
45
  # uses: ruby/setup-ruby@v1
46
- uses: ruby/setup-ruby@ebaea52cb20fea395b0904125276395e37183dac
46
+ uses: ruby/setup-ruby@v1
47
47
  with:
48
48
  ruby-version: ${{ matrix.ruby-version }}
49
49
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
data/CHANGELOG.md CHANGED
@@ -7,6 +7,14 @@ 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
+
14
+ ## [0.2.6]
15
+ ### Changed
16
+ - Updated minimum gem versions for dependencies ([#26](https://github.com/pacso/aoc_rb/pull/26) by [@pacso](https://github.com/pacso))
17
+
10
18
  ## [0.2.5]
11
19
  ### Added
12
20
  - New spec --all task to run all tests (by [@kauredo](https://github.com/kauredo))
@@ -58,7 +66,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
58
66
 
59
67
  Initial release.
60
68
 
61
- [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
62
72
  [0.2.5]: https://github.com/pacso/aoc_rb/compare/v0.2.4...v0.2.5
63
73
  [0.2.4]: https://github.com/pacso/aoc_rb/compare/v0.2.3...v0.2.4
64
74
  [0.2.3]: https://github.com/pacso/aoc_rb/compare/v0.2.2...v0.2.3
data/README.md CHANGED
@@ -1,12 +1,14 @@
1
1
  # AocRb
2
2
 
3
- [![Tests](https://github.com/pacso/aoc_rb/actions/workflows/tests.yml/badge.svg)](https://github.com/pacso/aoc_rb/actions/workflows/tests.yml)
4
3
  [![Gem Version](https://badge.fury.io/rb/aoc_rb.svg)](https://badge.fury.io/rb/aoc_rb)
4
+ [![Tests](https://github.com/pacso/aoc_rb/actions/workflows/tests.yml/badge.svg)](https://github.com/pacso/aoc_rb/actions/workflows/tests.yml)
5
5
 
6
6
  This gem provides a simple way to create a project for solving [Advent of Code](https://adventofcode.com) puzzles.
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.
@@ -25,11 +24,11 @@ Gem::Specification.new do |spec|
25
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
25
  spec.require_paths = ["lib"]
27
26
 
28
- spec.add_dependency "dotenv", "~> 2.7.6"
29
- spec.add_dependency "httparty", "~> 0.20.0"
30
- spec.add_dependency "thor", "~> 1.2.1"
27
+ spec.add_dependency "dotenv", "~> 3.1"
28
+ spec.add_dependency "httparty", "~> 0.22"
29
+ spec.add_dependency "thor", "~> 1.3"
31
30
  spec.add_dependency "rspec", "~> 3.0"
32
- spec.add_dependency "nokogiri", "~> 1.13.6"
31
+ spec.add_dependency "nokogiri", "~> 1.16"
33
32
 
34
- spec.add_development_dependency "webmock", "~> 3.14.0"
33
+ spec.add_development_dependency "webmock", "~> 3.24"
35
34
  end
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.5"
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.5
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: 2022-12-03 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
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.7.6
19
+ version: '3.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.7.6
26
+ version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: httparty
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.20.0
33
+ version: '0.22'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.20.0
40
+ version: '0.22'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: thor
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.2.1
47
+ version: '1.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.2.1
54
+ version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.13.6
75
+ version: '1.16'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.13.6
82
+ version: '1.16'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: webmock
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 3.14.0
89
+ version: '3.24'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 3.14.0
96
+ version: '3.24'
97
97
  description: Tools for creating a new project for your Advent of Code solutions, built
98
98
  using Ruby.
99
99
  email:
@@ -103,6 +103,7 @@ executables:
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
+ - ".devcontainer/devcontainer.json"
106
107
  - ".github/workflows/codeql-analysis.yml"
107
108
  - ".github/workflows/tests.yml"
108
109
  - ".gitignore"
@@ -111,7 +112,6 @@ files:
111
112
  - CODE_OF_CONDUCT.md
112
113
  - Gemfile
113
114
  - LICENSE
114
- - LICENSE.txt
115
115
  - README.md
116
116
  - Rakefile
117
117
  - aoc_rb.gemspec
@@ -140,7 +140,6 @@ licenses:
140
140
  - MIT
141
141
  metadata:
142
142
  homepage_uri: https://github.com/pacso/aoc_rb
143
- source_code_uri: https://github.com/pacso/aoc_rb
144
143
  changelog_uri: https://github.com/pacso/aoc_rb/blob/main/CHANGELOG
145
144
  post_install_message:
146
145
  rdoc_options: []
@@ -157,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
156
  - !ruby/object:Gem::Version
158
157
  version: '0'
159
158
  requirements: []
160
- rubygems_version: 3.3.7
159
+ rubygems_version: 3.5.22
161
160
  signing_key:
162
161
  specification_version: 4
163
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.