howzit 2.1.38 → 2.1.39

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: 3c0d8cd59db6974b2ceb826ab199eb7eab680919de813f2b2fe4f205c5506697
4
- data.tar.gz: 1aa7e1e3d80fb27efa4e38d56e5d31d0643871418a80a1417ae045839e6989c1
3
+ metadata.gz: a934719a022ca2f6713474e797eb1a9662dc884a750c93648d4151506ae41571
4
+ data.tar.gz: f261e5e733bd2d695cc76ce36e74096d357983301156c6b5b2ce5757aa3637eb
5
5
  SHA512:
6
- metadata.gz: a8c95b615947429c402ad32c218d744c69b2d7f51ed50957479471217608e38f04abcdbd4ce95ec551df2546d80f4df1a6b8806772bb6b048b4851bb4211b8e8
7
- data.tar.gz: 602bdf590e46d40d647ccf8be87dc61de0f86b2b3bafc9c0fe9209d52a648917f798918e1cfd0b3f9f438013e1a61b8eb81915bcfb27e57c3034276f30464aa5
6
+ metadata.gz: 9d928971e7280979fbfba50eedadedfadcf10ee31a26a4f94169c2cfe987706342fd3b826d781d89f4e3882fd87885e38b070352eae4b5e7a38c7fe06828046c
7
+ data.tar.gz: 72cc6fcc43c31a8d1827a5e421ebe41f06120d1fb0c428bb0339daa3e5c39b8477e769830fc302552723804033502aea5354b62b2e914a4d2e2a8bca9ac7421b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ### 2.1.39
2
+
3
+ 2026-01-25 07:39
4
+
5
+ #### IMPROVED
6
+
7
+ - The --stack option is now negatable, allowing --no-stack to disable stacking even when :stack: true is set in the configuration file, giving users command-line control over stack mode behavior
8
+ - Howzit.buildnote now always creates a new instance when a specific file is requested, preventing cache-related issues when different files need to be loaded
9
+
10
+ #### FIXED
11
+
12
+ - Template topics now have their template name prefixed to their title (e.g., "github:Update GitHub README"), allowing them to be distinguished from local topics and enabling @include directives to reference them using the template prefix format
13
+ - Build note file selection now prioritizes buildnotes.md and howzit.md over other build note files, preventing test files or other build notes from being incorrectly selected when multiple build note files exist in the same directory
14
+ - Explicit file arguments to BuildNote.new are now properly handled, ensuring that when a specific file is provided it is used correctly instead of falling back to file discovery logic, and stack mode is disabled when an explicit file is provided
15
+
1
16
  ### 2.1.38
2
17
 
3
18
  2026-01-25 07:18
data/bin/howzit CHANGED
@@ -243,8 +243,8 @@ OptionParser.new do |opts|
243
243
 
244
244
  opts.separator("\n Misc:\n\n") #=================================================================== MISC
245
245
 
246
- opts.on('--stack', 'Stack build notes from current directory up to root, with closer files taking precedence') do
247
- Howzit.options[:stack] = true
246
+ opts.on('--[no-]stack', 'Stack build notes from current directory up to root, with closer files taking precedence') do |s|
247
+ Howzit.options[:stack] = s
248
248
  end
249
249
 
250
250
  opts.on('-h', '--help', 'Display this screen') do
@@ -13,9 +13,13 @@ module Howzit
13
13
  ## @param file [String] The path to the build note file
14
14
  ##
15
15
  def initialize(file: nil, meta: nil)
16
+ # Track if an explicit file was provided
17
+ @explicit_file = file ? File.expand_path(file) : nil
18
+
16
19
  # Set @note_file if an explicit file was provided, before calling note_file getter
17
20
  if file
18
21
  @note_file = File.expand_path(file)
22
+ file = @note_file # Use expanded path for reading
19
23
  else
20
24
  file = note_file
21
25
  end
@@ -657,9 +661,7 @@ module Howzit
657
661
  topic.content = topic.content.render_template(@metadata)
658
662
  # Prefix topic title with template name (e.g., "github:Update GitHub README")
659
663
  # unless it already has a prefix
