Skip to content

Commit

Permalink
Merge pull request #264 from shortdudey123/move_to_chefstyle
Browse files Browse the repository at this point in the history
Move to chefstyle
  • Loading branch information
smurawski authored Dec 12, 2016
2 parents 4152db8 + 84ea74a commit 176d926
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 92 deletions.
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

0 comments on commit 176d926

Please sign in to comment.