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 +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/bin/howzit +18 -1
- data/lib/howzit/prompt.rb +2 -1
- data/lib/howzit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67377505c45973e38c5cc2430f2d9428ace8a5680a2bce0cfc26af369a1a98b2
|
4
|
+
data.tar.gz: bd6e00ccaf0484f486c965b0136fbd7a0cbb4af6cd7cf21c777b029c316ff13b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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`
|
data/lib/howzit/version.rb
CHANGED
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.
|
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:
|
11
|
+
date: 2024-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|