660
- unless topic.title.include?(':')
661
- topic.instance_variable_set(:@title, "#{template}:#{topic.title}")
662
- end
664
+ topic.instance_variable_set(:@title, "#{template}:#{topic.title}") unless topic.title.include?(':')
663
665
  topic
664
666
  end
665
667
  end
@@ -740,11 +742,11 @@ module Howzit
740
742
  def glob_note
741
743
  files = Dir.glob('*.{txt,md,markdown}').select(&:build_note?)
742
744
  return nil if files.empty?
743
-
745
+
744
746
  # Prioritize standard build note filenames
745
747
  priority_files = files.select { |f| f =~ /^(buildnotes|howzit)\./i }
746
748
  return priority_files.min unless priority_files.empty?
747
-
749
+
748
750
  # Otherwise return first alphabetically
749
751
  files.min
750
752
  end
@@ -904,6 +906,7 @@ module Howzit
904
906
  # 2. We're not already in stack mode (prevent recursion)
905
907
  # 3. We're not reading a template file
906
908
  # 4. We're reading the main build note (no specific path provided, or path matches the main note file)
909
+ # 5. An explicit file was not provided (explicit files should not use stack mode)
907
910
  main_note = path.nil? || begin
908
911
  main_file = note_file
909
912
  main_file && File.expand_path(path) == File.expand_path(main_file)
@@ -911,7 +914,8 @@ module Howzit
911
914
  false
912
915
  end
913
916
 
914
- use_stack = Howzit.options[:stack] && !in_stack_mode && !is_template && main_note
917
+ # Don't use stack mode if an explicit file was provided
918
+ use_stack = Howzit.options[:stack] && !in_stack_mode && !is_template && main_note && @explicit_file.nil?
915
919
 
916
920
  if use_stack
917
921
  # Set flag to prevent recursive stack mode calls
@@ -973,7 +977,8 @@ module Howzit
973
977
  @metadata = final_metadata
974
978
 
975
979
  # Set primary note file to the closest one (first in stack)
976
- @note_file = stack_files.first if stack_files.any?
980
+ # But don't override if an explicit file was provided
981
+ @note_file = stack_files.first if stack_files.any? && @explicit_file.nil?
977
982
 
978
983
  # Read topics from each file, closest first
979
984
  stack_files.each do |file|
@@ -3,5 +3,5 @@
3
3
  # Primary module for this gem.
4
4
  module Howzit
5
5
  # Current Howzit version.
6
- VERSION = '2.1.38'
6
+ VERSION = '2.1.39'
7
7
  end
data/lib/howzit.rb CHANGED
@@ -89,7 +89,13 @@ module Howzit
89
89
  ## Module storage for buildnote
90
90
  ##
91
91
  def buildnote(file = nil)
92
- @buildnote ||= BuildNote.new(file: file)
92
+ # If a specific file is requested, always create a new instance
93
+ # Otherwise, use cached instance if available
94
+ if file
95
+ BuildNote.new(file: file)
96
+ else
97
+ @buildnote ||= BuildNote.new(file: file)
98
+ end
93
99
  end
94
100
 
95
101
  ##
data/spec/cli_spec.rb CHANGED
@@ -6,20 +6,32 @@ require 'spec_helper'
6
6
  describe 'CLI' do
7
7
  include CliTest
8
8
 
9
+ before do
10
+ # Temporarily rename buildnotes.md so builda.md is selected
11
+ @original_buildnotes = 'buildnotes.md'
12
+ @backup_buildnotes = 'buildnotes.md.backup'
13
+ FileUtils.mv(@original_buildnotes, @backup_buildnotes) if File.exist?(@original_buildnotes)
14
+ end
15
+
16
+ after do
17
+ # Restore buildnotes.md
18
+ FileUtils.mv(@backup_buildnotes, @original_buildnotes) if File.exist?(@backup_buildnotes)
19
+ end
20
+
9
21
  it 'executes successfully' do
10
22
  execute_script('bin/howzit', use_bundler: true)
11
23
  expect(last_execution).to be_successful
12
24
  end
13
25
 
14
26
  it 'lists available topics' do
15
- execute_script('bin/howzit', use_bundler: true, args: %w[-L])
27
+ execute_script('bin/howzit', use_bundler: true, args: %w[--no-stack -L])
16
28
  expect(last_execution).to be_successful
