From d7211ee96e3da003eeb0f3ab744fff701f10e9de Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 2 Jun 2021 17:22:53 -0700 Subject: [PATCH 1/3] Depend on knife instead of chef Depend on knife for Chef 17 not the chef gem Signed-off-by: Tim Smith --- Gemfile | 19 ------------------- Rakefile | 14 -------------- knife-google.gemspec | 2 +- 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/Gemfile b/Gemfile index 7ee8272..2810aa3 100644 --- a/Gemfile +++ b/Gemfile @@ -2,27 +2,8 @@ source "https://rubygems.org" gemspec -group :docs do - gem "yard" - gem "redcarpet" - gem "github-markup" -end - group :test do gem "chefstyle" gem "rspec", "~> 3.1" gem "rake" - if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.7") - gem "chef-zero", "~> 15" - gem "chef", "~> 15" - else - gem "chef", "~> 16" - end -end - -group :development do - gem "pry" - gem "pry-byebug" - gem "pry-stack_explorer" - gem "rb-readline" end diff --git a/Rakefile b/Rakefile index fc238c3..be32a94 100644 --- a/Rakefile +++ b/Rakefile @@ -24,18 +24,4 @@ rescue LoadError puts "chefstyle gem is not installed. bundle install first to make sure all dependencies are installed." end -begin - require "yard" unless defined?(YARD) - YARD::Rake::YardocTask.new(:docs) -rescue LoadError - puts "yard is not available. bundle install first to make sure all dependencies are installed." -end - -task :console do - require "irb" - require "irb/completion" - ARGV.clear - IRB.start -end - task default: %i{spec style} diff --git a/knife-google.gemspec b/knife-google.gemspec index e1263b4..7762699 100644 --- a/knife-google.gemspec +++ b/knife-google.gemspec @@ -15,7 +15,7 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.required_ruby_version = ">= 2.7" - s.add_dependency "chef", ">= 15.11" + s.add_dependency "knife" s.add_dependency "knife-cloud", ">= 4.0.0" s.add_dependency "google-api-client", ">= 0.23.9", "< 0.53.0" # each version introduces breaking changes which we need to validate s.add_dependency "gcewinpass", "~> 1.1" From 1a1493ae604ecafb6b511a09e47adce7f7dab3b5 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 2 Jun 2021 17:24:26 -0700 Subject: [PATCH 2/3] Update the requirements in the readme Signed-off-by: Tim Smith --- README.md | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index d01f57a..62cbead 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,11 @@ ## Overview -This is the official Chef [Knife](http://docs.chef.io/knife.html) plugin for -[Google Compute Engine](https://cloud.google.com/products/compute-engine). -This plugin gives knife the ability to create, bootstrap, and manage -Google Compute Engine (GCE) instances. +This is the official Chef [Knife](http://docs.chef.io/knife.html) plugin for [Google Compute Engine](https://cloud.google.com/products/compute-engine). This plugin gives knife the ability to create, bootstrap, and manage Google Compute Engine (GCE) instances. ## Compatibility -This plugin has been tested with Chef 12.x and uses the [Google API Ruby Client](https://github.com/google/google-api-ruby-client). +This plugin has been tested with Chef 17 and uses the [Google API Ruby Client](https://github.com/google/google-api-ruby-client). # Getting Started @@ -32,12 +29,6 @@ Install the gem with: gem install knife-google ``` -Or, even better, if you're using the ChefDK: - -```sh -chef gem install knife-google -``` - If you're using Bundler, simply add it to your Gemfile: ```ruby @@ -70,7 +61,7 @@ The easiest way to create this is to download and install the [Google Cloud SDK] If you already have a file you'd like to use that is in a different location, set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable with the full path to that file. -## Configuration +## Configuration All knife-google commands require a project name, and most commands require zone name to be supplied. You can supply these on the command line: @@ -284,7 +275,7 @@ WinRM is used by Chef to bootstrap Windows nodes. The default settings of the GC All documentation is written using YARD. You can generate a by running: ``` -rake docs +yard ``` ## Contributing @@ -295,7 +286,7 @@ For information on contributing to this project please see our [Contributing Doc Version 3.0.0 of knife-google was rewritten by Chef Partner Engineering but is largely inspired by initial versions of knife-google, thanks to the work of the great folks at Google. -- Copyright:: Copyright (c) 2016-2018 Chef Software, Inc. +- Copyright:: Chef Software, Inc. - License:: Apache License, Version 2.0 ```text @@ -310,4 +301,4 @@ 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. -``` \ No newline at end of file +``` From 573ef8dbf2db5ee8639b87d203a70bbfb7b625c1 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 2 Jun 2021 17:25:13 -0700 Subject: [PATCH 3/3] Update links Signed-off-by: Tim Smith --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 62cbead..479b03a 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ ## Overview -This is the official Chef [Knife](http://docs.chef.io/knife.html) plugin for [Google Compute Engine](https://cloud.google.com/products/compute-engine). This plugin gives knife the ability to create, bootstrap, and manage Google Compute Engine (GCE) instances. +This is the official Chef [Knife](https://docs.chef.io/workstation/knife/) plugin for [Google Compute Engine](https://cloud.google.com/compute). This plugin gives knife the ability to create, bootstrap, and manage Google Compute Engine (GCE) instances. ## Compatibility