Browse Source

Style and lint fixes, add helpers

- add delivery and zuul configs
- prepare cookbook for inclusion in OpenStack
Samuel Cassiba 10 months ago
parent
commit
bfd132d5dc

+ 1
- 0
.delivery/project.toml View File

@@ -0,0 +1 @@
1
+remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml"

+ 36
- 1
.rubocop_todo.yml View File

@@ -1,11 +1,22 @@
1 1
 # This configuration was generated by
2 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 4
 # The point is for the user to remove these configuration records
5 5
 # one by one as the offenses are removed from the code base.
6 6
 # Note that changes in the inspected code, or installation of new
7 7
 # versions of RuboCop, may require this file to be generated again.
8 8
 
9
+# Offense count: 20
10
+# Configuration parameters: CountComments, ExcludedMethods.
11
+Metrics/BlockLength:
12
+  Max: 196
13
+
14
+# Offense count: 28
15
+# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
16
+# URISchemes: http, https
17
+Metrics/LineLength:
18
+  Max: 100
19
+
9 20
 # Offense count: 7
10 21
 Style/Documentation:
11 22
   Exclude:
@@ -18,3 +29,27 @@ Style/Documentation:
18 29
     - 'libraries/openstack_role.rb'
19 30
     - 'libraries/openstack_service.rb'
20 31
     - 'libraries/openstack_user.rb'
32
+
33
+# Offense count: 5
34
+# Cop supports --auto-correct.
35
+# Configuration parameters: PreferredDelimiters.
36
+Style/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
47
+Style/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'

+ 3
- 0
.zuul.yaml View File

@@ -0,0 +1,3 @@
1
+- project:
2
+    templates:
3
+      - openstack-chef-repo-jobs

+ 1
- 1
Berksfile View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 2
- 2
Rakefile View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #
@@ -16,7 +16,7 @@
16 16
 
17 17
 task default: ['test']
18 18
 
19
-task test: [:lint, :style, :unit]
19
+task test: %i(lint style unit)
20 20
 
21 21
 desc 'Run FoodCritic (lint) tests'
22 22
 task :lint do

+ 1
- 1
libraries/matchers.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
libraries/openstack_base.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
libraries/openstack_domain.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
libraries/openstack_endpoint.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
libraries/openstack_project.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
libraries/openstack_role.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
libraries/openstack_service.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
libraries/openstack_user.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 2
- 2
metadata.rb View File

@@ -1,5 +1,5 @@
1
-name 'openstack-client'
2
-maintainer 'openstack-chef'
1
+name 'openstackclient'
2
+maintainer 'OpenStack'
3 3
 maintainer_email 'openstack-dev@lists.openstack.org'
4 4
 license 'Apache-2.0'
5 5
 description 'Installs the fog-openstack gem and offers LWRPs to use it'

+ 1
- 1
spec/cookbooks/openstackclient_test/metadata.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/domain.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/endpoint.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/project.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/role.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/service.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/user.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/domain_spec.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/endpoint_spec.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/project_spec.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/role_spec.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/service_spec.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/spec_helper.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

+ 1
- 1
spec/user_spec.rb View File

@@ -1,4 +1,4 @@
1
-#  encoding: UTF-8
1
+
2 2
 #
3 3
 #  Copyright 2016 cloudbau GmbH
4 4
 #

Loading…
Cancel
Save