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

Move to chefstyle #264

Merged
merged 3 commits into from
Dec 12, 2016
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
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Cane::RakeTask.new do |cane|
cane.canefile = "./.cane"
end

require "finstyle"
require "chefstyle"
require "rubocop/rake_task"
RuboCop::RakeTask.new(:style) do |task|
task.options << "--display-cop-names"
Expand All @@ -42,5 +42,5 @@ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
config.future_release = Kitchen::Driver::VAGRANT_VERSION
config.enhancement_labels = "enhancement,Enhancement,New Feature,Feature,Improvement".split(",")
config.bug_labels = "bug,Bug".split(",")
config.exclude_labels = %w[Duplicate Question Discussion No_Changelog]
config.exclude_labels = %w{Duplicate Question Discussion No_Changelog}
end
9 changes: 3 additions & 6 deletions kitchen-vagrant.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ Gem::Specification.new do |gem|

gem.add_dependency "test-kitchen", "~> 1.4"

gem.add_development_dependency "countloc", "~> 0.4"
gem.add_development_dependency "countloc", "~> 0.4"
gem.add_development_dependency "rake"
gem.add_development_dependency "rspec", "~> 3.2"
gem.add_development_dependency "simplecov", "~> 0.9"
gem.add_development_dependency "github_changelog_generator", "1.11.3"

# style and complexity libraries are tightly version pinned as newer releases
# may introduce new and undesireable style choices which would be immediately
# enforced in CI
gem.add_development_dependency "finstyle", "1.5.0"
gem.add_development_dependency "cane", "2.6.2"
gem.add_development_dependency "chefstyle"
gem.add_development_dependency "cane", "3.0.0"
end
14 changes: 7 additions & 7 deletions lib/kitchen/driver/vagrant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def finalize_synced_folders!
config[:kitchen_root]
),
destination.gsub("%{instance_name}", instance.name),
options || "nil"
options || "nil",
]
end
add_extra_synced_folders!
Expand All @@ -288,7 +288,7 @@ def add_extra_synced_folders!
config[:synced_folders].push([
local_kitchen_cache,
cache_directory,
"create: true"
"create: true",
])
end
end
Expand Down Expand Up @@ -363,7 +363,7 @@ def run_command(cmd, options = {})
merged = {
:use_sudo => config[:use_sudo],
:log_subject => name,
:environment => {}
:environment => {},
}.merge(options)

# Attempt to extract bundler and associated GEM related values.
Expand All @@ -373,8 +373,8 @@ def run_command(cmd, options = {})
# "A Hard Problem"(TM), we simply blow away all known bundler
# related changes.
env = merged[:environment]
%w[BUNDLE_BIN_PATH BUNDLE_GEMFILE GEM_HOME GEM_PATH GEM_ROOT RUBYLIB
RUBYOPT _ORIGINAL_GEM_PATH].each do |var|
%w{BUNDLE_BIN_PATH BUNDLE_GEMFILE GEM_HOME GEM_PATH GEM_ROOT RUBYLIB
RUBYOPT _ORIGINAL_GEM_PATH}.each do |var|
env[var] = nil
end

Expand Down Expand Up @@ -456,7 +456,7 @@ def local_kitchen_cache
# @api private
def vagrant_root
@vagrant_root ||= instance.nil? ? nil : File.join(
config[:kitchen_root], %w[.kitchen kitchen-vagrant],
config[:kitchen_root], %w{.kitchen kitchen-vagrant},
"kitchen-#{File.basename(config[:kitchen_root])}-#{instance.name}"
)
end
Expand All @@ -470,7 +470,7 @@ def vagrant_config(type)
lines = run_silently("#{config[:vagrant_binary]} #{type}-config").
split("\n").map do |line|
tokens = line.strip.partition(" ")
[tokens.first, tokens.last.gsub(/"/, "")]
[tokens.first, tokens.last.delete('"')]
end
Hash[lines]
end
Expand Down
Loading