aoc_rb 0.2.4 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.devcontainer/devcontainer.json +26 -0
- data/.github/workflows/tests.yml +4 -4
- data/.gitignore +7 -0
- data/CHANGELOG.md +18 -1
- data/README.md +1 -1
- data/aoc_rb.gemspec +5 -5
- data/lib/aoc_rb/app.rb +11 -3
- data/lib/aoc_rb/cli.rb +4 -0
- data/lib/aoc_rb/version.rb +1 -1
- metadata +14 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f512d480998f52892cd50b4ab4f2ede65c6a658f05d51d7a94cdc435737f7b3c
|
4
|
+
data.tar.gz: 36fa102cf29463ec5e66c98683cc4be5b33a055799c94b18370a2158fc373f43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b51f8cee053e999a534a61076d4884bf4b1a0e02372af6901f51f5057fa16193d2cb269fffa1639ae7ecda36faf2dc0836a73d6c396314ee2a1a06df321c4d5
|
7
|
+
data.tar.gz: df718b45fde0c6cf0d3510b995158d846ea9d03114b903be7cd18c765ee19715f5dd4699a13a9dbbf0c1db34f064263ff84c536d43cc54a6887060b261d9eaaf
|
@@ -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
|
+
}
|
data/.github/workflows/tests.yml
CHANGED
@@ -24,7 +24,7 @@ jobs:
|
|
24
24
|
changelog:
|
25
25
|
runs-on: ubuntu-latest
|
26
26
|
steps:
|
27
|
-
- uses: actions/checkout@
|
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: ['
|
39
|
+
ruby-version: ['3.1', '3.2', '3.3']
|
40
40
|
steps:
|
41
|
-
- uses: actions/checkout@
|
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@
|
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/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,22 @@ 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.6]
|
11
|
+
### Changed
|
12
|
+
- Updated minimum gem versions for dependencies ([#26](https://github.com/pacso/aoc_rb/pull/26) by [@pacso](https://github.com/pacso))
|
13
|
+
|
14
|
+
## [0.2.5]
|
15
|
+
### Added
|
16
|
+
- New spec --all task to run all tests (by [@kauredo](https://github.com/kauredo))
|
17
|
+
- Tests for output task (by [@kauredo](https://github.com/kauredo))
|
18
|
+
|
19
|
+
### Changed
|
20
|
+
- Updated gitignore to exclude ruby environment and gem build files
|
21
|
+
- Updated all specs to use the generated test app folder, rather than the gem root dir ([#21](https://github.com/pacso/aoc_rb/pull/21) by [@pacso](https://github.com/pacso))
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
- Thor exit_on_failure deprecation warning (by [@kauredo](https://github.com/kauredo))
|
25
|
+
|
10
26
|
## [0.2.4]
|
11
27
|
### Fixed
|
12
28
|
- Output task fixed (by [@kauredo](https://github.com/kauredo))
|
@@ -46,7 +62,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
46
62
|
|
47
63
|
Initial release.
|
48
64
|
|
49
|
-
[Unreleased]: https://github.com/pacso/aoc_rb/compare/v0.2.
|
65
|
+
[Unreleased]: https://github.com/pacso/aoc_rb/compare/v0.2.5...HEAD
|
66
|
+
[0.2.5]: https://github.com/pacso/aoc_rb/compare/v0.2.4...v0.2.5
|
50
67
|
[0.2.4]: https://github.com/pacso/aoc_rb/compare/v0.2.3...v0.2.4
|
51
68
|
[0.2.3]: https://github.com/pacso/aoc_rb/compare/v0.2.2...v0.2.3
|
52
69
|
[0.2.2]: https://github.com/pacso/aoc_rb/compare/v0.2.1...v0.2.2
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
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
|
|
data/aoc_rb.gemspec
CHANGED
@@ -25,11 +25,11 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
26
|
spec.require_paths = ["lib"]
|
27
27
|
|
28
|
-
spec.add_dependency "dotenv", "~>
|
29
|
-
spec.add_dependency "httparty", "~> 0.
|
30
|
-
spec.add_dependency "thor", "~> 1.
|
28
|
+
spec.add_dependency "dotenv", "~> 3.1"
|
29
|
+
spec.add_dependency "httparty", "~> 0.22"
|
30
|
+
spec.add_dependency "thor", "~> 1.3"
|
31
31
|
spec.add_dependency "rspec", "~> 3.0"
|
32
|
-
spec.add_dependency "nokogiri", "~> 1.
|
32
|
+
spec.add_dependency "nokogiri", "~> 1.16"
|
33
33
|
|
34
|
-
spec.add_development_dependency "webmock", "~> 3.
|
34
|
+
spec.add_development_dependency "webmock", "~> 3.24"
|
35
35
|
end
|
data/lib/aoc_rb/app.rb
CHANGED
@@ -29,6 +29,10 @@ end
|
|
29
29
|
|
30
30
|
module AocRb
|
31
31
|
class App < Thor
|
32
|
+
def self.exit_on_failure?
|
33
|
+
false
|
34
|
+
end
|
35
|
+
|
32
36
|
desc "fetch", "Downloads the input file and problem statement for today, or an optionally specified year / day", hide: true
|
33
37
|
method_option :year, aliases: "-y", type: :numeric, default: Time.now.year
|
34
38
|
method_option :day, aliases: "-d", type: :numeric, default: Time.now.day
|
@@ -119,11 +123,15 @@ module AocRb
|
|
119
123
|
desc "spec", "runs tests for today, or the specified date"
|
120
124
|
method_option :year, aliases: "-y", type: :numeric, default: Time.now.year
|
121
125
|
method_option :day, aliases: "-d", type: :numeric, default: Time.now.day
|
126
|
+
method_option :all, :type => :boolean, :aliases => "--all"
|
122
127
|
|
123
128
|
def spec(year = options[:year], day = options[:day])
|
124
|
-
|
125
|
-
|
126
|
-
|
129
|
+
if options[:all]
|
130
|
+
Kernel.exec( "bundle exec rspec" )
|
131
|
+
else
|
132
|
+
spec_dir = File.join("spec", year.to_s, AocRb::Puzzle.padded(day))
|
133
|
+
Kernel.exec( "bundle exec rspec #{spec_dir}" )
|
134
|
+
end
|
127
135
|
end
|
128
136
|
|
129
137
|
desc "prep", "preps everything you need for a new puzzle"
|
data/lib/aoc_rb/cli.rb
CHANGED
data/lib/aoc_rb/version.rb
CHANGED
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.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Pascoe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-30 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:
|
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:
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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"
|
@@ -157,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
158
|
- !ruby/object:Gem::Version
|
158
159
|
version: '0'
|
159
160
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
161
|
+
rubygems_version: 3.5.16
|
161
162
|
signing_key:
|
162
163
|
specification_version: 4
|
163
164
|
summary: A Ruby toolkit for Advent of Code
|