File tree Expand file tree Collapse file tree 8 files changed +30
-13
lines changed Expand file tree Collapse file tree 8 files changed +30
-13
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def completion_generator
6262 end
6363
6464 def completion_flag_names
65- visible_flags . map ( &:name ) + public_flags . map ( &:short )
65+ visible_flags . map ( &:name ) + visible_flags . map ( &:short )
6666 end
6767
6868 def completion_allowed_args
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ if extensible
4343end
4444>
4545
46- if public_commands .any?
46+ if visible_commands .any?
4747 grouped_commands.each do |group, commands|
4848 > {{ group.gsub(/:$/, '').upcase }}
4949 > ==================================================
@@ -150,11 +150,11 @@ if dependencies.any?
150150 end
151151end
152152
153- if public_environment_variables .any?
153+ if visible_environment_variables .any?
154154 > ENVIRONMENT VARIABLES
155155 > ==================================================
156156 >
157- public_environment_variables .each do |environment_variable|
157+ visible_environment_variables .each do |environment_variable|
158158 > {{ environment_variable.name.upcase }}
159159 > --------------------------------------------------
160160 >
186186
187187see_also = []
188188see_also << parents.first if parents.any?
189- see_also += public_commands .map { |x| x.full_name.to_hyphen } if public_commands .any?
189+ see_also += visible_commands .map { |x| x.full_name.to_hyphen } if visible_commands .any?
190190see_also += x_mandoc_see_also if x_mandoc_see_also && x_mandoc_see_also.is_a?(Array)
191191see_also.map! do |item|
192192 item.match(/(.+)(\(\d\))/) ? "**#{$1}**#{$2}" : "**#{item}**(1)"
Original file line number Diff line number Diff line change 6262
6363# === Environment Variables
6464
65- if public_environment_variables .any?
65+ if visible_environment_variables .any?
6666 > ## Environment Variables
6767 >
68- public_environment_variables .each do |environment_variable|
68+ visible_environment_variables .each do |environment_variable|
6969 attributes = environment_variable.required || environment_variable.default
7070
7171 > #### *{{ environment_variable.name.upcase }}*
Original file line number Diff line number Diff line change @@ -72,12 +72,12 @@ def default_command
7272 def grouped_commands
7373 result = { }
7474
75- public_commands . each do |command |
75+ visible_commands . each do |command |
7676 result [ command . group_string ] ||= [ ]
7777 result [ command . group_string ] << command
7878 next unless command . expose
7979
80- command . public_commands . each do |subcommand |
80+ command . visible_commands . each do |subcommand |
8181 result [ command . group_string ] << subcommand
8282 end
8383 end
Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ def validated_environment_variables
3131 environment_variables . select ( &:validate )
3232 end
3333
34+ # Returns only public environment variables, or both public and private
35+ # environment variables if Settings.private_reveal_key is set
36+ def visible_environment_variables
37+ Settings . private_reveal_key ? environment_variables : public_environment_variables
38+ end
39+
3440 # Returns an array of all the environment_variables with a whitelist arg
3541 def whitelisted_environment_variables
3642 environment_variables . select ( &:allowed )
Original file line number Diff line number Diff line change 44> printf "{{ help.wrap(76).indent(4).sanitize_for_print }}\n"
55
66if allowed
7- > printf " %s\n" "{{ strings[:allowed] % { values: allowed.join(', ') } }}\n "
7+ > printf " %s\n" "{{ strings[:allowed] % { values: allowed.join(', ') } }}"
88end
99
1010if default
Original file line number Diff line number Diff line change @@ -18,10 +18,21 @@ Some specs have tags for convenience:
1818- ` :stable ` - specs of features that rarely change
1919- ` :noci ` - specs that are disabled in CI
2020
21- For example, to run only specs that are not : slow and not : stable , run:
21+ ## Useful respec commands
22+
2223
2324``` bash
25+ # smoke test; run only specs that are not :slow and not :stable
2426$ respec tagged ~ stable ~ slow
27+
28+ # test examples only
29+ $ respec only examples
30+
31+ # test a specific example only
32+ $ EXAMPLE=whitelist respec only examples
33+
34+ # test only specs that changed recently, and repeat on change
35+ $ respec refactor # or respec r
2536```
2637
2738## Notes about Example Tests
Original file line number Diff line number Diff line change 1414 cli --version | -v
1515
1616Commands:
17- connect Connect to the metaverse
17+ connect Connect to the metaverse
1818
1919+ ./cli -h
2020cli - Sample application with private commands
2525 cli --version | -v
2626
2727Commands:
28- connect Connect to the metaverse
28+ connect Connect to the metaverse
2929
3030Options:
3131 --help, -h
You can’t perform that action at this time.
0 commit comments