Permalink
Browse files

Merge pull request #53 from nanliu/tb/travis

Add travis.ci to module
  • Loading branch information...
bodepd committed Mar 21, 2012
2 parents 06ac21a + 0ea463b commit ce606a952560987f60889431852ecfa29dd0f01d
Showing with 42 additions and 2 deletions.
  1. +22 −0 .travis.yml
  2. +13 −0 Gemfile
  3. +3 −1 manifests/db.pp
  4. +4 −1 manifests/server.pp
View
@@ -0,0 +1,22 @@
+language: ruby
+rvm:
+ - 1.8.7
+ - 1.9.2
+ - ree
+before_script:
+ - "[ '2.6.12' = $PUPPET_VERSION ] && git clone git://github.com/puppetlabs/puppetlabs-create_resources.git spec/fixtures/modules/create_resources || true"
+after_script:
+script: "rake spec"
+branches:
+ only:
+ - tb/travis
+env:
+ - PUPPET_VERSION=2.6.12
+ - PUPPET_VERSION=2.7.6
+ - PUPPET_VERSION=2.7.9
+matrix:
+ exclude:
+ - rvm: 1.9.2
+ env: PUPPET_VERSION=2.6.12
+notifications:
+ email: false
View
13 Gemfile
@@ -0,0 +1,13 @@
+source :rubygems
+
+puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
+
+gem 'puppet', puppetversion
+gem 'hiera', '>= 0.3.0'
+gem 'hiera-puppet', '>= 0.3.0'
+
+group :test do
+ gem 'rake', '>= 0.9.0'
+ gem 'rspec', '>= 2.8.0'
+ gem 'rspec-puppet', '>= 0.1.1'
+end
View
@@ -64,11 +64,13 @@
require => Database_user["${user}@${host}"],
}
+ $refresh = ! $enforce_sql
+
if $sql {
exec{ "${name}-import":
command => "/usr/bin/mysql -u ${user} -p${password} -h ${host} ${name} < ${sql}",
logoutput => true,
- refreshonly => ! $enforce_sql,
+ refreshonly => $refresh,
require => Database_grant["${user}@${host}/${name}"],
subscribe => Database[$name],
}
View
@@ -24,7 +24,10 @@
Class['mysql::server'] -> Class['mysql::config']
- create_resources( 'class', {'mysql::config' => $config_hash} )
+ $config_class = {}
+ $config_class['mysql::config'] = $config_hash
+
+ create_resources( 'class', $config_class )
package { 'mysql-server':
name => $package_name,

0 comments on commit ce606a9

Please sign in to comment.