howzit 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 +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/howzit/buildnote.rb +12 -10
- data/lib/howzit/version.rb +1 -1
- data/lib/howzit.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d5ddc7a4ec5cda133517d27dfef17d80299c17a68de2469e9dab66e81dffa33
|
4
|
+
data.tar.gz: 78fed9d51d054f4c39d3bb6b9daed3709e6a7f7644e5a6368bb924bb0b042665
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5427a3f6754462ae1311194407a3c6dfc71b084bb639afa29d961fad758ed554ce40ccdb21ec7b9175289343866da6d1ddb0f9db5fccb12f8224d206f9d53b98
|
7
|
+
data.tar.gz: 6222c4a34783c842fc342a27b2167588578afefa3f45a2fc16637b5d3f266d99d11bbefada5dd4a586902f914566a86efcef4262396133e573cf520923cd468a
|
data/CHANGELOG.md
CHANGED
data/lib/howzit/buildnote.rb
CHANGED
@@ -32,7 +32,7 @@ module Howzit
|
|
32
32
|
## @return description
|
33
33
|
##
|
34
34
|
def inspect
|
35
|
-
|
35
|
+
"#<Howzit::BuildNote @topics=[#{@topics.count}]>"
|
36
36
|
end
|
37
37
|
|
38
38
|
##
|
@@ -205,14 +205,14 @@ module Howzit
|
|
205
205
|
if File.exist?(file) && !default
|
206
206
|
file = "{by}#{file}".c
|
207
207
|
unless Prompt.yn("Are you sure you want to overwrite #{file}", default: false)
|
208
|
-
|
208
|
+
Howzit.console.info('Cancelled')
|
209
209
|
Process.exit 0
|
210
210
|
end
|
211
211
|
end
|
212
212
|
|
213
213
|
File.open(file, 'w') do |f|
|
214
214
|
f.puts note
|
215
|
-
|
215
|
+
Howzit.console.info("{by}Template {bw}#{title}{by} written to {bw}#{file}{x}".c)
|
216
216
|
end
|
217
217
|
|
218
218
|
if File.exist?(file) && !default && Prompt.yn("{bg}Do you want to open {bw}#{file} {bg}for editing?{x}".c,
|
@@ -298,14 +298,14 @@ module Howzit
|
|
298
298
|
if File.exist?(fname) && !default
|
299
299
|
file = "{by}#{fname}".c
|
300
300
|
unless Prompt.yn("Are you absolutely sure you want to overwrite #{file}", default: false)
|
301
|
-
|
301
|
+
Howzit.console.info('Canceled')
|
302
302
|
Process.exit 0
|
303
303
|
end
|
304
304
|
end
|
305
305
|
|
306
306
|
File.open(fname, 'w') do |f|
|
307
307
|
f.puts note
|
308
|
-
|
308
|
+
Howzit.console.info("{by}Build notes for {bw}#{title}{by} written to {bw}#{fname}{x}".c)
|
309
309
|
end
|
310
310
|
|
311
311
|
if File.exist?(fname) && !default && Prompt.yn("{bg}Do you want to open {bw}#{fname} {bg}for editing?{x}".c,
|
@@ -532,7 +532,6 @@ module Howzit
|
|
532
532
|
##
|
533
533
|
def read_upstream
|
534
534
|
buildnotes = glob_upstream
|
535
|
-
|
536
535
|
topics_dict = []
|
537
536
|
buildnotes.each do |path|
|
538
537
|
topics_dict.concat(read_help_file(path))
|
@@ -627,12 +626,15 @@ module Howzit
|
|
627
626
|
##
|
628
627
|
def read_help(path = nil)
|
629
628
|
@topics = read_help_file(path)
|
630
|
-
return unless
|
629
|
+
return unless Howzit.options[:include_upstream]
|
631
630
|
|
632
|
-
|
631
|
+
unless Howzit.has_read_upstream
|
632
|
+
upstream_topics = read_upstream
|
633
633
|
|
634
|
-
|
635
|
-
|
634
|
+
upstream_topics.each do |topic|
|
635
|
+
@topics.push(topic) unless find_topic(topic.title.sub(/^.+:/, '')).count.positive?
|
636
|
+
end
|
637
|
+
Howzit.has_read_upstream = true
|
636
638
|
end
|
637
639
|
|
638
640
|
if note_file && @topics.empty?
|
data/lib/howzit/version.rb
CHANGED
data/lib/howzit.rb
CHANGED
@@ -82,5 +82,13 @@ module Howzit
|
|
82
82
|
def console
|
83
83
|
@console ||= Howzit::ConsoleLogger.new(options[:log_level])
|
84
84
|
end
|
85
|
+
|
86
|
+
def has_read_upstream
|
87
|
+
@has_read_upstream ||= false
|
88
|
+
end
|
89
|
+
|
90
|
+
def has_read_upstream=(has_read)
|
91
|
+
@has_read_upstream = has_read
|
92
|
+
end
|
85
93
|
end
|
86
94
|
end
|