beaker_puppet_helpers 1.0.0 → 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: cf5abd7cf85873a9544f42d9da34d59700f196fe7cf1665449dec6b04bf6c8c7
4
- data.tar.gz: cc3bfe5d7108fb7ce5bc33103afb2d842592f959012c86d70c32cd4647458c30
3
+ metadata.gz: fa0f4a5c8f1fdf3af5e5d2e70344d6a66eb57dccea809afa8874d0c2042a9909
4
+ data.tar.gz: 2b8869cdffac42895c8d45f2f7efed1a49acf0333208fde932fab6c779790667
5
5
  SHA512:
6
- metadata.gz: 7cffd9b821bb8a83af7409fe0ed0eae04f764b696545baa06896ad493a833c037ee83d3952e151bfed51415b2eb53794e6d74440e11245d7cde4721d095f80c2
7
- data.tar.gz: fd5402a62aacbb30b8a9534ed19b4f4a42e50295494adeecb4ee42277a1ea1679416264ec48ce4d0d9361323865ac1d0f1eb7bda1d50e810bbec2b4408f478b3
6
+ metadata.gz: d00617272c372496bf6c6512f05b6efc3800c8bac1618d3b5e30dfa91f808fd8c940dadceea9283a37104c2c63e2e7c6beb9c5e0bd62b5a228424d72c700043e
7
+ data.tar.gz: 4f6556760ce3963f0502fe55f03f9881f4b86d39e623089cc8a767abdcef53010161ad7b533442745174c021d6e865e69f101136d4464c71c323c4f0f8a4563f
data/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
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)
14
+
15
+ [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/1.0.0...1.0.1)
16
+
17
+ **Fixed bugs:**
18
+
19
+ - puppet-modulebuilder: Allow 1.x [\#25](https://github.com/voxpupuli/beaker_puppet_helpers/pull/25) ([bastelfreak](https://github.com/bastelfreak))
20
+
5
21
  ## [1.0.0](https://github.com/voxpupuli/beaker_puppet_helpers/tree/1.0.0) (2023-05-05)
6
22
 
7
23
  [Full Changelog](https://github.com/voxpupuli/beaker_puppet_helpers/compare/5cc9e2e0e2a6a3541502bb1aae961071a8b96157...1.0.0)
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.0'
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'
@@ -17,5 +17,5 @@ Gem::Specification.new do |s|
17
17
 
18
18
  # Run time dependencies
19
19
  s.add_runtime_dependency 'beaker', '>= 4', '< 6'
20
- s.add_runtime_dependency 'puppet-modulebuilder', '~> 0.3', '< 2'
20
+ s.add_runtime_dependency 'puppet-modulebuilder', '>= 0.3', '< 2'
21
21
  end
@@ -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.0
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-05 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
@@ -34,7 +34,7 @@ dependencies:
34
34
  name: puppet-modulebuilder
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0.3'
40
40
  - - "<"
@@ -44,7 +44,7 @@ dependencies:
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0.3'
50
50
  - - "<"