17
29
  expect(last_execution.stdout).to match(/Topic Balogna/)
18
30
  expect(last_execution.stdout.split(/\n/).count).to eq 7
19
31
  end
20
32
 
21
33
  it 'lists available tasks' do
22
- execute_script('bin/howzit', use_bundler: true, args: %w[-T])
34
+ execute_script('bin/howzit', use_bundler: true, args: %w[--no-stack -T])
23
35
  expect(last_execution).to be_successful
24
36
  expect(last_execution.stdout).to match(/Topic Balogna/)
25
37
  expect(last_execution.stdout.split(/\n/).count).to eq 2
@@ -5,6 +5,7 @@ require 'spec_helper'
5
5
  describe 'Conditional Blocks Integration' do
6
6
  before do
7
7
  Howzit.options[:include_upstream] = false
8
+ Howzit.options[:stack] = false
8
9
  Howzit.options[:default] = true
9
10
  Howzit.options[:matching] = 'partial'
10
11
  Howzit.options[:multiple_matches] = 'choose'
@@ -27,7 +28,7 @@ describe 'Conditional Blocks Integration' do
27
28
  EONOTE
28
29
  File.open('builda.md', 'w') { |f| f.puts note }
29
30
  Howzit.instance_variable_set(:@buildnote, nil) # Force reload
30
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
31
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
31
32
  expect(topic).not_to be_nil
32
33
  output = topic.print_out
33
34
  expect(output.join("\n")).to include('This should be included')
@@ -47,7 +48,7 @@ describe 'Conditional Blocks Integration' do
47
48
  EONOTE
48
49
  File.open('builda.md', 'w') { |f| f.puts note }
49
50
  Howzit.instance_variable_set(:@buildnote, nil) # Force reload
50
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
51
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
51
52
  expect(topic).not_to be_nil
52
53
  output = topic.print_out
53
54
  expect(output.join("\n")).not_to include('This should NOT be included')
@@ -65,7 +66,7 @@ describe 'Conditional Blocks Integration' do
65
66
  EONOTE
66
67
  File.open('builda.md', 'w') { |f| f.puts note }
67
68
  Howzit.instance_variable_set(:@buildnote, nil) # Force reload
68
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
69
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
69
70
  expect(topic).not_to be_nil
70
71
  expect(topic.tasks.count).to eq(1)
71
72
  expect(topic.tasks[0].action).to include('echo "test"')
@@ -83,7 +84,7 @@ describe 'Conditional Blocks Integration' do
83
84
  EONOTE
84
85
  File.open('builda.md', 'w') { |f| f.puts note }
85
86
  Howzit.instance_variable_set(:@buildnote, nil) # Force reload
86
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
87
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
87
88
  expect(topic).not_to be_nil
88
89
  expect(topic.tasks.count).to eq(0)
89
90
  end
@@ -104,7 +105,7 @@ describe 'Conditional Blocks Integration' do
104
105
  EONOTE
105
106
  File.open('builda.md', 'w') { |f| f.puts note }
106
107
  Howzit.instance_variable_set(:@buildnote, nil) # Force reload
107
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
108
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
108
109
  expect(topic).not_to be_nil
109
110
  output = topic.print_out
110
111
  expect(output.join("\n")).to include('Outer content')
@@ -126,7 +127,7 @@ describe 'Conditional Blocks Integration' do
126
127
  EONOTE
127
128
  File.open('builda.md', 'w') { |f| f.puts note }
128
129
  Howzit.instance_variable_set(:@buildnote, nil) # Force reload
129
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
130
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
130
131
  expect(topic).not_to be_nil
131
132
  output = topic.print_out
132
133
  expect(output.join("\n")).to include('Production content')
@@ -148,7 +149,7 @@ describe 'Conditional Blocks Integration' do
148
149
  EONOTE
149
150
  File.open('builda.md', 'w') { |f| f.puts note }
150
151
  Howzit.instance_variable_set(:@buildnote, nil) # Force reload
151
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
152
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
152
153
  expect(topic).not_to be_nil
153
154
  output = topic.print_out
154
155
  expect(output.join("\n")).to include('This should be included')
