onceover 3.0.10 → 3.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +3 -3
- data/lib/onceover/controlrepo.rb +4 -1
- data/lib/onceover/rake_tasks.rb +4 -0
- data/lib/onceover/testconfig.rb +1 -1
- data/{controlrepo.gemspec → onceover.gemspec} +1 -1
- data/templates/Gemfile.erb +5 -0
- data/templates/Rakefile.erb +1 -6
- data/templates/testconfig_Rakefile.erb +6 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27ba24b25b165dc0b98daceafdc049b1e5267584
|
4
|
+
data.tar.gz: b6cb2838c8b4e6f835e87707bae6c19565b6bec3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7409c2c959c90477265cbc45f5c26cf437a022f2e82ccefb4fb365977892a9dad48b8d856241a347e51fc72f715550fb22646d62d876dbaaf3d505a55a82f3c1
|
7
|
+
data.tar.gz: d52e076c44f1c4a4e10d4c550ecf15fc65396613fc24c75b45ad1b73f836e51a978fa5c38eab5b34952b122c360ca31c0e3d1661db0772e15d5d2c8bce9377dc
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -436,7 +436,7 @@ The same can also be done with profiles just by using the profiles method instea
|
|
436
436
|
|
437
437
|
```ruby
|
438
438
|
require 'spec_helper'
|
439
|
-
require '
|
439
|
+
require 'onceover'
|
440
440
|
Onceover::Controlrepo.profiles.each do |profile|
|
441
441
|
describe profile do
|
442
442
|
Onceover::Controlrepo.facts.each do |facts|
|
@@ -461,7 +461,7 @@ Just pass a hash to the `facts` method and it will return only the fact sets wit
|
|
461
461
|
|
462
462
|
```ruby
|
463
463
|
require 'spec_helper'
|
464
|
-
require '
|
464
|
+
require 'onceover'
|
465
465
|
|
466
466
|
describe 'profile::windows_appserver' do
|
467
467
|
Onceover::Controlrepo.facts({
|
@@ -492,7 +492,7 @@ Note that you will need to call the `roles` and `profiles` methods on the object
|
|
492
492
|
I have included a couple of little rake tasks to help get you started with testing your control repos. Set them up by adding this to your `Rakefile`
|
493
493
|
|
494
494
|
```ruby
|
495
|
-
require '
|
495
|
+
require 'onceover/rake_tasks'
|
496
496
|
```
|
497
497
|
|
498
498
|
The tasks are as follows:
|
data/lib/onceover/controlrepo.rb
CHANGED
@@ -246,7 +246,8 @@ class Onceover
|
|
246
246
|
def fixtures
|
247
247
|
# Load up the Puppetfile using R10k
|
248
248
|
puppetfile = R10K::Puppetfile.new(@root)
|
249
|
-
|
249
|
+
fail 'Could not load Puppetfile' unless puppetfile.load
|
250
|
+
modules = puppetfile.modules
|
250
251
|
|
251
252
|
# Iterate over everything and seperate it out for the sake of readability
|
252
253
|
symlinks = []
|
@@ -383,6 +384,8 @@ class Onceover
|
|
383
384
|
Onceover::Controlrepo.init_write_file(generate_nodesets(repo),repo.nodeset_file)
|
384
385
|
Onceover::Controlrepo.init_write_file(Onceover::Controlrepo.evaluate_template('pre_conditions_README.md.erb',binding),File.expand_path('./pre_conditions/README.md',repo.spec_dir))
|
385
386
|
Onceover::Controlrepo.init_write_file(Onceover::Controlrepo.evaluate_template('factsets_README.md.erb',binding),File.expand_path('./factsets/README.md',repo.spec_dir))
|
387
|
+
Onceover::Controlrepo.init_write_file(Onceover::Controlrepo.evaluate_template('Rakefile.erb',binding),File.expand_path('./Rakefile',repo.root))
|
388
|
+
Onceover::Controlrepo.init_write_file(Onceover::Controlrepo.evaluate_template('Gemfile.erb',binding),File.expand_path('./Gemfile',repo.root))
|
386
389
|
|
387
390
|
# Add .onceover to Gitignore
|
388
391
|
gitignore_path = File.expand_path('.gitignore',repo.root)
|
data/lib/onceover/rake_tasks.rb
CHANGED
@@ -4,12 +4,16 @@ require 'pathname'
|
|
4
4
|
@repo = nil
|
5
5
|
@config = nil
|
6
6
|
|
7
|
+
|
8
|
+
desc 'Writes a `fixtures.yml` file based on the Puppetfile'
|
7
9
|
task :generate_fixtures do
|
8
10
|
repo = Onceover::Controlrepo.new
|
9
11
|
raise ".fixtures.yml already exits, we won't overwrite because we are scared" if File.exists?(File.expand_path('./.fixtures.yml',repo.root))
|
10
12
|
File.write(File.expand_path('./.fixtures.yml',repo.root),repo.fixtures)
|
11
13
|
end
|
12
14
|
|
15
|
+
|
16
|
+
desc "Modifies your `hiera.yaml` to point at the hieradata relative to its position."
|
13
17
|
task :hiera_setup do
|
14
18
|
repo = Onceover::Controlrepo.new
|
15
19
|
current_config = repo.hiera_config
|
data/lib/onceover/testconfig.rb
CHANGED
@@ -209,7 +209,7 @@ class Onceover
|
|
209
209
|
end
|
210
210
|
|
211
211
|
def write_rakefile(location, pattern)
|
212
|
-
File.write("#{location}/Rakefile",Onceover::Controlrepo.evaluate_template('
|
212
|
+
File.write("#{location}/Rakefile",Onceover::Controlrepo.evaluate_template('testconfig_Rakefile.erb',binding))
|
213
213
|
end
|
214
214
|
|
215
215
|
def write_spec_helper(location, repo)
|
@@ -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.0.
|
6
|
+
s.version = "3.0.11"
|
7
7
|
s.authors = ["Dylan Ratcliffe"]
|
8
8
|
s.email = ["dylan.ratcliffe@puppet.com"]
|
9
9
|
s.homepage = "https://github.com/dylanratcliffe/onceover"
|
data/templates/Rakefile.erb
CHANGED
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.0.
|
4
|
+
version: 3.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Ratcliffe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -276,7 +276,6 @@ files:
|
|
276
276
|
- README.md
|
277
277
|
- Rakefile
|
278
278
|
- bin/onceover
|
279
|
-
- controlrepo.gemspec
|
280
279
|
- factsets/CentOS-5.11-32.json
|
281
280
|
- factsets/CentOS-5.11-64.json
|
282
281
|
- factsets/CentOS-6.6-32.json
|
@@ -310,7 +309,9 @@ files:
|
|
310
309
|
- lib/onceover/runner.rb
|
311
310
|
- lib/onceover/test.rb
|
312
311
|
- lib/onceover/testconfig.rb
|
312
|
+
- onceover.gemspec
|
313
313
|
- templates/.fixtures.yml.erb
|
314
|
+
- templates/Gemfile.erb
|
314
315
|
- templates/Rakefile.erb
|
315
316
|
- templates/acceptance_test_spec.rb.erb
|
316
317
|
- templates/controlrepo.yaml.erb
|
@@ -320,6 +321,7 @@ files:
|
|
320
321
|
- templates/spec_helper.rb.erb
|
321
322
|
- templates/spec_helper_acceptance.rb.erb
|
322
323
|
- templates/test_spec.rb.erb
|
324
|
+
- templates/testconfig_Rakefile.erb
|
323
325
|
homepage: https://github.com/dylanratcliffe/onceover
|
324
326
|
licenses:
|
325
327
|
- Apache-2.0
|