hiiro 0.1.115 → 0.1.116

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: cfa152be618514c41e457bc388e16dee713a2c1493d51c0644291dd7364de3ec
4
- data.tar.gz: 1c9fb76cbe0980f8c974f8d445aa866475676d1e4c515591869db4ba7f680c6b
3
+ metadata.gz: 22795bdebea669b32b07d77179314680415286a678a52bdc6269c44ecf072e0a
4
+ data.tar.gz: 02a4a2832523bced9773c4e0ffed50958853044a5c711b4f7c714eb7385e3f91
5
5
  SHA512:
6
- metadata.gz: ddb9df84a84bc23cde535cfdc86df63a39feeea05799843f39a9f575afa4d98689d50e46c603cf4cedaeb9b81da0bc89da9710a6f6f9ea7ddb62fcb7a43fb438
7
- data.tar.gz: f4139d409c8c9aca1d3c3e66e17d2e5ececbfdee59ee3073ddd7f5bb2473c1e3486c5c3dabae112324679eaab4e799aa5e8764350ae2c2d7458bc2fa8d3e451a
6
+ metadata.gz: 61eb1424009c2100695f0ec7527149e2694f9b56533d22318161f7964961517bbc190e740daff8db3083543b7f07c27de387e5f7ebf2b6c49aaebbccb034a29d
7
+ data.tar.gz: a6b3679e509e7b06a6507a766f030f1d96cad890cb2ebfdbd7f979a6ce3ee74db618d252bbfa6f7121ef480a955beb6cd496fe8e5cfe7ccd2c04b32fe9003d7f
data/lib/hiiro/queue.rb CHANGED
@@ -3,6 +3,7 @@ require 'fileutils'
3
3
  require 'shellwords'
4
4
  require 'time'
5
5
  require 'front_matter_parser'
6
+ require 'tempfile'
6
7
 
7
8
  class Hiiro
8
9
  class Queue
@@ -236,7 +237,10 @@ class Hiiro
236
237
  end
237
238
 
238
239
  name = slugify(content.lines.reject { |l| l.start_with?('---') || l.match?(/^\w+:/) }.first.to_s.strip)
239
- return nil if name.empty?
240
+ binding.pry
241
+ if name.empty?
242
+ name = Time.now.strftime("%Y%m%d%H%M%S") + '-' + task_info[:task_name]
243
+ end
240
244
 
241
245
  base_name = name
242
246
  counter = 1
@@ -394,14 +398,13 @@ class Hiiro
394
398
  args, flag_task = q.extract_task_flag(args)
395
399
  ti = flag_task ? q.task_info_for(flag_task) : task_info
396
400
 
401
+ tmpfile = Tempfile.new(['hq-', '.md'])
402
+ prompt_file = tmpfile.path
397
403
  if args.empty? && !$stdin.tty?
398
404
  content = $stdin.read.strip
399
405
  elsif args.any?
400
406
  content = args.join(' ')
401
407
  else
402
- require 'tempfile'
403
- tmpfile = Tempfile.new(['hq-', '.md'])
404
-
405
408
  # Pre-fill with frontmatter template if task_info is available
406
409
  if ti
407
410
  fm_lines = ["---"]
data/lib/hiiro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  class Hiiro
2
- VERSION = "0.1.115"
2
+ VERSION = "0.1.116"
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.115
4
+ version: 0.1.116
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Toyota