@@ -5,6 +5,7 @@ require 'spec_helper'
5
5
  describe 'Log Level Configuration' do
6
6
  before do
7
7
  Howzit.options[:include_upstream] = false
8
+ Howzit.options[:stack] = false
8
9
  Howzit.options[:default] = true
9
10
  Howzit.options[:matching] = 'partial'
10
11
  Howzit.options[:multiple_matches] = 'choose'
@@ -30,7 +31,7 @@ describe 'Log Level Configuration' do
30
31
  EONOTE
31
32
  File.open('builda.md', 'w') { |f| f.puts note }
32
33
  Howzit.instance_variable_set(:@buildnote, nil)
33
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
34
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
34
35
  expect(topic).not_to be_nil
35
36
 
36
37
  # Verify log_level directive was parsed
@@ -60,7 +61,7 @@ describe 'Log Level Configuration' do
60
61
  EONOTE
61
62
  File.open('builda.md', 'w') { |f| f.puts note }
62
63
  Howzit.instance_variable_set(:@buildnote, nil)
63
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
64
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
64
65
 
65
66
  log_level_directives = topic.directives.select(&:log_level?)
66
67
  expect(log_level_directives.count).to eq(3)
@@ -84,7 +85,7 @@ describe 'Log Level Configuration' do
84
85
  EONOTE
85
86
  File.open('builda.md', 'w') { |f| f.puts note }
86
87
  Howzit.instance_variable_set(:@buildnote, nil)
87
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
88
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
88
89
 
89
90
  # Set initial log level to warn (should hide debug/info)
90
91
  Howzit.options[:log_level] = 2
@@ -120,7 +121,7 @@ describe 'Log Level Configuration' do
120
121
  EONOTE
121
122
  File.open('builda.md', 'w') { |f| f.puts note }
122
123
  Howzit.instance_variable_set(:@buildnote, nil)
123
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
124
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
124
125
 
125
126
  log_level_directive = topic.directives.find(&:log_level?)
126
127
  expect(log_level_directive).not_to be_nil
@@ -139,7 +140,7 @@ describe 'Log Level Configuration' do
139
140
  EONOTE
140
141
  File.open('builda.md', 'w') { |f| f.puts note }
141
142
  Howzit.instance_variable_set(:@buildnote, nil)
142
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
143
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
143
144
  expect(topic).not_to be_nil
144
145
 
145
146
  task = topic.tasks.find { |t| t.title == 'Test Task' }
@@ -160,7 +161,7 @@ describe 'Log Level Configuration' do
160
161
  EONOTE
161
162
  File.open('builda.md', 'w') { |f| f.puts note }
162
163
  Howzit.instance_variable_set(:@buildnote, nil)
163
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
164
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
164
165
 
165
166
  tasks = topic.tasks
166
167
  expect(tasks.count).to eq(3)
@@ -179,7 +180,7 @@ describe 'Log Level Configuration' do
179
180
  EONOTE
180
181
  File.open('builda.md', 'w') { |f| f.puts note }
181
182
  Howzit.instance_variable_set(:@buildnote, nil)
182
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
183
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
183
184
 
184
185
  # Set initial log level to warn (should hide debug/info)
185
186
  Howzit.options[:log_level] = 2
@@ -208,7 +209,7 @@ describe 'Log Level Configuration' do
208
209
  EONOTE
209
210
  File.open('builda.md', 'w') { |f| f.puts note }
210
211
  Howzit.instance_variable_set(:@buildnote, nil)
211
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
212
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
212
213
 
213
214
  task = topic.tasks[0]
214
215
  expect(task.action).to eq('./script.sh arg1')
@@ -232,7 +233,7 @@ describe 'Log Level Configuration' do
232
233
  EONOTE
233
234
  File.open('builda.md', 'w') { |f| f.puts note }
234
235
  Howzit.instance_variable_set(:@buildnote, nil)
235
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
236
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
236
237
 
237
238
  # Verify environment variable is set (task execution will use it)
238
239
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
@@ -5,6 +5,7 @@ require 'spec_helper'
5
5
  describe 'Sequential Conditional Evaluation' do
6
6
  before do
7
7
  Howzit.options[:include_upstream] = false
8
+ Howzit.options[:stack] = false
8
9
  Howzit.options[:default] = true
