hiiro 0.1.22 → 0.1.24

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: 787da011c7c95df3200f4e970f51063dd62374604094e38cea15d726b2561de4
4
- data.tar.gz: af8bc6f163d8c197e652788816c7e1b1bc11c619dfce439379a7f1215a9e99d4
3
+ metadata.gz: 6a46d6691bc65a663bdbcb63dfe0fe6643572ee377c5f1448bbd34a5e9efe3f1
4
+ data.tar.gz: 2edd95e23a40d0910b88c0844e70f7839da22dbce3f86c2f2518b238abf68706
5
5
  SHA512:
6
- metadata.gz: b58caf4621282690f9905b781b122eb4119925456cd293f875af1e1eaa81c41e797a6b9bdb83d36e459fdb7ae15065d7453d3b99085c3639ee3325b4d48421cc
7
- data.tar.gz: 8fbb3c0c15e56b036351923b0893a96fe4348d02e56792048bb4d7fed01bcf9b4460050c1e8d39596f497b8b326a118290183755bd106bb0f8e14675628b580f
6
+ metadata.gz: 8d402b962e9e2c51870a586a8f83ea0209b43109b92135d468ac33336d15e37e882b564a1848e1c8efcf0fd6acf1739d6b356a8cf06bfc7069ea1f251457f280
7
+ data.tar.gz: df17f16075ceff456b6ee512424b962f207a25b72a1eaa2867fabbccaf91a64a9c015bdb5706f0a37bce3882d7c6ec927e0325984bfebc5828f6810a03562092
data/lib/hiiro/history.rb CHANGED
@@ -7,7 +7,7 @@ class Hiiro
7
7
  HISTORY_FILE = File.join(Dir.home, '.config/hiiro/history.yml')
8
8
 
9
9
  class Entry
10
- attr_reader :id, :timestamp, :source, :cmd, :description
10
+ attr_reader :id, :timestamp, :source, :cmd, :description, :pwd
11
11
  attr_reader :tmux_session, :tmux_window, :tmux_pane
12
12
  attr_reader :git_branch, :git_worktree
13
13
  attr_reader :task, :subtask
@@ -18,6 +18,7 @@ class Hiiro
18
18
  @timestamp = data['timestamp']
19
19
  @source = data['source']
20
20
  @cmd = data['cmd']
21
+ @pwd = data['pwd'] || Dir.pwd
21
22
  @description = data['description']
22
23
  @tmux_session = data['tmux_session']
23
24
  @tmux_window = data['tmux_window']
@@ -34,6 +35,7 @@ class Hiiro
34
35
  'timestamp' => timestamp,
35
36
  'source' => source,
36
37
  'cmd' => cmd,
38
+ 'pwd' => pwd,
37
39
  'description' => description,
38
40
  'tmux_session' => tmux_session,
39
41
  'tmux_window' => tmux_window,
@@ -46,7 +48,7 @@ class Hiiro
46
48
  end
47
49
 
48
50
  def short_line(index)
49
- time_str = Time.parse(timestamp).strftime('%Y-%m-%d %H:%M')
51
+ time_str = timestamp ? Time.parse(timestamp).strftime('%Y-%m-%d %H:%M') : Time.now.iso8601
50
52
  desc = description || cmd || '(no description)'
51
53
  desc = desc[0..60] + '...' if desc.length > 63
52
54
  [
@@ -181,7 +183,6 @@ class Hiiro
181
183
  end
182
184
 
183
185
  def add(description: nil, cmd: nil, source: nil, task: nil, subtask: nil, pwd: Dir.pwd)
184
- cmd ||=
185
186
  entry_data = {
186
187
  'id' => generate_id,
187
188
  'timestamp' => Time.now.iso8601,
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.22"
2
+ VERSION = "0.1.24"
3
3
  end
data/lib/hiiro.rb CHANGED
@@ -51,7 +51,7 @@ class Hiiro
51
51
  @logging = logging
52
52
  @global_values = values
53
53
  @full_command = [
54
- bin,
54
+ bin_name,
55
55
  *all_args,
56
56
  ].map(&:shellescape).join(' ')
57
57
  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.22
4
+ version: 0.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota