onceover 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +27 -1
- data/lib/onceover/controlrepo.rb +1 -1
- data/onceover.gemspec +1 -1
- data/templates/spec_helper.rb.erb +4 -0
- metadata +2 -3
- data/Gemfile.lock +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1c202c9c575a990e289391c96437c4be6518189
|
4
|
+
data.tar.gz: b979e35d426517f2f0f2f10dc692f92b57b0c6af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3141841bf037bdc8a8133c16d778fa21fa4c2110efd51358baa7f2f44bec316b0491213280599851fbc4e468181d218f4ecba9d35092d9601c3b43138c36b92e
|
7
|
+
data.tar.gz: 5d73734380fb8eb6a6d359655b4cace7cb6f2385c6e32c139ae43a9f07b2772979dcb040ecb8e1f24d5984a2c1b8c1b925dd3c23572c02ce9d9a27a6974aaeb6
|
data/README.md
CHANGED
@@ -285,7 +285,7 @@ If you have hiera data inside your controlrepo (or somewhere else) the Controlre
|
|
285
285
|
|
286
286
|
**WARNING:** This assumes that the path to your hiera data (datadir) is relative to the root of the controlrepo, if not it will fall over.
|
287
287
|
|
288
|
-
**Alternatively:**, if you are using cool new per-environment hiera config made available in puppet 4.x, the tool will automatically detect this and everything should work.
|
288
|
+
**Alternatively:**, if you are using cool new per-environment hiera config made available in puppet 4.x (Now called Hiera 5), the tool will automatically detect this and everything should work. If you want to use a different v5 `hiera.yaml` for testing, pleace it under the spec directory. Note that the datadir must be relative to the location of the hiera.yaml file in this instance. i.e. `../data`
|
289
289
|
|
290
290
|
## Spec testing
|
291
291
|
|
@@ -306,6 +306,12 @@ This will do the following things:
|
|
306
306
|
|
307
307
|
When using this gem adding your own spec tests is exactly the same as if you were to add them to a module, simply create them under `spec/{classes,defines,etc.}` in the Controlrepo and they will be run like normal, along with all of the `it { should compile }` tests.
|
308
308
|
|
309
|
+
### Exposing Puppet output
|
310
|
+
|
311
|
+
If you want to see Puppet's output, you can set the `SHOW_PUPPET_OUTPUT` environment variable to `true`, eg:
|
312
|
+
|
313
|
+
`SHOW_PUPPET_OUTPUT=true onceover run spec`
|
314
|
+
|
309
315
|
## Acceptance testing
|
310
316
|
|
311
317
|
Acceptance testing works in much the same way as spec testing except that it requires a nodeset file along with `onceover.yaml`
|
@@ -408,6 +414,14 @@ Here we are specifying custom commands to run for starting, stopping and checkin
|
|
408
414
|
|
409
415
|
## Extra Tooling
|
410
416
|
|
417
|
+
### Plugins
|
418
|
+
|
419
|
+
Onceover now allows for plugins. The framework is extremely simple and basically relies on the plugins to monkey-patch themselves in. It will likely be improved in future. To create a plugin simply install a gem with a name that starts with `onceover-` and onceover will `require` it. Once it has been required it is up to the plugin to insert itself wherever it is required.
|
420
|
+
|
421
|
+
Examples:
|
422
|
+
|
423
|
+
- [onceover-octocatalog-diff](https://github.com/dylanratcliffe/onceover-octocatalog-diff)
|
424
|
+
|
411
425
|
### Inspecting and updating the Puppetfile
|
412
426
|
|
413
427
|
Onceover comes with some extra commands for interacting with the Puppetfile in useful ways. These are:
|
@@ -590,3 +604,15 @@ fixtures:
|
|
590
604
|
```
|
591
605
|
|
592
606
|
Notice that the symlinks are not the ones that we provided in `environment.conf`? This is because the rake task will go into each of directories, find the modules and create a symlink for each of them (This is what rspec expects).
|
607
|
+
|
608
|
+
## Contributors
|
609
|
+
|
610
|
+
Cheers to all of those who helped out:
|
611
|
+
|
612
|
+
- jessereynolds
|
613
|
+
- op-ct
|
614
|
+
- GeoffWilliams
|
615
|
+
- beergeek
|
616
|
+
- jairojunior
|
617
|
+
- natemccurdy
|
618
|
+
- aardvark
|
data/lib/onceover/controlrepo.rb
CHANGED
@@ -335,8 +335,8 @@ class Onceover
|
|
335
335
|
|
336
336
|
def hiera_config_file
|
337
337
|
# try to find the hiera.iyaml file
|
338
|
-
hiera_config_file = File.expand_path('./hiera.yaml',@spec_dir) if File.exist?(File.expand_path('./hiera.yaml',@spec_dir))
|
339
338
|
hiera_config_file = File.expand_path('./hiera.yaml',@root) if File.exist?(File.expand_path('./hiera.yaml',@root))
|
339
|
+
hiera_config_file = File.expand_path('./hiera.yaml',@spec_dir) if File.exist?(File.expand_path('./hiera.yaml',@spec_dir))
|
340
340
|
hiera_config_file
|
341
341
|
end
|
342
342
|
|
data/onceover.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "onceover"
|
6
|
-
s.version = "3.2.
|
6
|
+
s.version = "3.2.1"
|
7
7
|
s.authors = ["Dylan Ratcliffe"]
|
8
8
|
s.email = ["dylan.ratcliffe@puppet.com"]
|
9
9
|
s.homepage = "https://github.com/dylanratcliffe/onceover"
|
@@ -14,4 +14,8 @@ RSpec.configure do |c|
|
|
14
14
|
c.hiera_config = '<%= environmentpath %>/production/hiera.yaml'
|
15
15
|
c.manifest = '<%= repo.temp_manifest %>'
|
16
16
|
ENV['STRICT_VARIABLES'] = '<%= self.strict_variables %>'
|
17
|
+
<% if ENV['SHOW_PUPPET_OUTPUT'] and ENV['SHOW_PUPPET_OUTPUT'].downcase == 'true' %>
|
18
|
+
Puppet::Util::Log.level = :debug
|
19
|
+
Puppet::Util::Log.newdestination(:console)
|
20
|
+
<% end -%>
|
17
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onceover
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Ratcliffe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -258,7 +258,6 @@ extra_rdoc_files: []
|
|
258
258
|
files:
|
259
259
|
- ".gitignore"
|
260
260
|
- Gemfile
|
261
|
-
- Gemfile.lock
|
262
261
|
- README.md
|
263
262
|
- Rakefile
|
264
263
|
- bin/onceover
|