summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Cassiba <s@cassiba.com>2018-05-28 09:05:53 -0700
committerSamuel Cassiba <s@cassiba.com>2018-05-28 09:05:53 -0700
commitbfd132d5dc1fa5e8095bd0c229ef3829df5190c2 (patch)
treecd0bfd8bfd4f80901655bc8f95ffcb8e61603bb9
parent6391057a3c271148f9e2a776b6b54cdc21757335 (diff)
Style and lint fixes, add helpers
- add delivery and zuul configs - prepare cookbook for inclusion in OpenStack
-rw-r--r--.delivery/project.toml1
-rw-r--r--.rubocop_todo.yml37
-rw-r--r--.zuul.yaml3
-rw-r--r--Berksfile2
-rw-r--r--Rakefile4
-rw-r--r--libraries/matchers.rb2
-rw-r--r--libraries/openstack_base.rb2
-rw-r--r--libraries/openstack_domain.rb2
-rw-r--r--libraries/openstack_endpoint.rb2
-rw-r--r--libraries/openstack_project.rb2
-rw-r--r--libraries/openstack_role.rb2
-rw-r--r--libraries/openstack_service.rb2
-rw-r--r--libraries/openstack_user.rb2
-rw-r--r--metadata.rb4
-rw-r--r--spec/cookbooks/openstackclient_test/metadata.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/domain.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/endpoint.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/project.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/role.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/service.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/user.rb2
-rw-r--r--spec/domain_spec.rb2
-rw-r--r--spec/endpoint_spec.rb2
-rw-r--r--spec/project_spec.rb2
-rw-r--r--spec/role_spec.rb2
-rw-r--r--spec/service_spec.rb2
-rw-r--r--spec/spec_helper.rb2
-rw-r--r--spec/user_spec.rb2
28 files changed, 67 insertions, 28 deletions
diff --git a/.delivery/project.toml b/.delivery/project.toml
new file mode 100644
index 0000000..6d5e361
--- /dev/null
+++ b/.delivery/project.toml
@@ -0,0 +1 @@
remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml"
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 11d2dd1..edcf1ed 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,11 +1,22 @@
1# This configuration was generated by 1# This configuration was generated by
2# `rubocop --auto-gen-config` 2# `rubocop --auto-gen-config`
3# on 2016-08-29 21:29:34 +0200 using RuboCop version 0.39.0. 3# on 2018-05-28 09:02:57 -0700 using RuboCop version 0.49.1.
4# The point is for the user to remove these configuration records 4# The point is for the user to remove these configuration records
5# one by one as the offenses are removed from the code base. 5# one by one as the offenses are removed from the code base.
6# Note that changes in the inspected code, or installation of new 6# Note that changes in the inspected code, or installation of new
7# versions of RuboCop, may require this file to be generated again. 7# versions of RuboCop, may require this file to be generated again.
8 8
9# Offense count: 20
10# Configuration parameters: CountComments, ExcludedMethods.
11Metrics/BlockLength:
12 Max: 196
13
14# Offense count: 28
15# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
16# URISchemes: http, https
17Metrics/LineLength:
18 Max: 100
19
9# Offense count: 7 20# Offense count: 7
10Style/Documentation: 21Style/Documentation:
11 Exclude: 22 Exclude:
@@ -18,3 +29,27 @@ Style/Documentation:
18 - 'libraries/openstack_role.rb' 29 - 'libraries/openstack_role.rb'
19 - 'libraries/openstack_service.rb' 30 - 'libraries/openstack_service.rb'
20 - 'libraries/openstack_user.rb' 31 - 'libraries/openstack_user.rb'
32
33# Offense count: 5
34# Cop supports --auto-correct.
35# Configuration parameters: PreferredDelimiters.
36Style/PercentLiteralDelimiters:
37 Exclude:
38 - 'Rakefile'
39 - 'metadata.rb'
40 - 'spec/cookbooks/openstackclient_test/recipes/endpoint.rb'
41 - 'spec/endpoint_spec.rb'
42
43# Offense count: 7
44# Cop supports --auto-correct.
45# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
46# SupportedStylesForMultiline: comma, consistent_comma, no_comma
47Style/TrailingCommaInLiteral:
48 Exclude:
49 - 'spec/cookbooks/openstackclient_test/recipes/domain.rb'
50 - 'spec/cookbooks/openstackclient_test/recipes/endpoint.rb'
51 - 'spec/cookbooks/openstackclient_test/recipes/project.rb'
52 - 'spec/cookbooks/openstackclient_test/recipes/role.rb'
53 - 'spec/cookbooks/openstackclient_test/recipes/service.rb'
54 - 'spec/cookbooks/openstackclient_test/recipes/user.rb'
55 - 'spec/spec_helper.rb'
diff --git a/.zuul.yaml b/.zuul.yaml
new file mode 100644
index 0000000..199cb43
--- /dev/null
+++ b/.zuul.yaml
@@ -0,0 +1,3 @@
1- project:
2 templates:
3 - openstack-chef-repo-jobs
diff --git a/Berksfile b/Berksfile
index 155e0bf..132eed9 100644
--- a/Berksfile
+++ b/Berksfile
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/Rakefile b/Rakefile
index ea420bb..3010014 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
@@ -16,7 +16,7 @@
16 16
17task default: ['test'] 17task default: ['test']
18 18
19task test: [:lint, :style, :unit] 19task test: %i(lint style unit)
20 20
21desc 'Run FoodCritic (lint) tests' 21desc 'Run FoodCritic (lint) tests'
22task :lint do 22task :lint do
diff --git a/libraries/matchers.rb b/libraries/matchers.rb
index 074f86b..d64ac6a 100644
--- a/libraries/matchers.rb
+++ b/libraries/matchers.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/libraries/openstack_base.rb b/libraries/openstack_base.rb
index 7b0803e..edfcdac 100644
--- a/libraries/openstack_base.rb
+++ b/libraries/openstack_base.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/libraries/openstack_domain.rb b/libraries/openstack_domain.rb
index 7a41d13..e52f967 100644
--- a/libraries/openstack_domain.rb
+++ b/libraries/openstack_domain.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/libraries/openstack_endpoint.rb b/libraries/openstack_endpoint.rb
index d2a2ee4..f77247e 100644
--- a/libraries/openstack_endpoint.rb
+++ b/libraries/openstack_endpoint.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/libraries/openstack_project.rb b/libraries/openstack_project.rb
index a1b31b6..438da8d 100644
--- a/libraries/openstack_project.rb
+++ b/libraries/openstack_project.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/libraries/openstack_role.rb b/libraries/openstack_role.rb
index 06dc6db..30a3c81 100644
--- a/libraries/openstack_role.rb
+++ b/libraries/openstack_role.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/libraries/openstack_service.rb b/libraries/openstack_service.rb
index 2c8a2b1..adb1219 100644
--- a/libraries/openstack_service.rb
+++ b/libraries/openstack_service.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/libraries/openstack_user.rb b/libraries/openstack_user.rb
index 716c977..09ccf28 100644
--- a/libraries/openstack_user.rb
+++ b/libraries/openstack_user.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/metadata.rb b/metadata.rb
index 1b0f469..6ce3083 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -1,5 +1,5 @@
1name 'openstack-client' 1name 'openstackclient'
2maintainer 'openstack-chef' 2maintainer 'OpenStack'
3maintainer_email 'openstack-dev@lists.openstack.org' 3maintainer_email 'openstack-dev@lists.openstack.org'
4license 'Apache-2.0' 4license 'Apache-2.0'
5description 'Installs the fog-openstack gem and offers LWRPs to use it' 5description 'Installs the fog-openstack gem and offers LWRPs to use it'
diff --git a/spec/cookbooks/openstackclient_test/metadata.rb b/spec/cookbooks/openstackclient_test/metadata.rb
index 1b3e3c8..a99c735 100644
--- a/spec/cookbooks/openstackclient_test/metadata.rb
+++ b/spec/cookbooks/openstackclient_test/metadata.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/cookbooks/openstackclient_test/recipes/domain.rb b/spec/cookbooks/openstackclient_test/recipes/domain.rb
index 8f031d6..f69a7f1 100644
--- a/spec/cookbooks/openstackclient_test/recipes/domain.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/domain.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/cookbooks/openstackclient_test/recipes/endpoint.rb b/spec/cookbooks/openstackclient_test/recipes/endpoint.rb
index 1983e7d..e9e95a2 100644
--- a/spec/cookbooks/openstackclient_test/recipes/endpoint.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/endpoint.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/cookbooks/openstackclient_test/recipes/project.rb b/spec/cookbooks/openstackclient_test/recipes/project.rb
index e7765d5..367f326 100644
--- a/spec/cookbooks/openstackclient_test/recipes/project.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/project.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/cookbooks/openstackclient_test/recipes/role.rb b/spec/cookbooks/openstackclient_test/recipes/role.rb
index 9aa6016..f0dcb0d 100644
--- a/spec/cookbooks/openstackclient_test/recipes/role.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/role.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/cookbooks/openstackclient_test/recipes/service.rb b/spec/cookbooks/openstackclient_test/recipes/service.rb
index f4751c3..5459f4a 100644
--- a/spec/cookbooks/openstackclient_test/recipes/service.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/service.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/cookbooks/openstackclient_test/recipes/user.rb b/spec/cookbooks/openstackclient_test/recipes/user.rb
index 6b46df7..963939a 100644
--- a/spec/cookbooks/openstackclient_test/recipes/user.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/user.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/domain_spec.rb b/spec/domain_spec.rb
index 6458f07..f9d0cba 100644
--- a/spec/domain_spec.rb
+++ b/spec/domain_spec.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/endpoint_spec.rb b/spec/endpoint_spec.rb
index 5fb9621..c092df0 100644
--- a/spec/endpoint_spec.rb
+++ b/spec/endpoint_spec.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/project_spec.rb b/spec/project_spec.rb
index f61dd92..ea6e038 100644
--- a/spec/project_spec.rb
+++ b/spec/project_spec.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/role_spec.rb b/spec/role_spec.rb
index e4c2061..9857795 100644
--- a/spec/role_spec.rb
+++ b/spec/role_spec.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/service_spec.rb b/spec/service_spec.rb
index f0b158a..523b846 100644
--- a/spec/service_spec.rb
+++ b/spec/service_spec.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 326de93..3f1fddf 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#
diff --git a/spec/user_spec.rb b/spec/user_spec.rb
index 0eec778..2cabef1 100644
--- a/spec/user_spec.rb
+++ b/spec/user_spec.rb
@@ -1,4 +1,4 @@
1# encoding: UTF-8 1
2# 2#
3# Copyright 2016 cloudbau GmbH 3# Copyright 2016 cloudbau GmbH
4# 4#