toji 2.4.1 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/koji_making.rb +1 -1
- data/example/moromi.rb +1 -1
- data/example/shubo.rb +1 -1
- data/lib/toji/brew/base.rb +0 -6
- data/lib/toji/brew/graph/ab.rb +3 -3
- data/lib/toji/brew/graph/progress.rb +6 -6
- data/lib/toji/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b3aca220f9d2ddc9b8278354a088af1c73609c3912388124db4d965db1b3e82
|
4
|
+
data.tar.gz: 91c7e9e3f6705f45bc7206bbbb0b98ad077a1ccc9ce41736a245eeccfdcd15da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5004d92b8c087d31d613e6705246c251160f6580f717c526b85a02d6cfdc0569c92d282f31b0fc0d9ba19a4fab963374cc0de876bbdf9ba9c6004add6009aec
|
7
|
+
data.tar.gz: 246c143b4ba5c2e9c1b6e2b4f310ba42064ce0faf307b1f451aac60f7b554d1d4da9a9bd866164008b7188deb5d089d92f684978c3e92b8c7a4f819cee0c9d47
|
data/example/koji_making.rb
CHANGED
@@ -7,7 +7,7 @@ koji = Example::Brew::Koji.load_yaml_file(File.dirname(__FILE__)+"/koji_making.y
|
|
7
7
|
table = Terminal::Table.new do |t|
|
8
8
|
t << ["作業", "日数", "品温(度)", "操作室温", "乾湿差(度)", "経過時間", "日時"]
|
9
9
|
t << :separator
|
10
|
-
koji.each {|s|
|
10
|
+
koji.wrapped_states.each {|s|
|
11
11
|
temp = s.temps.map(&:to_s).join(" / ")
|
12
12
|
t << [s.mark, s.day_label, temp, s.room_temp, s.room_psychrometry, s.elapsed_time, s.display_time]
|
13
13
|
}
|
data/example/moromi.rb
CHANGED
@@ -8,7 +8,7 @@ moromi = Example::Brew::Moromi.load_yaml_file(File.dirname(__FILE__)+"/moromi.ya
|
|
8
8
|
table = Terminal::Table.new do |t|
|
9
9
|
t << ["作業", "日数", "品温(度)", "操作室温", "ボーメ及び日本酒度", "アルコール度数", "BMD", "アルコール期待値(16.5 +3)", "経過時間", "日時"]
|
10
10
|
t << :separator
|
11
|
-
moromi.each {|s|
|
11
|
+
moromi.wrapped_states.each {|s|
|
12
12
|
temp = s.temps.map(&:to_s).join(" / ")
|
13
13
|
t << [s.mark, s.day_label, temp, s.room_temp, s.display_baume, s.alcohol, s.bmd&.round(2), s.expected_alcohol(16.5, +3, 1.5)&.round(2), s.elapsed_time, s.display_time]
|
14
14
|
}
|
data/example/shubo.rb
CHANGED
@@ -7,7 +7,7 @@ shubo = Example::Brew::Shubo.load_yaml_file(File.dirname(__FILE__)+"/shubo.yaml"
|
|
7
7
|
table = Terminal::Table.new do |t|
|
8
8
|
t << ["作業", "日数", "品温(度)", "ボーメ", "酸度", "経過時間", "日時"]
|
9
9
|
t << :separator
|
10
|
-
shubo.each {|s|
|
10
|
+
shubo.wrapped_states.each {|s|
|
11
11
|
temp = s.temps.map(&:to_s).join(" / ")
|
12
12
|
t << [s.mark, s.day_label, temp, s.baume, s.acid, s.elapsed_time, s.display_time]
|
13
13
|
}
|
data/lib/toji/brew/base.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
module Toji
|
2
2
|
module Brew
|
3
3
|
module Base
|
4
|
-
include Enumerable
|
5
|
-
|
6
4
|
REQUIRED_KEYS = [
|
7
5
|
:time,
|
8
6
|
:elapsed_time,
|
@@ -45,10 +43,6 @@ module Toji
|
|
45
43
|
nil
|
46
44
|
end
|
47
45
|
|
48
|
-
def each(&block)
|
49
|
-
wrapped_states.each(&block)
|
50
|
-
end
|
51
|
-
|
52
46
|
def has_keys
|
53
47
|
result = REQUIRED_KEYS.dup
|
54
48
|
|
data/lib/toji/brew/graph/ab.rb
CHANGED
@@ -24,7 +24,7 @@ module Toji
|
|
24
24
|
result = []
|
25
25
|
|
26
26
|
@actuals.each {|moromi, name|
|
27
|
-
states = moromi.select{|s| s.alcohol && s.baume}
|
27
|
+
states = moromi.wrapped_states.select{|s| s.alcohol && s.baume}
|
28
28
|
|
29
29
|
xs = states.map(&:alcohol)
|
30
30
|
ys = states.map(&:baume)
|
@@ -47,13 +47,13 @@ module Toji
|
|
47
47
|
|
48
48
|
def min_baume
|
49
49
|
@actuals.map {|moromi, name|
|
50
|
-
moromi.map(&:baume).compact.min
|
50
|
+
moromi.wrapped_states.map(&:baume).compact.min
|
51
51
|
}.compact.min || 0
|
52
52
|
end
|
53
53
|
|
54
54
|
def max_baume
|
55
55
|
@actuals.map {|moromi, name|
|
56
|
-
moromi.map(&:baume).compact.max
|
56
|
+
moromi.wrapped_states.map(&:baume).compact.max
|
57
57
|
}.compact.max || 0
|
58
58
|
end
|
59
59
|
|
@@ -56,13 +56,13 @@ module Toji
|
|
56
56
|
xs = []
|
57
57
|
ys = []
|
58
58
|
text = []
|
59
|
-
@brew.each {|
|
60
|
-
val =
|
59
|
+
@brew.wrapped_states.each {|s|
|
60
|
+
val = s.send(key)
|
61
61
|
if val
|
62
62
|
[val].flatten.each_with_index {|v,i|
|
63
|
-
xs <<
|
63
|
+
xs << s.elapsed_time_with_offset + i
|
64
64
|
ys << v
|
65
|
-
text <<
|
65
|
+
text << s.display_time
|
66
66
|
}
|
67
67
|
end
|
68
68
|
}
|
@@ -102,7 +102,7 @@ module Toji
|
|
102
102
|
def annotations
|
103
103
|
return [] if !@enable_annotations
|
104
104
|
|
105
|
-
@brew.select{|s| s.mark}.map {|s|
|
105
|
+
@brew.wrapped_states.select{|s| s.mark}.map {|s|
|
106
106
|
{
|
107
107
|
x: s.elapsed_time_with_offset,
|
108
108
|
y: s.temps.first || 0,
|
@@ -131,7 +131,7 @@ module Toji
|
|
131
131
|
end
|
132
132
|
|
133
133
|
rows = []
|
134
|
-
@brew.each {|state|
|
134
|
+
@brew.wrapped_states.each {|state|
|
135
135
|
rows << keys.map {|k|
|
136
136
|
v = state&.send(k)
|
137
137
|
if Array===v
|
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.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshida Tetsuya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|