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
1 change: 1 addition & 0 deletions bin/chef
1 change: 1 addition & 0 deletions bin/chef-analyze
25 changes: 0 additions & 25 deletions bin/chef-cli

This file was deleted.

1 change: 1 addition & 0 deletions bin/chef-cli
1 change: 1 addition & 0 deletions bin/chef-run
25 changes: 25 additions & 0 deletions bin/cinc-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env ruby
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Set a trap for ctrl-C right away so we don't surface interrupt exceptions inside of rubygems or whatever.
Kernel.trap(:INT) { print("\n"); exit 1 }

$:.unshift(File.expand_path(File.join(__dir__, "..", "lib")))
require "chef-cli/cli"

ChefCLI::CLI.new(ARGV.clone).run(enforce_license: false)
31 changes: 31 additions & 0 deletions bin/cinc-workstation-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env ruby
#
# ./cinc-workstation-wrapper - Redirect chef binstubs to cinc one with information on stdout
#
# Copyright:: Copyright (c) 2018-2020, Cinc Project
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Encoding.default_external = Encoding::UTF_8

require 'mixlib/shellout'

command = File.basename($PROGRAM_NAME).sub(/chef/, 'cinc')

STDERR.puts "Redirecting to #{command}"

cmd_dir = File.dirname(File.realpath($PROGRAM_NAME))
cmd = Mixlib::ShellOut.new("#{cmd_dir}/#{command}", *ARGV, live_stream: STDOUT, timeout: 3600)
cmd.run_command
exit cmd.exitstatus
4 changes: 2 additions & 2 deletions chef-cli.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Gem::Specification.new do |gem|
Dir.glob("Gemfile*") + # Includes Gemfile and locks
Dir.glob("*.gemspec") +
Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
gem.executables = %w{ chef-cli }
gem.executables = %w{ cinc-cli cinc-workstation-wrapper chef chef-cli chef-analyze chef-run }
gem.test_files = gem.files.grep(%r{^spec/})
gem.require_paths = ["lib"]

Expand All @@ -47,7 +47,7 @@ Gem::Specification.new do |gem|
gem.add_dependency "solve", "< 5.0", "> 2.0"
gem.add_dependency "addressable", ">= 2.3.5", "< 2.9"
gem.add_dependency "cookbook-omnifetch", "~> 0.5"
gem.add_dependency "diff-lcs", ">= 1.0", "< 1.4" # 1.4 changes the output
gem.add_dependency "diff-lcs", ">= 1.0", "< 1.6" # 1.4 changes the output
gem.add_dependency "pastel", "~> 0.7" # used for policyfile differ
gem.add_dependency "license-acceptance", ">= 1.0.11", "< 3"
end
32 changes: 16 additions & 16 deletions lib/chef-cli/dist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,47 @@ class Dist
# This class is not fully implemented, depending on it is not recommended!

# The full marketing name of the product
PRODUCT = "Chef Workstation".freeze
PRODUCT_PKG_HOME = "chef-workstation".freeze
PRODUCT = "Cinc Workstation".freeze
PRODUCT_PKG_HOME = "cinc-workstation".freeze

# the name of the chef-cli gem
CLI_PRODUCT = "Chef CLI".freeze
CLI_PRODUCT = "Cinc CLI".freeze
CLI_GEM = "chef-cli".freeze

# the name of the overall infra product
INFRA_PRODUCT = "Chef Infra".freeze
INFRA_PRODUCT = "Cinc Infra".freeze

# name of the Infra client product
INFRA_CLIENT_PRODUCT = "Chef Infra Client".freeze
INFRA_CLIENT_PRODUCT = "Cinc Client".freeze

# The client's alias (chef-client)
INFRA_CLIENT_CLI = "chef-client".freeze
INFRA_CLIENT_CLI = "cinc-client".freeze

# The client's gem
INFRA_CLIENT_GEM = "chef".freeze

INSPEC_PRODUCT = "Chef InSpec".freeze
INSPEC_CLI = "inspec".freeze
INSPEC_PRODUCT = "Cinc Auditor".freeze
INSPEC_CLI = "cinc-auditor-bin".freeze

# The name of the server product
SERVER_PRODUCT = "Chef Infra Server".freeze
WORKFLOW = "Chef Workflow (Delivery)".freeze
SERVER_PRODUCT = "Cinc Infra Server".freeze
WORKFLOW = "Cinc Workflow (Delivery)".freeze

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

# Chef-Zero's product name
ZERO_PRODUCT = "Chef Infra Zero".freeze
ZERO_PRODUCT = "Cinc Infra Zero".freeze

HAB_PRODUCT = "Chef Habitat".freeze
HAB_SOFTWARE_NAME = "habitat".freeze
HAB_CLI = "hab".freeze
HAB_PRODUCT = "Biome".freeze
HAB_SOFTWARE_NAME = "biome".freeze
HAB_CLI = "bio".freeze

# product patents page
PATENTS = "https://www.chef.io/patents".freeze

# Workstation banner/help text
WORKSTATION_DOCS = "https://docs.chef.io/workstation/".freeze
WORKSTATION_HEADER = "The Chef command line tool for managing your infrastructure from your workstation.".freeze
WORKSTATION_HEADER = "The Cinc command line tool for managing your infrastructure from your workstation.".freeze
end
end