toji 2.13.1 → 2.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/example/example_core.rb +224 -39
  3. data/lib/toji/calendar.rb +2 -2
  4. data/lib/toji/calendar/date_row.rb +2 -2
  5. data/lib/toji/ingredient/alcohol.rb +1 -1
  6. data/lib/toji/ingredient/base.rb +3 -2
  7. data/lib/toji/ingredient/koji.rb +2 -2
  8. data/lib/toji/ingredient/lactic_acid.rb +1 -1
  9. data/lib/toji/ingredient/rice.rb +10 -9
  10. data/lib/toji/ingredient/tanekoji.rb +3 -3
  11. data/lib/toji/ingredient/water.rb +3 -3
  12. data/lib/toji/ingredient/yeast.rb +4 -3
  13. data/lib/toji/processing/base.rb +1 -1
  14. data/lib/toji/processing/cooled_rice.rb +2 -2
  15. data/lib/toji/processing/cooled_rice_element.rb +1 -1
  16. data/lib/toji/processing/dekoji.rb +2 -2
  17. data/lib/toji/processing/dekoji_element.rb +1 -1
  18. data/lib/toji/processing/koji_processing.rb +1 -1
  19. data/lib/toji/processing/rice_processing.rb +4 -4
  20. data/lib/toji/processing/soaked_rice.rb +7 -7
  21. data/lib/toji/processing/soaked_rice_element.rb +3 -3
  22. data/lib/toji/processing/steamed_rice.rb +2 -2
  23. data/lib/toji/processing/steamed_rice_element.rb +1 -1
  24. data/lib/toji/product.rb +9 -15
  25. data/lib/toji/product/schedule_factory.rb +23 -9
  26. data/lib/toji/progress/base_state.rb +2 -5
  27. data/lib/toji/progress/graph/ab.rb +2 -2
  28. data/lib/toji/progress/koji_state.rb +5 -5
  29. data/lib/toji/progress/moromi_progress.rb +1 -1
  30. data/lib/toji/progress/moromi_state.rb +11 -11
  31. data/lib/toji/progress/moto_state.rb +8 -8
  32. data/lib/toji/progress/progress.rb +8 -7
  33. data/lib/toji/progress/state.rb +13 -0
  34. data/lib/toji/recipe.rb +5 -5
  35. data/lib/toji/recipe/ab_expect.rb +2 -2
  36. data/lib/toji/recipe/action.rb +2 -2
  37. data/lib/toji/recipe/step.rb +15 -6
  38. data/lib/toji/schedule/action_schedule.rb +1 -1
  39. data/lib/toji/schedule/base.rb +3 -3
  40. data/lib/toji/schedule/rice_schedule.rb +3 -3
  41. data/lib/toji/version.rb +1 -1
  42. metadata +5 -5
@@ -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
- attr_accessor :temps
16
- attr_accessor :preset_temp
17
- attr_accessor :room_temp
18
- attr_accessor :room_psychrometry
15
+ # @dynamic temps
16
+ # @dynamic preset_temp
17
+ # @dynamic room_temp
18
+ # @dynamic room_psychrometry
19
19
 
20
- attr_accessor :note
20
+ # @dynamic note
21
21
  end
22
22
  end
23
23
  end
@@ -3,7 +3,7 @@ module Toji
3
3
  module MoromiProgress
4
4
  include BaseProgress
5
5
 
6
- attr_accessor :prefix_day_labels
6
+ # @dynamic prefix_day_labels
7
7
 
8
8
  def moromi_tome_day
9
9
  prefix_day_labels&.length
@@ -22,19 +22,19 @@ module Toji
22
22
  :note,
23
23
  ].freeze
24
24
 
25
- attr_accessor :temps
26
- attr_accessor :preset_temp
27
- attr_accessor :room_temp
28
- attr_accessor :room_psychrometry
25
+ # @dynamic temps
26
+ # @dynamic preset_temp
27
+ # @dynamic room_temp
28
+ # @dynamic room_psychrometry
29
29
 
30
- attr_accessor :baume
31
- attr_accessor :nihonshudo
32
- attr_accessor :acid
33
- attr_accessor :amino_acid
34
- attr_accessor :alcohol
30
+ # @dynamic baume
31
+ # @dynamic nihonshudo
32
+ # @dynamic acid
33
+ # @dynamic amino_acid
34
+ # @dynamic alcohol
35
35
 
