Commit d1a149f9 authored by Raphael Sofaer's avatar Raphael Sofaer

Some stuff to not need an application.yml in CI

parent 5243a320
...@@ -5,14 +5,14 @@ require 'uri' ...@@ -5,14 +5,14 @@ require 'uri'
class AppConfig < Settingslogic class AppConfig < Settingslogic
def self.source_file def self.source_file_name
if Rails.env == 'test' if Rails.env == 'test' || ENV["CI"]
File.join(Rails.root, "config", "application.yml.example") File.join(Rails.root, "config", "application.yml.example")
else else
File.join(Rails.root, "config", "application.yml") File.join(Rails.root, "config", "application.yml")
end end
end end
source source_file source source_file_name
namespace Rails.env namespace Rails.env
def self.load! def self.load!
......
...@@ -8,4 +8,4 @@ rm -f Gemfile.lock && ...@@ -8,4 +8,4 @@ rm -f Gemfile.lock &&
source /usr/local/rvm/scripts/rvm && source /usr/local/rvm/scripts/rvm &&
rvm use ruby-1.9.2-p0@diaspora --create && rvm use ruby-1.9.2-p0@diaspora --create &&
bundle install && bundle install &&
bundle exec rake cruise CI=true bundle exec rake cruise
\ No newline at end of file
...@@ -16,5 +16,4 @@ rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02@diaspora/cache && ...@@ -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@global/cache &&
rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02/cache && rm -rf /usr/local/rvm/gems/ree-1.8.7-2010.02/cache &&
bundle install && bundle install &&
cp config/application.yml.example config/application.yml && CI=true bundle exec rake cruise
bundle exec rake cruise
...@@ -4,7 +4,7 @@ namespace :cruise do ...@@ -4,7 +4,7 @@ namespace :cruise do
puts "Starting virtual display..." puts "Starting virtual display..."
`sh -e /etc/init.d/xvfb start` `sh -e /etc/init.d/xvfb start`
puts "Starting specs..." puts "Starting specs..."
system('export DISPLAY=:99.0 && bundle exec rake') system('export DISPLAY=:99.0 && CI=true bundle exec rake')
exit_status = $?.exitstatus exit_status = $?.exitstatus
puts "Stopping virtual display..." puts "Stopping virtual display..."
`sh -e /etc/init.d/xvfb stop` `sh -e /etc/init.d/xvfb stop`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment