howzit 2.1.8 → 2.1.10

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: 8a339dc102a78623a6b3ef96602e081bf4a6d408d1f35d35d4f98dbc8135c154
4
- data.tar.gz: 420d78ffa41450f2546d22402d0ffaace9f4fedc450bf955de58038bee1fd657
3
+ metadata.gz: 67377505c45973e38c5cc2430f2d9428ace8a5680a2bce0cfc26af369a1a98b2
4
+ data.tar.gz: bd6e00ccaf0484f486c965b0136fbd7a0cbb4af6cd7cf21c777b029c316ff13b
5
5
  SHA512:
6
- metadata.gz: 2ea2707c779434c870a0d98d084f47dbe47b795f1c15282541866ba1c7cc74527f49f155d279d872fd2f7be57e1c8c6590d21dc31d29259c7b5358aef3ce589f
7
- data.tar.gz: e4c7250b27f0d89521bfdfc5aaade5e5f5d9ecda605ecca64c07402b2e3d0e97791768872e7a73ad1f5c27fb53f39507f98a7a6a3c41a56fefc5b01e45ee1f5a
6
+ metadata.gz: 9fc93201a2080344c7ea080697ccd6a38a0c6a4a7473d98c9bbe2b18f4685ada0799cc9013358d01b7e29696e3a63d074c0e6421dbbf9db55fe69e0586efeae8
7
+ data.tar.gz: 1a627938a04104298a13ee667876f7c7559707e08a1fdecc136837af26e1c9e0130ab34fd4be1f5b1a3b79172c3d7844cec4c43d147aa1308ce8d21c2c4251ad
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ### 2.1.10
2
+
3
+ 2024-04-09 14:59
4
+
5
+ #### NEW
6
+
7
+ - --no option (opposite of --yes) to answer no to all yes/no prompts
8
+
9
+ ### 2.1.9
10
+
11
+ 2023-09-07 11:02
12
+
13
+ #### NEW
14
+
15
+ - Add --templates-c to get a completion-compatible list of available templates
16
+
1
17
  ### 2.1.8
2
18
 
3
19
  2023-05-31 11:58
data/README.md CHANGED
@@ -38,7 +38,7 @@ You can install `howzit` by running:
38
38
 
39
39
  gem install howzit
40
40
 
41
- If you run into permission errors using the above command, you'll need to either use `sudo` (`sudo gem install howzit`) or if you're using Homebrew, you have the option to install via [brew-gem](https://github.com/sportngin/brew-gem):
41
+ If you run into permission errors using the above command, you'll need to use `gem install --user-install howzit`. If that fails, either use `sudo` (`sudo gem install howzit`) or if you're using Homebrew, you have the option to install via [brew-gem](https://github.com/sportngin/brew-gem):
42
42
 
43
43
  brew install brew-gem
44
44
  brew gem install howzit
data/bin/howzit CHANGED
@@ -24,7 +24,7 @@ OptionParser.new do |opts|
24
24
  opts.on('--ask', 'Request confirmation for all tasks when running a topic') { Howzit.options[:ask] = true }
25
25
 
26
26
  opts.on('--default', 'Answer all prompts with default response') do
27
- raise '--default cannot be used with --yes' if Howzit.options[:yes]
27
+ raise '--default cannot be used with --yes or --no' if Howzit.options[:yes] || Howzit.options[:no]
28
28
 
29
29
  Howzit.options[:default] = true
30
30
  end
@@ -51,6 +51,12 @@ OptionParser.new do |opts|
51
51
  Howzit.options[:yes] = true
52
52
  end
53
53
 
54
+ opts.on('-n', '--no', 'Answer no to all prompts') do
55
+ raise '--default cannot be used with --no' if Howzit.options[:default]
56
+
57
+ Howzit.options[:no] = true
58
+ end
59
+
54
60
  opts.separator "\n Listing:\n\n" #=================================================================== LISTING
55
61
 
56
62
  opts.on('-L', '--list-completions', 'List topics (completion-compatible)') do
@@ -97,6 +103,17 @@ OptionParser.new do |opts|
97
103
  Process.exit 0
98
104
  end
99
105
 
106
+ opts.on('--templates-c', 'List available templates in a format for completion') do
107
+ out = []
108
+ Dir.chdir(Howzit.config.template_folder)
109
+ Dir.glob('*.md').each do |file|
110
+ template = File.basename(file, '.md')
111
+ out.push(template)
112
+ end
113
+ puts out.join("\n")
114
+ Process.exit 0
115
+ end
116
+
100
117
  opts.on('--title-only', 'Output title only') do
101
118
  Howzit.options[:output_title] = true
102
119
  Howzit.options[:title_only] = true
data/lib/howzit/prompt.rb CHANGED
@@ -4,7 +4,6 @@ module Howzit
4
4
  # Command line prompt utils
5
5
  module Prompt
6
6
  class << self
7
-
8
7
  ##
9
8
  ## Display and read a Yes/No prompt
10
9
  ##
@@ -20,6 +19,8 @@ module Howzit
20
19
 
21
20
  return true if Howzit.options[:yes]
22
21
 
22
+ return false if Howzit.options[:no]
23
+
23
24
  return default if Howzit.options[:default]
24
25
 
25
26
  tty_state = `stty -g`
@@ -3,5 +3,5 @@
3
3
  # Primary module for this gem.
4
4
  module Howzit
5
5
  # Current Howzit version.
6
- VERSION = '2.1.8'
6
+ VERSION = '2.1.10'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.8
4
+ version: 2.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2024-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler