toji 2.30.0 → 2.31.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/toji.rb +0 -9
- data/lib/toji/recipe.rb +0 -6
- data/lib/toji/version.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: 2bf9d8505abcc7682462299d3afcc7d9229d9b7e82c34296117b89756caae93a
|
4
|
+
data.tar.gz: e4da7462a4a8e7f39c249292cfdc5c48408fd91f8084f15d5a959e5a77bcdad5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1da9eca5f79395d30484223830d09678e269debded74e613027f58af3ed181848881291f8542c51631e717cf9cfed8a63c8fed5f97ff92928f0e75fa3aee0bb
|
7
|
+
data.tar.gz: c5fda38a8bf9b11b974c0a4dd7882868fe9a135afeb6007f014d7c6f879a16477f1adbc378fe0b9ee3828171ffe7240bc80448ce4b0d6d5ec01db2c989d60487
|
data/lib/toji.rb
CHANGED
@@ -15,13 +15,4 @@ require 'toji/utils'
|
|
15
15
|
|
16
16
|
module Toji
|
17
17
|
class Error < StandardError; end
|
18
|
-
|
19
|
-
class DuplicateStepIndexError < Error
|
20
|
-
attr_reader :indexes
|
21
|
-
|
22
|
-
def initialize(indexes)
|
23
|
-
super("step indexes is deuplicated: #{indexes.inject}")
|
24
|
-
@indexes = indexes
|
25
|
-
end
|
26
|
-
end
|
27
18
|
end
|
data/lib/toji/recipe.rb
CHANGED
@@ -56,12 +56,6 @@ module Toji
|
|
56
56
|
steps.map(&:compact!)
|
57
57
|
steps.select! {|step| 0<step.ingredients.to_a.length}
|
58
58
|
|
59
|
-
indexes = steps.map{|step| {index: step.index, subindex: step.subindex}}
|
60
|
-
duplicates = indexes - indexes.uniq
|
61
|
-
if 0<duplicates.length
|
62
|
-
raise DuplicateStepIndexError.new(duplicates)
|
63
|
-
end
|
64
|
-
|
65
59
|
ab_expects.select! {|ab| ab.alcohol && ab.nihonshudo}
|
66
60
|
ab_expects.uniq! {|ab| [ab.alcohol, ab.nihonshudo]}
|
67
61
|
|
data/lib/toji/version.rb
CHANGED