toji 2.5.0 → 2.5.1
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 +6 -6
- data/example/calendar.yaml +6 -6
- data/example/example_core.rb +3 -3
- data/lib/toji/product.rb +3 -3
- 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: 31d789207932cd0399eaf06699ebd22bac870f4809cd112c53486ca5ca8e3164
|
4
|
+
data.tar.gz: aa1b306d160102b281101ac6651ffe94debe5364b335a1e09987622b025f10f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31deda45a392f5a565d9074b6bcf35163ed21d9a69614cbff3669ec8dc36affa0587f8ba511695c7d33fad781ea2fcc205066be8c53f056349b40e384de18b92
|
7
|
+
data.tar.gz: daa506c803091bdc3bc6409f502419565308610642bd3c3d565234b624daf0fd13198044658dca7bf462348b5e8c2df3bdf0d9cd228a3a5199ec2f05e76ffc3f
|
data/example/calendar.ipynb
CHANGED
@@ -302,7 +302,7 @@
|
|
302
302
|
" name: \"仕1\",\n",
|
303
303
|
" description: \"姫野国夫による酒母省略仕込\",\n",
|
304
304
|
" recipe: Example::Recipe::TEMPLATES[:simple_sokujo_himeno].scale(600).round(0),\n",
|
305
|
-
"
|
305
|
+
" base_date: Time.mktime(2020, 2, 24)\n",
|
306
306
|
"))\n",
|
307
307
|
".add(Example::Product.create(\n",
|
308
308
|
" name: \"仕2\",\n",
|
@@ -311,7 +311,7 @@
|
|
311
311
|
" r.steps[0].kake_interval_days = 5\n",
|
312
312
|
" r.steps[2].kake_interval_days = 3\n",
|
313
313
|
" },\n",
|
314
|
-
"
|
314
|
+
" base_date: Time.mktime(2020, 2, 27)\n",
|
315
315
|
"))\n",
|
316
316
|
".add(Example::Product.create(\n",
|
317
317
|
" name: \"仕3\",\n",
|
@@ -320,13 +320,13 @@
|
|
320
320
|
" r.steps[1].koji_interval_days = 11\n",
|
321
321
|
" r.steps[1].kake_interval_days = 13\n",
|
322
322
|
" },\n",
|
323
|
-
"
|
323
|
+
" base_date: Time.mktime(2020, 2, 20)\n",
|
324
324
|
"))\n",
|
325
325
|
".add(Example::Product.create(\n",
|
326
326
|
" name: \"仕4\",\n",
|
327
327
|
" description: \"酒造教本による標準型仕込配合\",\n",
|
328
328
|
" recipe: Example::Recipe::TEMPLATES[:sokujo_textbook].scale(900).round(0),\n",
|
329
|
-
"
|
329
|
+
" base_date: Time.mktime(2020, 2, 20)\n",
|
330
330
|
"))\n",
|
331
331
|
".add(Example::Product.create(\n",
|
332
332
|
" name: \"仕5\",\n",
|
@@ -335,13 +335,13 @@
|
|
335
335
|
" r.steps[1].koji_interval_days = 11\n",
|
336
336
|
" r.steps[1].kake_interval_days = 13\n",
|
337
337
|
" },\n",
|
338
|
-
"
|
338
|
+
" base_date: Time.mktime(2020, 2, 27)\n",
|
339
339
|
"))\n",
|
340
340
|
".add(Example::Product.create(\n",
|
341
341
|
" name: \"仕6\",\n",
|
342
342
|
" description: \"酒造教本による標準型仕込配合\",\n",
|
343
343
|
" recipe: Example::Recipe::TEMPLATES[:sokujo_textbook].scale(900).round(0),\n",
|
344
|
-
"
|
344
|
+
" base_date: Time.mktime(2020, 2, 27)\n",
|
345
345
|
"))\n",
|
346
346
|
"\n",
|
347
347
|
"cal.products.each {|product|\n",
|
data/example/calendar.yaml
CHANGED
@@ -4,34 +4,34 @@ products:
|
|
4
4
|
recipe: :simple_sokujo_himeno
|
5
5
|
scale: 600
|
6
6
|
round: 0
|
7
|
-
|
7
|
+
base_date: 2020-2-24
|
8
8
|
- name: 仕2
|
9
9
|
description: 姫野国夫による酒母省略仕込
|
10
10
|
recipe: :simple_sokujo_himeno
|
11
11
|
scale: 550
|
12
12
|
round: 0
|
13
|
-
|
13
|
+
base_date: 2020-2-27
|
14
14
|
- name: 仕3
|
15
15
|
description: 灘における仕込配合
|
16
16
|
recipe: :sokujo_nada
|
17
17
|
scale: 900
|
18
18
|
round: 0
|
19
|
-
|
19
|
+
base_date: 2020-2-20
|
20
20
|
- name: 仕4
|
21
21
|
description: 酒造教本による標準型仕込配合
|
22
22
|
recipe: :sokujo_textbook
|
23
23
|
scale: 900
|
24
24
|
round: 0
|
25
|
-
|
25
|
+
base_date: 2020-2-20
|
26
26
|
- name: 仕5
|
27
27
|
description: 灘における仕込配合
|
28
28
|
recipe: :sokujo_nada
|
29
29
|
scale: 900
|
30
30
|
round: 0
|
31
|
-
|
31
|
+
base_date: 2020-2-27
|
32
32
|
- name: 仕6
|
33
33
|
description: 酒造教本による標準型仕込配合
|
34
34
|
recipe: :sokujo_textbook
|
35
35
|
scale: 900
|
36
36
|
round: 0
|
37
|
-
|
37
|
+
base_date: 2020-2-27
|
data/example/example_core.rb
CHANGED
@@ -249,12 +249,12 @@ module Example
|
|
249
249
|
attr_accessor :description
|
250
250
|
attr_accessor :color
|
251
251
|
|
252
|
-
def initialize(reduce_key, name, description, recipe,
|
252
|
+
def initialize(reduce_key, name, description, recipe, base_date, color=nil)
|
253
253
|
@reduce_key = reduce_key || SecureRandom.uuid
|
254
254
|
@name = name
|
255
255
|
@description = description
|
256
256
|
@recipe = recipe
|
257
|
-
@
|
257
|
+
@base_date = base_date
|
258
258
|
@color = color
|
259
259
|
end
|
260
260
|
|
@@ -278,7 +278,7 @@ module Example
|
|
278
278
|
args[:name],
|
279
279
|
args[:description],
|
280
280
|
recipe,
|
281
|
-
args[:
|
281
|
+
args[:base_date],
|
282
282
|
args[:color]
|
283
283
|
)
|
284
284
|
else
|
data/lib/toji/product.rb
CHANGED
@@ -5,17 +5,17 @@ module Toji
|
|
5
5
|
attr_reader :reduce_key
|
6
6
|
attr_accessor :name
|
7
7
|
attr_accessor :recipe
|
8
|
-
attr_accessor :
|
8
|
+
attr_accessor :base_date
|
9
9
|
|
10
10
|
def koji_dates
|
11
|
-
date =
|
11
|
+
date = base_date
|
12
12
|
recipe.steps.map {|step|
|
13
13
|
date = date.next_day(step.koji_interval_days)
|
14
14
|
}
|
15
15
|
end
|
16
16
|
|
17
17
|
def kake_dates
|
18
|
-
date =
|
18
|
+
date = base_date
|
19
19
|
recipe.steps.map {|step|
|
20
20
|
date = date.next_day(step.kake_interval_days)
|
21
21
|
}
|
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.5.
|
4
|
+
version: 2.5.1
|
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-
|
11
|
+
date: 2020-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|