Some stuff to not need an application.yml in CI

This commit is contained in:
Raphael Sofaer 2011-06-29 11:52:13 -07:00
parent 5243a3203f
commit d1a149f9f6
4 changed files with 6 additions and 7 deletions

View file

@ -5,14 +5,14 @@ require 'uri'
class AppConfig < Settingslogic
def self.source_file
if Rails.env == 'test'
def self.source_file_name
if Rails.env == 'test' || ENV["CI"]
File.join(Rails.root, "config", "application.yml.example")
else
File.join(Rails.root, "config", "application.yml")
end
end
source source_file
source source_file_name
namespace Rails.env
def self.load!

View file

@ -8,4 +8,4 @@ rm -f Gemfile.lock &&
source /usr/local/rvm/scripts/rvm &&
rvm use ruby-1.9.2-p0@diaspora --create &&
bundle install &&
bundle exec rake cruise
CI=true bundle exec rake cruise

3
ci.sh
View file

@ -16,5 +16,4 @@ rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02@diaspora/cache &&
rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02@global/cache &&
rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02/cache &&
bundle install &&
cp config/application.yml.example config/application.yml &&
bundle exec rake cruise
CI=true bundle exec rake cruise

View file

@ -4,7 +4,7 @@ namespace :cruise do
puts "Starting virtual display..."
`sh -e /etc/init.d/xvfb start`
puts "Starting specs..."
system('export DISPLAY=:99.0 && bundle exec rake')
system('export DISPLAY=:99.0 && CI=true bundle exec rake')
exit_status = $?.exitstatus
puts "Stopping virtual display..."
`sh -e /etc/init.d/xvfb stop`