From 2f961c6181d014d09a0e720a2f633b038b4875f1 Mon Sep 17 00:00:00 2001 From: Dennis Hoppe Date: Wed, 19 Oct 2016 18:56:27 +0200 Subject: [PATCH 1/2] Update based on voxpupuli/modulesync_config 0.13.3 --- .msync.yml | 2 +- .rubocop.yml | 3 +++ Gemfile | 4 +++- Rakefile | 2 +- spec/spec_helper.rb | 2 -- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.msync.yml b/.msync.yml index c5e3e79be..7c1b6e6ab 100644 --- a/.msync.yml +++ b/.msync.yml @@ -1 +1 @@ -modulesync_config_version: '0.13.0' +modulesync_config_version: '0.13.3' diff --git a/.rubocop.yml b/.rubocop.yml index d6a394882..e1e0276b7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -57,6 +57,9 @@ Style/AndOr: Style/RedundantSelf: Enabled: True +Metric/BlockLength: + Enabled: False + # Method length is not necessarily an indicator of code quality Metrics/MethodLength: Enabled: False diff --git a/Gemfile b/Gemfile index 8613079c3..6a4e56d97 100644 --- a/Gemfile +++ b/Gemfile @@ -25,9 +25,10 @@ group :test do gem 'metadata-json-lint', :require => false gem 'puppet-blacksmith', :require => false gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem.git' - gem 'puppet-strings', '0.4.0', :require => false + gem 'puppet-strings', '~> 0.99.0', :require => false gem 'rubocop-rspec', '~> 1.6', :require => false if RUBY_VERSION >= '2.3.0' gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0' + gem 'mocha', '>= 1.2.1', :require => false end group :development do @@ -45,6 +46,7 @@ group :system_tests do else gem 'beaker-rspec', :require => false end + gem 'serverspec', :require => false gem 'beaker-puppet_install_helper', :require => false end diff --git a/Rakefile b/Rakefile index 35ee06a8d..d00f2470a 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ require 'puppetlabs_spec_helper/rake_tasks' require 'puppet_blacksmith/rake_tasks' require 'voxpupuli/release/rake_tasks' -require 'puppet-strings/rake_tasks' +require 'puppet-strings/tasks' PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}' PuppetLint.configuration.fail_on_warnings = true diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 30f044ab3..2d8b16588 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -10,8 +10,6 @@ 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 - - c.mock_with :rspec end # vim: syntax=ruby From 0221f289a677fe2e9aaf2ad09604b93a0937b15f Mon Sep 17 00:00:00 2001 From: Dennis Hoppe Date: Wed, 19 Oct 2016 22:02:53 +0200 Subject: [PATCH 2/2] Configure mock with rspec --- .msync.yml | 2 +- .sync.yml | 2 ++ spec/spec_helper.rb | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.msync.yml b/.msync.yml index 7c1b6e6ab..f15545c21 100644 --- a/.msync.yml +++ b/.msync.yml @@ -1 +1 @@ -modulesync_config_version: '0.13.3' +modulesync_config_version: '0.13.4' diff --git a/.sync.yml b/.sync.yml index f6bdf8942..c70b890f5 100644 --- a/.sync.yml +++ b/.sync.yml @@ -4,3 +4,5 @@ docker_sets: - set: docker/ubuntu-14.04 - set: docker/centos-7 +spec/spec_helper.rb: + mock_with: ':rspec' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 2d8b16588..f209ae7d8 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -10,6 +10,7 @@ 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 + c.mock_with :rspec end # vim: syntax=ruby