toji 2.12.0 → 2.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/calendar.ipynb +42 -51
- data/example/calendar.yaml +6 -6
- data/example/calendar_file.ipynb +35 -35
- data/example/example_core.rb +850 -230
- data/example/kake_ingredient.rb +21 -15
- data/example/koji_ingredient.rb +31 -21
- data/example/{koji_making.ipynb → koji_progress.ipynb} +14 -14
- data/example/{koji_making.rb → koji_progress.rb} +3 -2
- data/example/{koji_making.yaml → koji_progress.yaml} +8 -9
- data/example/{koji_making_multi.ipynb → koji_progress_multi.ipynb} +21 -22
- data/example/{moromi.ipynb → moromi_progress.ipynb} +22 -22
- data/example/{moromi.rb → moromi_progress.rb} +3 -2
- data/example/{moromi.yaml → moromi_progress.yaml} +0 -0
- data/example/moto_progress.ipynb +121 -0
- data/example/{moto.rb → moto_progress.rb} +3 -2
- data/example/{moto.yaml → moto_progress.yaml} +14 -15
- data/example/recipe.rb +44 -32
- data/lib/toji.rb +4 -2
- data/lib/toji/calendar.rb +12 -12
- data/lib/toji/calendar/date_column.rb +8 -8
- data/lib/toji/calendar/date_row.rb +6 -6
- data/lib/toji/ingredient.rb +6 -2
- data/lib/toji/ingredient/alcohol.rb +14 -0
- data/lib/toji/ingredient/base.rb +11 -0
- data/lib/toji/ingredient/kake.rb +3 -9
- data/lib/toji/ingredient/koji.rb +19 -10
- data/lib/toji/ingredient/lactic_acid.rb +14 -0
- data/lib/toji/ingredient/rice.rb +50 -4
- data/lib/toji/ingredient/tanekoji.rb +29 -0
- data/lib/toji/ingredient/water.rb +18 -0
- data/lib/toji/ingredient/yeast.rb +20 -0
- data/lib/toji/processing.rb +18 -0
- data/lib/toji/processing/base.rb +7 -0
- data/lib/toji/processing/cooled_rice.rb +22 -0
- data/lib/toji/processing/cooled_rice_element.rb +8 -0
- data/lib/toji/processing/dekoji.rb +22 -0
- data/lib/toji/processing/dekoji_element.rb +8 -0
- data/lib/toji/processing/kake_processing.rb +7 -0
- data/lib/toji/processing/koji_processing.rb +10 -0
- data/lib/toji/processing/rice_processing.rb +19 -0
- data/lib/toji/processing/soaked_rice.rb +49 -0
- data/lib/toji/processing/soaked_rice_element.rb +18 -0
- data/lib/toji/processing/steamed_rice.rb +22 -0
- data/lib/toji/processing/steamed_rice_element.rb +8 -0
- data/lib/toji/product.rb +11 -32
- data/lib/toji/product/schedule_factory.rb +74 -0
- data/lib/toji/progress.rb +23 -0
- data/lib/toji/progress/base_progress.rb +37 -0
- data/lib/toji/progress/base_state.rb +39 -0
- data/lib/toji/progress/builder.rb +53 -0
- data/lib/toji/progress/graph.rb +11 -0
- data/lib/toji/{brew → progress}/graph/ab.rb +4 -4
- data/lib/toji/{brew → progress}/graph/bmd.rb +2 -2
- data/lib/toji/{brew/graph/multi_progress.rb → progress/graph/multi_progress_note.rb} +11 -11
- data/lib/toji/{brew/graph/progress.rb → progress/graph/progress_note.rb} +20 -18
- data/lib/toji/progress/koji_progress.rb +15 -0
- data/lib/toji/progress/koji_state.rb +23 -0
- data/lib/toji/{brew/moromi.rb → progress/moromi_progress.rb} +9 -5
- data/lib/toji/progress/moromi_state.rb +77 -0
- data/lib/toji/progress/moto_progress.rb +15 -0
- data/lib/toji/progress/moto_state.rb +31 -0
- data/lib/toji/progress/progress.rb +15 -0
- data/lib/toji/progress/state.rb +9 -0
- data/lib/toji/progress/state/baume_to_nihonshudo.rb +21 -0
- data/lib/toji/progress/state/nihonshudo_to_baume.rb +21 -0
- data/lib/toji/recipe.rb +53 -39
- data/lib/toji/recipe/ab_expect.rb +2 -2
- data/lib/toji/recipe/action.rb +2 -2
- data/lib/toji/recipe/step.rb +97 -71
- data/lib/toji/schedule.rb +5 -0
- data/lib/toji/schedule/action_schedule.rb +9 -0
- data/lib/toji/{event → schedule}/base.rb +1 -1
- data/lib/toji/schedule/kake_schedule.rb +11 -0
- data/lib/toji/schedule/koji_schedule.rb +11 -0
- data/lib/toji/schedule/rice_schedule.rb +16 -0
- data/lib/toji/utils.rb +43 -0
- data/lib/toji/version.rb +1 -1
- metadata +58 -44
- data/lib/toji/brew.rb +0 -18
- data/lib/toji/brew/base.rb +0 -55
- data/lib/toji/brew/builder.rb +0 -98
- data/lib/toji/brew/graph.rb +0 -11
- data/lib/toji/brew/koji.rb +0 -11
- data/lib/toji/brew/moto.rb +0 -11
- data/lib/toji/brew/state.rb +0 -122
- data/lib/toji/brew/wrapped_state.rb +0 -109
- data/lib/toji/event.rb +0 -5
- data/lib/toji/event/action_event.rb +0 -12
- data/lib/toji/event/kake_event.rb +0 -13
- data/lib/toji/event/koji_event.rb +0 -19
- data/lib/toji/event/rice_event.rb +0 -34
- data/lib/toji/ingredient/kake/actual.rb +0 -26
- data/lib/toji/ingredient/kake/base.rb +0 -18
- data/lib/toji/ingredient/kake/expected.rb +0 -40
- data/lib/toji/ingredient/koji/actual.rb +0 -29
- data/lib/toji/ingredient/koji/actual_fermentable.rb +0 -15
- data/lib/toji/ingredient/koji/base.rb +0 -35
- data/lib/toji/ingredient/koji/expected.rb +0 -45
- data/lib/toji/ingredient/koji/expected_fermentable.rb +0 -15
- data/lib/toji/ingredient/koji_rate.rb +0 -16
- data/lib/toji/ingredient/rice/actual_steamable.rb +0 -27
- data/lib/toji/ingredient/rice/base.rb +0 -40
- data/lib/toji/ingredient/rice/expected_steamable.rb +0 -27
- data/lib/toji/ingredient/rice_rate.rb +0 -23
- data/lib/toji/product/event_factory.rb +0 -70
@@ -1,70 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Product
|
3
|
-
module EventFactory
|
4
|
-
|
5
|
-
def create_koji_event(date:, index:, step_indexes:, raw:)
|
6
|
-
raise Error, "implement required: create_koji_event"
|
7
|
-
end
|
8
|
-
|
9
|
-
def create_kake_event(date:, index:, step_indexes:, raw:)
|
10
|
-
raise Error, "implement required: create_kake_event"
|
11
|
-
end
|
12
|
-
|
13
|
-
def create_action_event(date:, type:, index:)
|
14
|
-
raise Error, "implement required: create_action_event"
|
15
|
-
end
|
16
|
-
|
17
|
-
def koji_events
|
18
|
-
koji_dates.map.with_index {|date,i|
|
19
|
-
{
|
20
|
-
index: i,
|
21
|
-
date: date,
|
22
|
-
weight: recipe.steps[i].koji,
|
23
|
-
}
|
24
|
-
}.select {|event|
|
25
|
-
0<event[:weight]
|
26
|
-
}.group_by{|event|
|
27
|
-
event[:date]
|
28
|
-
}.map {|date,events|
|
29
|
-
create_koji_event(
|
30
|
-
date: date,
|
31
|
-
index: koji_dates.find_index(date),
|
32
|
-
step_indexes: events.map{|ev| ev[:index]},
|
33
|
-
raw: events.map{|ev| ev[:weight]}.sum,
|
34
|
-
)
|
35
|
-
}
|
36
|
-
end
|
37
|
-
|
38
|
-
def kake_events
|
39
|
-
kake_dates.map.with_index {|date,i|
|
40
|
-
{
|
41
|
-
index: i,
|
42
|
-
date: date,
|
43
|
-
weight: recipe.steps[i].kake,
|
44
|
-
}
|
45
|
-
}.select {|event|
|
46
|
-
0<event[:weight]
|
47
|
-
}.group_by{|event|
|
48
|
-
event[:date]
|
49
|
-
}.map {|date,events|
|
50
|
-
create_kake_event(
|
51
|
-
date: date,
|
52
|
-
index: kake_dates.find_index(date),
|
53
|
-
step_indexes: events.map{|ev| ev[:index]},
|
54
|
-
raw: events.map{|ev| ev[:weight]}.sum,
|
55
|
-
)
|
56
|
-
}
|
57
|
-
end
|
58
|
-
|
59
|
-
def action_events
|
60
|
-
action_dates.map.with_index {|date,i|
|
61
|
-
create_action_event(
|
62
|
-
date: date,
|
63
|
-
type: recipe.actions[i].type,
|
64
|
-
index: i,
|
65
|
-
)
|
66
|
-
}
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|