From 4c4abb1ba78af40e897e70dcf6c3693fab8e93b2 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 26 May 2016 10:20:54 +0200 Subject: modulesync 0.6.3 --- .gitignore | 2 ++ .rubocop.yml | 13 +++++++++ .travis.yml | 32 +++++++++++----------- .yardopts | 1 + CONTRIBUTING.md | 1 + Gemfile | 19 ++++++------- Rakefile | 13 +++++---- spec/acceptance/nodesets/centos-511-x64.yml | 3 ++ spec/acceptance/nodesets/centos-66-x64-pe.yml | 3 ++ spec/acceptance/nodesets/centos-66-x64.yml | 3 ++ spec/acceptance/nodesets/centos-72-x64.yml | 3 ++ spec/acceptance/nodesets/debian-78-x64.yml | 3 ++ spec/acceptance/nodesets/debian-82-x64.yml | 3 ++ .../acceptance/nodesets/ubuntu-server-1204-x64.yml | 3 ++ .../acceptance/nodesets/ubuntu-server-1404-x64.yml | 3 ++ spec/classes/coverage_spec.rb | 1 + spec/spec_helper.rb | 1 + 17 files changed, 76 insertions(+), 31 deletions(-) create mode 100644 .yardopts diff --git a/.gitignore b/.gitignore index 8894657..21ff492 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ pkg/ Gemfile.lock +Gemfile.local vendor/ +.vendor/ spec/fixtures/ .vagrant/ .bundle/ diff --git a/.rubocop.yml b/.rubocop.yml index 819bbd8..364b022 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,8 +1,11 @@ +require: rubocop-rspec AllCops: + TargetRubyVersion: 1.9 Include: - ./**/*.rb Exclude: - vendor/**/* + - .vendor/**/* - pkg/**/* - spec/fixtures/**/* @@ -64,3 +67,13 @@ Style/BlockDelimiters: Style/MultilineBlockLayout: Enabled: False + +# Rspec + +# We don't use rspec in this way +RSpec/DescribeClass: + Enabled: False + +# Example length is not necessarily an indicator of code quality +RSpec/ExampleLength: + Enabled: False diff --git a/.travis.yml b/.travis.yml index 1b492f1..cc86b12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,14 @@ sudo: false language: ruby cache: bundler -bundler_args: --without system_tests -before_install: rm Gemfile.lock || true +bundler_args: --without system_tests development +before_install: + - bundle -v + - rm Gemfile.lock || true + - gem update --system + - gem update bundler + - gem --version + - bundle -v script: - 'bundle exec rake $CHECK' matrix: @@ -11,23 +17,18 @@ matrix: include: - rvm: 1.9.3 env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test - - rvm: 2.1.8 - env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test - rvm: 1.9.3 - env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes - - rvm: 2.1.8 - env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test FUTURE_PARSER=yes - - rvm: 2.1.8 + env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test + - rvm: 2.1 + env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test + - rvm: 2.1 env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test - - rvm: 2.2.4 + - rvm: 2.2 env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test - - rvm: 2.2.4 + - rvm: 2.3.1 env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=rubocop - - rvm: 2.3.0 + - rvm: 2.3.1 env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test - allow_failures: - - rvm: 2.3.0 - env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test notifications: email: false deploy: @@ -40,5 +41,4 @@ deploy: # all_branches is required to use tags all_branches: true # Only publish if our main Ruby target builds - rvm: 1.9.3 - condition: "$FUTURE_PARSER = yes" + rvm: 2.2 diff --git a/.yardopts b/.yardopts new file mode 100644 index 0000000..29c933b --- /dev/null +++ b/.yardopts @@ -0,0 +1 @@ +--markup markdown diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00deb27..8cac3bd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,3 +94,4 @@ can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will at least need `BEAKER_PROVISION` set to yes (the default). The Vagrantfile for the created virtual machines will be in `.vagrant/beaker_vagrant_fies`. +# vim: syntax=markdown diff --git a/Gemfile b/Gemfile index 66ed713..1755e16 100644 --- a/Gemfile +++ b/Gemfile @@ -11,17 +11,11 @@ def location_for(place, fake_version = nil) end group :test do - gem 'rake', :require => false + gem 'puppetlabs_spec_helper', :require => false gem 'rspec-puppet', :require => false, :git => 'https://github.com/rodjek/rspec-puppet.git' - gem 'puppet-lint', :require => false, :git => 'https://github.com/rodjek/puppet-lint.git' - gem 'metadata-json-lint', :require => false gem 'rspec-puppet-facts', :require => false - gem 'rspec', :require => false - gem 'puppet-blacksmith', :require => false, :git => 'https://github.com/voxpupuli/puppet-blacksmith.git' - gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git' - gem 'rubocop', '~> 0.38', :require => false gem 'rspec-puppet-utils', :require => false - gem 'puppetlabs_spec_helper', :require => false + gem 'puppet-lint', :require => false, :git => 'https://github.com/rodjek/puppet-lint.git' gem 'puppet-lint-absolute_classname-check', :require => false gem 'puppet-lint-leading_zero-check', :require => false gem 'puppet-lint-trailing_comma-check', :require => false @@ -29,6 +23,11 @@ group :test do gem 'puppet-lint-classes_and_types_beginning_with_digits-check', :require => false gem 'puppet-lint-unquoted_string-check', :require => false gem 'puppet-lint-variable_contains_upcase', :require => false + gem 'metadata-json-lint', :require => false + gem 'puppet-blacksmith', :require => false, :git => 'https://github.com/voxpupuli/puppet-blacksmith.git' + gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git' + gem 'puppet-strings', :require => false, :git => 'https://github.com/puppetlabs/puppetlabs-strings.git' + gem 'rubocop-rspec', '~> 1.4', :require => false end group :development do @@ -58,7 +57,7 @@ else gem 'facter', :require => false, :groups => [:test] end -ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 3.0' : puppetversion = ENV['PUPPET_VERSION'].to_s +ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 4.0' : puppetversion = ENV['PUPPET_VERSION'].to_s gem 'puppet', puppetversion, :require => false, :groups => [:test] -# vim:ft=ruby +# vim: syntax=ruby diff --git a/Rakefile b/Rakefile index 0ffcb86..56ffc74 100644 --- a/Rakefile +++ b/Rakefile @@ -1,12 +1,13 @@ require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -require 'puppet-syntax/tasks/puppet-syntax' -require 'metadata-json-lint/rake_task' require 'puppet_blacksmith/rake_tasks' require 'voxpupuli/release/rake_tasks' require 'rubocop/rake_task' +require 'puppet-strings/rake_tasks' -RuboCop::RakeTask.new +RuboCop::RakeTask.new(:rubocop) do |task| + # These make the rubocop experience maybe slightly less terrible + task.options = ['-D', '-S', '-E'] +end PuppetLint.configuration.log_format = '%{path}:%{linenumber}:%{check}:%{KIND}:%{message}' PuppetLint.configuration.fail_on_warnings = true @@ -19,6 +20,7 @@ PuppetLint.configuration.send('disable_single_quote_string_with_variables') exclude_paths = %w( pkg/**/* vendor/**/* + .vendor/**/* spec/**/* ) PuppetLint.configuration.ignore_paths = exclude_paths @@ -29,10 +31,11 @@ RSpec::Core::RakeTask.new(:acceptance) do |t| t.pattern = 'spec/acceptance' end -desc 'Run metadata_lint, lint, syntax, and spec tests.' +desc 'Run tests metadata_lint, lint, syntax, spec' task test: [ :metadata_lint, :lint, :syntax, :spec, ] +# vim: syntax=ruby diff --git a/spec/acceptance/nodesets/centos-511-x64.yml b/spec/acceptance/nodesets/centos-511-x64.yml index ca14463..a787863 100644 --- a/spec/acceptance/nodesets/centos-511-x64.yml +++ b/spec/acceptance/nodesets/centos-511-x64.yml @@ -1,3 +1,4 @@ +--- HOSTS: centos-511-x64: roles: @@ -7,3 +8,5 @@ HOSTS: hypervisor: vagrant CONFIG: type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/centos-66-x64-pe.yml b/spec/acceptance/nodesets/centos-66-x64-pe.yml index 9a93037..0da6913 100644 --- a/spec/acceptance/nodesets/centos-66-x64-pe.yml +++ b/spec/acceptance/nodesets/centos-66-x64-pe.yml @@ -1,3 +1,4 @@ +--- HOSTS: centos-66-x64: roles: @@ -9,3 +10,5 @@ HOSTS: hypervisor: vagrant CONFIG: type: pe +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/centos-66-x64.yml b/spec/acceptance/nodesets/centos-66-x64.yml index 214318a..dff02de 100644 --- a/spec/acceptance/nodesets/centos-66-x64.yml +++ b/spec/acceptance/nodesets/centos-66-x64.yml @@ -1,3 +1,4 @@ +--- HOSTS: centos-66-x64: roles: @@ -7,3 +8,5 @@ HOSTS: hypervisor: vagrant CONFIG: type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/centos-72-x64.yml b/spec/acceptance/nodesets/centos-72-x64.yml index 2c628fc..b5ec203 100644 --- a/spec/acceptance/nodesets/centos-72-x64.yml +++ b/spec/acceptance/nodesets/centos-72-x64.yml @@ -1,3 +1,4 @@ +--- HOSTS: centos-72-x64: roles: @@ -7,3 +8,5 @@ HOSTS: hypervisor: vagrant CONFIG: type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/debian-78-x64.yml b/spec/acceptance/nodesets/debian-78-x64.yml index 2baa693..8b71f39 100644 --- a/spec/acceptance/nodesets/debian-78-x64.yml +++ b/spec/acceptance/nodesets/debian-78-x64.yml @@ -1,3 +1,4 @@ +--- HOSTS: debian-78-x64: roles: @@ -7,3 +8,5 @@ HOSTS: hypervisor: vagrant CONFIG: type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/debian-82-x64.yml b/spec/acceptance/nodesets/debian-82-x64.yml index f496f12..83e3660 100644 --- a/spec/acceptance/nodesets/debian-82-x64.yml +++ b/spec/acceptance/nodesets/debian-82-x64.yml @@ -1,3 +1,4 @@ +--- HOSTS: debian-82-x64: roles: @@ -7,3 +8,5 @@ HOSTS: hypervisor: vagrant CONFIG: type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ubuntu-server-1204-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1204-x64.yml index fa94e2c..52ba020 100644 --- a/spec/acceptance/nodesets/ubuntu-server-1204-x64.yml +++ b/spec/acceptance/nodesets/ubuntu-server-1204-x64.yml @@ -1,3 +1,4 @@ +--- HOSTS: ubuntu-server-1204-x64: roles: @@ -7,3 +8,5 @@ HOSTS: hypervisor: vagrant CONFIG: type: foss +... +# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml b/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml index 72ba9c2..407e82b 100644 --- a/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml +++ b/spec/acceptance/nodesets/ubuntu-server-1404-x64.yml @@ -1,3 +1,4 @@ +--- HOSTS: ubuntu-server-1404-x64: roles: @@ -7,3 +8,5 @@ HOSTS: hypervisor: vagrant CONFIG: type: foss +... +# vim: syntax=yaml diff --git a/spec/classes/coverage_spec.rb b/spec/classes/coverage_spec.rb index c083569..de44654 100644 --- a/spec/classes/coverage_spec.rb +++ b/spec/classes/coverage_spec.rb @@ -1,3 +1,4 @@ require 'rspec-puppet' at_exit { RSpec::Puppet::Coverage.report! } +# vim: syntax=ruby diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1ffdf17..0f53c4e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,4 @@ require 'puppetlabs_spec_helper/module_spec_helper' require 'rspec-puppet-facts' include RspecPuppetFacts +# vim: syntax=ruby -- cgit v1.2.3