Merge branch 'master' of github.com:diaspora/diaspora
Conflicts: app/models/app_config.rb
This commit is contained in:
commit
71dd8dc7f3
3 changed files with 19 additions and 4 deletions
6
.travis.yml
Normal file
6
.travis.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
rvm:
|
||||||
|
- ree
|
||||||
|
- 1.9.2
|
||||||
|
|
||||||
|
script: "bundle exec rake cruise"
|
||||||
|
env: "TRAVIS=true"
|
||||||
|
|
@ -5,11 +5,21 @@ require 'uri'
|
||||||
|
|
||||||
class AppConfig < Settingslogic
|
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
|
namespace Rails.env
|
||||||
|
|
||||||
def self.load!
|
def self.load!
|
||||||
if no_config_file? && !have_old_config_file?
|
if no_config_file? && !have_old_config_file? && !travis?
|
||||||
$stderr.puts <<-HELP
|
$stderr.puts <<-HELP
|
||||||
******** You haven't set up your Diaspora settings file. **********
|
******** You haven't set up your Diaspora settings file. **********
|
||||||
Please do the following:
|
Please do the following:
|
||||||
|
|
@ -37,7 +47,6 @@ HELP
|
||||||
|
|
||||||
super
|
super
|
||||||
|
|
||||||
|
|
||||||
if no_cert_file_in_prod?
|
if no_cert_file_in_prod?
|
||||||
$stderr.puts <<-HELP
|
$stderr.puts <<-HELP
|
||||||
******** Diaspora does not know where your SSL-CA-Certificates file is. **********
|
******** Diaspora does not know where your SSL-CA-Certificates file is. **********
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace :db do
|
namespace :db do
|
||||||
desc "rebuild and prepare test db"
|
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
|
namespace :integration do
|
||||||
# desc 'Check for pending migrations and load the integration schema'
|
# desc 'Check for pending migrations and load the integration schema'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue