Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/252675
Change subject: Fixed Style/Next RuboCop offense ...................................................................... Fixed Style/Next RuboCop offense More information is available at: https://github.com/bbatsov/ruby-style-guide#no-nested-conditionals Bug: T106220 Change-Id: I8f8d0cc9172a98572bbb366ebdc8c9da26541b3a --- M .rubocop_todo.yml M Vagrantfile M lib/mediawiki-vagrant/roles/info.rb 3 files changed, 5 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/75/252675/1 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9342ea1..54e3b4b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2015-11-12 12:47:47 +0100 using RuboCop version 0.35.1. +# on 2015-11-12 12:58:44 +0100 using RuboCop version 0.35.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -63,14 +63,6 @@ - 'lib/mediawiki-vagrant/environment.rb' - 'lib/mediawiki-vagrant/roles/list.rb' - 'lib/mediawiki-vagrant/setup.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles. -Style/Next: - Exclude: - - 'Vagrantfile' - - 'lib/mediawiki-vagrant/roles/info.rb' # Offense count: 2 # Cop supports --auto-correct. diff --git a/Vagrantfile b/Vagrantfile index 2bcc337..ceb545c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -250,15 +250,14 @@ ['apt', 'composer'].each do |type| src = mwv.path("#{type}-cache") - if src.directory? - dst = mwv.path('cache', type) + next unless src.directory? +dst = mwv.path('cache', type) src.each_child do |src_file| unless src_file.directory? || src_file.basename.fnmatch?('.*') src_file.rename(dst.join(src_file.basename)) rescue nil end end - end end # Load custom Vagrantfile overrides from 'Vagrantfile-extra.rb' diff --git a/lib/mediawiki-vagrant/roles/info.rb b/lib/mediawiki-vagrant/roles/info.rb index 6477fd3..b917fe2 100644 --- a/lib/mediawiki-vagrant/roles/info.rb +++ b/lib/mediawiki-vagrant/roles/info.rb @@ -46,8 +46,8 @@ changes = @mwv.load_settings(@mwv.roles_enabled + [role]) - settings - if changes.any? - @env.ui.warn 'Enabling this role will adjust the following settings:' + next unless changes.any? [email protected] 'Enabling this role will adjust the following settings:' changes.each do |setting, change| cur, new = *change.map { |v| setting_display_value(v) } @@ -57,7 +57,6 @@ @env.ui.info "#{setting.name}: #{cur} -> ", new_line: false @env.ui.info "#{new}", bold: true end - end end 0 -- To view, visit https://gerrit.wikimedia.org/r/252675 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f8d0cc9172a98572bbb366ebdc8c9da26541b3a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Zfilipin <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
