onceover 3.2.4 → 3.2.5

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: b85817f58412747b58719613cd538edaa39c30c1
4
- data.tar.gz: b15cf0162376e3f8f43498550932b8f2f3817aeb
3
+ metadata.gz: 130a240137b4bcb6a3f12944ec67d87b5df340ce
4
+ data.tar.gz: bb79bd6c41981ee5edb7aa0de06f8e54e8636ce3
5
5
  SHA512:
6
- metadata.gz: 8d23af39ed3d2ffc1a56140b4d44b119fe3c587ba54be8e5375dd15fbafcb75e0f77d5db59fe5812b0b158ffc53206d9ed329f953abe5ba1e73c2f7f971e3113
7
- data.tar.gz: 93aebc3e5fcf29ddf249f9e1841bdd803fe1c8b723811391223f10ee757bb1a2ebc051d38136be5d1519038a90772db8bb29dc449a9b71d9e71618264dcdf404
6
+ metadata.gz: a1a9a99167c3c55849ce9864271b85066b1698239e238113c8e782393e06e1b9f8b23077ba5a828ccfbf4572c9b04097e2d013b48f3624cd99dce1a838b2b96b
7
+ data.tar.gz: 7fb28d8a49203486459fdd0599300c8ca88873d4d99aa5306e7c680030f291dbbbc7e01d27f9ef44732c83630849a633c392bfdccce5af0c37a2d5034abae1b7
data/.gitmodules ADDED
@@ -0,0 +1,4 @@
1
+ [submodule "spec/fixtures/puppet_controlrepo"]
2
+ path = spec/fixtures/puppet_controlrepo
3
+ url = https://github.com/dylanratcliffe/puppet_controlrepo.git
4
+ branch = production
data/.travis.yml CHANGED
@@ -2,6 +2,8 @@ language: ruby
2
2
 
3
3
  cache:
4
4
  bundler: true
5
+ directories:
6
+ - 'spec/fixtures/puppet_controlrepo/.onceover' # Onceover cache
5
7
 
6
8
  script: bundler exec rake test
7
9
  bundler_args: --path vendor/bundle
data/Rakefile CHANGED
@@ -2,7 +2,9 @@ require 'rubygems/tasks'
2
2
  require 'rspec/core/rake_task'
3
3
  Gem::Tasks.new
4
4
 
5
- RSpec::Core::RakeTask.new(:spec)
5
+ RSpec::Core::RakeTask.new(:spec) do |t|
6
+ t.rspec_opts = '--pattern spec/\*/\*_spec.rb'
7
+ end
6
8
 
7
9
  task default: :test
8
10
 
@@ -517,7 +517,6 @@ class Onceover
517
517
  logger.debug "Evaluating template #{template_name}"
518
518
  template_dir = File.expand_path('../../templates',File.dirname(__FILE__))
519
519
  template = File.read(File.expand_path("./#{template_name}",template_dir))
520
- logger.debug "Binding variables #{bind.local_variables}"
521
520
  ERB.new(template, nil, '-').result(bind)
522
521
  end
523
522
 
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.4"
6
+ s.version = "3.2.5"
7
7
  s.authors = ["Dylan Ratcliffe"]
8
8
  s.email = ["dylan.ratcliffe@puppet.com"]
9
9
  s.homepage = "https://github.com/dylanratcliffe/onceover"
@@ -2,17 +2,50 @@ require 'spec_helper'
2
2
  require 'onceover/controlrepo'
3
3
 
4
4
  describe "Onceover::Controlrepo" do
5
- before do
6
- @repo = Onceover::Controlrepo.new(
7
- {
8
- path:'spec/fixtures/controlrepo'
9
- }
10
- )
11
- end
5
+ context "in a barebones controlrepo" do
6
+ before do
7
+ @repo = Onceover::Controlrepo.new(
8
+ {
9
+ path:'spec/fixtures/controlrepo_basic'
10
+ }
11
+ )
12
+ end
12
13
 
13
- context ".hiera_config_file_relative_path" do
14
14
  context "without hiera.yaml" do
15
15
  it { expect(@repo.hiera_config_file_relative_path).to be_nil }
16
16
  end
17
17
  end
18
+
19
+ context "in a complex repo" do
20
+ before do
21
+ @repo = Onceover::Controlrepo.new(
22
+ {
23
+ path:'spec/fixtures/puppet_controlrepo'
24
+ }
25
+ )
26
+ end
27
+
28
+ context "when initialising the object" do
29
+ it { expect(@repo).not_to be_nil }
30
+ end
31
+
32
+ context "when running the tests" do
33
+ it "doesn't die horribly" do
34
+ expect{
35
+ Dir.chdir('spec/fixtures/puppet_controlrepo') do
36
+ require 'onceover/controlrepo'
37
+ require 'onceover/cli'
38
+ require 'onceover/runner'
39
+ require 'onceover/testconfig'
40
+ require 'onceover/logger'
41
+
42
+ repo = Onceover::Controlrepo.new({})
43
+ runner = Onceover::Runner.new(repo,Onceover::TestConfig.new(repo.onceover_yaml, {}), :spec)
44
+ runner.prepare!
45
+ runner.run_spec!
46
+ end
47
+ }.not_to raise_error
48
+ end
49
+ end
50
+ end
18
51
  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
4
+ version: 3.2.5
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-08-28 00:00:00.000000000 Z
11
+ date: 2017-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -285,6 +285,7 @@ extensions: []
285
285
  extra_rdoc_files: []
286
286
  files:
287
287
  - ".gitignore"
288
+ - ".gitmodules"
288
289
  - ".rubocop.yml"
289
290
  - ".travis.yml"
290
291
  - Gemfile
@@ -330,7 +331,7 @@ files:
330
331
  - lib/onceover/test.rb
331
332
  - lib/onceover/testconfig.rb
332
333
  - onceover.gemspec
333
- - spec/fixtures/controlrepo/environment.conf
334
+ - spec/fixtures/controlrepo_basic/environment.conf
334
335
  - spec/onceover/controlrepo_spec.rb
335
336
  - spec/spec_helper.rb
336
337
  - templates/.fixtures.yml.erb