Skip to content

Commit

Permalink
flip multiline function arguments around
Browse files Browse the repository at this point in the history
no enforced trailing comma on arguments...
  • Loading branch information
lamont-granquist committed Feb 19, 2016
1 parent 6077b99 commit 92bec4b
Show file tree
Hide file tree
Showing 139 changed files with 588 additions and 588 deletions.
2 changes: 1 addition & 1 deletion ext/win32-eventlog/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ task :register => EVT_SHARED_OBJECT do
:source => "Application",
:key_name => "Chef",
:event_message_file => dll_file,
:category_message_file => dll_file,
:category_message_file => dll_file
)
rescue Errno::EIO => e
puts "Skipping event log registration due to missing privileges: #{e}"
Expand Down
10 changes: 5 additions & 5 deletions lib/chef/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def name(arg = nil)
set_or_return(
:name,
arg,
:regex => /^[\-[:alnum:]_\.]+$/,
:regex => /^[\-[:alnum:]_\.]+$/
)
end

Expand All @@ -65,7 +65,7 @@ def admin(arg = nil)
set_or_return(
:admin,
arg,
:kind_of => [ TrueClass, FalseClass ],
:kind_of => [ TrueClass, FalseClass ]
)
end

Expand All @@ -77,7 +77,7 @@ def public_key(arg = nil)
set_or_return(
:public_key,
arg,
:kind_of => String,
:kind_of => String
)
end

Expand All @@ -90,7 +90,7 @@ def validator(arg = nil)
set_or_return(
:validator,
arg,
:kind_of => [TrueClass, FalseClass],
:kind_of => [TrueClass, FalseClass]
)
end

Expand All @@ -102,7 +102,7 @@ def private_key(arg = nil)
set_or_return(
:private_key,
arg,
:kind_of => [String, FalseClass],
:kind_of => [String, FalseClass]
)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/api_client/registration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def http_api
:api_version => "0",
:client_name => Chef::Config[:validation_client_name],
:signing_key_filename => Chef::Config[:validation_key],
},
}
)
end

Expand Down
12 changes: 6 additions & 6 deletions lib/chef/api_client_v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def name(arg = nil)
set_or_return(
:name,
arg,
:regex => /^[\-[:alnum:]_\.]+$/,
:regex => /^[\-[:alnum:]_\.]+$/
)
end

Expand All @@ -88,7 +88,7 @@ def admin(arg = nil)
set_or_return(
:admin,
arg,
:kind_of => [ TrueClass, FalseClass ],
:kind_of => [ TrueClass, FalseClass ]
)
end

Expand All @@ -100,7 +100,7 @@ def public_key(arg = nil)
set_or_return(
:public_key,
arg,
:kind_of => String,
:kind_of => String
)
end

Expand All @@ -113,7 +113,7 @@ def validator(arg = nil)
set_or_return(
:validator,
arg,
:kind_of => [TrueClass, FalseClass],
:kind_of => [TrueClass, FalseClass]
)
end

Expand All @@ -126,7 +126,7 @@ def private_key(arg = nil)
set_or_return(
:private_key,
arg,
:kind_of => [String, TrueClass, FalseClass],
:kind_of => [String, TrueClass, FalseClass]
)
end

Expand All @@ -138,7 +138,7 @@ def create_key(arg = nil)
set_or_return(
:create_key,
arg,
:kind_of => [ TrueClass, FalseClass ],
:kind_of => [ TrueClass, FalseClass ]
)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def run_chef_client(specific_recipes = [])
@chef_client_json,
override_runlist: override_runlist,
specific_recipes: specific_recipes,
runlist: config[:runlist],
runlist: config[:runlist]
)
@chef_client_json = nil

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/application/windows_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def run_chef_client
result = shell_out(
"chef-client.bat #{config_params}",
:timeout => Chef::Config[:windows_service][:watchdog_timeout],
:logger => Chef::Log,
:logger => Chef::Log
)
Chef::Log.debug "#{result.stdout}"
Chef::Log.debug "#{result.stderr}"
Expand Down
4 changes: 2 additions & 2 deletions lib/chef/application/windows_service_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ def run(params = ARGV)
:binary_path_name => cmd,
:service_start_name => @service_start_name,
:password => @password,
:dependencies => @dependencies,
:dependencies => @dependencies
)
::Win32::Service.configure(
:service_name => @service_name,
:delayed_start => @delayed_start,
:delayed_start => @delayed_start
) unless @delayed_start.nil?
puts "Service '#{@service_name}' has successfully been installed."
end
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/chef_fs/data_handler/acl_data_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def normalize(acl, entry)
"update" => {},
"delete" => {},
"grant" => {},
},)
})
result.keys.each do |key|
result[key] = normalize_hash(result[key], { "actors" => [], "groups" => [] })
result[key]["actors"] = result[key]["actors"].sort
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/chef_fs/data_handler/container_data_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def normalize(container, entry)
normalize_hash(container, {
"containername" => remove_dot_json(entry.name),
"containerpath" => remove_dot_json(entry.name),
},)
})
end

def preserve_key?(key)
Expand Down
4 changes: 2 additions & 2 deletions lib/chef/chef_fs/data_handler/cookbook_data_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ def normalize(cookbook, entry)
"chef_type" => "cookbook_version",
"frozen?" => false,
"metadata" => {},
},)
})
result["metadata"] = normalize_hash(result["metadata"], {
"version" => version,
"name" => name,
},)
})
end

