Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/chef-cli/dist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Dist
WORKFLOW = "Chef Workflow (Delivery)".freeze

# The chef executable, as in `chef gem install` or `chef generate cookbook`
EXEC = "chef".freeze
EXEC = "chef-cli".freeze

# Chef-Zero's product name
ZERO_PRODUCT = "Chef Infra Zero".freeze
Expand Down
4 changes: 2 additions & 2 deletions spec/shared/a_file_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def generator_context
let(:argv) { [] }

it "emits an error message and exits" do
expected_stdout = "Usage: chef generate #{generator_name} [path/to/cookbook] NAME [options]"
expected_stdout = "Usage: chef-cli generate #{generator_name} [path/to/cookbook] NAME [options]"

expect(recipe_generator.run).to eq(1)
expect(stdout).to include(expected_stdout)
Expand Down Expand Up @@ -85,7 +85,7 @@ def generator_context
let(:argv) { [ new_file_name ] }

it "emits an error message and exits" do
expected_stdout = "Usage: chef generate #{generator_name} [path/to/cookbook] NAME [options]"
expected_stdout = "Usage: chef-cli generate #{generator_name} [path/to/cookbook] NAME [options]"
expected_stderr = "Error: Directory #{Dir.pwd} is not a cookbook\n"

expect(recipe_generator.run).to eq(1)
Expand Down
14 changes: 7 additions & 7 deletions spec/unit/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def stderr
Patents: #{ChefCLI::Dist::PATENTS}

Usage:
chef -h/--help
chef -v/--version
chef command [arguments...] [options...]
chef-cli -h/--help
chef-cli -v/--version
chef-cli command [arguments...] [options...]

Available Commands:
gem Runs the `gem` command in context of the embedded ruby
Expand Down Expand Up @@ -290,7 +290,7 @@ def test_result
run_cli_with_sanity_check(0)
expect(stdout).to eq(base_help_message)
expect(stderr).to include("please reverse that order")
expect(stderr).to include("chef shell-init")
expect(stderr).to include("chef-cli shell-init")
end

it "complains if only embedded is present" do
Expand All @@ -300,7 +300,7 @@ def test_result
run_cli_with_sanity_check(0)
expect(stdout).to eq(base_help_message)
expect(stderr).to include("you must add")
expect(stderr).to include("chef shell-init")
expect(stderr).to include("chef-cli shell-init")
end

it "passes when both are present in the correct order" do
Expand Down Expand Up @@ -349,7 +349,7 @@ def test_result
run_cli_with_sanity_check(0)
expect(stdout).to eq(base_help_message)
expect(stderr).to include("please reverse that order")
expect(stderr).to include("chef shell-init")
expect(stderr).to include("chef-cli shell-init")
end

it "complains if only embedded is present" do
Expand All @@ -359,7 +359,7 @@ def test_result
run_cli_with_sanity_check(0)
expect(stdout).to eq(base_help_message)
expect(stderr).to include("you must add")
expect(stderr).to include("chef shell-init")
expect(stderr).to include("chef-cli shell-init")
end

it "passes when both are present in the correct order" do
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/command/env_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
let(:omnibus_bin_dir) { "/foo/bin" }

it "has a usage banner" do
expect(command_instance.banner).to eq("Usage: chef env")
expect(command_instance.banner).to eq("Usage: chef-cli env")
end

describe "when running from within an omnibus install" do
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/command/exec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def run_command
end

it "has a usage banner" do
expect(command_instance.banner).to eq("Usage: chef exec SYSTEM_COMMAND")
expect(command_instance.banner).to eq("Usage: chef-cli exec SYSTEM_COMMAND")
end

describe "when locating omnibus directory" do
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/command/generate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def stderr
context "with a generator defined" do
let(:expected_help_message) do
<<~E
Usage: chef generate GENERATOR [options]
Usage: chef-cli generate GENERATOR [options]

Available generators:
example this is a test
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/command/generator_commands/cookbook_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def generator_context
context "when given invalid/incomplete arguments" do

let(:expected_help_message) do
"Usage: chef generate cookbook NAME [options]\n"
"Usage: chef-cli generate cookbook NAME [options]\n"
end

def with_argv(argv)
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/command/generator_commands/policyfile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def generator_context
let(:argv) { %w{ foo bar baz } }

it "shows usage and exits" do
expected_stdout = "Usage: chef generate policyfile [NAME] [options]"
expected_stdout = "Usage: chef-cli generate policyfile [NAME] [options]"

expect(generator.run).to eq(1)
expect(stderr).to include(expected_stdout)
Expand Down