Skip to content
This repository was archived by the owner on May 15, 2019. It is now read-only.

Commit 794bfe3

Browse files
committed
Merge pull request voxpupuli#174 from petems/fix_gemfile_and_travis
Fix gemfile and travis
2 parents b1e3f2e + 4fd57de commit 794bfe3

3 files changed

Lines changed: 56 additions & 24 deletions

File tree

.travis.yml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1+
---
12
language: ruby
2-
rvm:
3-
- 1.8.7
4-
- 1.9.3
5-
script:
6-
- "rake spec SPEC_OPTS='--format documentation'"
7-
env:
8-
- PUPPET_VERSION="~> 2.6.0"
9-
- PUPPET_VERSION="~> 2.7.0"
10-
- PUPPET_VERSION="~> 3.1.0"
11-
- PUPPET_VERSION="~> 3.6.0"
3+
bundler_args: --without system_tests
4+
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
125
matrix:
13-
exclude:
14-
- rvm: 1.9.3
15-
env: PUPPET_VERSION="~> 2.6.0"
16-
gemfile: .gemfile
17-
18-
gemfile: .gemfile
19-
notifications:
20-
email: false
6+
fast_finish: true
7+
include:
8+
- rvm: 1.8.7
9+
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
10+
- rvm: 1.8.7
11+
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
12+
- rvm: 1.9.3
13+
env: PUPPET_GEM_VERSION="~> 3.0"
14+
- rvm: 2.0.0
15+
env: PUPPET_GEM_VERSION="~> 3.0"

Gemfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ group :development, :test do
44
gem 'rake', :require => false
55
gem 'rspec-puppet', :require => false
66
gem 'puppetlabs_spec_helper', :require => false
7-
gem 'serverspec', :require => false
87
gem 'puppet-lint', :require => false
9-
gem 'beaker', :require => false
10-
gem 'beaker-rspec', :require => false
118
gem 'pry', :require => false
129
gem 'simplecov', :require => false
1310
end
@@ -24,4 +21,10 @@ else
2421
gem 'puppet', :require => false
2522
end
2623

24+
group :system_tests do
25+
gem 'serverspec', :require => false
26+
gem 'beaker', :require => false
27+
gem 'beaker-rspec', :require => false
28+
end
29+
2730
# vim:ft=ruby

Rakefile

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
1-
require 'rubygems'
21
require 'puppetlabs_spec_helper/rake_tasks'
3-
require 'puppet-lint'
4-
PuppetLint.configuration.send("disable_80chars")
2+
require 'puppet-lint/tasks/puppet-lint'
3+
require 'puppet-syntax/tasks/puppet-syntax'
4+
5+
# These two gems aren't always present, for instance
6+
# on Travis with --without development
7+
begin
8+
require 'puppet_blacksmith/rake_tasks'
9+
rescue LoadError
10+
end
11+
12+
PuppetLint.configuration.fail_on_warnings
13+
PuppetLint.configuration.send('relative')
14+
PuppetLint.configuration.send('disable_80chars')
15+
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
516
PuppetLint.configuration.send('disable_class_parameter_defaults')
17+
PuppetLint.configuration.send('disable_documentation')
18+
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
19+
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
20+
21+
exclude_paths = [
22+
"pkg/**/*",
23+
"vendor/**/*",
24+
"spec/**/*",
25+
]
26+
PuppetLint.configuration.ignore_paths = exclude_paths
27+
PuppetSyntax.exclude_paths = exclude_paths
28+
29+
desc "Run acceptance tests"
30+
RSpec::Core::RakeTask.new(:acceptance) do |t|
31+
t.pattern = 'spec/acceptance'
32+
end
33+
34+
desc "Run syntax, lint, and spec tests."
35+
task :test => [
36+
:syntax,
37+
:lint,
38+
:spec,
39+
]

0 commit comments

Comments
 (0)