From ef8c535cc832febbd47ce903c72e676aa532902b Mon Sep 17 00:00:00 2001 From: "Christopher H. Laco" Date: Tue, 4 Feb 2014 15:27:56 -0500 Subject: [PATCH] Upgrade/Update rubocop Now that almost all of the rubocop blueprints have been completed, make one final pass through all of the cookbooks ensuring they're all in sync with each other. - Upgrade rubocop to 0.18.1 - Fix violations caused by 0.18.1 upgrade - Add Includes for non-existent folders to Includes so they automatically cover future additions Change-Id: I9224b785f50103d348e3b16ea24e5dc8cab84c62 Implements: blueprint lint-and-unit-testing-for-havana --- .rubocop.yml | 10 ++++++++-- Gemfile | 2 +- Gemfile.lock | 13 +++++++------ recipes/api.rb | 2 +- recipes/cinder-common.rb | 2 +- recipes/volume.rb | 2 +- 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 888678a..8dc6194 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,13 +3,19 @@ AllCops: - metadata.rb - Gemfile - attributes/** + - libraries/** + - providers/** - recipes/** + - resources/** - spec/** -# ignore long lines +Encoding: + Exclude: + - metadata.rb + - Gemfile + LineLength: Enabled: false -# Allow small arrays before forcing %w or %W WordArray: MinSize: 3 diff --git a/Gemfile b/Gemfile index 27706b4..86dcd42 100644 --- a/Gemfile +++ b/Gemfile @@ -7,4 +7,4 @@ gem 'berkshelf', '~> 2.0.10' gem 'chefspec', '~> 3.1.4' gem 'foodcritic', '~> 3.0.3' gem 'strainer' -gem 'rubocop', '>= 0.16.0' +gem 'rubocop', '~> 0.18.1' diff --git a/Gemfile.lock b/Gemfile.lock index 47c4e86..b6f6331 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -135,7 +135,7 @@ GEM mixlib-shellout systemu (~> 2.5.2) yajl-ruby - parser (2.1.2) + parser (2.1.4) ast (~> 1.1) slop (~> 3.4, >= 3.4.5) polyglot (0.3.3) @@ -147,7 +147,7 @@ GEM puma (1.6.3) rack (~> 1.2) rack (1.5.2) - rainbow (1.99.1) + rainbow (2.0.0) rake (10.1.1) rbzip2 (0.2.0) rest-client (1.6.7) @@ -181,10 +181,11 @@ GEM rspec-expectations (2.14.4) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.4) - rubocop (0.16.0) - parser (~> 2.1) + rubocop (0.18.1) + json (>= 1.7.7, < 2) + parser (~> 2.1.3) powerpack (~> 0.0.6) - rainbow (>= 1.1.4) + rainbow (>= 1.99.1, < 3.0) rubyntlm (0.1.1) savon (0.9.5) akami (~> 1.0) @@ -230,5 +231,5 @@ DEPENDENCIES chefspec (~> 3.1.4) foodcritic (~> 3.0.3) json (<= 1.7.7) - rubocop (>= 0.16.0) + rubocop (~> 0.18.1) strainer diff --git a/recipes/api.rb b/recipes/api.rb index a9a4db8..459b42b 100644 --- a/recipes/api.rb +++ b/recipes/api.rb @@ -21,7 +21,7 @@ # limitations under the License. # -class ::Chef::Recipe +class ::Chef::Recipe # rubocop:disable Documentation include ::Openstack end diff --git a/recipes/cinder-common.rb b/recipes/cinder-common.rb index a846491..285bc77 100644 --- a/recipes/cinder-common.rb +++ b/recipes/cinder-common.rb @@ -13,7 +13,7 @@ # limitations under the License. # -class ::Chef::Recipe +class ::Chef::Recipe # rubocop:disable Documentation include ::Openstack end diff --git a/recipes/volume.rb b/recipes/volume.rb index 1733e9b..efe4051 100644 --- a/recipes/volume.rb +++ b/recipes/volume.rb @@ -22,7 +22,7 @@ # limitations under the License. # -class ::Chef::Recipe +class ::Chef::Recipe # rubocop:disable Documentation include ::Openstack end