Permalink
Browse files

Adding travis-ci configuration.

  • Loading branch information...
1 parent e51b5b6 commit aa6c457eb0f9fcf382d826f89865910eacf6b97e @potatosalad committed Jan 6, 2012
Showing with 12 additions and 2 deletions.
  1. +5 −0 .travis.yml
  2. +1 −0 Gemfile.lock
  3. +1 −0 mongoid-data_table.gemspec
  4. +5 −2 spec/spec_helper.rb
View
@@ -0,0 +1,5 @@
+language: ruby
+rvm:
+ - 1.9.2
+ - 1.9.3
+before_install: gem install bundler --pre
View
@@ -138,6 +138,7 @@ DEPENDENCIES
mocha (~> 0.10.0)
mongoid (~> 2.1)
mongoid-data_table!
+ rake
rb-fsevent
rspec (~> 2.8)
spork (~> 0.9.0.rc)
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
s.add_dependency "rails", ">= 3.0.0"
s.add_dependency "kaminari", "~> 0.13.0"
+ s.add_development_dependency "rake"
s.add_development_dependency "bson_ext", "~>1.3"
s.add_development_dependency "mongoid", "~>2.1"
s.add_development_dependency "mocha", "~>0.10.0"
View
@@ -20,9 +20,12 @@
LOGGER = ActiveSupport::BufferedLogger.new($stdout)
+ def database_id
+ ENV["CI"] ? "mongoid_data_table_#{Process.pid}" : "mongoid_data_table_test"
+ end
+
Mongoid.configure do |config|
- name = "mongoid_data_table_test"
- config.master = Mongo::Connection.new.db(name)
+ config.master = Mongo::Connection.new.db(database_id)
config.logger = nil
end

0 comments on commit aa6c457

Please sign in to comment.