Skip to content

Commit ab9392f

Browse files
committed
Perform Vox Pupuli modulesync
This module is included in the Vox Pupuli modulesync_config, and so has various files and content managed via that tool. The purpose of this commit is to persist the results of a modulesync to pull in the latest standards and centrally managed configs.
1 parent bd71c7b commit ab9392f

17 files changed

+243
-133
lines changed

.gitignore

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,11 @@
1-
*.gem
2-
*.rbc
3-
/.config
4-
/coverage/
5-
/InstalledFiles
6-
/pkg/
7-
/spec/reports/
8-
/test/tmp/
9-
/test/version_tmp/
10-
/tmp/
11-
modules/
12-
13-
## Specific to RubyMotion:
14-
.dat*
15-
.repl_history
16-
build/
17-
18-
## Documentation cache and generated files:
19-
/.yardoc/
20-
/_yardoc/
21-
/doc/
22-
/rdoc/
23-
24-
## Environment normalisation:
25-
/.bundle/
26-
/vendor/bundle
27-
/lib/bundler/man/
28-
29-
# for a library or gem, you might want to ignore these files since the code is
30-
# intended to run in multiple environments; otherwise, check them in:
1+
pkg/
312
Gemfile.lock
32-
# .ruby-version
33-
# .ruby-gemset
34-
35-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
36-
.rvmrc
3+
vendor/
4+
spec/fixtures/
5+
.vagrant/
6+
.bundle/
7+
coverage/
8+
log/
9+
.idea/
10+
*.iml
11+
.*.sw

.rspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--format documentation
2+
--color

.rubocop.yml

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,66 @@
11
AllCops:
2+
Include:
3+
- ./**/*.rb
24
Exclude:
35
- vendor/**/*
46
- pkg/**/*
57
- spec/fixtures/**/*
68

79
# Configuration parameters: AllowURI, URISchemes.
810
Metrics/LineLength:
9-
Max: 400
11+
Max: 328
12+
13+
# 'Complexity' is very relative
14+
Metrics/PerceivedComplexity:
15+
Enabled: false
16+
17+
# 'Complexity' is very relative
18+
Metrics/CyclomaticComplexity:
19+
Enabled: false
20+
21+
# 'Complexity' is very relative
22+
Metrics/AbcSize:
23+
Enabled: false
24+
25+
# Method length is not necessarily an indicator of code quality
26+
Metrics/MethodLength:
27+
Enabled: false
28+
29+
# Module length is not necessarily an indicator of code quality
30+
Metrics/ModuleLength:
31+
Enabled: false
32+
33+
# Class length is not necessarily an indicator of code quality
34+
Metrics/ClassLength:
35+
Enabled: false
1036

1137
# dealbreaker:
38+
Style/TrailingCommaInArguments:
39+
Enabled: false
1240
Style/TrailingCommaInLiteral:
1341
Enabled: false
14-
Style/TrailingCommaInArguments:
42+
Style/ClosingParenthesisIndentation:
1543
Enabled: false
1644

17-
# we still support ruby 1.8
18-
Style/HashSyntax:
45+
Lint/AmbiguousRegexpLiteral:
46+
Enabled: true
47+
Style/RegexpLiteral:
48+
Enabled: true
49+
Style/WordArray:
50+
Enabled: true
51+
52+
# this catches the cases of using `module` for parser functions, types, or
53+
# providers
54+
Style/ClassAndModuleChildren:
55+
Enabled: false
56+
57+
Style/Documentation:
58+
Description: 'Document classes and non-namespace modules.'
1959
Enabled: false
60+
61+
# More comfortable block layouts
62+
Style/BlockDelimiters:
63+
Enabled: False
64+
65+
Style/MultilineBlockLayout:
66+
Enabled: False

.travis.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
notifications:
3-
email: false
42
sudo: false
53
language: ruby
64
cache: bundler
@@ -12,15 +10,35 @@ matrix:
1210
fast_finish: true
1311
include:
1412
- rvm: 1.9.3
15-
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER="yes"
16-
- rvm: 2.1.6
17-
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER="yes"
18-
- rvm: 2.1.6
13+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
14+
- rvm: 2.1.8
15+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
16+
- rvm: 1.9.3
17+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
18+
- rvm: 2.1.8
19+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
20+
- rvm: 2.1.8
1921
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
20-
- rvm: 2.2.3
22+
- rvm: 2.2.4
2123
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
22-
- rvm: 2.2.3
24+
- rvm: 2.2.4
2325
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=rubocop
26+
- rvm: 2.3.0
27+
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
28+
allow_failures:
29+
- rvm: 1.9.3
30+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
31+
allow_failures:
32+
- rvm: 2.1.8
33+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
34+
allow_failures:
35+
- rvm: 1.9.3
36+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
37+
allow_failures:
38+
- rvm: 2.1.8
39+
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes
40+
notifications:
41+
email: false
2442
deploy:
2543
provider: puppetforge
2644
user: puppet
@@ -32,3 +50,4 @@ deploy:
3250
all_branches: true
3351
# Only publish if our main Ruby target builds
3452
rvm: 1.9.3
53+
condition: "$FUTURE_PARSER = yes"

