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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7cc4b6a12f15647aaa3d9c8e6fd3b9c861755a33
4
- data.tar.gz: e849504c04131575ac616c3bb8a12b589784160f
3
+ metadata.gz: 27ba24b25b165dc0b98daceafdc049b1e5267584
4
+ data.tar.gz: b6cb2838c8b4e6f835e87707bae6c19565b6bec3
5
5
  SHA512:
6
- metadata.gz: 51a531b68836433a1d1adcf95301c84c5c19e02af589ea8cf88a49d76f3618cef142fa6ccd1e7347e98cdc6d70873b73f2afa7903dbf6522acddfc395fab54a2
7
- data.tar.gz: d096c470967ad83e6e8158e72f6cfa17b4b070917d81287f5f9ff31cca2355edb63a8c50f8f96d1e4bc9c02b25684ac4bdfa6ef453b32ba107e4044e55373728
6
+ metadata.gz: 7409c2c959c90477265cbc45f5c26cf437a022f2e82ccefb4fb365977892a9dad48b8d856241a347e51fc72f715550fb22646d62d876dbaaf3d505a55a82f3c1
7
+ data.tar.gz: d52e076c44f1c4a4e10d4c550ecf15fc65396613fc24c75b45ad1b73f836e51a978fa5c38eab5b34952b122c360ca31c0e3d1661db0772e15d5d2c8bce9377dc
@@ -1,8 +1,8 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- git (1.2.9.1)
5
- rake (10.5.0)
4
+ git (1.3.0)
5
+ rake (12.0.0)
6
6
  rubygems-tasks (0.2.4)
7
7
 
8
8
  PLATFORMS
@@ -14,4 +14,4 @@ DEPENDENCIES
14
14
  rubygems-tasks
15
15
 
16
16
  BUNDLED WITH
17
- 1.10.6
17
+ 1.13.7
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 'controlrepo'
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 'controlrepo'
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 'controlrepo/rake_tasks'
495
+ require 'onceover/rake_tasks'
496
496
  ```
497
497
 
498
498
  The tasks are as follows:
@@ -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
- modules = puppetfile.load
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)
@@ -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
@@ -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('Rakefile.erb',binding))
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.10"
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"
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'onceover'
4
+ gem 'beaker', '~> 2.0'
5
+
@@ -1,6 +1 @@
1
- require 'puppetlabs_spec_helper/rake_tasks'
2
-
3
- desc "Run acceptance tests"
4
- RSpec::Core::RakeTask.new(:acceptance) do |t|
5
- t.pattern = 'spec/acceptance'
6
- end
1
+ require 'onceover/rake_tasks'
@@ -0,0 +1,6 @@
1
+ require 'puppetlabs_spec_helper/rake_tasks'
2
+
3
+ desc "Run acceptance tests"
4
+ RSpec::Core::RakeTask.new(:acceptance) do |t|
5
+ t.pattern = 'spec/acceptance'
6
+ 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.0.10
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: 2016-12-14 00:00:00.000000000 Z
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