Skip to content

Commit 1a485aa

Browse files
committed
update rubocop to 0.48.0
1 parent c2ceaa8 commit 1a485aa

4 files changed

Lines changed: 18 additions & 3 deletions

File tree

.rubocop_todo.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Metrics/AbcSize:
3434
Max: 65
3535

3636
# Offense count: 2
37+
# Configuration parameters: CountBlocks.
3738
Metrics/BlockNesting:
3839
Max: 4
3940

@@ -64,3 +65,17 @@ Metrics/ParameterLists:
6465
# Offense count: 4
6566
Metrics/PerceivedComplexity:
6667
Max: 13
68+
69+
# Offense count: 1
70+
# Configuration parameters: EnforcedStyle, SupportedStyles.
71+
# SupportedStyles: format, sprintf, percent
72+
Style/FormatString:
73+
Exclude:
74+
- 'app/models/concerns/fog_extensions/xenserver/server.rb'
75+
76+
# Offense count: 1
77+
# Cop supports --auto-correct.
78+
# Configuration parameters: SupportedStyles.
79+
# SupportedStyles: percent, brackets
80+
Style/SymbolArray:
81+
EnforcedStyle: brackets

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ source 'https://rubygems.org'
33
gemspec
44

55
gem 'nokogiri', '< 1.7', require: false if RUBY_VERSION.start_with? '2.0.'
6-
gem 'rubocop', '~> 0.46.0', require: false
6+
gem 'rubocop', '~> 0.48.0', require: false

app/models/foreman_xen/xenserver.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ def console(uuid)
356356
:type => 'vnc',
357357
:name => vm.name
358358
)
359-
360359
rescue Error => e
361360
logger.warn e
362361
raise e
@@ -418,7 +417,7 @@ def xenstore_hash_flatten(nested_hash, key = nil, keychain = nil, out_hash = {})
418417
end
419418

420419
def get_templates(templates)
421-
tmps = templates.select { |t| !t.is_a_snapshot }
420+
tmps = templates.reject(&:is_a_snapshot)
422421
tmps.sort_by(&:name)
423422
end
424423

foreman_xen.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# encoding: utf-8
2+
23
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
34

45
# Maintain your gem's version:

0 commit comments

Comments
 (0)