This repository has been archived by the owner on May 5, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use simplified gemfile/rakefile * Update travis test matrix * Include blacksmith rake tasks
- Loading branch information
Showing
5 changed files
with
12 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
fixtures: | ||
repositories: | ||
stdlib: 'git://github.com/puppetlabs/puppetlabs-stdlib.git' | ||
stdlib: 'http://github.com/puppetlabs/puppetlabs-stdlib.git' | ||
symlinks: | ||
staging: "#{source_dir}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
language: ruby | ||
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" | ||
before_install: | ||
- gem update bundler | ||
- bundle --version | ||
- gem update --system 2.1.11 | ||
- gem --version | ||
rvm: | ||
- 1.8.7 | ||
- 1.9.3 | ||
env: | ||
- PUPPET_GEM_VERSION="~> 3.2.0" | ||
- PUPPET_GEM_VERSION=">= 3.0.0" | ||
branches: | ||
only: | ||
- master | ||
matrix: | ||
exclude: | ||
- rvm: 1.8.7 | ||
env: PUPPET_GEM_VERSION=">= 3.0.0" | ||
fast_finish: true | ||
include: | ||
- rvm: 1.9.3 | ||
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" | ||
- rvm: 1.9.3 | ||
env: PUPPET_GEM_VERSION="~> 3.0" | ||
- rvm: 2.0.0 | ||
env: PUPPET_GEM_VERSION="~> 3.0" | ||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,7 @@ | ||
source "https://rubygems.org" | ||
|
||
group :development, :test do | ||
gem 'rake' | ||
gem 'bodeco_module_helper', :git => 'https://github.com/bodeco/bodeco_module_helper.git' | ||
gem 'rspec', "~> 2.11.0", :require => false | ||
gem 'mocha', "~> 0.10.5", :require => false | ||
gem 'puppetlabs_spec_helper', :require => false | ||
gem 'rspec-puppet', :require => false | ||
gem 'puppet-lint' | ||
end | ||
|
||
facterversion = ENV['GEM_FACTER_VERSION'] | ||
if facterversion | ||
gem 'facter', facterversion | ||
else | ||
gem 'facter', :require => false | ||
end | ||
|
||
ENV['GEM_PUPPET_VERSION'] ||= ENV['PUPPET_GEM_VERSION'] | ||
puppetversion = ENV['GEM_PUPPET_VERSION'] | ||
if puppetversion | ||
gem 'puppet', puppetversion | ||
else | ||
gem 'puppet', :require => false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1 @@ | ||
require 'rubygems' | ||
require 'puppetlabs_spec_helper/rake_tasks' | ||
|
||
def io_popen(command) | ||
IO.popen(command) do |io| | ||
io.each do |line| | ||
print line | ||
yield line if block_given? | ||
end | ||
end | ||
end | ||
|
||
# Customize lint option | ||
task :lint do | ||
PuppetLint.configuration.send("disable_80chars") | ||
PuppetLint.configuration.send("disable_class_parameter_defaults") | ||
end | ||
|
||
desc "Validate manifests, templates, and ruby files in lib." | ||
task :validate do | ||
Dir['manifests/**/*.pp'].each do |manifest| | ||
sh "puppet parser validate --noop #{manifest}" | ||
end | ||
Dir['lib/**/*.rb'].each do |lib_file| | ||
sh "ruby -c #{lib_file}" | ||
end | ||
Dir['templates/**/*.erb'].each do |template| | ||
sh "erb -P -x -T '-' #{template} | ruby -c" | ||
end | ||
end | ||
|
||
# Initialize vagrant instance for testing | ||
desc "Powers on Vagrant VMs with specific manifests" | ||
task :vagrant, :manifest do |t, args| | ||
Rake::Task["spec_prep"].execute | ||
|
||
prefix = "VAGRANT_MANIFEST='#{args[:manifest]||'init.pp'}'" | ||
|
||
puts args[:manifest] | ||
provision = false | ||
io_popen("export #{prefix}; vagrant up --provider=vmware_fusion") do |line| | ||
provision = true if line =~ /Machine is already running./ | ||
end | ||
io_popen("export #{prefix}; vagrant provision") if provision | ||
end | ||
|
||
# Cleanup vagrant environment | ||
task :vagrant_clean do | ||
`vagrant destroy -f` | ||
Rake::Task["spec_clean"].execute | ||
end | ||
require 'bodeco_module_helper/rake_tasks' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters