Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
update rubocop to 0.49.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed Jun 1, 2017
1 parent 628b707 commit c9ecf0c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 19 deletions.
7 changes: 5 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ Metrics/LineLength:
Style/Documentation:
Enabled: false

Style/FormatStringToken:
EnforcedStyle: template

Style/HashSyntax:
Enabled: false
SupportedStyles:
- ruby19
- hash_rockets

Style/ExtraSpacing:
Layout/ExtraSpacing:
AllowForAlignment: true

Style/AlignHash:
Layout/AlignHash:
EnforcedHashRocketStyle: table
EnforcedColonStyle: table
14 changes: 0 additions & 14 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,3 @@ Metrics/ParameterLists:
# Offense count: 4
Metrics/PerceivedComplexity:
Max: 13

# Offense count: 1
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: format, sprintf, percent
Style/FormatString:
Exclude:
- 'app/models/concerns/fog_extensions/xenserver/server.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles.
# SupportedStyles: percent, brackets
Style/SymbolArray:
EnforcedStyle: brackets
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ source 'https://rubygems.org'
gemspec

gem 'nokogiri', '< 1.7', require: false if RUBY_VERSION.start_with? '2.0.'
gem 'rubocop', '~> 0.48.1', require: false
gem 'rubocop', '~> 0.49.1', require: false
2 changes: 1 addition & 1 deletion app/models/concerns/fog_extensions/xenserver/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def state
end

def vm_description
_('%{cpus} CPUs and %{ram} memory') % { :cpus => vcpus_max, :ram => number_to_human_size(memory_max.to_i) }
format(_('%{cpus} CPUs and %{ram} memory'), :cpus => vcpus_max, :ram => number_to_human_size(memory_max.to_i))
end

def interfaces
Expand Down
2 changes: 1 addition & 1 deletion app/models/foreman_xen/xenserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def new_vm(attr = {})
return unless errors.empty?
opts = vm_instance_defaults.merge(attr.to_hash).symbolize_keys

[:networks, :volumes].each do |collection|
%i[networks volumes].each do |collection|
nested_attrs = opts.delete("#{collection}_attributes".to_sym)
opts[collection] = nested_attributes_for(collection, nested_attrs) if nested_attrs
end
Expand Down

0 comments on commit c9ecf0c

Please sign in to comment.