mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
try to get travis build working
This commit is contained in:
parent
d83cef0e09
commit
d6f567e765
3 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
language: ruby
|
||||
rvm:
|
||||
- "2.1.0"
|
||||
addons:
|
||||
postgresql: "9.3"
|
||||
before_script:
|
||||
- psql -c 'create database travis_ci_test;' -U postgres
|
||||
|
|
7
config.yml.travis
Normal file
7
config.yml.travis
Normal file
|
@ -0,0 +1,7 @@
|
|||
database: 'postgres://postgres@localhost/travis_ci_test'
|
||||
database_pool: 1
|
||||
session_secret: 's3cr3t'
|
||||
recaptcha_public_key: '1234'
|
||||
recaptcha_private_key: '5678'
|
||||
phantomjs_url:
|
||||
- http://localhost:8910
|
|
@ -12,7 +12,16 @@ require 'zip'
|
|||
Bundler.require
|
||||
Bundler.require :development if ENV['RACK_ENV'] == 'development'
|
||||
|
||||
$config = YAML.load_file(File.join(DIR_ROOT, 'config.yml'))[ENV['RACK_ENV']]
|
||||
if ENV['TRAVIS']
|
||||
$config = YAML.load_file File.join(DIR_ROOT, 'config.yml.travis')
|
||||
else
|
||||
begin
|
||||
$config = YAML.load_file(File.join(DIR_ROOT, 'config.yml'))[ENV['RACK_ENV']]
|
||||
rescue Errno::ENOENT
|
||||
puts "ERROR: Please provide a config.yml file."
|
||||
exit
|
||||
end
|
||||
end
|
||||
|
||||
DB = Sequel.connect $config['database'], sslmode: 'disable', max_connections: $config['database_pool']
|
||||
DB.extension :pagination
|
||||
|
|
Loading…
Add table
Reference in a new issue