From 7e976aaa84a3423abaea8b02c3168c5063735a33 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Tue, 28 Jul 2020 10:33:20 -0700 Subject: Fix minor typos Signed-off-by: Tim Smith --- .expeditor/run_linux_tests.sh | 2 +- README.md | 10 +++++----- lib/mixlib/cli.rb | 4 ++-- lib/mixlib/cli/formatter.rb | 2 +- spec/mixlib/cli_spec.rb | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.expeditor/run_linux_tests.sh b/.expeditor/run_linux_tests.sh index 4c14c80..2e6c34c 100755 --- a/.expeditor/run_linux_tests.sh +++ b/.expeditor/run_linux_tests.sh @@ -50,4 +50,4 @@ else fi echo "+++ bundle exec task" -bundle exec $1 +bundle exec $@ diff --git a/README.md b/README.md index daabf86..bddbf35 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ Given the following example: ```ruby -# mycli.rb +# my_cli.rb class MyCLI include Mixlib::CLI @@ -166,7 +166,7 @@ In this example, --dep-one will be used. Note that dep_one will not have a valu ```bash -$ ruby mycli.rb --dep-one +$ ruby my_cli.rb --dep-one -1/--dep-one: This flag is deprecated. Use -n/--arg-not-required instead arg_not_required: true @@ -178,12 +178,12 @@ that --arg-required will accept,a nd populate `:arg\_required` with ```bash -$ ruby mycli.rb --dep-two z # 'q' maps to 'invalid' in the value_mapper proc above +$ ruby my_cli.rb --dep-two z # 'q' maps to 'invalid' in the value_mapper proc above -2/--dep-two: This flag is deprecated. Use -a/--arg-required instead. arg_required: a # The value is mapped to its replacement using the function provided. -dep_two: z # the deprected value is kept by default +dep_two: z # the deprecated value is kept by default ``` In this example, the value provided to dep-two will be converted to a value @@ -191,7 +191,7 @@ that --arg-required will reject, showing how content rules are applied even when the input is coming from a deprecated option: ```bash -$ ruby mycli.rb --dep-two q +$ ruby my_cli.rb --dep-two q -2/--dep-two: This flag is deprecated. Use -a/--arg-required instead. -a/--arg-required: invalid is not one of the allowed values: 'a', 'b', or 'c' diff --git a/lib/mixlib/cli.rb b/lib/mixlib/cli.rb index b8f5748..30efbd3 100644 --- a/lib/mixlib/cli.rb +++ b/lib/mixlib/cli.rb @@ -140,7 +140,7 @@ module Mixlib # and converts it to a value suitable for the new option. # If not provided, the value provided to the deprecated option will be # assigned directly to the converted option. - # keep :: Defaults to true, this ensure sthat `options[:deprecated_flag]` is + # keep :: Defaults to true, this ensures that `options[:deprecated_flag]` is # populated when the deprecated flag is used. If set to false, # only the value in `replacement` will be set. Results undefined # if no replacement is provided. You can use this to enforce the transition @@ -194,7 +194,7 @@ module Mixlib # === Returns # @options:: The current options hash. def options=(val) - raise(ArgumentError, "Options must recieve a hash") unless val.is_a?(Hash) + raise(ArgumentError, "Options must receive a hash") unless val.is_a?(Hash) @options = val end diff --git a/lib/mixlib/cli/formatter.rb b/lib/mixlib/cli/formatter.rb index 59f98a4..24a2de7 100644 --- a/lib/mixlib/cli/formatter.rb +++ b/lib/mixlib/cli/formatter.rb @@ -19,7 +19,7 @@ module Mixlib usage end - # @param opt_arry [Array] + # @param opt_array [Array] # # @return [String] a friendly quoted list of items complete with "or" def self.friendly_opt_list(opt_array) diff --git a/spec/mixlib/cli_spec.rb b/spec/mixlib/cli_spec.rb index 91a4a4d..ec9435c 100644 --- a/spec/mixlib/cli_spec.rb +++ b/spec/mixlib/cli_spec.rb @@ -299,7 +299,7 @@ describe Mixlib::CLI do expect(@cli.config[:require_me]).to eql("") end - it "preserves all of the commandline arguments, ARGV" do + it "preserves all of the command line arguments, ARGV" do TestCLI.option(:config_file, short: "-c CONFIG") @cli = TestCLI.new argv_old = ARGV.dup -- cgit v1.2.1