Skip to content

Commit 3e681ca

Browse files
committed
(FM-4049) Update to current msync configs [2c99161]
1 parent 62d26fe commit 3e681ca

9 files changed

+34
-70
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ spec/fixtures/
55
.vagrant/
66
.bundle/
77
coverage/
8+
log/
89
.idea/
910
*.iml

Diff for: .rspec

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--color
2+
--format documentation

Diff for: .sync.yml

-9
This file was deleted.

Diff for: .travis.yml

+7-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
---
22
sudo: false
33
language: ruby
4+
cache: bundler
45
bundler_args: --without system_tests
5-
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
6+
script: "bundle exec rake validate lint spec"
67
matrix:
78
fast_finish: true
89
include:
9-
- rvm: 1.8.7
10+
- rvm: 2.1.6
11+
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
12+
- rvm: 2.1.5
13+
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
14+
- rvm: 2.1.5
1015
env: PUPPET_GEM_VERSION="~> 3.0"
1116
- rvm: 1.9.3
1217
env: PUPPET_GEM_VERSION="~> 3.0"
13-
- rvm: 2.1.5
14-
env: PUPPET_GEM_VERSION="~> 3.0"
15-
- rvm: 2.1.5
16-
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
17-
- rvm: 2.1.6
18-
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
19-
- rvm: 1.8.7
20-
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
21-
- rvm: 1.8.7
22-
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
2318
notifications:
2419
email: false

Diff for: CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ If you already have those gems installed, make sure they are up-to-date:
159159
With all dependencies in place and up-to-date we can now run the tests:
160160

161161
```shell
162-
% rake spec
162+
% bundle exec rake spec
163163
```
164164

165165
This will execute all the [rspec tests](http://rspec-puppet.com/) tests
@@ -178,8 +178,8 @@ installed on your system.
178178
You can run them by issuing the following command
179179

180180
```shell
181-
% rake spec_clean
182-
% rspec spec/acceptance
181+
% bundle exec rake spec_clean
182+
% bundle exec rspec spec/acceptance
183183
```
184184

185185
This will now download a pre-fabricated image configured in the [default node-set](./spec/acceptance/nodesets/default.yml),

Diff for: Gemfile

+11-17
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source ENV['GEM_SOURCE'] || "https://rubygems.org"
22

33
def location_for(place, fake_version = nil)
4-
if place =~ /^(git:[^#]*)#(.*)/
4+
if place =~ /^(git[:@][^#]*)#(.*)/
55
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
66
elsif place =~ /^file:\/\/(.*)/
77
['>= 0', { :path => File.expand_path($1), :require => false }]
@@ -11,20 +11,16 @@ def location_for(place, fake_version = nil)
1111
end
1212

1313
group :development, :unit_tests do
14-
# rspec-core 3.1.7 is the last version to support ruby 1.8
15-
if RUBY_VERSION < '1.9'
16-
gem 'rspec-core', '3.1.7'
17-
else
18-
# newer version required to avoid BKR-537
19-
gem 'rspec-core', '>= 3.4'
20-
end
21-
gem 'puppetlabs_spec_helper', :require => false
22-
gem 'simplecov', :require => false
23-
gem 'puppet_facts', :require => false
24-
gem 'json', :require => false
14+
gem 'json', :require => false
15+
gem 'metadata-json-lint', :require => false
16+
gem 'puppet_facts', :require => false
17+
gem 'puppet-blacksmith', :require => false
18+
gem 'puppetlabs_spec_helper', :require => false
19+
gem 'rspec-puppet', '>= 2.3.2', :require => false
20+
gem 'simplecov', :require => false
2521
end
26-
2722
group :system_tests do
23+
gem 'beaker-puppet_install_helper', :require => false
2824
if beaker_version = ENV['BEAKER_VERSION']
2925
gem 'beaker', *location_for(beaker_version)
3026
end
@@ -33,12 +29,10 @@ group :system_tests do
3329
else
3430
gem 'beaker-rspec', :require => false
3531
end
36-
gem 'serverspec', :require => false
37-
gem 'beaker-puppet_install_helper', :require => false
32+
gem 'master_manipulator', :require => false
33+
gem 'serverspec', :require => false
3834
end
3935

40-
41-
4236
if facterversion = ENV['FACTER_GEM_VERSION']
4337
gem 'facter', facterversion, :require => false
4438
else

Diff for: Rakefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
require 'puppetlabs_spec_helper/rake_tasks'
1+
require 'puppet_blacksmith/rake_tasks'
22
require 'puppet-lint/tasks/puppet-lint'
3+
require 'puppetlabs_spec_helper/rake_tasks'
34

45
PuppetLint.configuration.fail_on_warnings = true
56
PuppetLint.configuration.send('relative')

Diff for: spec/spec_helper.rb

+5-28
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,7 @@
1-
dir = File.expand_path(File.dirname(__FILE__))
2-
$LOAD_PATH.unshift File.join(dir, 'lib')
1+
require 'puppetlabs_spec_helper/module_spec_helper'
32

4-
# Don't want puppet getting the command line arguments for rake or autotest
5-
ARGV.clear
6-
7-
require 'rubygems'
8-
require 'bundler/setup'
9-
require 'rspec-puppet'
10-
11-
Bundler.require :default, :test
12-
13-
require 'pathname'
14-
require 'tmpdir'
15-
16-
Pathname.glob("#{dir}/shared_behaviours/**/*.rb") do |behaviour|
17-
require behaviour.relative_path_from(Pathname.new(dir))
18-
end
19-
20-
fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
21-
22-
RSpec.configure do |config|
23-
config.tty = true
24-
config.mock_with :rspec do |c|
25-
c.syntax = :expect
26-
end
27-
config.module_path = File.join(fixture_path, 'modules')
28-
config.manifest_dir = File.join(fixture_path, 'manifests')
29-
config.environmentpath = File.expand_path(File.join(Dir.pwd, 'spec'))
3+
# put local configuration and setup into spec_helper_local
4+
begin
5+
require 'spec_helper_local'
6+
rescue LoadError
307
end

Diff for: spec/spec_helper_local.rb

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
RSpec.configure do |config|
2+
config.mock_with :rspec
3+
end

0 commit comments

Comments
 (0)