(maint) Update VMPooler files with fixes for Rubocop violations

This commit updates vmpooler.rb, api.rb and providers.rb with style changes as
per rubocop style violations.

This commit also updates the rubocop configuration to always use LF line endings
even on Windows as rubocop was expecting CRLF even though git is configured
for LF.
This commit is contained in:
Glenn Sarti 2017-04-04 17:08:56 -07:00
parent 2e255a5a43
commit ba686e3c0a
4 changed files with 9 additions and 3 deletions

View file

@ -9,6 +9,8 @@ AllCops:
- 'scripts/**/*' - 'scripts/**/*'
- 'spec/**/*' - 'spec/**/*'
- 'vendor/**/*' - 'vendor/**/*'
- Gemfile
- Rakefile
Style/Documentation: Style/Documentation:
Enabled: false Enabled: false
@ -58,3 +60,7 @@ Style/ConditionalAssignment:
Next: Next:
Enabled: false Enabled: false
# Enforce LF line endings, even when on Windows
Style/EndOfLine:
EnforcedStyle: lf

View file

@ -12,7 +12,7 @@ module Vmpooler
require 'yaml' require 'yaml'
require 'set' require 'set'
%w(api graphite logger pool_manager vsphere_helper statsd dummy_statsd providers).each do |lib| %w[api graphite logger pool_manager vsphere_helper statsd dummy_statsd providers].each do |lib|
begin begin
require "vmpooler/#{lib}" require "vmpooler/#{lib}"
rescue LoadError rescue LoadError

View file

@ -30,7 +30,7 @@ module Vmpooler
use Vmpooler::Dashboard use Vmpooler::Dashboard
# Load API components # Load API components
%w(helpers dashboard reroute v1).each do |lib| %w[helpers dashboard reroute v1].each do |lib|
begin begin
require "api/#{lib}" require "api/#{lib}"
rescue LoadError rescue LoadError

View file

@ -1,4 +1,4 @@
%w(base dummy vsphere).each do |lib| %w[base dummy vsphere].each do |lib|
begin begin
require "vmpooler/providers/#{lib}" require "vmpooler/providers/#{lib}"
rescue LoadError rescue LoadError