From 5e04e6fa23eb366a76574ffaacc96e0b402d36e3 Mon Sep 17 00:00:00 2001 From: fatbulat Date: Wed, 20 Apr 2016 20:42:45 +0300 Subject: [PATCH 1/3] Integrate with TravisCI --- .travis.yml | 19 +++++++++++++++++++ config/secrets.yml.example | 22 ++++++++++++++++++++++ database.travis.yml | 4 ++++ 3 files changed, 45 insertions(+) create mode 100644 .travis.yml create mode 100644 config/secrets.yml.example create mode 100644 database.travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e5afab9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: ruby +sudo: false +rvm: + - 2.2.1 + - 2.2 + - 2.3.0 +bundler_args: --without production +addons: + postgresql: '9.4' +before_install: + - gem update bundler +before_script: + - cp config/secrets.yml.example config/secrets.yml + - cp config/database.travis.yml config/database.yml + - bundle exec rake db:create db:migrate +script: + - bundle exec rspec +notifications: + email: false \ No newline at end of file diff --git a/config/secrets.yml.example b/config/secrets.yml.example new file mode 100644 index 0000000..bba5a4d --- /dev/null +++ b/config/secrets.yml.example @@ -0,0 +1,22 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +# You can use `rake secret` to generate a secure secret key. + +# Make sure the secrets in this file are kept private +# if you're sharing your code publicly. + +development: + secret_key_base: f13cff0ee1e77d353743fb8b2ad4ea558225afd403beb1eda3cde3ba6aec54a570cab0566616a4dd7e9b0c83c939c8368af41bba77ba9e24049be8feae33a57d + +test: + secret_key_base: 9b6d4e7d233a9263337ada73fbab42d6af77f3a4411dab2bdda8360b08dbaa9233fbe7d1c9dabe9fbf46fe052d4bbcbf68a8ad077ec53637a8e0678427e0fdff + +# Do not keep production secrets in the repository, +# instead read values from the environment. +production: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/database.travis.yml b/database.travis.yml new file mode 100644 index 0000000..253a853 --- /dev/null +++ b/database.travis.yml @@ -0,0 +1,4 @@ +test: + adapter: postgresql + database: travis_ci_test + username: postgres \ No newline at end of file From ec0fd3cc30568ce805680eca5bbc79764cb183e4 Mon Sep 17 00:00:00 2001 From: fatbulat Date: Wed, 20 Apr 2016 20:48:37 +0300 Subject: [PATCH 2/3] Fix database configs for Travis --- database.travis.yml => config/database.travis.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename database.travis.yml => config/database.travis.yml (100%) diff --git a/database.travis.yml b/config/database.travis.yml similarity index 100% rename from database.travis.yml rename to config/database.travis.yml From b8f0f9e1d1dd5b3047d6fdb7791c887fad3cd1d3 Mon Sep 17 00:00:00 2001 From: fatbulat Date: Wed, 20 Apr 2016 20:55:57 +0300 Subject: [PATCH 3/3] Add TravisCI badge to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c2abc25..842ebc5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ How Many ======== + +[![Build Status](https://travis-ci.org/ironbrains/How-Many.svg)](https://travis-ci.org/ironbrains/How-Many) [![Code Climate](https://codeclimate.com/github/ironbrains/How-Many/badges/gpa.svg)](https://codeclimate.com/github/ironbrains/How-Many) Your Personal Finance