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 +4 -4
- data/lib/hiiro/history.rb +2 -2
- data/lib/hiiro/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 41e847e11cc0fb36738ccbacdba19b1bff6ab3038ea9b47fc735e1d69b98a51d
|
|
4
|
+
data.tar.gz: fb80c229a8a8711523813c90535a677f0fcd55558e11a2d797f92c428420d847
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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