Skip to content

Commit 8917a46

Browse files
joshcoopercthorn42
authored andcommitted
Include the help header in the gem
The built gem didn't include the help header fixture. Just inline the text.
1 parent 555da78 commit 8917a46

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Naming/MethodName:
4747
Exclude:
4848
- 'spec/mocks/win32ole.rb'
4949
- 'spec/mocks/ffi.rb'
50+
- 'spec/facter/util/windows/network_utils_spec.rb'
5051

5152
Naming/PredicateName:
5253
Exclude:

lib/facter/fixtures/facter_help_header

Lines changed: 0 additions & 7 deletions
This file was deleted.

lib/facter/framework/cli/cli.rb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,20 +167,26 @@ def list_cache_groups
167167
end
168168

169169
desc '--help, -h', 'Help for all arguments'
170-
def help(*args)
170+
def help(*_args)
171171
help_string = +''
172-
help_string << help_header(args)
172+
help_string << help_header
173173
help_string << add_class_options_to_help
174174
help_string << add_commands_to_help
175175

176176
puts help_string
177177
end
178178

179179
no_commands do
180-
def help_header(_args)
181-
path = File.join(File.dirname(__FILE__), '../../')
180+
def help_header
181+
<<~HELP
182+
Usage
183+
=====
182184
183-
Facter::Util::FileHelper.safe_read("#{path}fixtures/facter_help_header")
185+
facter [options] [query] [query] [...]
186+
187+
Options
188+
=======
189+
HELP
184190
end
185191

186192
def add_class_options_to_help

0 commit comments

Comments
 (0)