From 9e7d9a179d50da7ce75296f7d8129c0eeb17b5c8 Mon Sep 17 00:00:00 2001 From: Joerg Reichert Date: Mon, 16 Nov 2015 19:42:12 +0100 Subject: [PATCH 1/3] added .travis.yml --- .project | 19 +++++++++++++++++++ .travis.yml | 15 +++++++++++++++ spec/support/elasticsearch.rb | 1 + 3 files changed, 35 insertions(+) create mode 100644 .project create mode 100644 .travis.yml diff --git a/.project b/.project new file mode 100644 index 0000000..ce55b48 --- /dev/null +++ b/.project @@ -0,0 +1,19 @@ + + + stadtratmonitor + + + + + + com.aptana.ide.core.unifiedBuilder + + + + + + com.aptana.projects.webnature + org.radrails.rails.core.railsnature + com.aptana.ruby.core.rubynature + + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8d7089e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +sudo: required + +language: ruby + +services: + - docker + +script: + - docker-compose run web rake db:setup + - docker-compose run web rspec + +env: + global: + secure: axvjtAqhdh32g9zmUaxd4mu7+iR/ZJaj/hw+Ss5XMJDcCKUSR/BUvqvo7ZFeHN2YGwS8DzCS0Fsr6Axop5mqfzyjVvHDKd4zE+Lm7HW+NUJVoV8khlLeEVX/KYcqWkKNkChxRRbIB3xnqim1H4T2ThKNlzl3wHgFRXdzK/gl57c= + diff --git a/spec/support/elasticsearch.rb b/spec/support/elasticsearch.rb index 4575c58..24e5784 100644 --- a/spec/support/elasticsearch.rb +++ b/spec/support/elasticsearch.rb @@ -1,5 +1,6 @@ RSpec.configure do |config| config.before :each, elasticsearch: true do Paper.__elasticsearch__.create_index!(force: true) + sleep 2 end end From 6fcff2f0b11780905a53d564af4fa05b2d33fbda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Reichert?= Date: Wed, 2 Mar 2016 20:17:02 +0100 Subject: [PATCH 2/3] adds travis build status label --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 81a5f4f..0c71737 100644 --- a/README.md +++ b/README.md @@ -28,3 +28,5 @@ Adding a scraper manually: 3. `exit` Now import everything via `bundle exec rake import_papers`. + +[![Build Status](https://travis-ci.org/joergreichert/stadtratmonitor.png?branch=travis-docker)](https://travis-ci.org/joergreichert/stadtratmonitor) From e0cf4b39e748af1a02bf2666599aff883dc6ee67 Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Sat, 27 Feb 2016 10:43:15 +0100 Subject: [PATCH 3/3] Fix 503 errors in tests from Elasticsearch due to cluster not being ready --- spec/support/elasticsearch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/elasticsearch.rb b/spec/support/elasticsearch.rb index 24e5784..2a3f246 100644 --- a/spec/support/elasticsearch.rb +++ b/spec/support/elasticsearch.rb @@ -1,6 +1,6 @@ RSpec.configure do |config| config.before :each, elasticsearch: true do Paper.__elasticsearch__.create_index!(force: true) - sleep 2 + Elasticsearch::Model.client.cluster.health wait_for_status: "yellow" end end