From ec7b7f0b23e314cec9066b44c8db0de658620636 Mon Sep 17 00:00:00 2001 From: Dennis Hoppe Date: Sat, 4 Feb 2017 16:08:28 +0100 Subject: [PATCH] Update based on voxpupuli/modulesync_config 0.19.3 (#15) --- .gitignore | 3 +++ .msync.yml | 2 +- .pmtignore | 1 + .rubocop.yml | 6 +++++- .travis.yml | 15 +++++---------- .yardopts | 1 + Gemfile | 12 ++++++++---- Rakefile | 11 +++++++++++ spec/spec_helper.rb | 6 +++--- 9 files changed, 38 insertions(+), 19 deletions(-) create mode 100644 .pmtignore diff --git a/.gitignore b/.gitignore index 82426da6e..b5217490b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ spec/fixtures/modules/ coverage/ log/ .idea/ +.dependencies/ +.librarian/ +Puppetfile.lock *.iml .*.sw? .yardoc/ diff --git a/.msync.yml b/.msync.yml index d505802eb..b42c48761 100644 --- a/.msync.yml +++ b/.msync.yml @@ -1 +1 @@ -modulesync_config_version: '0.16.7' +modulesync_config_version: '0.19.3' diff --git a/.pmtignore b/.pmtignore new file mode 100644 index 000000000..77f12ae2e --- /dev/null +++ b/.pmtignore @@ -0,0 +1 @@ +docs/ diff --git a/.rubocop.yml b/.rubocop.yml index f2136f3c5..ef85ceb41 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -74,7 +74,7 @@ Style/WhileUntilModifier: Lint/AmbiguousRegexpLiteral: Enabled: True -Lint/Eval: +Security/Eval: Enabled: True Lint/BlockAlignment: @@ -518,3 +518,7 @@ RSpec/RepeatedDescription: RSpec/NestedGroups: Enabled: False + +# disable Yaml safe_load. This is needed to support ruby2.0.0 development envs +Security/YAMLLoad: + Enabled: false diff --git a/.travis.yml b/.travis.yml index 7779d470c..531ec6ba0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ --- sudo: false +dist: trusty language: ruby cache: bundler bundler_args: --without system_tests development @@ -15,24 +16,18 @@ script: matrix: fast_finish: true include: - - rvm: 1.9.3 - env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test - - rvm: 2.1.9 - env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test - rvm: 2.1.9 env: PUPPET_VERSION="~> 4.0" CHECK=test - rvm: 2.2.6 env: PUPPET_VERSION="~> 4.0" CHECK=test - - rvm: 2.3.3 - env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes - - rvm: 2.3.3 - env: PUPPET_VERSION="~> 4.0" CHECK=rubocop - rvm: 2.3.3 env: PUPPET_VERSION="~> 4.0" CHECK=test - rvm: 2.4.0 env: PUPPET_VERSION="~> 4.0" CHECK=test - allow_failures: - - rvm: 2.4.0 + - rvm: 2.4.0 + env: PUPPET_VERSION="~> 4.0" CHECK=rubocop + - rvm: 2.4.0 + env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes branches: only: - master diff --git a/.yardopts b/.yardopts index 29c933bcf..3687f5184 100644 --- a/.yardopts +++ b/.yardopts @@ -1 +1,2 @@ --markup markdown +--output-dir docs/ diff --git a/Gemfile b/Gemfile index 0fa24c662..3bbbce90c 100644 --- a/Gemfile +++ b/Gemfile @@ -26,11 +26,15 @@ group :test do gem 'puppet-blacksmith', :require => false gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git' gem 'puppet-strings', '~> 1.0.0', :require => false - gem 'rubocop-rspec', '~> 1.9.0', :require => false if RUBY_VERSION >= '2.3.0' - gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0' + gem 'redcarpet', :require => false + gem 'rubocop', '~> 0.47.0', :require => false if RUBY_VERSION >= '2.3.0' + gem 'rubocop-rspec', '~> 1.10.0', :require => false if RUBY_VERSION >= '2.3.0' gem 'mocha', '>= 1.2.1', :require => false - gem 'coveralls', :require => false if RUBY_VERSION >= '2.0.0' - gem 'simplecov-console', :require => false if RUBY_VERSION >= '2.0.0' + gem 'coveralls', :require => false + gem 'simplecov-console', :require => false + gem 'github_changelog_generator', '~> 1.13.0', :require => false if RUBY_VERSION < '2.2.2' + gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2' + gem 'github_changelog_generator', :require => false if RUBY_VERSION >= '2.2.2' end group :development do diff --git a/Rakefile b/Rakefile index d00f2470a..2def02fad 100644 --- a/Rakefile +++ b/Rakefile @@ -30,4 +30,15 @@ task test: [ :metadata_lint, :release_checks, ] + +begin + require 'github_changelog_generator/task' + GitHubChangelogGenerator::RakeTask.new :changelog do |config| + version = (Blacksmith::Modulefile.new).version + config.future_release = "#{version}" + config.header = "# Change log\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not impact the functionality of the module." + config.exclude_labels = %w{duplicate question invalid wontfix modulesync} + end +rescue LoadError +end # vim: syntax=ruby diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ec02c1a63..2aa9da74c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,7 +2,7 @@ require 'rspec-puppet-facts' include RspecPuppetFacts -if Dir.exist?(File.expand_path('../../lib', __FILE__)) && RUBY_VERSION !~ %r{^1.9} +if Dir.exist?(File.expand_path('../../lib', __FILE__)) require 'coveralls' require 'simplecov' require 'simplecov-console' @@ -24,8 +24,8 @@ puppetversion: Puppet.version, facterversion: Facter.version } - default_facts.merge!(YAML.safe_load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__)) - default_facts.merge!(YAML.safe_load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__)) + default_facts.merge!(YAML.load(File.read(File.expand_path('../default_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_facts.yml', __FILE__)) + default_facts.merge!(YAML.load(File.read(File.expand_path('../default_module_facts.yml', __FILE__)))) if File.exist?(File.expand_path('../default_module_facts.yml', __FILE__)) c.default_facts = default_facts end