aoc_generator 0.1.9 → 0.1.11

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: 209a280e6279d13cc27d005359020122010c13663798c8cde7b6ae381ce682e2
4
- data.tar.gz: 20bdcc796e05cc57fbc083636b37fd28b79e5424c6d8afac0471f36936fdb952
3
+ metadata.gz: 87bb6bdad90acd0b30e35fc65693edf78b013b3296213f07afba6fd7bdd4e606
4
+ data.tar.gz: 6ee72895bee557c2c59152059bee3dfe7cabea0398a57a21d91f7f56d99ae587
5
5
  SHA512:
6
- metadata.gz: dfe0ed279f24ea63b3cc9d03328a1036c391ad6c20db56649b8b1fc4e384a11c7052d3d91c197f33a3eddebc850a0d85fdaf149acdd6c8d8bd44b2a0132d161b
7
- data.tar.gz: 0b37f8320f04605a1e6ef7c5bc1d2bc0c541a1c7c33c45d1eac19965bb99a299bc0f4baa1e6a4bb047375945fc43676c013f7c65eb140dcb3c742c496f982249
6
+ metadata.gz: 2c67f8eb67a10e215d6feb6ccce9e6b5867e4b27085caca60430364f0847c1fb39ef6ddc7a561bb95774a6c67e06196675827815a92dd2669a278c623ccf6600
7
+ data.tar.gz: 86881ffb81aee7dd4616f5f4340f62e49dbbd0dec2b08f869e1d6d5ae3d59345801c9e541b40f1bbddeeb9853c6d91fd512b6b9072f2763d32f650a6abc72bd2
data/CHANGELOG.md CHANGED
@@ -1,10 +1,18 @@
1
1
  # Changelog
2
2
 
3
- ## [0.1.9] - 2024-12-02
3
+ ## [0.1.11] - 2024-12-05
4
+
5
+ - Only parse the final code blocks as the test input
6
+
7
+ ## [0.1.10] - 2024-12-02
4
8
 
5
9
  - Output to stdout which files were generated
6
10
 
7
- ## [0.1.8] - 2024-12-02
11
+ ## [0.1.9]
12
+
13
+ - Fix a HTML-parsing bug for the test expectation
14
+
15
+ ## [0.1.8]
8
16
 
9
17
  - Use commented-out code in templates
10
18
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aoc_generator (0.1.9)
4
+ aoc_generator (0.1.11)
5
5
  fileutils (~> 1.7)
6
6
  nokogiri (~> 1.16)
7
7
  thor (~> 1.3)
@@ -26,16 +26,14 @@ module AdventOfCodeGenerator
26
26
  end
27
27
 
28
28
  def test_input
29
- part_descriptions.map { |desc| desc.scan(/```sh\n(.*?)\n```/m) }.flatten
29
+ part_descriptions.map { |desc| desc.scan(/```sh\n(.*?)\n```/m).last }.flatten
30
30
  end
31
31
 
32
32
  def test_expectations
33
- part_descriptions
34
- .flat_map { |desc| desc.scan(/\*\*`(.*?)`\*\*/) }
35
- .map do |matches|
36
- match = matches.first
37
- match&.match?(/\A\d+\z/) ? match.to_i : match
38
- end.compact
33
+ part_descriptions.map do |desc|
34
+ match = desc.scan(/\*\*`(.*?)`\*\*/).flatten.last
35
+ match&.match?(/\A\d+\z/) ? match.to_i : match
36
+ end.compact
39
37
  end
40
38
 
41
39
  def articles
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AdventOfCodeGenerator
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.11"
5
5
 
6
6
  class Error < StandardError; end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aoc_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-01 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: fileutils