From 583b6e077db4273044cf9322665b303184dc1fef Mon Sep 17 00:00:00 2001 From: Matt Callaway Date: Wed, 23 Apr 2014 17:45:13 -0500 Subject: [PATCH 1/4] Don't require empty output from augparse. xref issue https://github.com/domcleal/rspec-puppet-augeas/issues/10 --- lib/rspec-puppet-augeas/test_utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rspec-puppet-augeas/test_utils.rb b/lib/rspec-puppet-augeas/test_utils.rb index 2296da4..e06d7e1 100644 --- a/lib/rspec-puppet-augeas/test_utils.rb +++ b/lib/rspec-puppet-augeas/test_utils.rb @@ -88,7 +88,7 @@ module Test_Rspec_Puppet_Augeas = end output = %x(augparse --notypecheck #{testaug} 2>&1) - raise RSpec::Puppet::Augeas::Error, "augparse failed:\n#{output}" unless $? == 0 && output.empty? + raise RSpec::Puppet::Augeas::Error, "augparse failed:\n#{output}" unless $? == 0 end end From 22eda4ac3c5422728638f7d2d89f23b235d540aa Mon Sep 17 00:00:00 2001 From: Matt Callaway Date: Thu, 24 Apr 2014 10:50:11 -0500 Subject: [PATCH 2/4] Try removing dep on rspec-puppet < 1.0 --- Gemfile | 3 ++- rspec-puppet-augeas.gemspec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 10dff62..cf0889e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,8 @@ source 'https://rubygems.org' gem 'puppetlabs_spec_helper' -gem 'rspec-puppet', '< 1.0.0' +#gem 'rspec-puppet', '< 1.0.0' +gem 'rspec-puppet' gem 'ruby-augeas' group :test do diff --git a/rspec-puppet-augeas.gemspec b/rspec-puppet-augeas.gemspec index de051e8..f1be1b8 100644 --- a/rspec-puppet-augeas.gemspec +++ b/rspec-puppet-augeas.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |s| 'spec/spec_helper.rb' ] - s.add_dependency 'rspec-puppet', '< 1.0.0' + #s.add_dependency 'rspec-puppet', '< 1.0.0' s.add_dependency 'puppetlabs_spec_helper' s.authors = ['Dominic Cleal'] From b3660c0888334b4e87d214dcb55794b79d845eb3 Mon Sep 17 00:00:00 2001 From: Matt Callaway Date: Fri, 25 Apr 2014 11:42:34 -0500 Subject: [PATCH 3/4] Add support for code coverage from recent rspec-puppet --- lib/rspec-puppet-augeas/matchers/execute.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rspec-puppet-augeas/matchers/execute.rb b/lib/rspec-puppet-augeas/matchers/execute.rb index 91c169e..8af7d90 100644 --- a/lib/rspec-puppet-augeas/matchers/execute.rb +++ b/lib/rspec-puppet-augeas/matchers/execute.rb @@ -13,6 +13,7 @@ def initialize def matches?(resource) @resource = resource + RSpec::Puppet::Coverage.cover!(resource) return false if resource.txn.any_failed? return false if change and !resource.txn.changed?.any? return false if idempotent and resource.idempotent.changed?.any? From af39f58acebec16d4964fd37c5694e3d1f43b894 Mon Sep 17 00:00:00 2001 From: Matt Callaway Date: Fri, 25 Apr 2014 11:46:42 -0500 Subject: [PATCH 4/4] Remove apparent unneccessary restriction on rspec-puppet < 1.0.0 --- Gemfile | 1 - rspec-puppet-augeas.gemspec | 1 - 2 files changed, 2 deletions(-) diff --git a/Gemfile b/Gemfile index cf0889e..21b2db8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,6 @@ source 'https://rubygems.org' gem 'puppetlabs_spec_helper' -#gem 'rspec-puppet', '< 1.0.0' gem 'rspec-puppet' gem 'ruby-augeas' diff --git a/rspec-puppet-augeas.gemspec b/rspec-puppet-augeas.gemspec index f1be1b8..09f6640 100644 --- a/rspec-puppet-augeas.gemspec +++ b/rspec-puppet-augeas.gemspec @@ -28,7 +28,6 @@ Gem::Specification.new do |s| 'spec/spec_helper.rb' ] - #s.add_dependency 'rspec-puppet', '< 1.0.0' s.add_dependency 'puppetlabs_spec_helper' s.authors = ['Dominic Cleal']