Skip to content

Commit

Permalink
Put back travis?
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Aug 19, 2016
1 parent 6d2322c commit 503a163
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .travis.yml
@@ -0,0 +1,15 @@
cache: bundler
sudo: false

language: ruby
rvm:
- 2.3.1

addons:
postgresql: 9.4

services:
- memcached

before_script:
- script/travis_prepare
2 changes: 1 addition & 1 deletion config/database.yml.example
Expand Up @@ -2,7 +2,7 @@
# Only works with postgresql adapter.
login: &login
adapter: postgresql
username: moe
username: postgres
password: imouto
host: 127.0.0.1

Expand Down
18 changes: 18 additions & 0 deletions script/travis_prepare
@@ -0,0 +1,18 @@
#!/bin/sh

mkdir -p public/data

cat <<EOF > config/database.yml
test:
adapter: postgresql
username: postgres
database: moebooru_test
EOF

cat <<EOF > config/local_config.rb
CONFIG["server_host"] = "localhost"
CONFIG["admin_contact"] = "webmaster@#{CONFIG["server_host"]}"
CONFIG["memcache_servers"] = ["127.0.0.1:11211"]
EOF

bundle exec rails db:create

0 comments on commit 503a163

Please sign in to comment.