Permalink
Browse files

(maint) Add Travis CI support to active branches

Without this patch all active branches do not have proper Travis configuration
files.  This is a problem because Travis will exercise any branch pushed to the
puppetlabs organization repository on Github.  The default behavior is to email
notifications which is undesirable.

To address this problem Travis configuration settings are added to an active
branch.

Active branches are those that have recent activity when compared against the
following command:

    for k in `git branch -r |grep origin/|perl -pe s/^..//`
    do
      echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k|head -n 1`\\t$k;
    done | sort -r | grep origin

Which should produce output like:

    2013-01-06 02:10:28 -0800 14 hours ago  origin/master
    2013-01-02 16:59:15 -0800 4 days ago    origin/3.0.x
    2012-12-18 10:36:18 -0800 3 weeks ago   origin/2.7.x
    2012-07-09 15:34:04 -0700 6 months ago  origin/2.6.x
    2011-11-03 15:02:03 -0700 1 year, 2 months ago  origin/0.24.x
    2011-10-21 23:15:37 -0700 1 year, 3 months ago  origin/0.25.x
  • Loading branch information...
1 parent 08e45ed commit 0350afd5c64e176e05df15cc408facd93748ee94 @jeffmccune jeffmccune committed Jan 7, 2013
Showing with 46 additions and 51 deletions.
  1. +5 −0 .gitignore
  2. +11 −0 .travis.yml
  3. +22 −6 Gemfile
  4. +0 −44 Gemfile.lock
  5. +8 −1 puppet.gemspec
View
5 .gitignore
@@ -6,3 +6,8 @@ tags
# Now that there is a gemfile, RVM ignores rvmrc in parent directories, so a local one is required
# to work around that. Which we don't want committed, so we can ignore it here.
/.rvmrc
+.bundle/
+ext/packaging/
+pkg/
+vendor/
+Gemfile.lock
View
11 .travis.yml
@@ -0,0 +1,11 @@
+language: ruby
+bundler_args: --without development
+script: "bundle exec rake spec SPEC_OPTS='--color --format documentation'"
+notifications:
+ email: false
+rvm:
+ - 1.8.7
+ - 1.9.3
+matrix:
+ allow_failures:
+ - rvm: 1.9.3
View
28 Gemfile
@@ -1,17 +1,33 @@
source :rubygems
-gemspec
+def location_for(place)
+ if place =~ /^(git:[^#]*)#(.*)/
+ [{ :git => $1, :branch => $2, :require => false }]
+ elsif place =~ /^file:\/\/(.*)/
+ ['>= 0', { :path => File.expand_path($1), :require => false }]
+ else
+ [place, { :require => false }]
+ end
+end
group(:development, :test) do
- gem "facter", "~> 1.6.4", :require => false
- gem "rack", "~> 1.4.1", :require => false
- gem "rspec", "~> 2.10.0", :require => false
+ gem "puppet", *location_for('file://.')
+ 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", :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
- # See http://jenkins.puppetlabs.com/ for current Gem listings for the Windows
- # CI Jobs.
gem "sys-admin", "~> 1.5.6", :require => false
gem "win32-api", "~> 1.4.8", :require => false
gem "win32-dir", "~> 0.3.7", :require => false
View
44 Gemfile.lock
@@ -1,44 +0,0 @@
-PATH
- remote: .
- specs:
- puppet (2.7.19)
- facter (~> 1.5)
-
-GEM
- remote: http://rubygems.org/
- specs:
- diff-lcs (1.1.3)
- facter (1.6.11)
- metaclass (0.0.1)
- mocha (0.10.5)
- metaclass (~> 0.0.1)
- rack (1.4.1)
- rspec (2.10.0)
- rspec-core (~> 2.10.0)
- rspec-expectations (~> 2.10.0)
- rspec-mocks (~> 2.10.0)
- rspec-core (2.10.1)
- rspec-expectations (2.10.0)
- diff-lcs (~> 1.1.3)
- rspec-mocks (2.10.1)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- facter (~> 1.6.4)
- mocha (~> 0.10.5)
- puppet!
- rack (~> 1.4.1)
- rspec (~> 2.10.0)
- sys-admin (~> 1.5.6)
- win32-api (~> 1.4.8)
- win32-dir (~> 0.3.7)
- win32-eventlog (~> 0.5.3)
- win32-process (~> 0.6.5)
- win32-security (~> 0.1.4)
- win32-service (~> 0.7.2)
- win32-taskscheduler (~> 0.2.2)
- win32console (~> 1.3.2)
- windows-api (~> 0.4.1)
- windows-pr (~> 1.2.1)
View
9 puppet.gemspec
@@ -1,8 +1,15 @@
# -*- encoding: utf-8 -*-
+require File.expand_path("../lib/puppet/version", __FILE__)
+
Gem::Specification.new do |s|
s.name = "puppet"
- s.version = "2.7.19"
+ version = Puppet.version
+ if mdata = version.match(/(\d+\.\d+\.\d+)/)
+ s.version = mdata[1]
+ else
+ s.version = version
+ end
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["Puppet Labs"]

0 comments on commit 0350afd

Please sign in to comment.