Some stuff to not need an application.yml in CI
This commit is contained in:
parent
5243a3203f
commit
d1a149f9f6
4 changed files with 6 additions and 7 deletions
|
|
@ -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!
|
||||||
|
|
|
||||||
2
ci-19.sh
2
ci-19.sh
|
|
@ -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
|
||||||
|
|
|
||||||
3
ci.sh
3
ci.sh
|
|
@ -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
|
||||||
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`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue