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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b3aca220f9d2ddc9b8278354a088af1c73609c3912388124db4d965db1b3e82
4
- data.tar.gz: 91c7e9e3f6705f45bc7206bbbb0b98ad077a1ccc9ce41736a245eeccfdcd15da
3
+ metadata.gz: 31d789207932cd0399eaf06699ebd22bac870f4809cd112c53486ca5ca8e3164
4
+ data.tar.gz: aa1b306d160102b281101ac6651ffe94debe5364b335a1e09987622b025f10f0
5
5
  SHA512:
6
- metadata.gz: f5004d92b8c087d31d613e6705246c251160f6580f717c526b85a02d6cfdc0569c92d282f31b0fc0d9ba19a4fab963374cc0de876bbdf9ba9c6004add6009aec
7
- data.tar.gz: 246c143b4ba5c2e9c1b6e2b4f310ba42064ce0faf307b1f451aac60f7b554d1d4da9a9bd866164008b7188deb5d089d92f684978c3e92b8c7a4f819cee0c9d47
6
+ metadata.gz: 31deda45a392f5a565d9074b6bcf35163ed21d9a69614cbff3669ec8dc36affa0587f8ba511695c7d33fad781ea2fcc205066be8c53f056349b40e384de18b92
7
+ data.tar.gz: daa506c803091bdc3bc6409f502419565308610642bd3c3d565234b624daf0fd13198044658dca7bf462348b5e8c2df3bdf0d9cd228a3a5199ec2f05e76ffc3f
@@ -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
- " start_date: Time.mktime(2020, 2, 24)\n",
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
- " start_date: Time.mktime(2020, 2, 27)\n",
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
- " start_date: Time.mktime(2020, 2, 20)\n",
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
- " start_date: Time.mktime(2020, 2, 20)\n",
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
- " start_date: Time.mktime(2020, 2, 27)\n",
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
- " start_date: Time.mktime(2020, 2, 27)\n",
344
+ " base_date: Time.mktime(2020, 2, 27)\n",
345
345
  "))\n",
346
346
  "\n",
347
347
  "cal.products.each {|product|\n",
@@ -4,34 +4,34 @@ products:
4
4
  recipe: :simple_sokujo_himeno
5
5
  scale: 600
6
6
  round: 0
7
- start_date: 2020-2-24
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
- start_date: 2020-2-27
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
- start_date: 2020-2-20
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
- start_date: 2020-2-20
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
- start_date: 2020-2-27
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
- start_date: 2020-2-27
37
+ base_date: 2020-2-27
@@ -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, start_date, color=nil)
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
- @start_date = start_date
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[:start_date],
281
+ args[:base_date],
282
282
  args[:color]
283
283
  )
284
284
  else
@@ -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 :start_date
8
+ attr_accessor :base_date
9
9
 
10
10
  def koji_dates
11
- date = start_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 = start_date
18
+ date = base_date
19
19
  recipe.steps.map {|step|
20
20
  date = date.next_day(step.kake_interval_days)
21
21
  }
@@ -1,3 +1,3 @@
1
1
  module Toji
2
- VERSION = "2.5.0"
2
+ VERSION = "2.5.1"
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.5.0
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-06-24 00:00:00.000000000 Z
11
+ date: 2020-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport