Skip to content

Commit

Permalink
Refs #3809 - Remove cop emptyliteral
Browse files Browse the repository at this point in the history
  • Loading branch information
dLobatog authored and Dominic Cleal committed Feb 18, 2015
1 parent cd03208 commit 6ace062
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
5 changes: 0 additions & 5 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,6 @@ Style/DoubleNegation:
Style/EachWithObject:
Enabled: false

# Offense count: 6
# Cop supports --auto-correct.
Style/EmptyLiteral:
Enabled: false

# Offense count: 14
# Configuration parameters: Exclude.
Style/FileName:
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/compute_resources_vms_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def default_available_actions(vm, authorizer = nil)
end

def vpc_security_group_hash(security_groups)
vpc_sg_hash = Hash.new
vpc_sg_hash = {}
security_groups.each{ |sg|
vpc_id = sg.vpc_id || 'ec2'
( vpc_sg_hash[vpc_id] ||= []) << {:group_name => sg.name, :group_id => sg.group_id}
Expand All @@ -124,7 +124,7 @@ def vpc_security_group_hash(security_groups)
end

def subnet_vpc_hash(subnets)
subnet_vpc_hash = Hash.new
subnet_vpc_hash = {}
subnets.each{ |sub| subnet_vpc_hash[sub.subnet_id] = {:vpc_id =>sub.vpc_id, :subnet_name => sub.tag_set["Name"] || sub.subnet_id} }
subnet_vpc_hash
end
Expand Down
4 changes: 2 additions & 2 deletions app/services/tax_host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def need_to_be_selected_ids

def missing_ids
return @missing_ids if @missing_ids
missing_ids = Array.new
missing_ids = []
need_to_be_selected_ids.each do |key, values|
taxable_type = hash_key_to_class(key)
values.each do |v|
Expand All @@ -106,7 +106,7 @@ def import_missing_ids

def mismatches
return @mismatches if @mismatches
mismatches = Array.new
mismatches = []
need_to_be_selected_ids.each do |key, values|
taxable_type = hash_key_to_class(key)
values.each do |v|
Expand Down
2 changes: 1 addition & 1 deletion app/services/trend_importer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def check_values

def update_trend_counters
timestamp = Time.now
counter_hash = Hash.new
counter_hash = {}
Trend.types.each do |trend|
if trend.is_a? FactTrend
counter_hash[trend.trendable_id] = Host.joins(:fact_values).where(:fact_values => {:fact_name_id => trend.trendable_id}).group(:value).count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class CreateMediaOperatingsystemsAndMigrateData < ActiveRecord::Migration
class Medium < ActiveRecord::Base; end

def self.up
medium_hash = Hash.new
medium_hash = {}
Medium.all.each do |medium|
unless medium.operatingsystem_id.nil?
if Operatingsystem.exists?(medium.operatingsystem_id)
Expand Down

0 comments on commit 6ace062

Please sign in to comment.