Browse Source

Rubocop support for metadata.rb and Gemfile

Replace double-quotes with single-quotes for now, expect this to act as a gate
in the future.

Change-Id: I10ff8b23517cb334905b162ce14059dbf23d7bc8
Matt Ray 5 years ago
parent
commit
0ef57f0473
4 changed files with 34 additions and 25 deletions
  1. 7
    0
      .rubocop.yml
  2. 8
    8
      Gemfile
  3. 2
    0
      Strainerfile
  4. 17
    17
      metadata.rb

+ 7
- 0
.rubocop.yml View File

@@ -0,0 +1,7 @@
1
+# UTF-8 headers not generally in these files
2
+Encoding:
3
+  Enabled: false
4
+
5
+# ignore long lines
6
+LineLength:
7
+  Enabled: false

+ 8
- 8
Gemfile View File

@@ -1,9 +1,9 @@
1
-source "https://rubygems.org"
1
+source 'https://rubygems.org'
2 2
 
3
-gem "chef", "~> 11.4.4"
4
-gem "json", "<= 1.7.7" # chef 11 dependency
5
-gem "berkshelf", "~> 2.0.10"
6
-gem "chefspec", "~> 3.0.2"
7
-gem "foodcritic", "~> 3.0.3"
8
-gem "strainer"
9
-gem "rubocop"
3
+gem 'chef', '~> 11.4.4'
4
+gem 'json', '<= 1.7.7' # chef 11 dependency
5
+gem 'berkshelf', '~> 2.0.10'
6
+gem 'chefspec', '~> 3.0.2'
7
+gem 'foodcritic', '~> 3.0.3'
8
+gem 'strainer'
9
+gem 'rubocop'

+ 2
- 0
Strainerfile View File

@@ -1,5 +1,7 @@
1 1
 # Strainerfile
2 2
 rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK/attributes/
3
+rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK/metadata.rb
4
+rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK/Gemfile
3 5
 # rubocop: bundle exec rubocop $SANDBOX/$COOKBOOK
4 6
 # may want to add rubocop check for Berksfile and Gemfile
5 7
 knife test: bundle exec knife cookbook test $COOKBOOK

+ 17
- 17
metadata.rb View File

@@ -1,24 +1,24 @@
1
-name             "openstack-block-storage"
2
-maintainer       "AT&T Services, Inc."
3
-maintainer_email "cookbooks@lists.tfoundry.com"
4
-license          "Apache 2.0"
5
-description      "The OpenStack Advanced Volume Management service Cinder."
1
+name             'openstack-block-storage'
2
+maintainer       'AT&T Services, Inc.'
3
+maintainer_email 'cookbooks@lists.tfoundry.com'
4
+license          'Apache 2.0'
5
+description      'The OpenStack Advanced Volume Management service Cinder.'
6 6
 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7
-version          "8.0.0"
7
+version          '8.0.0'
8 8
 
9
-recipe           "openstack-block-storage::common", "Defines the common pieces of repeated code from the other recipes"
10
-recipe           "openstack-block-storage::api", "Installs the cinder-api, sets up the cinder database, and cinder service/user/endpoints in keystone"
11
-recipe           "openstack-block-storage::keystone_registration", "Registers cinder service/user/endpoints in keystone"
12
-recipe           "openstack-block-storage::scheduler", "Installs the cinder-scheduler service"
13
-recipe           "openstack-block-storage::volume", "Installs the cinder-volume service and sets up the iscsi helper"
9
+recipe           'openstack-block-storage::common', 'Defines the common pieces of repeated code from the other recipes'
10
+recipe           'openstack-block-storage::api', 'Installs the cinder-api, sets up the cinder database, and cinder service/user/endpoints in keystone'
11
+recipe           'openstack-block-storage::keystone_registration', 'Registers cinder service/user/endpoints in keystone'
12
+recipe           'openstack-block-storage::scheduler', 'Installs the cinder-scheduler service'
13
+recipe           'openstack-block-storage::volume', 'Installs the cinder-volume service and sets up the iscsi helper'
14 14
 
15 15
 %w{ ubuntu fedora redhat centos suse }.each do |os|
16 16
   supports os
17 17
 end
18 18
 
19
-depends          "apt"
20
-depends          "openstack-common", "~> 8.0"
21
-depends          "openstack-identity", "~> 8.0"
22
-depends          "openstack-image", "~> 8.0"
23
-depends          "selinux"
24
-depends          "python"
19
+depends          'apt'
20
+depends          'openstack-common', '~> 8.0'
21
+depends          'openstack-identity', '~> 8.0'
22
+depends          'openstack-image', '~> 8.0'
23
+depends          'selinux'
24
+depends          'python'

Loading…
Cancel
Save