hiiro 0.1.166 → 0.1.167

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: 07671e97445824be495c40e43386cbc4619c03af22a2fe1f01e6f08e3493b3db
4
- data.tar.gz: '0328a082fdfa441001ed1085d2d57a9954f02588bf0c3f09ba2431dafadbd8fa'
3
+ metadata.gz: 50c2b882e543df50b9a6548cdfccaa882c600e14e98ad895d9279043173235d3
4
+ data.tar.gz: e9527eb69316f627b3d0539a6dff8deedf417baf20d8a5ba9c1558a60d1a880e
5
5
  SHA512:
6
- metadata.gz: c939aa32a6272ca6b3907b77d0e7bb320b95681b7161bb146d7fdb25a696b2b8c0e910b1915a35d67c73ebe02fcef077c6093316324bd69670114f115ffd2b18
7
- data.tar.gz: 35a97dffd10762d18375668d4fa9b2e8d42b29f1e7a2e32c983251c99b93d4d3e9fc71650ee3d2398f5aa6225553f72c38037b910ca5b44d3edaf85716f2dfed
6
+ metadata.gz: cda48c3aaa277d657727a2b0428e3f2f7f087d797f3b41200d42fd0668cffe4fa595df9e169b1bb0d36dd1684da65f7b816bc69ace493f2bcb7c8993f597db31
7
+ data.tar.gz: b49a12f7b87e7071e21764a1b0380c782c2c88eb5094d097b9571d7978a2802aba592ca4cdbae3eadc79e4ef872f403a90f50126653951ca4fdfc2c12f6e2f48
data/lib/hiiro/queue.rb CHANGED
@@ -364,17 +364,6 @@ class Hiiro
364
364
 
365
365
  h.add_subcmd(:attach) { |name = nil|
366
366
  running = q.tasks_in(:running)
367
-
368
- if name.nil? && running.empty?
369
- # Switch to (or create) the hq session
370
- work_dir = File.expand_path('~/work')
371
- unless system('tmux', 'has-session', '-t', TMUX_SESSION, out: File::NULL, err: File::NULL)
372
- system('tmux', 'new-session', '-d', '-s', TMUX_SESSION, '-c', work_dir)
373
- end
374
- system('tmux', 'switch-client', '-t', TMUX_SESSION)
375
- next
376
- end
377
-
378
367
  if running.empty?
379
368
  puts "No running tasks"
380
369
  next
@@ -404,6 +393,14 @@ class Hiiro
404
393
  system('tmux', 'switch-client', '-t', "#{session}:#{win}")
405
394
  }
406
395
 
396
+ h.add_subcmd(:session) {
397
+ work_dir = File.expand_path('~/work')
398
+ unless system('tmux', 'has-session', '-t', TMUX_SESSION, out: File::NULL, err: File::NULL)
399
+ system('tmux', 'new-session', '-d', '-s', TMUX_SESSION, '-c', work_dir)
400
+ end
401
+ system('tmux', 'switch-client', '-t', TMUX_SESSION)
402
+ }
403
+
407
404
  h.add_subcmd(:add) { |*args|
408
405
  q.queue_dirs
409
406
  args, flag_task = q.extract_task_flag(args)
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.166"
2
+ VERSION = "0.1.167"
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.166
4
+ version: 0.1.167
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota