From 9cb58ab0c98ded57b7de6bdebb0ad6b24015b3a3 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 27 Nov 2016 13:08:53 +1300 Subject: [PATCH 1/5] Wrapped the phantomjs downloading in travis.yml --- .travis.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0fc8e1e54..5d24c9f89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,14 @@ rvm: - 2.3.1 before_install: - export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH - - if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi - - if [ $(phantomjs --version) != '2.1.1' ]; then wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi - - if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi + - > + if [ $(phantomjs --version) != '2.1.1' ]; then + PHANTOM_URL=https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2; + rm -rf $PWD/travis_phantomjs; + mkdir -p $PWD/travis_phantomjs; + wget $PHANTOM_URL -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; + tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; + fi - phantomjs --version before_script: - psql -c 'create database growstuff_test;' -U postgres From 7fcd3cba8d1471b4c3a7a50ad35eac63590764ae Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 27 Nov 2016 13:22:10 +1300 Subject: [PATCH 2/5] Changed phantomjs url to project official --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5d24c9f89..a13ca40d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ before_install: - export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH - > if [ $(phantomjs --version) != '2.1.1' ]; then - PHANTOM_URL=https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2; + PHANTOM_URL=https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2; rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; wget $PHANTOM_URL -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; From 167417a7119ecae2de75161a4ed184c0bcf991c3 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 27 Nov 2016 13:24:02 +1300 Subject: [PATCH 3/5] Indent travis.yml correctly --- .travis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index a13ca40d9..f3397e9c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ env: global: secure: "Z5TpM2jEX4UCvNePnk/LwltQX48U2u9BRc+Iypr1x9QW2o228QJhPIOH39a8RMUrepGnkQIq9q3ZRUn98RfrJz1yThtlNFL3NmzdQ57gKgjGwfpa0e4Dwj/ZJqV2D84tDGjvdVYLP7zzaYZxQcwk/cgNpzKf/jq97HLNP7CYuf4=" rvm: -- 2.3.1 + - 2.3.1 before_install: - export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH - > @@ -24,13 +24,13 @@ before_install: fi - phantomjs --version before_script: -- psql -c 'create database growstuff_test;' -U postgres + - psql -c 'create database growstuff_test;' -U postgres script: -- bundle exec rubocop --display-cop-names --rails -- script/gemfile_check -- bundle exec script/check_contributors_md -- bundle exec rake db:migrate --trace -- bundle exec rspec spec/ + - bundle exec rubocop --display-cop-names --rails + - script/gemfile_check + - bundle exec script/check_contributors_md + - bundle exec rake db:migrate --trace + - bundle exec rspec spec/ services: - elasticsearch before_deploy: From c76fb15cfd2a8a205117b6bbe723faa9cf03330d Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 27 Nov 2016 13:24:21 +1300 Subject: [PATCH 4/5] Add yamllint settings --- .yamllint | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .yamllint diff --git a/.yamllint b/.yamllint new file mode 100644 index 000000000..06876caa2 --- /dev/null +++ b/.yamllint @@ -0,0 +1,7 @@ +extends: relaxed + +rules: + # 80 chars should be enough, but don't fail if a line is longer + line-length: + max: 150 + level: warning From f52b828abe6c897fb8a94e9bd370b63d39756ca3 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 27 Nov 2016 13:27:45 +1300 Subject: [PATCH 5/5] Use rake to create database --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f3397e9c7..5bc80442c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ before_install: fi - phantomjs --version before_script: - - psql -c 'create database growstuff_test;' -U postgres + - bundle exec rake db:create db:migrate db:test:prepare script: - bundle exec rubocop --display-cop-names --rails - script/gemfile_check