diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..ed742c3ca --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +rvm: + - ree + - 1.9.2 + +script: "bundle exec rake cruise" +env: "TRAVIS=true" diff --git a/app/models/app_config.rb b/app/models/app_config.rb index 08c955601..cc630e9c7 100644 --- a/app/models/app_config.rb +++ b/app/models/app_config.rb @@ -5,11 +5,21 @@ require 'uri' class AppConfig < Settingslogic - source File.join(Rails.root, "config", "application.yml") + def self.travis? + ENV["TRAVIS"] + end + + def self.source_file_name + file_name = "application.yml" + file_name << ".example" if travis? + File.join(Rails.root, "config", file_name) + end + + source source_file_name namespace Rails.env def self.load! - if no_config_file? && !have_old_config_file? + if no_config_file? && !have_old_config_file? && !travis? $stderr.puts <<-HELP ******** You haven't set up your Diaspora settings file. ********** Please do the following: @@ -37,7 +47,6 @@ HELP super - if no_cert_file_in_prod? $stderr.puts <<-HELP ******** Diaspora does not know where your SSL-CA-Certificates file is. ********** diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index 94fda525d..68a9439ac 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -4,7 +4,7 @@ namespace :db do desc "rebuild and prepare test db" - task :rebuild => [:drop, :create, 'schema:load', 'db:test:prepare'] + task :rebuild => [:drop, :create, :migrate, 'db:test:prepare'] namespace :integration do # desc 'Check for pending migrations and load the integration schema'