summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-05 15:00:00 -0800
commit686113531d23f30e9973d659c456ae33eb9cff1f (patch)
treef225de7251a8b49b8d183dd168bab0a0addbe23f /tasks
parentd1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff)
downloadchef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
Diffstat (limited to 'tasks')
-rw-r--r--tasks/cbgb.rb6
-rw-r--r--tasks/external_tests.rb4
-rw-r--r--tasks/maintainers.rb16
-rw-r--r--tasks/rspec.rb3
4 files changed, 14 insertions, 15 deletions
diff --git a/tasks/cbgb.rb b/tasks/cbgb.rb
index f95a251885..9aa6700137 100644
--- a/tasks/cbgb.rb
+++ b/tasks/cbgb.rb
@@ -34,7 +34,7 @@ begin
out = "<!-- This is a generated file. Please do not edit directly -->\n"
out << "<!-- Modify CBGB.toml file and run `rake cbgb:generate` to regenerate -->\n\n"
out << "# " + cbgb["Preamble"]["title"] + "\n\n"
- out << cbgb["Preamble"]["text"] + "\n"
+ out << cbgb["Preamble"]["text"] + "\n"
out << "# Board of Governors\n\n"
out << "## " + cbgb["Org"]["Lead"]["title"] + "\n\n"
out << person(cbgb["people"], cbgb["Org"]["Lead"]["person"]) + "\n\n"
@@ -52,8 +52,8 @@ begin
def components(list, cmp)
out = ""
- cmp.each do |k,v|
- out << "\n#### #{v['title'].gsub('#','\\#')}\n"
+ cmp.each do |k, v|
+ out << "\n#### #{v['title'].gsub('#', '\\#')}\n"
out << cbgb(list, v["cbgb"])
end
out
diff --git a/tasks/external_tests.rb b/tasks/external_tests.rb
index f3a0da062f..f6fd79c86b 100644
--- a/tasks/external_tests.rb
+++ b/tasks/external_tests.rb
@@ -55,10 +55,10 @@ EXTERNAL_PROJECTS = {
"knife-windows" => "rake unit_spec",
}
-task :external_specs => EXTERNAL_PROJECTS.keys.map { |g| :"#{g.sub("-","_")}_spec" }
+task :external_specs => EXTERNAL_PROJECTS.keys.map { |g| :"#{g.sub("-", "_")}_spec" }
EXTERNAL_PROJECTS.each do |test_gem, commands|
- task :"#{test_gem.gsub("-","_")}_spec" do
+ task :"#{test_gem.gsub("-", "_")}_spec" do
bundle_exec_with_chef(test_gem, commands)
end
end
diff --git a/tasks/maintainers.rb b/tasks/maintainers.rb
index 6c5eb18ad2..535edda248 100644
--- a/tasks/maintainers.rb
+++ b/tasks/maintainers.rb
@@ -38,7 +38,7 @@ begin
task :generate do
out = "<!-- This is a generated file. Please do not edit directly -->\n\n"
out << "# " + source["Preamble"]["title"] + "\n\n"
- out << source["Preamble"]["text"] + "\n"
+ out << source["Preamble"]["text"] + "\n"
# The project lead is a special case
out << "# " + source["Org"]["Lead"]["title"] + "\n\n"
@@ -70,7 +70,7 @@ begin
end
def teams
- @teams ||= {"client-maintainers" => {"title" => "Client Maintainers"}}
+ @teams ||= { "client-maintainers" => { "title" => "Client Maintainers" } }
end
def add_members(team, name)
@@ -94,7 +94,7 @@ begin
# setting, so we know whether we need to update it
def get_github_teams
github.org_teams("chef").each do |team|
- gh_teams[team[:slug]] = {"id" => team[:id], "privacy" => team[:privacy]}
+ gh_teams[team[:slug]] = { "id" => team[:id], "privacy" => team[:privacy] }
end
end
@@ -109,8 +109,8 @@ begin
def create_team(team)
puts "creating new github team: #{team} with title: #{teams[team]["title"]} "
t = github.create_team("chef", name: team, description: teams[team]["title"],
- privacy: "closed", repo_names: REPOSITORIES,
- accept: "application/vnd.github.ironman-preview+json")
+ privacy: "closed", repo_names: REPOSITORIES,
+ accept: "application/vnd.github.ironman-preview+json")
gh_teams[team] = { "id" => t[:id], "privacy" => t[:privacy] }
end
@@ -146,14 +146,14 @@ begin
return if gh_teams[team]["privacy"] == "closed"
puts "Setting #{team} privacy to closed from #{gh_teams[team]["privacy"]}"
github.update_team(gh_teams[team]["id"], privacy: "closed",
- accept: "application/vnd.github.ironman-preview+json")
+ accept: "application/vnd.github.ironman-preview+json")
end
def add_team_members(team, additions)
additions.each do |member|
puts "Adding #{member} to #{team}"
github.add_team_membership(gh_teams[team]["id"], member, role: "member",
- accept: "application/vnd.github.ironman-preview+json")
+ accept: "application/vnd.github.ironman-preview+json")
end
end
@@ -188,7 +188,7 @@ begin
end
out << format_maintainers(cmp.delete("maintainers")) + "\n" if cmp.has_key?("maintainers")
cmp.delete("paths")
- cmp.each {|k,v| out << format_components(v) }
+ cmp.each { |k, v| out << format_components(v) }
out
end
diff --git a/tasks/rspec.rb b/tasks/rspec.rb
index 72c783038f..a52960f165 100644
--- a/tasks/rspec.rb
+++ b/tasks/rspec.rb
@@ -25,7 +25,6 @@ CHEF_ROOT = File.join(File.dirname(__FILE__), "..")
begin
require "rspec/core/rake_task"
-
desc "Run specs for Chef's Components"
task :component_specs do
Dir.chdir("chef-config") do
@@ -55,7 +54,7 @@ begin
t.pattern = FileList["spec/**/*_spec.rb"]
t.rcov = true
t.rcov_opts = lambda do
- IO.readlines("#{CHEF_ROOT}/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
+ IO.readlines("#{CHEF_ROOT}/spec/rcov.opts").map { |l| l.chomp.split " " }.flatten
end
end