Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Ruby 2.5 + misc test cleanup #533

Merged
merged 7 commits into from
Jan 18, 2021
Merged
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 .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
AllCops:
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5

Lint/IneffectiveAccessModifier:
Exclude:
Expand Down
3 changes: 1 addition & 2 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
--readme README.md
--markup markdown
--markup-provider maruku
--markup markdown
1 change: 1 addition & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please refer to the Chef Community Code of Conduct at https://www.chef.io/code-of-conduct/
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ source "https://rubygems.org"
gemspec

group :test do
gem "rake"
gem "rake", ">= 11.0"
gem "rspec", "~> 3.2"
end

group :debug do
gem "pry"
end

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# <a name="title"></a> Kitchen::Ec2: A Test Kitchen Driver for Amazon EC2

[![Gem Version](https://badge.fury.io/rb/kitchen-ec2.svg)](https://badge.fury.io/rb/kitchen-ec2)
![CI](https://github.com/test-kitchen/kitchen-ec2/workflows/CI/badge.svg)
[![Code Climate](https://codeclimate.com/github/test-kitchen/kitchen-ec2/badges/gpa.svg)](https://codeclimate.com/github/test-kitchen/kitchen-ec2)
![CI](https://github.com/test-kitchen/kitchen-ec2/workflows/CI/badge.svg?branch=master)

A [Test Kitchen][kitchenci] Driver for Amazon EC2.

Expand Down
2 changes: 0 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ rescue LoadError
puts "chefstyle is not available. (sudo) gem install chefstyle to do style checking."
end

desc "Run all quality tasks"

task default: %i{test style}
6 changes: 1 addition & 5 deletions kitchen-ec2.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@ Gem::Specification.new do |gem|
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR).grep(/LICENSE|^lib/)
gem.require_paths = ["lib"]

gem.required_ruby_version = ">= 2.4"
gem.required_ruby_version = ">= 2.5"

gem.add_dependency "test-kitchen", ">= 1.4.1", "< 3"
gem.add_dependency "aws-sdk-ec2", "~> 1.0"
gem.add_dependency "retryable", ">= 2.0", "< 4.0" # 4.0 will need to be validated

gem.add_development_dependency "rspec", "~> 3.2"
gem.add_development_dependency "maruku", "~> 0.6"
gem.add_development_dependency "climate_control"
end
10 changes: 4 additions & 6 deletions lib/kitchen/driver/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,10 @@ def submit_spots

errs = []
configs.each do |conf|
begin
@config = conf
return submit_spot
rescue => e
errs.append(e)
end
@config = conf
return submit_spot
rescue => e
errs.append(e)
end
raise ["Could not create a spot instance:", errs].flatten.join("\n")
end
Expand Down
1 change: 0 additions & 1 deletion spec/kitchen/driver/aws/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# limitations under the License.

require "kitchen/driver/aws/client"
require "climate_control"

describe Kitchen::Driver::Aws::Client do

Expand Down
5 changes: 0 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@

require "support/fake_image"

if ENV["CODECLIMATE_REPO_TOKEN"]
require "codeclimate-test-reporter"
CodeClimate::TestReporter.start
end

RSpec.configure do |config|
# rspec-expectations config goes here. You can use an alternate
# assertion/expectation library such as wrong or the stdlib/minitest
Expand Down