aoc_rb 0.2.3 → 0.2.4

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: c6b9b02f670f239d02ce4b04aebc3520e82dfda9654ec8e031b929c9b2fcd379
4
- data.tar.gz: 260fcdaaa65f8652e075dae3f6d67f867692d1f50468ea058110de0ca9666397
3
+ metadata.gz: 5e7022fa9b1978076b33de4b63e0161f63ac1359b0cabf42f5eb89ba0fea309f
4
+ data.tar.gz: 5ecae3ef947b0cef0719278644af8c211946fff6b985e046f4225f044fa0c2cb
5
5
  SHA512:
6
- metadata.gz: 50e0b3d7d0debb618b240109d6da5d684e4327d6a66231c716a1d0f18e5e17287082449a08f25bf685c7cd8a2bd186f55f88d0b4c7f9b813454cfdc181637d1b
7
- data.tar.gz: 30d87e13feb0c05846b86df8563ccdc407ea6136cbbd39e1865104a6a00e2d15c9b0727533e70d806ba79e2ff3d7155cac8ff1b4bfa96e0b22783a259a4ef02e
6
+ metadata.gz: 86b1cd0f4090056041bd9e53c215684ad598d97b394c2a724a8b71ef6e4497e5aa1a66197ad09c651c48ad910b58654349f33e9ad142e36e2a5defa850576c1b
7
+ data.tar.gz: 430b19f6c60a9bc95e487e63cbffcb3bb5cf0f86f93921e41d7269c1addbfdc1c7473a255a2b41ebe5b29f6495346a267aceeb4299e12926d28378624b62dd17
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
+ - No unreleased changes!
9
+
10
+ ## [0.2.4]
11
+ ### Fixed
12
+ - Output task fixed (by [@kauredo](https://github.com/kauredo))
13
+ - Spec task added to run tests from a given day (by [@kauredo](https://github.com/kauredo))
8
14
 
9
15
  ## [0.2.3]
10
16
  ### Changed
@@ -40,7 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
40
46
 
41
47
  Initial release.
42
48
 
43
- [Unreleased]: https://github.com/pacso/aoc_rb/compare/v0.2.3...HEAD
49
+ [Unreleased]: https://github.com/pacso/aoc_rb/compare/v0.2.4...HEAD
50
+ [0.2.4]: https://github.com/pacso/aoc_rb/compare/v0.2.3...v0.2.4
44
51
  [0.2.3]: https://github.com/pacso/aoc_rb/compare/v0.2.2...v0.2.3
45
52
  [0.2.2]: https://github.com/pacso/aoc_rb/compare/v0.2.1...v0.2.2
46
53
  [0.2.1]: https://github.com/pacso/aoc_rb/compare/v0.2.0...v0.2.1
data/lib/aoc_rb/app.rb CHANGED
@@ -108,12 +108,22 @@ module AocRb
108
108
  method_option :day, aliases: "-d", type: :numeric, default: Time.now.day
109
109
 
110
110
  def output(year = options[:year], day = options[:day])
111
- puzzle = AocRb::PuzzleSource.create_puzzle(year, day)
112
111
  input = AocRb::PuzzleInput.load(year, day)
112
+ puzzle = AocRb::PuzzleSource.create_puzzle(year, day, input)
113
113
 
114
- AocRb::PuzzleSource.run_part('part 1') { puzzle.part_1(input) }
114
+ AocRb::PuzzleSource.run_part('part 1') { puzzle.part_1 }
115
115
  puts
116
- AocRb::PuzzleSource.run_part('part 2') { puzzle.part_2(input) }
116
+ AocRb::PuzzleSource.run_part('part 2') { puzzle.part_2 }
117
+ end
118
+
119
+ desc "spec", "runs tests for today, or the specified date"
120
+ method_option :year, aliases: "-y", type: :numeric, default: Time.now.year
121
+ method_option :day, aliases: "-d", type: :numeric, default: Time.now.day
122
+
123
+ def spec(year = options[:year], day = options[:day])
124
+ spec_dir = File.join("spec", year.to_s, AocRb::Puzzle.padded(day))
125
+
126
+ Kernel.exec( "bundle exec rspec #{spec_dir}" )
117
127
  end
118
128
 
119
129
  desc "prep", "preps everything you need for a new puzzle"
@@ -1,3 +1,3 @@
1
1
  module AocRb
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
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.3
4
+ version: 0.2.4
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-06-01 00:00:00.000000000 Z
11
+ date: 2022-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  requirements: []
160
- rubygems_version: 3.0.9
160
+ rubygems_version: 3.3.7
161
161
  signing_key:
162
162
  specification_version: 4
163
163
  summary: A Ruby toolkit for Advent of Code