Merge pull request #1373 from jeffmccune/feature/master/travis_ci

(maint) Add Travis CI Support
This commit is contained in:
Jeff McCune 2013-01-06 02:10:28 -08:00
Родитель 2c220ca204 625b85f196
Коммит 17c2d6bb36
6 изменённых файлов: 38 добавлений и 11 удалений

2
.gitignore поставляемый
Просмотреть файл

@ -12,3 +12,5 @@ doc
# to work around that. Which we don't want committed, so we can ignore it here.
/.rvmrc
Gemfile.lock
vendor/
.bundle/

12
.travis.yml Normal file
Просмотреть файл

@ -0,0 +1,12 @@
language: ruby
bundler_args: --without development
script: "bundle exec rake spec SPEC_OPTS='--color --format documentation'"
notifications:
email: false
rvm:
- 1.9.3
- 1.8.7
- ruby-head
matrix:
allow_failures:
- rvm: ruby-head

22
Gemfile
Просмотреть файл

@ -1,13 +1,20 @@
source :rubygems
# This is a fake version just to make bundler happy during development
FAKE_VERSION = '9999.0.0'
puppet_version_lib = File.expand_path("../lib/puppet/version", __FILE__)
require puppet_version_lib
def location_for(place)
if place =~ /^(git:[^#]*)#(.*)/
[{ :git => $1, :branch => $2, :require => false }]
elsif place =~ /^file:\/\/(.*)/
[FAKE_VERSION, { :path => File.expand_path($1), :require => false }]
path = $1
puppet_version = Puppet.version
if match_data = puppet_version.match(/(\d+\.\d+\.\d+)/)
gem_puppet_version = match_data[1]
else
gem_puppet_version = puppet_version
end
[gem_puppet_version, { :path => File.expand_path(path), :require => false }]
else
[place, { :require => false }]
end
@ -18,9 +25,16 @@ group(:development, :test) do
gem "facter", *location_for(ENV['FACTER_LOCATION'] || '~> 1.6')
gem "hiera", *location_for(ENV['HIERA_LOCATION'] || '~> 1.0')
gem "rack", "~> 1.4", :require => false
gem "rake", "~> 0.9.2", :require => false
gem "rake", :require => false
gem "rspec", "~> 2.11.0", :require => false
gem "mocha", "~> 0.10.5", :require => false
gem "activerecord", *location_for('~> 3.0.7')
gem "couchrest", *location_for('~> 1.0')
gem "net-ssh", *location_for('~> 2.1')
gem "puppetlabs_spec_helper"
gem "sqlite3"
gem "stomp"
gem "tzinfo"
end
platforms :mswin, :mingw do

Просмотреть файл

@ -1,6 +1,8 @@
Puppet
======
[![Build Status](https://travis-ci.org/puppetlabs/puppet.png?branch=master)](https://travis-ci.org/puppetlabs/puppet)
Puppet, an automated administrative engine for your Linux and Unix systems, performs
administrative tasks (such as adding users, installing packages, and updating server
configurations) based on a centralized specification.

0
bin/extlookup2hiera Normal file → Executable file
Просмотреть файл

Просмотреть файл

@ -291,11 +291,6 @@ describe Puppet::Network::AuthStore::Declaration do
end unless ip =~ /:.*\./ # Hybrid IPs aren't supported by ruby's ipaddr
}
# These IP addresses are affected by Ruby bug https://bugs.ruby-lang.org/issues/7477
# As a result, we exclude the examples on specific versions of Ruby that
# improperly handle these addresses.
ruby_version = "#{RUBY_VERSION}-p#{RbConfig::CONFIG['PATCHLEVEL']}"
ruby_bug_7477 = ("1.9.3-p327" == ruby_version)
[
"::2:3:4:5:6:7:8",
].each { |ip|
@ -304,12 +299,14 @@ describe Puppet::Network::AuthStore::Declaration do
Puppet::Network::AuthStore::Declaration.new(:allow_ip,ip)
end
issue_7477 = !(IPAddr.new(ip) rescue false)
it "should match the specified IP" do
pending "resolution of ruby issue [7477](http://goo.gl/Bb1LU)", :if => ruby_bug_7477
pending "resolution of ruby issue [7477](http://goo.gl/Bb1LU)", :if => issue_7477
declaration.should be_match('www.testsite.org',ip)
end
it "should not match other IPs" do
pending "resolution of ruby issue [7477](http://goo.gl/Bb1LU)", :if => ruby_bug_7477
pending "resolution of ruby issue [7477](http://goo.gl/Bb1LU)", :if => issue_7477
declaration.should_not be_match('www.testsite.org','200.101.99.98')
end
end