onceover 3.17.3 → 3.18.0
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 +8 -0
- data/lib/onceover/runner.rb +2 -2
- data/lib/onceover/testconfig.rb +14 -0
- data/onceover.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 994971aad52879b6500defdb15dd34f2959d1ec86112712e3fb9c02f1b25ff27
|
4
|
+
data.tar.gz: 9de0f213683ad7c635f6bde6e233de5c0b7a5a52e9947f8ccf7ae8fdb78b3819
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d078f45a54c3ec3df4a76907979c460825ccf5436be101524640f6e523272196564fb138431e7e96c7c67a3b291640f35f1de237edf952083a1e2e494c95bcf3
|
7
|
+
data.tar.gz: edc3120fab568247708a2810fe01074ee6f00c87bf894fa74cdfa3e5478c8a8a21312a60d7f6862b0c615cb377df71eea7506a84aa997a2529c349f0f2b260e7
|
data/README.md
CHANGED
@@ -231,6 +231,13 @@ It's important to note that in order to reference a group using the *include/exc
|
|
231
231
|
|
232
232
|
One or many tags that tests in this group should be tagged with. This allows you to run only certain tests using the `--tags` command line parameter. **NOTE:** Custom spec tests will always be run as they are not subject to tags
|
233
233
|
|
234
|
+
**include_spec_files** *Default: [**/*]*
|
235
|
+
|
236
|
+
Glob to select additionnal files to be run during `onceover` spec tests.
|
237
|
+
|
238
|
+
Default is to select all files located in the repo spec directory, usually `spec/`.
|
239
|
+
If you have some RSpec tests that depend on a different RSpec configuration than `onceover` or want, for example, to have a different job in your CI to run your own unit tests, you can use this option to select which spec files to run during `onceover` spec tests.
|
240
|
+
|
234
241
|
### factsets
|
235
242
|
|
236
243
|
This gem comes with a few pre-canned factsets. These are listed under the `nodes` sections of `onceover.yaml` when you run `onceover init`. You can also add your own factsets by putting them in:
|
@@ -702,4 +709,5 @@ Cheers to all of those who helped out:
|
|
702
709
|
- @alexjfisher
|
703
710
|
- @smortex
|
704
711
|
- @16c7x
|
712
|
+
- @neomilium
|
705
713
|
|
data/lib/onceover/runner.rb
CHANGED
@@ -24,8 +24,8 @@ class Onceover
|
|
24
24
|
FileUtils.mkdir_p("#{@repo.tempdir}/spec/classes")
|
25
25
|
FileUtils.mkdir_p("#{@repo.tempdir}/spec/acceptance/nodesets")
|
26
26
|
|
27
|
-
# Copy
|
28
|
-
|
27
|
+
# Copy specified spec files over
|
28
|
+
@config.copy_spec_files(@repo)
|
29
29
|
|
30
30
|
# Create the Rakefile so that we can take advantage of the existing tasks
|
31
31
|
@config.write_rakefile(@repo.tempdir, "spec/classes/**/*_spec.rb")
|
data/lib/onceover/testconfig.rb
CHANGED
@@ -50,6 +50,7 @@ class Onceover
|
|
50
50
|
@before_conditions = config['before'] || []
|
51
51
|
@after_conditions = config['after']
|
52
52
|
@strict_variables = opts[:strict_variables] ? 'yes' : 'no'
|
53
|
+
@included_specs = [config['include_spec_files'] || ['**/*']].flatten
|
53
54
|
|
54
55
|
# Set dynamic defaults for format
|
55
56
|
if Array(opts[:format]) == [:defaults]
|
@@ -236,6 +237,19 @@ class Onceover
|
|
236
237
|
)
|
237
238
|
end
|
238
239
|
|
240
|
+
def copy_spec_files(repo)
|
241
|
+
source_files = @included_specs.map { |glob| Dir.glob "#{repo.spec_dir}/#{glob}" }.flatten.uniq
|
242
|
+
source_files.each do |source_file|
|
243
|
+
target_file = File.join(repo.tempdir, 'spec', source_file.sub(/^#{repo.spec_dir}/, ''))
|
244
|
+
if File.directory?(source_file)
|
245
|
+
FileUtils.cp_r source_file, target_file unless File.exists? target_file
|
246
|
+
else
|
247
|
+
FileUtils.mkdir_p File.dirname target_file
|
248
|
+
FileUtils.cp source_file, target_file
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
239
253
|
def create_fixtures_symlinks(repo)
|
240
254
|
logger.debug "Creating fixtures symlinks"
|
241
255
|
FileUtils.rm_rf("#{repo.tempdir}/spec/fixtures/modules")
|
data/onceover.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "onceover"
|
7
|
-
s.version = "3.
|
7
|
+
s.version = "3.18.0"
|
8
8
|
s.authors = ["Dylan Ratcliffe"]
|
9
9
|
s.email = ["dylan.ratcliffe@puppet.com"]
|
10
10
|
s.homepage = "https://github.com/dylanratcliffe/onceover"
|
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.
|
4
|
+
version: 3.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Ratcliffe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backticks
|