diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20df152e..35fc4177 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: LC_ALL: en_US.UTF-8 strategy: - matrix: { ruby: ['3.3', '3.3', '3.4', '4.0'] } + matrix: { ruby: ['3.3', '3.4', '4.0'] } steps: - name: Checkout code diff --git a/lib/bashly/libraries/settings/settings.yml b/lib/bashly/libraries/settings/settings.yml index 350f982f..38f84811 100644 --- a/lib/bashly/libraries/settings/settings.yml +++ b/lib/bashly/libraries/settings/settings.yml @@ -157,7 +157,7 @@ env: development # - always # render this feature in any environment # - never # do not render this feature enable_header_comment: always -enable_bash3_bouncer: always +enable_bash_version_bouncer: always enable_completions: never enable_view_markers: development enable_inspect_args: development diff --git a/lib/bashly/script/wrapper.rb b/lib/bashly/script/wrapper.rb index 537766e4..93b6b780 100644 --- a/lib/bashly/script/wrapper.rb +++ b/lib/bashly/script/wrapper.rb @@ -46,7 +46,7 @@ def header! def default_header result = render 'header' - result += render('bash3_bouncer') unless function_name || !Settings.enabled?(:bash3_bouncer) + result += render('bash_version_bouncer') unless function_name || !Settings.enabled?(:bash_version_bouncer) result end diff --git a/lib/bashly/settings.rb b/lib/bashly/settings.rb index cdb02e25..38694d75 100644 --- a/lib/bashly/settings.rb +++ b/lib/bashly/settings.rb @@ -9,7 +9,7 @@ class << self :compact_short_flags, :conjoined_flag_args, :config_path, - :enable_bash3_bouncer, + :enable_bash_version_bouncer, :enable_completions, :enable_deps_array, :enable_env_var_names_array, @@ -65,8 +65,8 @@ def enabled?(feature) (send(:"enable_#{feature}") == 'development' && !production?) end - def enable_bash3_bouncer - @enable_bash3_bouncer ||= get :enable_bash3_bouncer + def enable_bash_version_bouncer + @enable_bash_version_bouncer ||= get :enable_bash_version_bouncer end def enable_completions diff --git a/lib/bashly/views/wrapper/bash3_bouncer.gtx b/lib/bashly/views/wrapper/bash_version_bouncer.gtx similarity index 100% rename from lib/bashly/views/wrapper/bash3_bouncer.gtx rename to lib/bashly/views/wrapper/bash_version_bouncer.gtx diff --git a/schemas/settings.json b/schemas/settings.json index db299ec1..36c8b138 100644 --- a/schemas/settings.json +++ b/schemas/settings.json @@ -178,9 +178,9 @@ ], "default": "always" }, - "enable_bash3_bouncer": { - "title": "enable_bash3_bouncer", - "description": "Whether to include the code snippet that aborts when an old version of bash is detected in the generated script\nhttps://bashly.dev/usage/settings/#enable_bash3_bouncer", + "enable_bash_version_bouncer": { + "title": "enable_bash_version_bouncer", + "description": "Whether to include the code snippet that aborts when an old version of bash is detected in the generated script\nhttps://bashly.dev/usage/settings/#enable_bash_version_bouncer", "type": "string", "enum": [ "development", diff --git a/spec/approvals/script/wrapper/code b/spec/approvals/script/wrapper/code index e1cd1df7..ac2ae2bf 100644 --- a/spec/approvals/script/wrapper/code +++ b/spec/approvals/script/wrapper/code @@ -2,7 +2,7 @@ # This script was generated by bashly ... (https://bashly.dev) # Modifying it manually is not recommended -# :wrapper.bash3_bouncer +# :wrapper.bash_version_bouncer if ((BASH_VERSINFO[0] < 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 2))); then printf "bash version 4.2 or higher is required\n" >&2 exit 1 diff --git a/spec/bashly/commands/generate_spec.rb b/spec/bashly/commands/generate_spec.rb index 4975b669..f29dc610 100644 --- a/spec/bashly/commands/generate_spec.rb +++ b/spec/bashly/commands/generate_spec.rb @@ -103,7 +103,7 @@ cp 'lib/bashly/templates/bashly.yml', "#{source_dir}/bashly.yml" end - it 'generates the cli script wrapped in a function without bash3 bouncer' do + it 'generates the cli script wrapped in a function without bash version bouncer' do expect { subject.execute %w[generate --wrap function] }.to output_approval('cli/generate/wrap-function') expect(File).to exist(cli_script) lines = File.readlines cli_script diff --git a/spec/bashly/script/wrapper_spec.rb b/spec/bashly/script/wrapper_spec.rb index be118f0e..963c63f5 100644 --- a/spec/bashly/script/wrapper_spec.rb +++ b/spec/bashly/script/wrapper_spec.rb @@ -18,7 +18,7 @@ context 'with function name' do subject { described_class.new command, 'my_super_function' } - it 'returns the complete script wrapped in a function without a bash3 bouncer' do + it 'returns the complete script wrapped in a function without a bash version bouncer' do lines = subject.code.split "\n" expect(lines[0..13].join("\n")).to match_approval('script/wrapper/code-wrapped') .except(/\d+\.\d+\.\d+(\.rc\d)?/) diff --git a/support/schema/settings.yml b/support/schema/settings.yml index 2abce71b..a2141a91 100644 --- a/support/schema/settings.yml +++ b/support/schema/settings.yml @@ -161,11 +161,11 @@ properties: - always - never default: always - enable_bash3_bouncer: - title: enable_bash3_bouncer + enable_bash_version_bouncer: + title: enable_bash_version_bouncer description: |- Whether to include the code snippet that aborts when an old version of bash is detected in the generated script - https://bashly.dev/usage/settings/#enable_bash3_bouncer + https://bashly.dev/usage/settings/#enable_bash_version_bouncer type: string enum: *feature_toggles default: always