9
10
  Howzit.options[:matching] = 'partial'
10
11
  Howzit.options[:multiple_matches] = 'choose'
@@ -35,7 +36,7 @@ describe 'Sequential Conditional Evaluation' do
35
36
  EONOTE
36
37
  File.open('builda.md', 'w') { |f| f.puts note }
37
38
  Howzit.instance_variable_set(:@buildnote, nil)
38
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
39
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
39
40
  expect(topic).not_to be_nil
40
41
 
41
42
  # Verify the conditional task is present
@@ -76,7 +77,7 @@ describe 'Sequential Conditional Evaluation' do
76
77
  EONOTE
77
78
  File.open('builda.md', 'w') { |f| f.puts note }
78
79
  Howzit.instance_variable_set(:@buildnote, nil)
79
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
80
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
80
81
 
81
82
  task_titles = []
82
83
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
@@ -115,7 +116,7 @@ describe 'Sequential Conditional Evaluation' do
115
116
  EONOTE
116
117
  File.open('builda.md', 'w') { |f| f.puts note }
117
118
  Howzit.instance_variable_set(:@buildnote, nil)
118
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
119
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
119
120
 
120
121
  task_titles = []
121
122
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
@@ -151,7 +152,7 @@ describe 'Sequential Conditional Evaluation' do
151
152
  EONOTE
152
153
  File.open('builda.md', 'w') { |f| f.puts note }
153
154
  Howzit.instance_variable_set(:@buildnote, nil)
154
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
155
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
155
156
 
156
157
  task_titles = []
157
158
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
@@ -189,7 +190,7 @@ describe 'Sequential Conditional Evaluation' do
189
190
  EONOTE
190
191
  File.open('builda.md', 'w') { |f| f.puts note }
191
192
  Howzit.instance_variable_set(:@buildnote, nil)
192
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
193
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
193
194
 
194
195
  task_titles = []
195
196
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
@@ -227,7 +228,7 @@ describe 'Sequential Conditional Evaluation' do
227
228
  EONOTE
228
229
  File.open('builda.md', 'w') { |f| f.puts note }
229
230
  Howzit.instance_variable_set(:@buildnote, nil)
230
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
231
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
231
232
 
232
233
  task_titles = []
233
234
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
@@ -265,7 +266,7 @@ describe 'Sequential Conditional Evaluation' do
265
266
  EONOTE
266
267
  File.open('builda.md', 'w') { |f| f.puts note }
267
268
  Howzit.instance_variable_set(:@buildnote, nil)
268
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
269
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
269
270
 
270
271
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
271
272
 
@@ -302,7 +303,7 @@ describe 'Sequential Conditional Evaluation' do
302
303
  EONOTE
303
304
  File.open('builda.md', 'w') { |f| f.puts note }
304
305
  Howzit.instance_variable_set(:@buildnote, nil)
305
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
306
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
306
307
 
307
308
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
308
309
 
data/spec/set_var_spec.rb CHANGED
@@ -5,6 +5,7 @@ require 'spec_helper'
5
5
  describe '@set_var directive' do
6
6
  before do
7
7
  Howzit.options[:include_upstream] = false
8
+ Howzit.options[:stack] = false
8
9
  Howzit.options[:default] = true
9
10
  Howzit.options[:matching] = 'partial'
10
11
  Howzit.options[:multiple_matches] = 'choose'
@@ -29,7 +30,7 @@ describe '@set_var directive' do
29
30
  EONOTE
30
31
  File.open('builda.md', 'w') { |f| f.puts note }
31
32
  Howzit.instance_variable_set(:@buildnote, nil)
32
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
33
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
33
34
 
34
35
  expect(topic.directives).not_to be_nil
35
36
  set_var_directive = topic.directives.find(&:set_var?)
@@ -48,7 +49,7 @@ describe '@set_var directive' do
48
49
  EONOTE
49
50
  File.open('builda.md', 'w') { |f| f.puts note }
50
51
  Howzit.instance_variable_set(:@buildnote, nil)
51
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
52
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
52
53
 
53
54
  set_var_directive = topic.directives.find(&:set_var?)
54
55
  expect(set_var_directive).not_to be_nil
