beaker_puppet_helpers 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ff13e8fb03a324201a2a00459816f96fb65b4ee3b658bd685f4d820fd7f36b6
4
- data.tar.gz: 38ad4707104592a508f9a8a0635ab099cd7fe72490dc530eebbc545db33502fe
3
+ metadata.gz: fa0f4a5c8f1fdf3af5e5d2e70344d6a66eb57dccea809afa8874d0c2042a9909
4
+ data.tar.gz: 2b8869cdffac42895c8d45f2f7efed1a49acf0333208fde932fab6c779790667
5
5
  SHA512:
6
- metadata.gz: 28bf14e5400707a070dff651528a6914bc10514f561f25704b884feba002c5ed9e14d95cd6cf03f5dc628351f40643bc560938ea897405cde13cea978018f9ff
7
- data.tar.gz: 22c07ea4a35af6bb391966b5a24e3e4afcb30e53e6fd6d546aaec898f67993350d5e6f6df18e6c1c89dda45c6675ffeec1c59b3957629913e236861ee14452f7
6
+ metadata.gz: d00617272c372496bf6c6512f05b6efc3800c8bac1618d3b5e30dfa91f808fd8c940dadceea9283a37104c2c63e2e7c6beb9c5e0bd62b5a228424d72c700043e
7
+ data.tar.gz: 4f6556760ce3963f0502fe55f03f9881f4b86d39e623089cc8a767abdcef53010161ad7b533442745174c021d6e865e69f101136d4464c71c323c4f0f8a4563f
data/CHANGELOG.md CHANGED
@@ -2,7 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [1.0.1](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.0.1) (2023-05-09)
5
+ ## [1.1.0](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.1.0) (2023-06-01)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.0.1...1.1.0)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ - Add support for `--show_diff` [\#27](https://github.com/voxpupuli/beaker_puppet_helpers/pull/27) ([smortex](https://github.com/smortex))
12
+
13
+ ## [1.0.1](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.0.1) (2023-05-10)
6
14
 
7
15
  [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.0.0...1.0.1)
8
16
 
data/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Beaker Puppet Helpers
2
2
 
3
+ [![License](https://img.shields.io/github/license/voxpupuli/beaker_puppet_helpers.svg)](https://github.com/voxpupuli/beaker_puppet_helpers/blob/master/LICENSE)
4
+ [![Test](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/ci.yml/badge.svg)](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/ci.yml)
5
+ [![Release](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/beaker_puppet_helpers/actions/workflows/release.yml)
6
+ [![RubyGem Version](https://img.shields.io/gem/v/beaker_puppet_helpers.svg)](https://rubygems.org/gems/beaker_puppet_helpers)
7
+ [![RubyGem Downloads](https://img.shields.io/gem/dt/beaker_puppet_helpers.svg)](https://rubygems.org/gems/beaker_puppet_helpers)
8
+
3
9
  The purpose of this library is to hold Puppet-specific info & DSL methods.
4
10
  This includes all helper & installer methods.
5
11
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'beaker_puppet_helpers'
5
- s.version = '1.0.1'
5
+ s.version = '1.1.0'
6
6
  s.authors = ['Vox Pupuli']
7
7
  s.email = ['voxpupuli@groups.io']
8
8
  s.homepage = 'https://github.com/voxpupuli/beaker_puppet_helpers'
@@ -89,10 +89,15 @@ module BeakerPuppetHelpers
89
89
  #
90
90
  # @option opts [String] :hiera_config The path of the hiera.yaml configuration.
91
91
  #
92
- # @option opts [String] :debug (false) If this option exists,
92
+ # @option opts [Boolean] :debug (false) If this option exists,
93
93
  # the "--debug" command line parameter
94
94
  # will be passed to the 'puppet apply' command.
95
- # @option opts [Boolean] :run_in_parallel Whether to run on each host in parallel.
95
+ #
96
+ # @option opts [Boolean] :run_in_parallel Whether to run on each host in parallel.
97
+ #
98
+ # @option opts [Boolean] :show_diff (false) If this option exists,
99
+ # the "--show_diff=true" command line parameter
100
+ # will be passed to the 'puppet apply' command.
96
101
  #
97
102
  # @param [Block] block This method will yield to a block of code passed
98
103
  # by the caller; this can be used for additional
@@ -118,6 +123,7 @@ module BeakerPuppetHelpers
118
123
  puppet_apply_opts[:modulepath] = opts[:modulepath] if opts[:modulepath]
119
124
  puppet_apply_opts[:hiera_config] = opts[:hiera_config] if opts[:hiera_config]
120
125
  puppet_apply_opts[:noop] = nil if opts[:noop]
126
+ puppet_apply_opts[:show_diff] = nil if opts[:show_diff]
121
127
 
122
128
  # From puppet help:
123
129
  # "... an exit code of '2' means there were changes, an exit code of
@@ -166,6 +166,14 @@ describe BeakerPuppetHelpers::DSL do
166
166
 
167
167
  dsl.apply_manifest_on(agent, 'class { "boo": }', debug: true)
168
168
  end
169
+
170
+ it 'can set the --show_diff flag' do
171
+ expect(dsl).to receive(:create_remote_file).and_return(true)
172
+ expect(Beaker::PuppetCommand).to receive(:new).with('apply', anything, include(show_diff: nil)).and_return('puppet_command')
173
+ expect(dsl).to receive(:on).with(agent, 'puppet_command', acceptable_exit_codes: [0])
174
+
175
+ dsl.apply_manifest_on(agent, 'class { "boo": }', show_diff: true)
176
+ end
169
177
  end
170
178
 
171
179
  describe '#apply_manifest' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker_puppet_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-10 00:00:00.000000000 Z
11
+ date: 2023-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: beaker