aoc_generator 0.1.7 → 0.1.8
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +27 -4
- data/lib/advent_of_code_generator/generator.rb +8 -8
- data/lib/advent_of_code_generator.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53517b89d8f104b0cd5924d2f09eeb6607f735131b80b7b0d6dd694da1b0a842
|
4
|
+
data.tar.gz: cd46560f3dbd64457b37b5459bf13937474c41b97120b84ab0a2c57a36385579
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da3ec592eff238f75cd44853cdf7699f6ad4838a2b51796067f5e514743de03289a82201557d167ad7012958e8cb0715520d0e2fb090094ad0796a9662bb65bf
|
7
|
+
data.tar.gz: cc84976227d250848e62b1025ff3b4bb00ea474047e64f105144bbe2311b2fe3cbfa1e52ffca75e7db0c58f8f269e01d02686a340c00d38c4c72c75d6fbda967
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -75,11 +75,11 @@ The generator creates the following files with basic templates:
|
|
75
75
|
```ruby
|
76
76
|
class DayXX
|
77
77
|
def part_one(input)
|
78
|
-
# Your solution for
|
78
|
+
# Your solution for Part One
|
79
79
|
end
|
80
80
|
|
81
81
|
def part_two(input)
|
82
|
-
# Your solution for
|
82
|
+
# Your solution for Part Two
|
83
83
|
end
|
84
84
|
end
|
85
85
|
```
|
@@ -87,8 +87,31 @@ end
|
|
87
87
|
### `day_XX_spec.rb`
|
88
88
|
|
89
89
|
```ruby
|
90
|
-
RSpec.describe DayXX do
|
91
|
-
|
90
|
+
RSpec.describe Cheddachedda::YearXXXX::DayXX do
|
91
|
+
it "solves Part One" do
|
92
|
+
input = <<~INPUT
|
93
|
+
1abc2
|
94
|
+
pqr3stu8vwx
|
95
|
+
a1b2c3d4e5f
|
96
|
+
treb7uchet
|
97
|
+
INPUT
|
98
|
+
|
99
|
+
expect(described_class.part_one(input)).to eq(142)
|
100
|
+
end
|
101
|
+
|
102
|
+
# it "solves Part Two" do
|
103
|
+
# input = <<~INPUT
|
104
|
+
# two1nine
|
105
|
+
# eightwothree
|
106
|
+
# abcone2threexyz
|
107
|
+
# xtwone3four
|
108
|
+
# 4nineeightseven2
|
109
|
+
# zoneight234
|
110
|
+
# 7pqrstsixteen
|
111
|
+
# INPUT
|
112
|
+
|
113
|
+
# expect(described_class.part_two(input)).to eq(281)
|
114
|
+
# end
|
92
115
|
end
|
93
116
|
```
|
94
117
|
|
@@ -72,11 +72,11 @@ module AdventOfCodeGenerator
|
|
72
72
|
module Year#{@year}
|
73
73
|
class Day#{@day}
|
74
74
|
def self.part_one(input)
|
75
|
-
|
75
|
+
# Your solution for Part One
|
76
76
|
end
|
77
77
|
|
78
78
|
def self.part_two(input)
|
79
|
-
|
79
|
+
# Your solution for Part Two
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
@@ -104,13 +104,13 @@ module AdventOfCodeGenerator
|
|
104
104
|
expect(described_class.part_one(input)).to eq(#{expectations[0]})
|
105
105
|
end
|
106
106
|
|
107
|
-
it "solves Part Two"
|
108
|
-
|
109
|
-
|
110
|
-
|
107
|
+
# it "solves Part Two" do
|
108
|
+
# input = <<~INPUT
|
109
|
+
# #{input[1]&.gsub("\n", "\n # ")}
|
110
|
+
# INPUT
|
111
111
|
|
112
|
-
|
113
|
-
end
|
112
|
+
# expect(described_class.part_two(input)).to eq(#{expectations[1]})
|
113
|
+
# end
|
114
114
|
end
|
115
115
|
RUBY
|
116
116
|
|