@@ -66,7 +67,7 @@ describe '@set_var directive' do
66
67
  EONOTE
67
68
  File.open('builda.md', 'w') { |f| f.puts note }
68
69
  Howzit.instance_variable_set(:@buildnote, nil)
69
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
70
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
70
71
 
71
72
  set_var_directive = topic.directives.find(&:set_var?)
72
73
  expect(set_var_directive).not_to be_nil
@@ -84,7 +85,7 @@ describe '@set_var directive' do
84
85
  EONOTE
85
86
  File.open('builda.md', 'w') { |f| f.puts note }
86
87
  Howzit.instance_variable_set(:@buildnote, nil)
87
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
88
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
88
89
 
89
90
  set_var_directive = topic.directives.find(&:set_var?)
90
91
  expect(set_var_directive).not_to be_nil
@@ -102,7 +103,7 @@ describe '@set_var directive' do
102
103
  EONOTE
103
104
  File.open('builda.md', 'w') { |f| f.puts note }
104
105
  Howzit.instance_variable_set(:@buildnote, nil)
105
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
106
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
106
107
 
107
108
  set_var_directive = topic.directives.find(&:set_var?)
108
109
  expect(set_var_directive).not_to be_nil
@@ -120,7 +121,7 @@ describe '@set_var directive' do
120
121
  EONOTE
121
122
  File.open('builda.md', 'w') { |f| f.puts note }
122
123
  Howzit.instance_variable_set(:@buildnote, nil)
123
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
124
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
124
125
 
125
126
  set_var_directive = topic.directives.find(&:set_var?)
126
127
  expect(set_var_directive).to be_nil
@@ -136,7 +137,7 @@ describe '@set_var directive' do
136
137
  EONOTE
137
138
  File.open('builda.md', 'w') { |f| f.puts note }
138
139
  Howzit.instance_variable_set(:@buildnote, nil)
139
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
140
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
140
141
 
141
142
  set_var_directive = topic.directives.find(&:set_var?)
142
143
  expect(set_var_directive).not_to be_nil
@@ -156,7 +157,7 @@ describe '@set_var directive' do
156
157
  EONOTE
157
158
  File.open('builda.md', 'w') { |f| f.puts note }
158
159
  Howzit.instance_variable_set(:@buildnote, nil)
159
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
160
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
160
161
 
161
162
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
162
163
 
@@ -186,7 +187,7 @@ describe '@set_var directive' do
186
187
  EONOTE
187
188
  File.open('builda.md', 'w') { |f| f.puts note }
188
189
  Howzit.instance_variable_set(:@buildnote, nil)
189
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
190
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
190
191
 
191
192
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
192
193
  topic.run
@@ -205,7 +206,7 @@ describe '@set_var directive' do
205
206
  EONOTE
206
207
  File.open('builda.md', 'w') { |f| f.puts note }
207
208
  Howzit.instance_variable_set(:@buildnote, nil)
208
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
209
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
209
210
 
210
211
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
211
212
  topic.run
@@ -226,7 +227,7 @@ describe '@set_var directive' do
226
227
  EONOTE
227
228
  File.open('builda.md', 'w') { |f| f.puts note }
228
229
  Howzit.instance_variable_set(:@buildnote, nil)
229
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
230
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
230
231
 
231
232
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
232
233
  topic.run
@@ -247,7 +248,7 @@ describe '@set_var directive' do
247
248
  EONOTE
248
249
  File.open('builda.md', 'w') { |f| f.puts note }
249
250
  Howzit.instance_variable_set(:@buildnote, nil)
250
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
251
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
251
252
 
252
253
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
253
254
  topic.run
@@ -268,7 +269,7 @@ describe '@set_var directive' do
268
269
  EONOTE
269
270
  File.open('builda.md', 'w') { |f| f.puts note }
270
271
  Howzit.instance_variable_set(:@buildnote, nil)
271
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
272
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
272
273
 
273
274
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
274
275
  topic.run
@@ -286,7 +287,7 @@ describe '@set_var directive' do
286
287
  EONOTE
287
288
  File.open('builda.md', 'w') { |f| f.puts note }
288
289
  Howzit.instance_variable_set(:@buildnote, nil)