def preserve_key?(key)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def normalize(data_bag_item, entry)
# use those in knife-essentials.
normalize_hash(data_bag_item, {
"id" => remove_dot_json(entry.name),
},)
})
end

def normalize_for_post(data_bag_item, entry)
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/chef_fs/data_handler/environment_data_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def normalize(environment, entry)
"override_attributes" => {},
"json_class" => "Chef::Environment",
"chef_type" => "environment",
},)
})
end

def preserve_key?(key)
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/chef_fs/data_handler/node_data_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def normalize(node, entry)
"default" => {},
"automatic" => {},
"run_list" => [],
},)
})
result["run_list"] = normalize_run_list(result["run_list"])
result
end
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/chef_fs/data_handler/organization_data_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def normalize(organization, entry)
"org_type" => "Business",
"clientname" => "#{entry.org}-validator",
"billing_plan" => "platform-free",
},)
})
result
end

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/chef_fs/data_handler/role_data_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def normalize(role, entry)
"override_attributes" => {},
"run_list" => [],
"env_run_lists" => {},
},)
})
result["run_list"] = normalize_run_list(result["run_list"])
result["env_run_lists"].each_pair do |env, run_list|
result["env_run_lists"][env] = normalize_run_list(run_list)
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/chef_fs/data_handler/user_data_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def normalize(user, entry)
"salt" => nil,
"password" => nil,
"openid" => nil,
},)
})
end

def preserve_key?(key)
Expand Down
22 changes: 11 additions & 11 deletions lib/chef/cookbook/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def maintainer(arg = nil)
set_or_return(
:maintainer,
arg,
:kind_of => [ String ],
:kind_of => [ String ]
)
end

Expand All @@ -192,7 +192,7 @@ def maintainer_email(arg = nil)
set_or_return(
:maintainer_email,
arg,
:kind_of => [ String ],
:kind_of => [ String ]
)
end

Expand All @@ -207,7 +207,7 @@ def license(arg = nil)
set_or_return(
:license,
arg,
:kind_of => [ String ],
:kind_of => [ String ]
)
end

Expand All @@ -222,7 +222,7 @@ def description(arg = nil)
set_or_return(
:description,
arg,
:kind_of => [ String ],
:kind_of => [ String ]
)
end

Expand All @@ -237,7 +237,7 @@ def long_description(arg = nil)
set_or_return(
:long_description,
arg,
:kind_of => [ String ],
:kind_of => [ String ]
)
end

Expand Down Expand Up @@ -268,7 +268,7 @@ def name(arg = nil)
set_or_return(
:name,
arg,
:kind_of => [ String ],
:kind_of => [ String ]
)
end

Expand Down Expand Up @@ -492,7 +492,7 @@ def attribute(name, options)
:source_url => { :kind_of => String },
:issues_url => { :kind_of => String },
:privacy => { :kind_of => [ TrueClass, FalseClass ] },
},
}
)
options[:required] = remap_required_attribute(options[:required]) unless options[:required].nil?
validate_choice_array(options)
Expand All @@ -509,7 +509,7 @@ def grouping(name, options)
{
:title => { :kind_of => String },
:description => { :kind_of => String },
},
}
)
@groupings[name] = options
@groupings[name]
Expand Down Expand Up @@ -648,7 +648,7 @@ def source_url(arg = nil)
set_or_return(
:source_url,
arg,
:kind_of => [ String ],
:kind_of => [ String ]
)
end

Expand All @@ -663,7 +663,7 @@ def issues_url(arg = nil)
set_or_return(
:issues_url,
arg,
:kind_of => [ String ],
:kind_of => [ String ]
)
end

Expand All @@ -680,7 +680,7 @@ def privacy(arg = nil)
set_or_return(
:privacy,
arg,
:kind_of => [ TrueClass, FalseClass ],
:kind_of => [ TrueClass, FalseClass ]
)
end

Expand Down
4 changes: 2 additions & 2 deletions lib/chef/cookbook_manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def generate_manifest
:resources => Array.new,
:providers => Array.new,
:root_files => Array.new,
},)
})
@checksums = {}

if !root_paths || root_paths.size == 0
Expand All @@ -217,7 +217,7 @@ def generate_manifest
:path => path,
:checksum => csum,
:specificity => specificity,
},)
})

manifest[segment] << rs
end
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/data_bag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def name(arg = nil)
set_or_return(
:name,
arg,
:regex => VALID_NAME,
:regex => VALID_NAME
)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/data_bag_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def data_bag(arg = nil)
set_or_return(
:data_bag,
arg,
:regex => /^[\-[:alnum:]_]+$/,
:regex => /^[\-[:alnum:]_]+$/
)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/chef/dsl/declare_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def build_resource(type, name, created_at = nil, run_context: self.run_context,
run_context: run_context,
cookbook_name: cookbook_name,
recipe_name: recipe_name,
enclosing_provider: self.is_a?(Chef::Provider) ? self : nil,
enclosing_provider: self.is_a?(Chef::Provider) ? self : nil
).build(&resource_attrs_block)
end
end
Expand Down
Loading

0 comments on commit 92bec4b

Please sign in to comment.