36
- attr_accessor :warmings
37
- attr_accessor :note
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
- attr_accessor :temps
20
- attr_accessor :preset_temp
21
- attr_accessor :room_temp
22
- attr_accessor :room_psychrometry
19
+ # @dynamic temps
20
+ # @dynamic preset_temp
21
+ # @dynamic room_temp
22
+ # @dynamic room_psychrometry
23
23
 
24
- attr_accessor :baume
25
- attr_accessor :acid
24
+ # @dynamic baume
25
+ # @dynamic acid
26
26
 
27
- attr_accessor :warmings
28
- attr_accessor :note
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
- attr_reader :states
5
- attr_reader :date_line
4
+ # @dynamic states
5
+ # @dynamic date_line
6
6
 
7
- attr_reader :base_time
8
- attr_reader :day_offset
9
- attr_reader :days
10
- attr_reader :day_labels
7
+ # @dynamic base_time
8
+ # @dynamic day_offset
9
+ # @dynamic days
10
+ # @dynamic day_labels
11
11
 
12
- attr_reader :all_keys
12
+ # @dynamic all_keys
13
+ # @dynamic has_keys
13
14
  end
14
15
  end
15
16
  end
@@ -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
@@ -4,13 +4,13 @@ require 'toji/recipe/ab_expect'
4
4
 
5
5
  module Toji
6
6
  module Recipe
7
- attr_reader :steps
8
- attr_reader :actions
9
- attr_reader :ab_coef
10
- attr_reader :ab_expects
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
 
@@ -1,8 +1,8 @@
1
1
  module Toji
2
2
  module Recipe
3
3
  module AbExpect
4
- attr_reader :alcohol
5
- attr_reader :nihonshudo
4
+ # @dynamic alcohol
5
+ # @dynamic nihonshudo
6
6
  end
7
7
  end
8
8
  end
@@ -1,8 +1,8 @@
1
1
  module Toji
2
2
  module Recipe
3
3
  module Action
4
- attr_reader :type
5
- attr_reader :interval_days
4
+ # @dynamic type
5
+ # @dynamic interval_days
6
6
  end
7
7
  end
8
8
  end
@@ -1,12 +1,21 @@
1
1
  module Toji
2
2
  module Recipe
3
3
  module Step
4
- attr_accessor :kojis
5
- attr_accessor :kakes
6
- attr_accessor :waters
7
- attr_accessor :lactic_acids
8
- attr_accessor :alcohols
9
- attr_accessor :yeasts
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=
10
19
 
11
20
  # 麹米
12
21
  def koji_total
@@ -3,7 +3,7 @@ module Toji
3
3
  module ActionSchedule
4
4
  include Base
5
5
 
6
- attr_reader :index
6
+ # @dynamic action_index
7
7
  end
8
8
  end
9
9
  end
@@ -1,9 +1,9 @@
1
1
  module Toji
2
2
  module Schedule
3
3
  module Base
4
- attr_reader :product
5
- attr_reader :date
6
- attr_reader :type
4
+ # @dynamic product
5
+ # @dynamic date
6
+ # @dynamic type
7
7
  end
8
8
  end
9
9
  end
@@ -3,10 +3,10 @@ module Toji
3
3
  module RiceSchedule
4
4
  include Base
5
5
 
6
- attr_reader :rice_type
7
- attr_reader :step_indexes
6
+ # @dynamic rice_type
7
+ # @dynamic step_indexes
8
8
 
9
- attr_reader :expect
9
+ # @dynamic expect
10
10
 
11
11
  def type
12
12
  :rice
@@ -1,3 +1,3 @@
1
1
  module Toji
2
- VERSION = "2.13.1"
2
+ VERSION = "2.18.0"
3
3
  end
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.13.1
4
+ version: 2.18.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-03 00:00:00.000000000 Z
11
+ date: 2020-12-27 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
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  version: '0'
211
211
  requirements: []
212
212
  rubygems_version: 3.1.2
213
- signing_key:
213
+ signing_key:
214
214
  specification_version: 4
215
215
  summary: Management tools for brewing japanese sake.
216
216
  test_files: []