From 43da004ccba549b19e35b36fc5d605a561a0247c Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 5 Sep 2017 13:58:56 +1200 Subject: [PATCH 01/13] Bundle update and change to platform-api instead of heroku --- Gemfile | 2 +- Gemfile.lock | 69 +++++++++++++++++++++++++++++----------------------- 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/Gemfile b/Gemfile index 617134236..9a676fa29 100644 --- a/Gemfile +++ b/Gemfile @@ -145,5 +145,5 @@ group :test do end group :travis do - gem 'heroku-api' + gem 'platform-api' end diff --git a/Gemfile.lock b/Gemfile.lock index 011745535..0d86bba83 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,18 +20,18 @@ GEM erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_link_to (1.0.4) + active_link_to (1.0.5) actionpack addressable active_merchant-paypal-bogus-gateway (0.1.0) activemerchant - active_utils (3.3.7) + active_utils (3.3.8) activesupport (>= 3.2, < 5.2.0) i18n activejob (4.2.9) activesupport (= 4.2.9) globalid (>= 0.3.0) - activemerchant (1.69.0) + activemerchant (1.71.0) activesupport (>= 3.2.14, < 6.x) builder (>= 2.1.2, < 4.0.0) i18n (>= 0.6.9) @@ -51,16 +51,16 @@ GEM acts_as_paranoid (0.5.0) activerecord (>= 4.0, < 5.1) activesupport (>= 4.0, < 5.1) - addressable (2.5.1) - public_suffix (~> 2.0, >= 2.0.2) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) arel (6.0.4) ast (2.3.0) - autoprefixer-rails (7.1.2.3) + autoprefixer-rails (7.1.3) execjs bcrypt (3.1.11) - better_errors (2.2.0) + better_errors (2.3.0) coderay (>= 1.0.0) - erubis (>= 2.6.6) + erubi (>= 1.0.0) rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) @@ -68,7 +68,7 @@ GEM bonsai-elasticsearch-rails (0.2.0) elasticsearch-model (~> 0) elasticsearch-rails (~> 0) - bootstrap-datepicker-rails (1.6.4.1) + bootstrap-datepicker-rails (1.7.1.1) railties (>= 3.0) bootstrap-kaminari-views (0.0.5) kaminari (>= 0.13) @@ -81,11 +81,11 @@ GEM bullet (5.6.1) activesupport (>= 3.0.0) uniform_notifier (~> 1.10.0) - byebug (9.0.6) + byebug (9.1.0) cancancan (2.0.0) - capybara (2.14.4) + capybara (2.15.1) addressable - mime-types (>= 1.16) + mini_mime (>= 0.1.3) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) @@ -106,7 +106,7 @@ GEM simplecov (<= 0.13) codemirror-rails (5.16.0) railties (>= 3.0, < 6.0) - coderay (1.1.1) + coderay (1.1.2) coffee-rails (4.2.2) coffee-script (>= 2.2.0) railties (>= 4.0.0) @@ -169,6 +169,7 @@ GEM elasticsearch-transport (2.0.2) faraday multi_json + erubi (1.6.1) erubis (2.7.0) excon (0.58.0) execjs (2.7.0) @@ -233,9 +234,10 @@ GEM rubocop (>= 0.47.0) sysexits (~> 1.1) hashie (3.5.6) - heroku-api (0.4.2) - excon (~> 0.45) - multi_json (~> 1.8) + heroics (0.0.23) + erubis (~> 2.0) + excon + multi_json (>= 1.9.2) highline (1.7.8) html2haml (2.2.0) erubis (~> 2.7.0) @@ -255,19 +257,19 @@ GEM parser (>= 2.2.3.0) term-ansicolor (>= 1.3.2) terminal-table (>= 1.5.1) - jasmine (2.7.0) - jasmine-core (>= 2.7.0, < 3.0.0) + jasmine (2.8.0) + jasmine-core (>= 2.8.0, < 3.0.0) phantomjs rack (>= 1.2.1) rake - jasmine-core (2.7.0) + jasmine-core (2.8.0) jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-ui-rails (5.0.5) railties (>= 3.2.16) - js-routes (1.3.3) + js-routes (1.4.0) railties (>= 3.2) sprockets-rails json (2.1.0) @@ -308,13 +310,15 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mimemagic (0.3.2) + mini_mime (0.1.4) mini_portile2 (2.2.0) minitest (5.10.3) + moneta (0.8.1) multi_json (1.11.3) multi_xml (0.6.0) multipart-post (2.0.0) nenv (0.3.0) - newrelic_rpm (4.3.0.335) + newrelic_rpm (4.4.0.336) nokogiri (1.8.0) mini_portile2 (~> 2.2.0) notiffany (0.1.1) @@ -355,9 +359,12 @@ GEM ast (~> 2.2) pg (0.21.0) phantomjs (2.1.1.0) + platform-api (2.1.0) + heroics (~> 0.0.23) + moneta (~> 0.8.1) plupload-rails (1.2.1) rails (>= 3.1) - poltergeist (1.15.0) + poltergeist (1.16.0) capybara (~> 2.1) cliver (~> 0.3.1) websocket-driver (>= 0.2.0) @@ -366,7 +373,7 @@ GEM coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - public_suffix (2.0.5) + public_suffix (3.0.0) quiet_assets (1.1.0) railties (>= 3.1, < 5.0) rack (1.6.8) @@ -407,7 +414,7 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.1.0) - raindrops (0.18.0) + raindrops (0.19.0) rake (12.0.0) rb-fsevent (0.10.2) rb-inotify (0.9.10) @@ -432,7 +439,7 @@ GEM rspec-mocks (3.6.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.6.0) - rspec-rails (3.6.0) + rspec-rails (3.6.1) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -448,7 +455,7 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.8.1) - ruby-units (2.1.0) + ruby-units (2.2.0) ruby_dep (1.5.0) ruby_parser (3.10.1) sexp_processor (~> 4.9) @@ -464,7 +471,7 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - selenium-webdriver (3.4.4) + selenium-webdriver (3.5.1) childprocess (~> 0.5) rubyzip (~> 1.0) sexp_processor (4.10.0) @@ -478,14 +485,14 @@ GEM docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-html (0.10.1) + simplecov-html (0.10.2) slop (3.6.0) sparkpost_rails (1.4.0) rails (>= 4.0, < 5.1) sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.0) + sprockets-rails (3.2.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) @@ -521,7 +528,7 @@ GEM websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) will_paginate (3.1.6) - xmlrpc (0.2.1) + xmlrpc (0.3.0) xpath (2.1.0) nokogiri (~> 1.3) @@ -574,7 +581,6 @@ DEPENDENCIES haml-rails haml_lint hashie (>= 3.5.3) - heroku-api i18n-tasks jasmine jquery-rails @@ -591,6 +597,7 @@ DEPENDENCIES omniauth-flickr (>= 0.0.15) omniauth-twitter pg + platform-api poltergeist pry quiet_assets From ca5f14bb37aab2928ff0e8254e6a80b55f9c8705 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 5 Sep 2017 14:19:24 +1200 Subject: [PATCH 02/13] Specify the executable in the npm installed linters --- .overcommit.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.overcommit.yml b/.overcommit.yml index ab0f0e1c5..eb134a086 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -31,6 +31,7 @@ PreCommit: enabled: true on_fail: warn command: ['npm', 'run', 'coffeelint'] + required_executable: '/usr/bin/npm' HardTabs: enabled: true AuthorEmail: @@ -42,6 +43,7 @@ PreCommit: exclude: - '**/bootstrap.min.css' command: ['npm', 'run', 'csslint'] + required_executable: '/usr/bin/npm' HamlLint: enabled: true command: ['bundle', 'exec', 'haml-lint', 'app/views'] @@ -73,6 +75,7 @@ PostCommit: GitGuilt: enabled: true command: ['npm', 'run', 'git-guilt'] + required_executable: '/usr/bin/npm' PostCheckout: ALL: From c9aacd0110d8bfd56f6570bae9d725e231a88ed7 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 5 Sep 2017 14:20:28 +1200 Subject: [PATCH 03/13] Specify the executable in the npm installed linters --- .overcommit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.overcommit.yml b/.overcommit.yml index eb134a086..62d883497 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -31,7 +31,7 @@ PreCommit: enabled: true on_fail: warn command: ['npm', 'run', 'coffeelint'] - required_executable: '/usr/bin/npm' + required_executable: 'npm' HardTabs: enabled: true AuthorEmail: @@ -43,7 +43,7 @@ PreCommit: exclude: - '**/bootstrap.min.css' command: ['npm', 'run', 'csslint'] - required_executable: '/usr/bin/npm' + required_executable: 'npm' HamlLint: enabled: true command: ['bundle', 'exec', 'haml-lint', 'app/views'] @@ -75,7 +75,7 @@ PostCommit: GitGuilt: enabled: true command: ['npm', 'run', 'git-guilt'] - required_executable: '/usr/bin/npm' + required_executable: 'npm' PostCheckout: ALL: From 94bb3bf6bbe64e56362db50d4fb73c3ba5695e18 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 5 Sep 2017 14:21:48 +1200 Subject: [PATCH 04/13] Remove git guilt --- .overcommit.yml | 6 ------ package.json | 1 - 2 files changed, 7 deletions(-) diff --git a/.overcommit.yml b/.overcommit.yml index 62d883497..9b44544dc 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -71,12 +71,6 @@ PreCommit: YamlLint: enabled: true -PostCommit: - GitGuilt: - enabled: true - command: ['npm', 'run', 'git-guilt'] - required_executable: 'npm' - PostCheckout: ALL: quiet: false diff --git a/package.json b/package.json index 475973c0e..a46ef1516 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "coffeelint": "^1.16.0", "csslint": "^1.0.5", "eslint": "^3.17.1", - "git-guilt": "^0.1.1", "jshint": "^2.9.4" }, "repository": { From 5f7d48c63313cc7ea9cd25695113b610afdb2934 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 5 Sep 2017 14:30:03 +1200 Subject: [PATCH 05/13] Don't need to create database if just running linters --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 59bdd9c2a..ee6583f50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,12 +18,12 @@ before_install: - ./script/install_phantomjs; - export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH before_script: - - bundle exec rake db:create db:migrate db:test:prepare - set -e - > if [ "${STATIC_CHECKS}" = "true" ]; then ./script/install_linters; else + bundle exec rake db:create db:migrate db:test:prepare; bundle exec rake assets:precompile; fi - set +e From 17521cde1725ac64e5472c3af4dcc577de5a29ce Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 13 Sep 2017 22:01:33 +1200 Subject: [PATCH 06/13] Set required executable to jshint linting --- .overcommit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.overcommit.yml b/.overcommit.yml index 9b44544dc..505c8e2e6 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -62,6 +62,7 @@ PreCommit: - 'spec/javascripts/support/vendor/**' - '**/bootstrap*' command: ['npm', 'run', 'jshint'] + required_executable: 'npm' ScssLint: enabled: true RailsSchemaUpToDate: From 19205cb6a82d8cdf4d6e1cebbb5d0aac0ecc9fec Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 13 Sep 2017 22:08:21 +1200 Subject: [PATCH 07/13] update from erubi to erubis gem broke stuff - rolling back --- Gemfile | 2 +- Gemfile.lock | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 9a676fa29..ed5d1ca8f 100644 --- a/Gemfile +++ b/Gemfile @@ -106,7 +106,7 @@ group :development do # A debugger and irb alternative. Pry doesn't play nice # with unicorn, so start a Webrick server when debugging # with Pry - gem 'better_errors' + gem 'better_errors', '~> 2.2.0' gem 'binding_of_caller' gem 'guard' gem 'guard-rspec' diff --git a/Gemfile.lock b/Gemfile.lock index 0d86bba83..539c8ab7e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,9 +58,9 @@ GEM autoprefixer-rails (7.1.3) execjs bcrypt (3.1.11) - better_errors (2.3.0) + better_errors (2.2.0) coderay (>= 1.0.0) - erubi (>= 1.0.0) + erubis (>= 2.6.6) rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) @@ -169,7 +169,6 @@ GEM elasticsearch-transport (2.0.2) faraday multi_json - erubi (1.6.1) erubis (2.7.0) excon (0.58.0) execjs (2.7.0) @@ -540,7 +539,7 @@ DEPENDENCIES active_utils activemerchant acts_as_paranoid (~> 0.5.0) - better_errors + better_errors (~> 2.2.0) binding_of_caller bluecloth bonsai-elasticsearch-rails From e21b95a353a218c5ca00cba826a4545d6d3183ac Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 13 Sep 2017 22:21:15 +1200 Subject: [PATCH 08/13] Use floats, so the percentage calc works --- app/services/planting_predictions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/planting_predictions.rb b/app/services/planting_predictions.rb index 47b9bca69..c71d56964 100644 --- a/app/services/planting_predictions.rb +++ b/app/services/planting_predictions.rb @@ -17,7 +17,7 @@ class PlantingPredictions def percentage_grown return nil unless @planting.days_before_maturity && @planting.planted? - days = (Date.current - @planting.planted_at.to_date).to_i + days = (Date.current - @planting.planted_at.to_date).to_f return 0 if Date.current < @planting.planted_at return 100 if days > @planting.days_before_maturity From f4658df20827206047e628b3ed099148b62546d7 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 24 Sep 2017 14:28:51 +1300 Subject: [PATCH 09/13] Further gem updates --- Gemfile.lock | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 539c8ab7e..aa7c4a8f3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,7 +31,7 @@ GEM activejob (4.2.9) activesupport (= 4.2.9) globalid (>= 0.3.0) - activemerchant (1.71.0) + activemerchant (1.72.0) activesupport (>= 3.2.14, < 6.x) builder (>= 2.1.2, < 4.0.0) i18n (>= 0.6.9) @@ -55,7 +55,7 @@ GEM public_suffix (>= 2.0.2, < 4.0) arel (6.0.4) ast (2.3.0) - autoprefixer-rails (7.1.3) + autoprefixer-rails (7.1.4) execjs bcrypt (3.1.11) better_errors (2.2.0) @@ -170,7 +170,7 @@ GEM faraday multi_json erubis (2.7.0) - excon (0.58.0) + excon (0.59.0) execjs (2.7.0) factory_girl (4.8.0) activesupport (>= 3.0.0) @@ -186,7 +186,7 @@ GEM font-awesome-sass (4.7.0) sass (>= 3.2) formatador (0.2.5) - friendly_id (5.2.1) + friendly_id (5.2.3) activerecord (>= 4.0.0) geocoder (1.4.4) gibbon (1.2.1) @@ -211,7 +211,7 @@ GEM guard (~> 2.1) guard-compat (~> 1.1) rspec (>= 2.99.0, < 4.0) - haml (5.0.2) + haml (5.0.3) temple (>= 0.8.0) tilt haml-i18n-extractor (0.5.9) @@ -233,9 +233,10 @@ GEM rubocop (>= 0.47.0) sysexits (~> 1.1) hashie (3.5.6) - heroics (0.0.23) + heroics (0.0.24) erubis (~> 2.0) excon + moneta multi_json (>= 1.9.2) highline (1.7.8) html2haml (2.2.0) @@ -268,7 +269,7 @@ GEM thor (>= 0.14, < 2.0) jquery-ui-rails (5.0.5) railties (>= 3.2.16) - js-routes (1.4.0) + js-routes (1.4.1) railties (>= 3.2) sprockets-rails json (2.1.0) @@ -286,7 +287,7 @@ GEM kaminari-core (= 1.0.1) kaminari-core (1.0.1) kgio (2.11.0) - kramdown (1.14.0) + kramdown (1.15.0) launchy (2.4.3) addressable (~> 2.3) leaflet-markercluster-rails (0.7.0) @@ -310,7 +311,7 @@ GEM mime-types-data (3.2016.0521) mimemagic (0.3.2) mini_mime (0.1.4) - mini_portile2 (2.2.0) + mini_portile2 (2.3.0) minitest (5.10.3) moneta (0.8.1) multi_json (1.11.3) @@ -318,8 +319,8 @@ GEM multipart-post (2.0.0) nenv (0.3.0) newrelic_rpm (4.4.0.336) - nokogiri (1.8.0) - mini_portile2 (~> 2.2.0) + nokogiri (1.8.1) + mini_portile2 (~> 2.3.0) notiffany (0.1.1) nenv (~> 0.1) shellany (~> 0.0) @@ -368,10 +369,9 @@ GEM cliver (~> 0.3.1) websocket-driver (>= 0.2.0) powerpack (0.1.1) - pry (0.10.4) + pry (0.11.0) coderay (~> 1.1.0) method_source (~> 0.8.1) - slop (~> 3.4) public_suffix (3.0.0) quiet_assets (1.1.0) railties (>= 3.1, < 5.0) @@ -414,7 +414,7 @@ GEM thor (>= 0.18.1, < 2.0) rainbow (2.1.0) raindrops (0.19.0) - rake (12.0.0) + rake (12.1.0) rb-fsevent (0.10.2) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) @@ -453,7 +453,7 @@ GEM rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - ruby-progressbar (1.8.1) + ruby-progressbar (1.8.3) ruby-units (2.2.0) ruby_dep (1.5.0) ruby_parser (3.10.1) @@ -470,7 +470,7 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - selenium-webdriver (3.5.1) + selenium-webdriver (3.5.2) childprocess (~> 0.5) rubyzip (~> 1.0) sexp_processor (4.10.0) @@ -485,7 +485,6 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - slop (3.6.0) sparkpost_rails (1.4.0) rails (>= 4.0, < 5.1) sprockets (3.7.1) @@ -523,7 +522,7 @@ GEM nokogiri (>= 1.2.0) rack (>= 1.0) rack-test (>= 0.5.3) - websocket-driver (0.6.5) + websocket-driver (0.7.0) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) will_paginate (3.1.6) From 5ed5f9ec7ebf5e797aa163703eb414694d6c707f Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 24 Sep 2017 15:17:39 +1300 Subject: [PATCH 10/13] Sleep before tests as suggested here https://docs.travis-ci.com/user/database-setup/#ElasticSearch --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ee6583f50..34aff116b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ before_install: - ./script/install_phantomjs; - export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH before_script: + - sleep 10 - set -e - > if [ "${STATIC_CHECKS}" = "true" ]; then From c749f4a81347ce5262781805749ea806c8b93f6a Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 24 Sep 2017 18:35:39 +1300 Subject: [PATCH 11/13] Install elastic search 2.4.0 when running on travis --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 34aff116b..eb005e17e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -sudo: false +sudo: required language: ruby cache: bundler: true @@ -17,6 +17,11 @@ env: before_install: - ./script/install_phantomjs; - export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH + # Force Travis to use Elastic Search 2.4.0 + - sudo dpkg -r elasticsearch + - curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.4.0/elasticsearch-2.4.0.deb + - sudo dpkg -i --force-confnew elasticsearch-2.4.0.deb + - sudo service elasticsearch start before_script: - sleep 10 - set -e From 8e5c52e85e53420f0339f2b27830e2233e9f5502 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 24 Sep 2017 18:40:50 +1300 Subject: [PATCH 12/13] Outputs which version of elasticsearch we are running on travis --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb005e17e..97db9b44b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,8 @@ before_install: - sudo service elasticsearch start before_script: - sleep 10 + # Outputs info about ES, including version number. Useful for debugging. + - curl localhost:9200 - set -e - > if [ "${STATIC_CHECKS}" = "true" ]; then @@ -44,9 +46,6 @@ script: bundle exec rake jasmine:ci; fi; - set +e - -services: - - elasticsearch before_deploy: - bundle exec script/heroku_maintenance.rb on deploy: From 6b1714eb05dcf1fa0faec9812c2e922fa44eb14f Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 24 Sep 2017 18:50:23 +1300 Subject: [PATCH 13/13] Only install elastic search in travis on the matix that tests elasticsearch --- .travis.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97db9b44b..6b6966904 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,14 +18,16 @@ before_install: - ./script/install_phantomjs; - export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH # Force Travis to use Elastic Search 2.4.0 - - sudo dpkg -r elasticsearch - - curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.4.0/elasticsearch-2.4.0.deb - - sudo dpkg -i --force-confnew elasticsearch-2.4.0.deb - - sudo service elasticsearch start + - > + if [ "${GROWSTUFF_ELASTICSEARCH}" = "true" ]; then + sudo dpkg -r elasticsearch; + curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.4.0/elasticsearch-2.4.0.deb; + sudo dpkg -i --force-confnew elasticsearch-2.4.0.deb; + sudo service elasticsearch start; + sleep 10; + curl localhost:9200; + fi before_script: - - sleep 10 - # Outputs info about ES, including version number. Useful for debugging. - - curl localhost:9200 - set -e - > if [ "${STATIC_CHECKS}" = "true" ]; then