toji 2.15.0 → 2.16.0
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/example/example_core.rb +194 -41
- data/lib/toji/ingredient/alcohol.rb +1 -1
- data/lib/toji/ingredient/base.rb +3 -2
- data/lib/toji/ingredient/koji.rb +2 -2
- data/lib/toji/ingredient/lactic_acid.rb +1 -1
- data/lib/toji/ingredient/rice.rb +10 -9
- data/lib/toji/ingredient/tanekoji.rb +3 -3
- data/lib/toji/ingredient/water.rb +3 -3
- data/lib/toji/ingredient/yeast.rb +4 -3
- data/lib/toji/product.rb +6 -6
- data/lib/toji/product/schedule_factory.rb +2 -2
- data/lib/toji/progress/base_state.rb +2 -5
- data/lib/toji/progress/graph/ab.rb +2 -2
- data/lib/toji/progress/koji_state.rb +5 -5
- data/lib/toji/progress/moromi_progress.rb +1 -1
- data/lib/toji/progress/moromi_state.rb +11 -11
- data/lib/toji/progress/moto_state.rb +8 -8
- data/lib/toji/progress/progress.rb +8 -7
- data/lib/toji/progress/state.rb +13 -0
- data/lib/toji/recipe.rb +5 -5
- data/lib/toji/recipe/ab_expect.rb +2 -2
- data/lib/toji/recipe/action.rb +2 -2
- data/lib/toji/recipe/step.rb +15 -8
- data/lib/toji/schedule/action_schedule.rb +1 -1
- data/lib/toji/schedule/base.rb +3 -3
- data/lib/toji/schedule/rice_schedule.rb +3 -3
- data/lib/toji/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6ad4bdc7122ba4ec4f2adcbc6195053ea360234c584ffe253bb4a622f4f8cda
|
4
|
+
data.tar.gz: 78eee224e64461812fa9afdebb2f524277617c361148b810c58abc70438099bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e50e3b61d68cd65359fe16542d76b7a01cf2bfeba73cace8ea115f03067475b8e7e4337d747cb161eeeee08499ee67a71a40693972e161972799f4cca0b22186
|
7
|
+
data.tar.gz: 003cbaaac2e1bd7fa45c73b36f934392548baedd5d604357d1823a8ece558bd19e5234e9b63d71890f55c31d7e17ea1209527e6e8244778356a6102f45ef96fc
|
data/example/example_core.rb
CHANGED
@@ -8,8 +8,12 @@ module Example
|
|
8
8
|
include Toji::Product
|
9
9
|
include Toji::Product::ScheduleFactory
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
attr_reader :name
|
12
|
+
attr_reader :recipe
|
13
|
+
attr_reader :base_date
|
14
|
+
|
15
|
+
attr_reader :description
|
16
|
+
attr_reader :color
|
13
17
|
|
14
18
|
def initialize(id, name, description, recipe, base_date, color=nil)
|
15
19
|
@id = id
|
@@ -86,6 +90,15 @@ module Example
|
|
86
90
|
class Step
|
87
91
|
include Toji::Recipe::Step
|
88
92
|
|
93
|
+
attr_reader :index
|
94
|
+
attr_reader :subindex
|
95
|
+
attr_accessor :kojis
|
96
|
+
attr_accessor :kakes
|
97
|
+
attr_accessor :waters
|
98
|
+
attr_accessor :lactic_acids
|
99
|
+
attr_accessor :alcohols
|
100
|
+
attr_accessor :yeasts
|
101
|
+
|
89
102
|
def initialize(index:, subindex:, kojis: [], kakes: [], waters: [], lactic_acids: [], alcohols: [], yeasts: [])
|
90
103
|
@index = index
|
91
104
|
@subindex = subindex
|
@@ -110,6 +123,18 @@ module Example
|
|
110
123
|
class Koji
|
111
124
|
include Toji::Ingredient::Koji
|
112
125
|
|
126
|
+
attr_accessor :weight
|
127
|
+
attr_reader :brand
|
128
|
+
attr_reader :polishing_ratio
|
129
|
+
attr_reader :made_in
|
130
|
+
attr_reader :year
|
131
|
+
attr_reader :soaking_ratio
|
132
|
+
attr_reader :steaming_ratio
|
133
|
+
attr_reader :cooling_ratio
|
134
|
+
attr_reader :tanekojis
|
135
|
+
attr_reader :dekoji_ratio
|
136
|
+
attr_reader :interval_days
|
137
|
+
|
113
138
|
def initialize(weight:, brand:, polishing_ratio:, made_in:, year:, soaking_ratio:, steaming_ratio:, cooling_ratio:, tanekojis:, dekoji_ratio:, interval_days:)
|
114
139
|
@weight = weight
|
115
140
|
@brand = brand
|
@@ -152,6 +177,8 @@ module Example
|
|
152
177
|
include Toji::Ingredient::Tanekoji
|
153
178
|
|
154
179
|
attr_accessor :koji
|
180
|
+
attr_reader :brand
|
181
|
+
attr_reader :ratio
|
155
182
|
|
156
183
|
def initialize(koji: nil, brand:, ratio:)
|
157
184
|
@brand = brand
|
@@ -167,6 +194,16 @@ module Example
|
|
167
194
|
class Kake
|
168
195
|
include Toji::Ingredient::Kake
|
169
196
|
|
197
|
+
attr_accessor :weight
|
198
|
+
attr_reader :brand
|
199
|
+
attr_reader :polishing_ratio
|
200
|
+
attr_reader :made_in
|
201
|
+
attr_reader :year
|
202
|
+
attr_reader :soaking_ratio
|
203
|
+
attr_reader :steaming_ratio
|
204
|
+
attr_reader :cooling_ratio
|
205
|
+
attr_reader :interval_days
|
206
|
+
|
170
207
|
def initialize(weight:, brand:, polishing_ratio:, made_in:, year:, soaking_ratio:, steaming_ratio:, cooling_ratio:, interval_days:)
|
171
208
|
@weight = weight
|
172
209
|
@brand = brand
|
@@ -183,6 +220,10 @@ module Example
|
|
183
220
|
class Water
|
184
221
|
include Toji::Ingredient::Water
|
185
222
|
|
223
|
+
attr_accessor :weight
|
224
|
+
attr_reader :calcium_hardness
|
225
|
+
attr_reader :magnesium_hardness
|
226
|
+
|
186
227
|
def initialize(weight:)
|
187
228
|
@weight = weight
|
188
229
|
end
|
@@ -191,6 +232,8 @@ module Example
|
|
191
232
|
class LacticAcid
|
192
233
|
include Toji::Ingredient::LacticAcid
|
193
234
|
|
235
|
+
attr_accessor :weight
|
236
|
+
|
194
237
|
def initialize(weight:)
|
195
238
|
@weight = weight
|
196
239
|
end
|
@@ -199,6 +242,8 @@ module Example
|
|
199
242
|
class Alcohol
|
200
243
|
include Toji::Ingredient::Alcohol
|
201
244
|
|
245
|
+
attr_accessor :weight
|
246
|
+
|
202
247
|
def initialize(weight:)
|
203
248
|
@weight = weight
|
204
249
|
end
|
@@ -207,6 +252,10 @@ module Example
|
|
207
252
|
class Yeast
|
208
253
|
include Toji::Ingredient::Yeast
|
209
254
|
|
255
|
+
attr_accessor :weight
|
256
|
+
attr_reader :unit
|
257
|
+
attr_reader :brand
|
258
|
+
|
210
259
|
def initialize(weight:)
|
211
260
|
@weight = weight
|
212
261
|
end
|
@@ -216,22 +265,48 @@ module Example
|
|
216
265
|
class Action
|
217
266
|
include Toji::Recipe::Action
|
218
267
|
|
268
|
+
attr_reader :type
|
269
|
+
attr_reader :interval_days
|
270
|
+
|
219
271
|
def initialize(type:, interval_days:)
|
220
272
|
@type = type
|
221
273
|
@interval_days = interval_days
|
222
274
|
end
|
223
275
|
end
|
224
276
|
|
277
|
+
class AbExpect
|
278
|
+
include Toji::Recipe::AbExpect
|
279
|
+
|
280
|
+
attr_reader :alcohol
|
281
|
+
attr_reader :nihonshudo
|
282
|
+
|
283
|
+
def initialize(alcohol:, nihonshudo:)
|
284
|
+
@alcohol = alcohol
|
285
|
+
@nihonshudo = nihonshudo
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
225
289
|
|
226
290
|
class Recipe
|
227
291
|
include Toji::Recipe
|
228
292
|
|
229
|
-
|
293
|
+
attr_reader :steps
|
294
|
+
attr_reader :actions
|
295
|
+
attr_reader :ab_coef
|
296
|
+
attr_reader :ab_expects
|
297
|
+
|
298
|
+
def initialize(steps:, actions:, ab_coef:, ab_expects:)
|
230
299
|
@steps = steps
|
300
|
+
@actions = actions
|
301
|
+
@ab_coef = ab_coef
|
302
|
+
@ab_expects = ab_expects
|
231
303
|
end
|
232
304
|
|
233
305
|
def initialize_copy(obj)
|
234
306
|
@steps = obj.steps.deep_dup
|
307
|
+
@actions = obj.actions.deep_dup
|
308
|
+
@ab_coef = obj.ab_coef.dup
|
309
|
+
@ab_expects = obj.ab_expects.deep_dup
|
235
310
|
end
|
236
311
|
|
237
312
|
# 乳酸は汲水100L当たり比重1.21の乳酸(90%乳酸と称される)を650〜720ml添加する。
|
@@ -244,7 +319,7 @@ module Example
|
|
244
319
|
# 酒造教本による標準型仕込配合
|
245
320
|
# 出典: 酒造教本 P97
|
246
321
|
sokujo_textbook: new(
|
247
|
-
[
|
322
|
+
steps: [
|
248
323
|
Step.new(
|
249
324
|
index: 0,
|
250
325
|
subindex: 0,
|
@@ -445,12 +520,29 @@ module Example
|
|
445
520
|
),
|
446
521
|
],
|
447
522
|
),
|
448
|
-
].map(&:freeze).freeze
|
523
|
+
].map(&:freeze).freeze,
|
524
|
+
actions: [
|
525
|
+
Action.new(
|
526
|
+
type: :squeeze,
|
527
|
+
interval_days: 50,
|
528
|
+
),
|
529
|
+
].map(&:freeze).freeze,
|
530
|
+
ab_coef: 1.4,
|
531
|
+
ab_expects: [
|
532
|
+
AbExpect.new(
|
533
|
+
alcohol: 15.0,
|
534
|
+
nihonshudo: 0.0,
|
535
|
+
),
|
536
|
+
AbExpect.new(
|
537
|
+
alcohol: 16.0,
|
538
|
+
nihonshudo: 3.0,
|
539
|
+
),
|
540
|
+
].map(&:freeze).freeze,
|
449
541
|
).freeze,
|
450
542
|
# 灘における仕込配合の平均値
|
451
543
|
# 出典: http://www.nada-ken.com/main/jp/index_shi/234.html
|
452
544
|
sokujo_nada: new(
|
453
|
-
[
|
545
|
+
steps: [
|
454
546
|
Step.new(
|
455
547
|
index: 0,
|
456
548
|
subindex: 0,
|
@@ -638,12 +730,29 @@ module Example
|
|
638
730
|
),
|
639
731
|
],
|
640
732
|
),
|
641
|
-
].map(&:freeze).freeze
|
733
|
+
].map(&:freeze).freeze,
|
734
|
+
actions: [
|
735
|
+
Action.new(
|
736
|
+
type: :squeeze,
|
737
|
+
interval_days: 50,
|
738
|
+
),
|
739
|
+
].map(&:freeze).freeze,
|
740
|
+
ab_coef: 1.4,
|
741
|
+
ab_expects: [
|
742
|
+
AbExpect.new(
|
743
|
+
alcohol: 15.0,
|
744
|
+
nihonshudo: 0.0,
|
745
|
+
),
|
746
|
+
AbExpect.new(
|
747
|
+
alcohol: 16.0,
|
748
|
+
nihonshudo: 3.0,
|
749
|
+
),
|
750
|
+
].map(&:freeze).freeze,
|
642
751
|
).freeze,
|
643
752
|
# 簡易酒母省略仕込
|
644
753
|
# 出典: https://www.jstage.jst.go.jp/article/jbrewsocjapan1915/60/11/60_11_999/_article/-char/ja/
|
645
754
|
simple_sokujo_himeno: new(
|
646
|
-
[
|
755
|
+
steps: [
|
647
756
|
Step.new(
|
648
757
|
index: 0,
|
649
758
|
subindex: 0,
|
@@ -668,17 +777,6 @@ module Example
|
|
668
777
|
),
|
669
778
|
],
|
670
779
|
kakes: [
|
671
|
-
Kake.new(
|
672
|
-
weight: 0,
|
673
|
-
brand: :yamadanishiki,
|
674
|
-
polishing_ratio: 0.55,
|
675
|
-
made_in: :hyogo,
|
676
|
-
year: 2020,
|
677
|
-
soaking_ratio: 0.33,
|
678
|
-
steaming_ratio: 0.41,
|
679
|
-
cooling_ratio: 0.33,
|
680
|
-
interval_days: 6,
|
681
|
-
),
|
682
780
|
],
|
683
781
|
waters: [
|
684
782
|
Water.new(
|
@@ -700,24 +798,6 @@ module Example
|
|
700
798
|
index: 1,
|
701
799
|
subindex: 0,
|
702
800
|
kojis: [
|
703
|
-
Koji.new(
|
704
|
-
weight: 0,
|
705
|
-
brand: :yamadanishiki,
|
706
|
-
polishing_ratio: 0.55,
|
707
|
-
made_in: :hyogo,
|
708
|
-
year: 2020,
|
709
|
-
soaking_ratio: 0.33,
|
710
|
-
steaming_ratio: 0.41,
|
711
|
-
cooling_ratio: 0.33,
|
712
|
-
tanekojis: [
|
713
|
-
Tanekoji.new(
|
714
|
-
brand: :byakuya,
|
715
|
-
ratio: 0.001,
|
716
|
-
),
|
717
|
-
],
|
718
|
-
dekoji_ratio: 0.18,
|
719
|
-
interval_days: 0,
|
720
|
-
),
|
721
801
|
],
|
722
802
|
kakes: [
|
723
803
|
Kake.new(
|
@@ -739,7 +819,7 @@ module Example
|
|
739
819
|
],
|
740
820
|
),
|
741
821
|
Step.new(
|
742
|
-
index:
|
822
|
+
index: 2,
|
743
823
|
subindex: 0,
|
744
824
|
kojis: [
|
745
825
|
Koji.new(
|
@@ -781,7 +861,7 @@ module Example
|
|
781
861
|
],
|
782
862
|
),
|
783
863
|
Step.new(
|
784
|
-
index:
|
864
|
+
index: 3,
|
785
865
|
subindex: 0,
|
786
866
|
kojis: [
|
787
867
|
Koji.new(
|
@@ -823,7 +903,7 @@ module Example
|
|
823
903
|
],
|
824
904
|
),
|
825
905
|
Step.new(
|
826
|
-
index:
|
906
|
+
index: 4,
|
827
907
|
subindex: 0,
|
828
908
|
waters: [
|
829
909
|
Water.new(
|
@@ -831,7 +911,24 @@ module Example
|
|
831
911
|
),
|
832
912
|
],
|
833
913
|
),
|
834
|
-
].map(&:freeze).freeze
|
914
|
+
].map(&:freeze).freeze,
|
915
|
+
actions: [
|
916
|
+
Action.new(
|
917
|
+
type: :squeeze,
|
918
|
+
interval_days: 50,
|
919
|
+
),
|
920
|
+
].map(&:freeze).freeze,
|
921
|
+
ab_coef: 1.4,
|
922
|
+
ab_expects: [
|
923
|
+
AbExpect.new(
|
924
|
+
alcohol: 15.0,
|
925
|
+
nihonshudo: 0.0,
|
926
|
+
),
|
927
|
+
AbExpect.new(
|
928
|
+
alcohol: 16.0,
|
929
|
+
nihonshudo: 3.0,
|
930
|
+
),
|
931
|
+
].map(&:freeze).freeze,
|
835
932
|
).freeze,
|
836
933
|
}.freeze
|
837
934
|
end
|
@@ -840,6 +937,12 @@ module Example
|
|
840
937
|
class KojiSchedule
|
841
938
|
include Toji::Schedule::KojiSchedule
|
842
939
|
|
940
|
+
attr_reader :product
|
941
|
+
attr_reader :date
|
942
|
+
|
943
|
+
attr_reader :step_indexes
|
944
|
+
attr_reader :expect
|
945
|
+
|
843
946
|
def initialize(product:, date:, step_indexes:, expect:)
|
844
947
|
@product = product
|
845
948
|
@date = date
|
@@ -851,6 +954,12 @@ module Example
|
|
851
954
|
class KakeSchedule
|
852
955
|
include Toji::Schedule::KakeSchedule
|
853
956
|
|
957
|
+
attr_reader :product
|
958
|
+
attr_reader :date
|
959
|
+
|
960
|
+
attr_reader :step_indexes
|
961
|
+
attr_reader :expect
|
962
|
+
|
854
963
|
def initialize(product:, date:, step_indexes:, expect:)
|
855
964
|
@product = product
|
856
965
|
@date = date
|
@@ -862,6 +971,12 @@ module Example
|
|
862
971
|
class ActionSchedule
|
863
972
|
include Toji::Schedule::ActionSchedule
|
864
973
|
|
974
|
+
attr_reader :product
|
975
|
+
attr_reader :date
|
976
|
+
attr_reader :type
|
977
|
+
|
978
|
+
attr_reader :index_index
|
979
|
+
|
865
980
|
def initialize(product:, date:, type:, action_index:)
|
866
981
|
@product = product
|
867
982
|
@date = date
|
@@ -904,6 +1019,16 @@ module Example
|
|
904
1019
|
class KojiState
|
905
1020
|
include Toji::Progress::KojiState
|
906
1021
|
|
1022
|
+
attr_accessor :progress
|
1023
|
+
attr_accessor :time
|
1024
|
+
attr_accessor :mark
|
1025
|
+
|
1026
|
+
attr_accessor :temps
|
1027
|
+
attr_accessor :preset_temp
|
1028
|
+
attr_accessor :room_temp
|
1029
|
+
attr_accessor :room_psychrometry
|
1030
|
+
attr_accessor :note
|
1031
|
+
|
907
1032
|
def self.create(args)
|
908
1033
|
new.tap {|s|
|
909
1034
|
s.progress = args[:progress]
|
@@ -933,6 +1058,19 @@ module Example
|
|
933
1058
|
class MotoState
|
934
1059
|
include Toji::Progress::MotoState
|
935
1060
|
|
1061
|
+
attr_accessor :progress
|
1062
|
+
attr_accessor :time
|
1063
|
+
attr_accessor :mark
|
1064
|
+
|
1065
|
+
attr_accessor :temps
|
1066
|
+
attr_accessor :preset_temp
|
1067
|
+
attr_accessor :room_temp
|
1068
|
+
attr_accessor :room_psychrometry
|
1069
|
+
attr_accessor :baume
|
1070
|
+
attr_accessor :acid
|
1071
|
+
attr_accessor :warmings
|
1072
|
+
attr_accessor :note
|
1073
|
+
|
936
1074
|
def self.create(args)
|
937
1075
|
new.tap {|s|
|
938
1076
|
s.progress = args[:progress]
|
@@ -968,6 +1106,21 @@ module Example
|
|
968
1106
|
include Toji::Progress::MoromiState
|
969
1107
|
include Toji::Progress::State::BaumeToNihonshudo
|
970
1108
|
|
1109
|
+
attr_accessor :progress
|
1110
|
+
attr_accessor :time
|
1111
|
+
attr_accessor :mark
|
1112
|
+
|
1113
|
+
attr_accessor :temps
|
1114
|
+
attr_accessor :preset_temp
|
1115
|
+
attr_accessor :room_temp
|
1116
|
+
attr_accessor :room_psychrometry
|
1117
|
+
attr_accessor :baume
|
1118
|
+
attr_accessor :acid
|
1119
|
+
attr_accessor :amino_acid
|
1120
|
+
attr_accessor :alcohol
|
1121
|
+
attr_accessor :warmings
|
1122
|
+
attr_accessor :note
|
1123
|
+
|
971
1124
|
def self.create(args)
|
972
1125
|
new.tap {|s|
|
973
1126
|
s.progress = args[:progress]
|
data/lib/toji/ingredient/base.rb
CHANGED
data/lib/toji/ingredient/koji.rb
CHANGED
@@ -4,14 +4,14 @@ module Toji
|
|
4
4
|
include Rice
|
5
5
|
|
6
6
|
# 種麹 (has_many: Toji::Ingredient::Tanekoji)
|
7
|
-
|
7
|
+
# @dynamic tanekojis
|
8
8
|
|
9
9
|
# 出麹歩合
|
10
10
|
#
|
11
11
|
# 出麹歩合17〜19%のものが麹菌の繁殖のほどよい麹である
|
12
12
|
#
|
13
13
|
# 出典: 酒造教本 P67
|
14
|
-
|
14
|
+
# @dynamic dekoji_ratio
|
15
15
|
|
16
16
|
def dekoji
|
17
17
|
weight + weight * dekoji_ratio
|
data/lib/toji/ingredient/rice.rb
CHANGED
@@ -4,20 +4,21 @@ module Toji
|
|
4
4
|
include Base
|
5
5
|
|
6
6
|
# 白米
|
7
|
-
|
7
|
+
# @dynamic weight
|
8
|
+
# @dynamic weight=
|
8
9
|
|
9
10
|
# 品種、精米歩合、産地、年度
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
# @dynamic brand
|
12
|
+
# @dynamic polishing_ratio
|
13
|
+
# @dynamic made_in
|
14
|
+
# @dynamic year
|
14
15
|
|
15
16
|
# 浸漬米吸水率
|
16
17
|
#
|
17
18
|
# 標準的な白米吸水率は掛米で30〜35%、麹米で33%前後で許容範囲はかなり狭い
|
18
19
|
#
|
19
20
|
# 出典: 酒造教本 P38
|
20
|
-
|
21
|
+
# @dynamic soaking_ratio
|
21
22
|
|
22
23
|
def soaked
|
23
24
|
weight + weight * soaking_ratio
|
@@ -30,7 +31,7 @@ module Toji
|
|
30
31
|
# 蒸米吸水率は麹米及び酒母米で41〜43%、掛米は39〜40%で、吟醸造りの場合は数%低い
|
31
32
|
#
|
32
33
|
# 出典: 酒造教本 P48
|
33
|
-
|
34
|
+
# @dynamic steaming_ratio
|
34
35
|
|
35
36
|
def steamed
|
36
37
|
weight + weight * steaming_ratio
|
@@ -43,14 +44,14 @@ module Toji
|
|
43
44
|
#
|
44
45
|
# 麹を造るのに適した蒸米は、引込時の吸水率が33%を理想とし、許容幅はプラスマイナス1%である
|
45
46
|
# 出典: 酒造教本 P59
|
46
|
-
|
47
|
+
# @dynamic cooling_ratio
|
47
48
|
|
48
49
|
def cooled
|
49
50
|
weight + weight * cooling_ratio
|
50
51
|
end
|
51
52
|
|
52
53
|
# Product.base_dateからの日数差
|
53
|
-
|
54
|
+
# @dynamic interval_days
|
54
55
|
end
|
55
56
|
end
|
56
57
|
end
|
@@ -4,10 +4,10 @@ module Toji
|
|
4
4
|
include Base
|
5
5
|
|
6
6
|
# 麹 (belongs_to: Toji::Ingredient::Koji)
|
7
|
-
|
7
|
+
# @dynamic koji
|
8
8
|
|
9
9
|
# 種麹の種類
|
10
|
-
|
10
|
+
# @dynamic brand
|
11
11
|
|
12
12
|
# 種麹
|
13
13
|
#
|
@@ -15,7 +15,7 @@ module Toji
|
|
15
15
|
# 突き破精麹を造るには、種麹の量を麹米100kgあたり種麹80gとする
|
16
16
|
#
|
17
17
|
# 出典: 酒造教本 P66
|
18
|
-
|
18
|
+
# @dynamic ratio
|
19
19
|
|
20
20
|
def weight
|
21
21
|
koji.weight * ratio
|
@@ -4,11 +4,11 @@ module Toji
|
|
4
4
|
include Base
|
5
5
|
|
6
6
|
# 汲水
|
7
|
-
|
7
|
+
# @dynamic weight
|
8
8
|
|
9
9
|
# 硬度
|
10
|
-
|
11
|
-
|
10
|
+
# @dynamic calcium_hardness
|
11
|
+
# @dynamic magnesium_hardness
|
12
12
|
|
13
13
|
def group_key
|
14
14
|
[calcium_hardness, magnesium_hardness].join(":")
|
@@ -4,13 +4,14 @@ module Toji
|
|
4
4
|
include Base
|
5
5
|
|
6
6
|
# 酵母
|
7
|
-
|
7
|
+
# @dynamic weight
|
8
|
+
# @dynamic weight=
|
8
9
|
|
9
10
|
# 単位 (ex: ampoule, gram, ml)
|
10
|
-
|
11
|
+
# @dynamic unit
|
11
12
|
|
12
13
|
# 酵母名、協会酵母番号
|
13
|
-
|
14
|
+
# @dynamic brand
|
14
15
|
|
15
16
|
def group_key
|
16
17
|
[brand, unit].join(":")
|
data/lib/toji/product.rb
CHANGED
@@ -2,13 +2,13 @@ require 'toji/product/schedule_factory'
|
|
2
2
|
|
3
3
|
module Toji
|
4
4
|
module Product
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
# @dynamic name
|
6
|
+
# @dynamic recipe
|
7
|
+
# @dynamic base_date
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
# @dynamic koji_schedules
|
10
|
+
# @dynamic kake_schedules
|
11
|
+
# @dynamic action_schedules
|
12
12
|
|
13
13
|
def rice_schedules
|
14
14
|
koji_schedules + kake_schedules
|
@@ -31,7 +31,7 @@ module Toji
|
|
31
31
|
0<schedule[:koji]&.weight.to_f
|
32
32
|
}.group_by {|schedule|
|
33
33
|
[schedule[:date], schedule[:koji].group_key]
|
34
|
-
}.map {|(date,
|
34
|
+
}.map {|(date, _group_key), schedules|
|
35
35
|
create_koji_schedule(
|
36
36
|
date: date,
|
37
37
|
step_indexes: schedules.map {|schedule| schedule[:step_index]}.sort_by {|x| [x[:index], x[:subindex]]},
|
@@ -57,7 +57,7 @@ module Toji
|
|
57
57
|
0<schedule[:kake]&.weight.to_f
|
58
58
|
}.group_by {|schedule|
|
59
59
|
[schedule[:date], schedule[:kake].group_key, schedule[:step_index]]
|
60
|
-
}.map {|(date,
|
60
|
+
}.map {|(date, _group_key, _step_index), schedules|
|
61
61
|
create_kake_schedule(
|
62
62
|
date: date,
|
63
63
|
step_indexes: schedules.map {|schedule| schedule[:step_index]}.sort_by {|x| [x[:index], x[:subindex]]},
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Toji
|
2
2
|
module Progress
|
3
3
|
module BaseState
|
4
|
+
include State
|
5
|
+
|
4
6
|
REQUIRED_KEYS = [
|
5
7
|
:time,
|
6
8
|
:elapsed_time,
|
@@ -10,11 +12,6 @@ module Toji
|
|
10
12
|
:mark,
|
11
13
|
].freeze
|
12
14
|
|
13
|
-
attr_accessor :progress
|
14
|
-
|
15
|
-
attr_accessor :time
|
16
|
-
attr_accessor :mark
|
17
|
-
|
18
15
|
def elapsed_time
|
19
16
|
time - progress.base_time
|
20
17
|
end
|
@@ -58,13 +58,13 @@ module Toji
|
|
58
58
|
def min_baume
|
59
59
|
@actuals.map {|moromi, name|
|
60
60
|
moromi.states.map(&:baume).compact.min
|
61
|
-
}.compact.min || 0
|
61
|
+
}.compact.min || 0.0
|
62
62
|
end
|
63
63
|
|
64
64
|
def max_baume
|
65
65
|
@actuals.map {|moromi, name|
|
66
66
|
moromi.states.map(&:baume).compact.max
|
67
|
-
}.compact.max || 0
|
67
|
+
}.compact.max || 0.0
|
68
68
|
end
|
69
69
|
|
70
70
|
def plot
|
@@ -12,12 +12,12 @@ module Toji
|
|
12
12
|
:note,
|
13
13
|
].freeze
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
# @dynamic temps
|
16
|
+
# @dynamic preset_temp
|
17
|
+
# @dynamic room_temp
|
18
|
+
# @dynamic room_psychrometry
|
19
19
|
|
20
|
-
|
20
|
+
# @dynamic note
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -22,19 +22,19 @@ module Toji
|
|
22
22
|
:note,
|
23
23
|
].freeze
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
# @dynamic temps
|
26
|
+
# @dynamic preset_temp
|
27
|
+
# @dynamic room_temp
|
28
|
+
# @dynamic room_psychrometry
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
# @dynamic baume
|
31
|
+
# @dynamic nihonshudo
|
32
|
+
# @dynamic acid
|
33
|
+
# @dynamic amino_acid
|
34
|
+
# @dynamic alcohol
|
35
35
|
|
36
|
-
|
37
|
-
|
36
|
+
# @dynamic warmings
|
37
|
+
# @dynamic note
|
38
38
|
|
39
39
|
def moromi_day
|
40
40
|
_tome_day = progress.moromi_tome_day
|
@@ -16,16 +16,16 @@ module Toji
|
|
16
16
|
:note,
|
17
17
|
].freeze
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
# @dynamic temps
|
20
|
+
# @dynamic preset_temp
|
21
|
+
# @dynamic room_temp
|
22
|
+
# @dynamic room_psychrometry
|
23
23
|
|
24
|
-
|
25
|
-
|
24
|
+
# @dynamic baume
|
25
|
+
# @dynamic acid
|
26
26
|
|
27
|
-
|
28
|
-
|
27
|
+
# @dynamic warmings
|
28
|
+
# @dynamic note
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -1,15 +1,16 @@
|
|
1
1
|
module Toji
|
2
2
|
module Progress
|
3
3
|
module Progress
|
4
|
-
|
5
|
-
|
4
|
+
# @dynamic states
|
5
|
+
# @dynamic date_line
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
# @dynamic base_time
|
8
|
+
# @dynamic day_offset
|
9
|
+
# @dynamic days
|
10
|
+
# @dynamic day_labels
|
11
11
|
|
12
|
-
|
12
|
+
# @dynamic all_keys
|
13
|
+
# @dynamic has_keys
|
13
14
|
end
|
14
15
|
end
|
15
16
|
end
|
data/lib/toji/progress/state.rb
CHANGED
@@ -4,6 +4,19 @@ require 'toji/progress/state/nihonshudo_to_baume'
|
|
4
4
|
module Toji
|
5
5
|
module Progress
|
6
6
|
module State
|
7
|
+
# @dynamic progress
|
8
|
+
# @dynamic progress=
|
9
|
+
|
10
|
+
# @dynamic time
|
11
|
+
# @dynamic time=
|
12
|
+
# @dynamic mark
|
13
|
+
# @dynamic mark=
|
14
|
+
|
15
|
+
# @dynamic elapsed_time
|
16
|
+
# @dynamic elapsed_time_with_offset
|
17
|
+
# @dynamic day
|
18
|
+
# @dynamic day_label
|
19
|
+
# @dynamic display_time
|
7
20
|
end
|
8
21
|
end
|
9
22
|
end
|
data/lib/toji/recipe.rb
CHANGED
@@ -4,13 +4,13 @@ require 'toji/recipe/ab_expect'
|
|
4
4
|
|
5
5
|
module Toji
|
6
6
|
module Recipe
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
# @dynamic steps
|
8
|
+
# @dynamic actions
|
9
|
+
# @dynamic ab_coef
|
10
|
+
# @dynamic ab_expects
|
11
11
|
|
12
12
|
def scale_rice_total(rice_total)
|
13
|
-
ratio = rice_total / steps.map(&:rice_total).sum
|
13
|
+
ratio = rice_total.to_f / steps.map(&:rice_total).sum
|
14
14
|
scale(ratio)
|
15
15
|
end
|
16
16
|
|
data/lib/toji/recipe/action.rb
CHANGED
data/lib/toji/recipe/step.rb
CHANGED
@@ -1,14 +1,21 @@
|
|
1
1
|
module Toji
|
2
2
|
module Recipe
|
3
3
|
module Step
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
# @dynamic index
|
5
|
+
# @dynamic subindex
|
6
|
+
|
7
|
+
# @dynamic kojis
|
8
|
+
# @dynamic kojis=
|
9
|
+
# @dynamic kakes
|
10
|
+
# @dynamic kakes=
|
11
|
+
# @dynamic waters
|
12
|
+
# @dynamic waters=
|
13
|
+
# @dynamic lactic_acids
|
14
|
+
# @dynamic lactic_acids=
|
15
|
+
# @dynamic alcohols
|
16
|
+
# @dynamic alcohols=
|
17
|
+
# @dynamic yeasts
|
18
|
+
# @dynamic yeasts=
|
12
19
|
|
13
20
|
# 麹米
|
14
21
|
def koji_total
|
data/lib/toji/schedule/base.rb
CHANGED
data/lib/toji/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshida Tetsuya
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -194,7 +194,7 @@ metadata:
|
|
194
194
|
homepage_uri: https://github.com/yoshida-eth0/ruby-toji
|
195
195
|
source_code_uri: https://github.com/yoshida-eth0/ruby-toji
|
196
196
|
changelog_uri: https://github.com/yoshida-eth0/ruby-toji
|
197
|
-
post_install_message:
|
197
|
+
post_install_message:
|
198
198
|
rdoc_options: []
|
199
199
|
require_paths:
|
200
200
|
- lib
|
@@ -209,8 +209,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
- !ruby/object:Gem::Version
|
210
210
|
version: '0'
|
211
211
|
requirements: []
|
212
|
-
rubygems_version: 3.
|
213
|
-
signing_key:
|
212
|
+
rubygems_version: 3.1.2
|
213
|
+
signing_key:
|
214
214
|
specification_version: 4
|
215
215
|
summary: Management tools for brewing japanese sake.
|
216
216
|
test_files: []
|