hiiro 0.1.21 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d4b0ee784735efbd72843c0b1f685751827ac5b6ba8111d01461c081baf601f
4
- data.tar.gz: c29c11818c64118904511e8f19169103031152d37e8a1a18525b04efa1de5616
3
+ metadata.gz: 41e847e11cc0fb36738ccbacdba19b1bff6ab3038ea9b47fc735e1d69b98a51d
4
+ data.tar.gz: fb80c229a8a8711523813c90535a677f0fcd55558e11a2d797f92c428420d847
5
5
  SHA512:
6
- metadata.gz: 3ab9f3f37f39031d4f9e9cf5985da5088fb4e58ab26522740ef0bf1b02b03eb6677ba3184e483decb107d1b8f45fb4d7f99a7ad4806ccfef21832a4dad38af37
7
- data.tar.gz: 4490398cf89cef1e807ea36b348fa8433e5370d7b1c548345e5216cfde3438ca8cc78b05c17657c5cd674ede156250fb96accfb559032e5c19f42c8a03269eca
6
+ metadata.gz: cafa0cd97eb7377bfeb63f830444edffe11718b804e871ca93f8b4d743be8077187f597e4704b746aaeba82002d766fab26cdb91d69f636abff73b192969e878
7
+ data.tar.gz: ace6a681e01c47cb1b048775df9b074619710530b1274c29efa9e2419058032a8bb6cd9ecc5de1f049b63ad7d9cd63cccfbac34238597a18b75c2da97102ecc0
data/lib/hiiro/history.rb CHANGED
@@ -13,6 +13,7 @@ class Hiiro
13
13
  attr_reader :task, :subtask
14
14
 
15
15
  def initialize(data)
16
+ data ||= {}
16
17
  @id = data['id']
17
18
  @timestamp = data['timestamp']
18
19
  @source = data['source']
@@ -45,7 +46,7 @@ class Hiiro
45
46
  end
46
47
 
47
48
  def short_line(index)
48
- time_str = Time.parse(timestamp).strftime('%Y-%m-%d %H:%M')
49
+ time_str = timestamp ? Time.parse(timestamp).strftime('%Y-%m-%d %H:%M') : Time.now.iso8601
49
50
  desc = description || cmd || '(no description)'
50
51
  desc = desc[0..60] + '...' if desc.length > 63
51
52
  [
@@ -180,7 +181,6 @@ class Hiiro
180
181
  end
181
182
 
182
183
  def add(description: nil, cmd: nil, source: nil, task: nil, subtask: nil, pwd: Dir.pwd)
183
- cmd ||=
184
184
  entry_data = {
185
185
  'id' => generate_id,
186
186
  'timestamp' => Time.now.iso8601,
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.21"
2
+ VERSION = "0.1.23"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiiro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota