-
Notifications
You must be signed in to change notification settings - Fork 60
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.3+ / InSpec 1.47+ and update dev deps #221
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
326bcdd
Remove github_changelog_generator dep
tas50 3a90c15
Remove bundler dep in the gemfile
tas50 910b820
Require Ruby 2.3 or later
tas50 1011c9c
Remove unused Code Climate support
tas50 498260b
Update rake and chefstyle
tas50 60a4284
Rename the kitchen file
tas50 006f1b9
Require InSpec 1.47+
tas50 39b7f19
Fix capitalization of InSpec
tas50 8005512
Update ruby versions to test in Travis
tas50 c0944ed
Force the bundler install in Travis and install the integration gems
tas50 40c1cd2
Update version to 1.0.0
tas50 733a11e
Properly limit the files we ship in the gem
tas50 e0850d8
Test on xenial in Travis
tas50 c4fc916
Add Ruby 2.6.0 testing to Travis
tas50 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,42 @@ | ||
sudo: required | ||
branches: | ||
only: | ||
- master | ||
language: ruby | ||
cache: bundler | ||
dist: xenial | ||
services: | ||
- docker | ||
bundler_args: "--without integration guard tools" | ||
bundler_args: "--without guard tools" | ||
before_install: | ||
- gem update --system | ||
- gem --version | ||
- rvm @global do gem install bundler | ||
- rvm @global do gem install bundler -f | ||
- bundle --version | ||
matrix: | ||
include: | ||
- rvm: 2.3.7 | ||
- rvm: 2.4.4 | ||
- rvm: 2.3.8 | ||
- rvm: 2.4.5 | ||
bundler_args: "--without guard tools" | ||
script: bundle exec rake $SUITE | ||
env: SUITE="test:integration" OS='default profile contains_inspec' | ||
- rvm: 2.4.4 | ||
- rvm: 2.4.5 | ||
bundler_args: "--without guard tools" | ||
script: bundle exec rake $SUITE | ||
env: SUITE="test:integration" OS='backwards' | ||
- rvm: 2.4.4 | ||
- rvm: 2.4.5 | ||
bundler_args: "--without guard tools" | ||
script: bundle exec rake $SUITE | ||
env: SUITE="test:integration" OS='duplicates' | ||
- rvm: 2.4.4 | ||
- rvm: 2.4.5 | ||
bundler_args: "--without guard tools" | ||
script: bundle exec rake $SUITE | ||
env: SUITE="test:integration" OS='supermarket' | ||
- rvm: 2.4.4 | ||
- rvm: 2.4.5 | ||
bundler_args: "--without guard tools" | ||
script: bundle exec rake $SUITE | ||
env: SUITE="test:integration" OS='attributes-inline attributes-file' | ||
- rvm: 2.5.1 | ||
- rvm: 2.5.3 | ||
- rvm: 2.6.0 | ||
- rvm: ruby-head | ||
allow_failures: | ||
- rvm: ruby-head |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.27.0 | ||
1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# Author:: Fletcher Nichol (<[email protected]>) | ||
# Author:: Christoph Hartmann (<[email protected]>) | ||
# | ||
# Copyright (C) 2015, Chef Software Inc. | ||
# Copyright (C) 2015-2019, Chef Software Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -95,7 +95,7 @@ def call(state) | |
exit_code = runner.run | ||
# 101 is a success as well (exit with no fails but has skipped controls) | ||
return if exit_code == 0 || exit_code == 101 | ||
raise ActionFailed, "Inspec Runner returns #{exit_code}" | ||
raise ActionFailed, "InSpec Runner returns #{exit_code}" | ||
end | ||
|
||
private | ||
|
@@ -142,7 +142,7 @@ def local_suite_files | |
base = File.join(base, "inspec") if legacy_mode | ||
|
||
# only return the directory if it exists | ||
Pathname.new(base).exist? ? [{ :path => base }] : [] | ||
Pathname.new(base).exist? ? [{ path: base }] : [] | ||
end | ||
|
||
# Takes config[:inspec_tests] and modifies any value with a key of :path by adding the full path | ||
|
@@ -207,8 +207,6 @@ def runner_options(transport, state = {}, platform = nil, suite = nil) # rubocop | |
|
||
# check to make sure we have a valid version for caching | ||
if config[:backend_cache] | ||
backend_cache_msg = "backend_cache requires InSpec version >= 1.47.0" | ||
logger.warn backend_cache_msg if Gem::Version.new(::Inspec::VERSION) < Gem::Version.new("1.47.0") | ||
runner_options[:backend_cache] = config[:backend_cache] | ||
else | ||
# default to false until we default to true in inspec | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# | ||
# Author:: Fletcher Nichol (<[email protected]>) | ||
# | ||
# Copyright (C) 2015, Chef Software Inc. | ||
# Copyright (C) 2015-2018, Chef Software Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the 'License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -16,10 +16,7 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
if ENV["CODECLIMATE_REPO_TOKEN"] | ||
require "codeclimate-test-reporter" | ||
CodeClimate::TestReporter.start | ||
elsif ENV["COVERAGE"] | ||
if ENV["COVERAGE"] | ||
require "simplecov" | ||
SimpleCov.profiles.define "gem" do | ||
command_name "Specs" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ❤️you so much for these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worked for a company that changed the case of their name to be all lowercase (so cool). I spent years slowly fixing it all.