doing 2.0.23 → 2.0.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: 47e702ec6e32cc0f97b0d81ef0e6482fb78ea462916fd2f83a58474759c0b4af
4
- data.tar.gz: b50848409e7a8b409bd9f82a77dbf0722ef97ac3a2a9491a5096ad60ca94f563
3
+ metadata.gz: be908ed31434bd248efe3ebcba66b9022ed35be3651af6ada7e6464b50c91c9f
4
+ data.tar.gz: 0dcf2ce4915637e2514a8d9735c8ca294a6d5bbc0558afdabeb714d3f1de5b50
5
5
  SHA512:
6
- metadata.gz: 25b1e4482ee5120b1b8fc6716c6f717235addf893917b8c21116da57ee25fef5d0bca3b29b3dbda39e0fb23c149e4284e17da755a9b1f6a92c89a7e30eda55f7
7
- data.tar.gz: 28563fdc3eadec4d60faae9bdb2a38072caea19a98a5084670591851036702d2a46e7ee4f0798e6cd22e7b9eeec1a0c822872d9457b1eb8c890c45b4d5d54998
6
+ metadata.gz: ef314b60821ba50306c0d6b9704f310a21d6652480e67350f092cfc670c6ddab9024c24f602d68396e555fb624cf316507526a50b241c959639c738699c8602e
7
+ data.tar.gz: 8474ed1164f978c0359f7826b1c92fd66821bb112ae71938a67245b42a8e342f8e629dd42ec4cc8216b033e6aff20e1c44d0b3d89cdbc7f96b5e6d4513cd1319
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 2.0.23
1
+ ### 2.0.24
2
2
 
3
3
  - include fzf source directly, in case git isn't installed
4
4
  - fall back to installing fzf with sudo on error
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- doing (2.0.23)
4
+ doing (2.0.24)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  deep_merge (~> 1.2, >= 1.2.1)
7
7
  gli (~> 2.19, >= 2.19.2)
data/README.md CHANGED
@@ -6,7 +6,7 @@ _If you're one of the rare people like me who find this useful, feel free to [bu
6
6
 
7
7
  <!--README-->
8
8
 
9
- The current version of `doing` is <!--VER-->2.0.22<!--END VER-->.
9
+ The current version of `doing` is <!--VER-->2.0.23<!--END VER-->.
10
10
 
11
11
  Find all of the documentation in the [doing wiki](https://github.com/ttscoff/doing/wiki).
12
12
 
data/doing.rdoc CHANGED
@@ -5,7 +5,7 @@ record of what you've been doing, complete with tag-based time tracking. The
5
5
  command line tool allows you to add entries, annotate with tags and notes, and
6
6
  view your entries with myriad options, with a focus on a "natural" language syntax.
7
7
 
8
- v2.0.23
8
+ v2.0.24
9
9
 
10
10
  === Global Options
11
11
  === --config_file arg
@@ -72,7 +72,9 @@ module Doing
72
72
  end
73
73
 
74
74
  def adjust_verbosity(options = {})
75
- if options[:quiet]
75
+ if options[:log_level]
76
+ self.log_level = options[:log_level].to_sym
77
+ elsif options[:quiet]
76
78
  self.log_level = :error
77
79
  elsif options[:verbose] || options[:debug]
78
80
  self.log_level = :debug
data/lib/doing/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Doing
2
- VERSION = '2.0.23'
2
+ VERSION = '2.0.24'
3
3
  end
data/lib/doing/wwid.rb CHANGED
@@ -612,21 +612,29 @@ module Doing
612
612
  end
613
613
 
614
614
  def fzf
615
+ @fzf ||= install_fzf
616
+ end
617
+
618
+ def install_fzf
615
619
  fzf_dir = File.join(File.dirname(__FILE__), '../helpers/fzf')
616
620
  FileUtils.mkdir_p(fzf_dir) unless File.directory?(fzf_dir)
617
621
  fzf_bin = File.join(fzf_dir, 'bin/fzf')
618
622
  return fzf_bin if File.exist?(fzf_bin)
619
623
 
620
- Doing.logger.log_now(:warn, 'Compiling and installing FZF -- this will only happen once')
621
- Doing.logger.log_now(:warn, 'fzf is copyright Junegunn Choi <https://github.com/junegunn/fzf/blob/master/LICENSE>')
624
+ prev_level = Doing.logger.level
625
+ Doing.logger.adjust_verbosity({ log_level: :info })
626
+ Doing.logger.log_now(:warn, 'Compiling and installing fzf -- this will only happen once')
627
+ Doing.logger.log_now(:warn, 'fzf is copyright Junegunn Choi, MIT License <https://github.com/junegunn/fzf/blob/master/LICENSE>')
622
628
 
623
- res = system("#{fzf_dir}/install --bin --no-key-bindings --no-completion --no-update-rc --no-bash --no-zsh --no-fish")
624
- unless res
629
+ res = system("'#{fzf_dir}/install' --bin --no-key-bindings --no-completion --no-update-rc --no-bash --no-zsh --no-fish &> /dev/null")
630
+ unless File.exist?(fzf_bin)
625
631
  Doing.logger.log_now(:warn, 'Error installing, trying again as root')
626
- system("sudo #{fzf_dir}/install --bin --no-key-bindings --no-completion --no-update-rc --no-bash --no-zsh --no-fish")
632
+ system("sudo '#{fzf_dir}/install' --bin --no-key-bindings --no-completion --no-update-rc --no-bash --no-zsh --no-fish &> /dev/null")
627
633
  end
628
634
  raise RuntimeError.new('Error installing fzf, please report at https://github.com/ttscoff/doing/issues') unless File.exist?(fzf_bin)
629
635
 
636
+ Doing.logger.info("fzf installed to #{fzf}")
637
+ Doing.logger.adjust_verbosity({ log_level: prev_level })
630
638
  fzf_bin
631
639
  end
632
640
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doing
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.23
4
+ version: 2.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-23 00:00:00.000000000 Z
11
+ date: 2021-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: safe_yaml