diff --git a/.travis.yml b/.travis.yml index bb325f3f9..d8587bf5d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,8 @@ gemfile: - gemfiles/Gemfile.rails3.2 - gemfiles/Gemfile.rails4.1 - gemfiles/Gemfile.rails5.0 +before_install: + - which bundle >/dev/null 2>&1 || gem install bundler matrix: exclude: - rvm: 1.9.3 diff --git a/Gemfile b/Gemfile index 128b94fda..b52115ad5 100644 --- a/Gemfile +++ b/Gemfile @@ -31,14 +31,14 @@ group :test do gem 'webmock' platforms :ruby do - gem 'pg' + gem 'pg', '~> 0.11' gem 'mysql2', '~> 0.3.11' end platforms :jruby do gem 'jdbc-mysql' gem 'jdbc-sqlite3' - gem 'activerecord-jdbcpostgresql-adapter' + gem 'activerecord-jdbcpostgresql-adapter', '~> 1.3.0' end end diff --git a/Rakefile b/Rakefile index c7d106326..83de4cdd5 100644 --- a/Rakefile +++ b/Rakefile @@ -32,7 +32,7 @@ namespace :db do desc 'Drop the MySQL test databases' task :drop do - `mysqladmin --user=#{config['mysql']['username']} -f drop #{config['mysql']['database']}` + `mysql --user=#{config['mysql']['username']} -e "DROP DATABASE IF EXISTS #{config['mysql']['database']}"` end end @@ -44,7 +44,7 @@ namespace :db do desc 'Drop the PostgreSQL test databases' task :drop do - `dropdb #{config['postgres']['database']}` + `dropdb --if-exists #{config['postgres']['database']}` end end diff --git a/gemfiles/Gemfile.rails3.2 b/gemfiles/Gemfile.rails3.2 index da838d6ab..8eed6ddc6 100644 --- a/gemfiles/Gemfile.rails3.2 +++ b/gemfiles/Gemfile.rails3.2 @@ -31,13 +31,13 @@ group :test do gem 'webmock' platforms :ruby do - gem 'pg' + gem 'pg', '~> 0.11' gem 'mysql2', '~> 0.3.11' end platforms :jruby do gem 'jdbc-mysql' gem 'jdbc-sqlite3' - gem 'activerecord-jdbcpostgresql-adapter' + gem 'activerecord-jdbcpostgresql-adapter', '~> 1.3.0' end end diff --git a/gemfiles/Gemfile.rails4.1 b/gemfiles/Gemfile.rails4.1 index 34f96168b..b9b0a9448 100644 --- a/gemfiles/Gemfile.rails4.1 +++ b/gemfiles/Gemfile.rails4.1 @@ -31,13 +31,13 @@ group :test do gem 'webmock' platforms :ruby do - gem 'pg' + gem 'pg', '~> 0.11' gem 'mysql2', '~> 0.3.11' end platforms :jruby do gem 'jdbc-mysql' gem 'jdbc-sqlite3' - gem 'activerecord-jdbcpostgresql-adapter' + gem 'activerecord-jdbcpostgresql-adapter', '~> 1.3.0' end end diff --git a/gemfiles/Gemfile.rails5.0 b/gemfiles/Gemfile.rails5.0 index 07a4aaa87..21370903a 100644 --- a/gemfiles/Gemfile.rails5.0 +++ b/gemfiles/Gemfile.rails5.0 @@ -31,7 +31,7 @@ group :test do gem 'webmock' platforms :ruby do - gem 'pg' + gem 'pg', '~> 0.18' gem 'mysql2', '~> 0.3.11' end