CONTRIBUTING.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ will likely make it into a release a little quicker.
55

66
## Contributing
77

8+
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. [Contributor Code of Conduct](https://voxpupuli.org/coc/).
9+
810
1. Fork the repo.
911

1012
1. Create a separate branch for your change.
@@ -47,18 +49,29 @@ The test suite will run [Puppet Lint](http://puppet-lint.com/) and
4749
[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to
4850
check various syntax and style things. You can run these locally with:
4951

50-
bundle exec rake test
52+
bundle exec rake lint
53+
bundle exec rake validate
5154

5255
## Running the unit tests
5356

5457
The unit test suite covers most of the code, as mentioned above please
5558
add tests if you're adding new functionality. If you've not used
5659
[rspec-puppet](http://rspec-puppet.com/) before then feel free to ask
57-
about how best to test your new feature. To run your specific spec test
58-
you can pass it to `SPEC`:
60+
about how best to test your new feature.
61+
62+
To run your all the unit tests
63+
64+
bundle exec rake spec SPEC_OPTS='--format documentation'
65+
66+
To run a specific spec test set the `SPEC` variable:
5967

6068
bundle exec rake spec SPEC=spec/foo_spec.rb
6169

70+
To run the linter, the syntax checker and the unit tests:
71+
72+
bundle exec rake test
73+
74+
6275
## Integration tests
6376

6477
The unit tests just check the code runs, not that it does exactly what
@@ -74,9 +87,10 @@ with:
7487
This will run the tests on an Ubuntu 12.04 virtual machine. You can also
7588
run the integration tests against Centos 6.5 with.
7689

77-
RS_SET=centos-64-x64 bundle exec rake acceptances
90+
BEAKER_set=centos-64-x64 bundle exec rake acceptances
7891

7992
If you don't want to have to recreate the virtual machine every time you
8093
can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will
8194
at least need `BEAKER_PROVISION` set to yes (the default). The Vagrantfile
8295
for the created virtual machines will be in `.vagrant/beaker_vagrant_fies`.
96+

Gemfile

Lines changed: 55 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,64 @@
1-
# Copyright 2015 Puppet Community
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
15-
source 'https://rubygems.org'
1+
source ENV['GEM_SOURCE'] || "https://rubygems.org"
2+
3+
def location_for(place, fake_version = nil)
4+
if place =~ /^(git[:@][^#]*)#(.*)/
5+
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
6+
elsif place =~ /^file:\/\/(.*)/
7+
['>= 0', { :path => File.expand_path($1), :require => false }]
8+
else
9+
[place, { :require => false }]
10+
end
11+
end
1612

1713
group :test do
18-
gem 'rake'
19-
gem 'puppet', ENV['PUPPET_VERSION'] || '~> 4.0'
20-
gem 'rspec-puppet', git: 'https://github.com/rodjek/rspec-puppet.git'
21-
gem 'puppetlabs_spec_helper'
22-
gem 'metadata-json-lint'
23-
gem 'rspec-puppet-facts'
24-
gem 'rspec'
25-
gem 'puppet-blacksmith'
26-
gem 'rubocop'
14+
gem 'rake', :require => false
15+
gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git'
16+
gem 'puppet-lint', :require => false, :git => 'https://github.com/rodjek/puppet-lint.git'
17+
gem 'metadata-json-lint', :require => false
18+
gem 'rspec-puppet-facts', :require => false
19+
gem 'rspec', :require => false
20+
gem 'puppet-blacksmith', :require => false, :git => 'https://github.com/voxpupuli/puppet-blacksmith.git'
21+
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git'
22+
gem 'rubocop', '~> 0.38', :require => false
23+
gem 'rspec-puppet-utils', :require => false
24+
gem 'puppetlabs_spec_helper', :require => false
25+
gem 'puppet-lint-absolute_classname-check', :require => false
26+
gem 'puppet-lint-leading_zero-check', :require => false
27+
gem 'puppet-lint-trailing_comma-check', :require => false
28+
gem 'puppet-lint-version_comparison-check', :require => false
29+
gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false
30+
gem 'puppet-lint-unquoted_string-check', :require => false
31+
gem 'puppet-lint-variable_contains_upcase', :require => false
2732
end
2833

2934
group :development do
30-
gem 'travis'
31-
gem 'travis-lint'
32-
gem 'guard-rake'
35+
gem 'travis', :require => false
36+
gem 'travis-lint', :require => false
37+
gem 'guard-rake', :require => false
3338
end
3439

3540
group :system_tests do
36-
gem 'beaker'
37-
gem 'beaker-rspec'
41+
gem 'beaker', :require => false
42+
if beaker_version = ENV['BEAKER_VERSION']
43+
gem 'beaker', *location_for(beaker_version)
44+
end
45+
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
46+
gem 'beaker-rspec', *location_for(beaker_rspec_version)
47+
else
48+
gem 'beaker-rspec', :require => false
49+
end
50+
gem 'beaker-puppet_install_helper', :require => false
51+
end
52+
53+
54+
55+
if facterversion = ENV['FACTER_GEM_VERSION']
56+
gem 'facter', facterversion.to_s, :require => false, :groups => [:test]
57+
else
58+
gem 'facter', :require => false, :groups => [:test]
3859
end
60+
61+
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 4.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
62+
gem 'puppet', puppetversion, :require => false, :groups => [:test]
63+
64+
# vim:ft=ruby

Rakefile

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,19 @@ require 'puppet-lint/tasks/puppet-lint'
33
require 'puppet-syntax/tasks/puppet-syntax'
44
require 'metadata-json-lint/rake_task'
55
require 'puppet_blacksmith/rake_tasks'
6+
require 'voxpupuli/release/rake_tasks'
67
require 'rubocop/rake_task'
78

89
RuboCop::RakeTask.new
910

10-
PuppetLint.configuration.relative = true
11-
PuppetLint.configuration.send('disable_80chars')
1211
PuppetLint.configuration.log_format = '%{path}:%{linenumber}:%{check}:%{KIND}:%{message}'
1312
PuppetLint.configuration.fail_on_warnings = true
14-
15-
# Forsake support for Puppet 2.6.2 for the benefit of cleaner code.
16-
# http://puppet-lint.com/checks/class_parameter_defaults/
17-
PuppetLint.configuration.send('disable_class_parameter_defaults')
18-
# http://puppet-lint.com/checks/class_inherits_from_params_class/
13+
PuppetLint.configuration.send('relative')
14+
PuppetLint.configuration.send('disable_140chars')
1915
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
16+
PuppetLint.configuration.send('disable_documentation')
17+
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
18+
PuppetLint.configuration.send('disable_relative_classname_inclusion')
2019

2120
exclude_paths = %w(
2221
pkg/**/*
@@ -36,24 +35,5 @@ task test: [
3635
:metadata_lint,
3736
:lint,
3837
:syntax,
39-
:spec
38+
:spec,
4039
]
41-
42-
Blacksmith::RakeTask.new do |t|
43-
t.build = false # do not build the module nor push it to the Forge
44-
# just do the tagging [:clean, :tag, :bump_commit]
45-
end
46-
47-
desc 'Offload release process to Travis.'
48-
task travis_release: [
49-
:check_changelog, # check that the changelog contains an entry for the current release
50-
:"module:release", # do everything except build / push to forge, travis will do that for us
51-
]
52-
53-
desc 'Check Changelog.'
54-
task :check_changelog do
55-
v = Blacksmith::Modulefile.new.version
56-
if File.readlines('CHANGELOG.md').grep(/Releasing #{v}/).empty?
57-
raise "Unable to find a CHANGELOG.md entry for the #{v} release."
58-
end
59-
end
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
HOSTS:
2+
centos-511-x64:
3+
roles:
4+
- master
5+
platform: el-5-x86_64
6+
box: puppetlabs/centos-5.11-64-nocm
7+
hypervisor: vagrant
8+
CONFIG:
9+
type: foss
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
HOSTS:
2+
centos-66-x64:
3+
roles:
4+
- master
5+
- database
6+
- dashboard
7+
platform: el-6-x86_64
8+
box: puppetlabs/centos-6.6-64-puppet-enterprise
9+
hypervisor: vagrant
10+
CONFIG:
11+
type: pe

0 commit comments

Comments
 (0)