289
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
290
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
290
291
 
291
292
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
292
293
  topic.run
@@ -304,7 +305,7 @@ describe '@set_var directive' do
304
305
  EONOTE
305
306
  File.open('builda.md', 'w') { |f| f.puts note }
306
307
  Howzit.instance_variable_set(:@buildnote, nil)
307
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
308
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
308
309
 
309
310
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
310
311
  topic.run
@@ -323,7 +324,7 @@ describe '@set_var directive' do
323
324
  EONOTE
324
325
  File.open('builda.md', 'w') { |f| f.puts note }
325
326
  Howzit.instance_variable_set(:@buildnote, nil)
326
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
327
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
327
328
 
328
329
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
329
330
  topic.run
@@ -349,7 +350,7 @@ describe '@set_var directive' do
349
350
  console_warnings << message
350
351
  end
351
352
 
352
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
353
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
353
354
 
354
355
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
355
356
  topic.run
@@ -373,7 +374,7 @@ describe '@set_var directive' do
373
374
  EONOTE
374
375
  File.open('builda.md', 'w') { |f| f.puts note }
375
376
  Howzit.instance_variable_set(:@buildnote, nil)
376
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
377
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
377
378
 
378
379
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
379
380
 
@@ -405,7 +406,7 @@ describe '@set_var directive' do
405
406
  EONOTE
406
407
  File.open('builda.md', 'w') { |f| f.puts note }
407
408
  Howzit.instance_variable_set(:@buildnote, nil)
408
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
409
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
409
410
 
410
411
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
411
412
 
@@ -438,7 +439,7 @@ describe '@set_var directive' do
438
439
  EONOTE
439
440
  File.open('builda.md', 'w') { |f| f.puts note }
440
441
  Howzit.instance_variable_set(:@buildnote, nil)
441
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
442
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
442
443
 
443
444
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
444
445
 
@@ -473,7 +474,7 @@ describe '@set_var directive' do
473
474
  EONOTE
474
475
  File.open('builda.md', 'w') { |f| f.puts note }
475
476
  Howzit.instance_variable_set(:@buildnote, nil)
476
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
477
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
477
478
 
478
479
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
479
480
 
@@ -505,7 +506,7 @@ describe '@set_var directive' do
505
506
  EONOTE
506
507
  File.open('builda.md', 'w') { |f| f.puts note }
507
508
  Howzit.instance_variable_set(:@buildnote, nil)
508
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
509
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
509
510
 
510
511
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
511
512
 
@@ -532,7 +533,7 @@ describe '@set_var directive' do
532
533
  EONOTE
533
534
  File.open('builda.md', 'w') { |f| f.puts note }
534
535
  Howzit.instance_variable_set(:@buildnote, nil)
535
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
536
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
536
537
 
537
538
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
538
539
 
@@ -562,7 +563,7 @@ describe '@set_var directive' do
562
563
  EONOTE
563
564
  File.open('builda.md', 'w') { |f| f.puts note }
564
565
  Howzit.instance_variable_set(:@buildnote, nil)
565
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
566
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
566
567
 
567
568
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
568
569
 
@@ -591,7 +592,7 @@ describe '@set_var directive' do
591
592
  EONOTE
592
593
  File.open('builda.md', 'w') { |f| f.puts note }
593
594
  Howzit.instance_variable_set(:@buildnote, nil)
594
- topic = Howzit.buildnote.find_topic('Test Topic')[0]
595
+ topic = Howzit.buildnote('builda.md').find_topic('Test Topic')[0]
595
596
 
596
597
  allow(Howzit::Prompt).to receive(:yn).and_return(true)
597
598
  topic.run
data/spec/spec_helper.rb CHANGED
@@ -19,6 +19,7 @@ RSpec.configure do |c|
19
19
  # Reset buildnote cache to ensure fresh instance with updated file
20
20
  Howzit.instance_variable_set(:@buildnote, nil)
21
21
  Howzit.options[:include_upstream] = false
22
+ Howzit.options[:stack] = false
22
23
  Howzit.options[:default] = true
23
24
  Howzit.options[:matching] = 'partial'
24
25
  Howzit.options[:multiple_matches] = 'choose'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.38
4
+ version: 2.1.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra