From 5caf245af57b92813d76d13477cf22510719dac7 Mon Sep 17 00:00:00 2001 From: Chad Nelson Date: Wed, 23 Sep 2020 13:59:21 -0400 Subject: [PATCH 1/2] Some hygeine so Travis tests can pass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, running the tests on master on Travis for this gem fail with two distinct errors: 1. `ActionView::Template::Error: Autoprefixer doesn’t support Node v8.12.0. Update it.` - 9 tests fail with this issue. 2. `NoMethodError: undefined method `search_state_class' for #` - 2 tests fail with this issue. Additionally, there are some warnings about gems being found in multiple sources: ``` Warning: the gem 'bindex' was found in multiple sources. Installed from: https://rubygems.org/ Also found in: * http://rubygems.org/ You should add a source requirement to restrict this gem to your preferred source. ``` This PR fixes those errors by: 1) Updating the TRavis config to use Node 12 2) Updating the render_constraints_override spec to work with with changes introuced in Blacklight 7.8.0, by commmit https://github.com/projectblacklight/blacklight/commit/c11db267465a63f9ba91798369750466cbac0be7 It eliminates the multiple source gem warnings by updating updating the rubygems url to https. --- .travis.yml | 3 +++ Gemfile | 2 +- .../render_constraints_override_spec.rb | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e02a805..7f79923 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ notifications: email: false +before_install: + nvm install 12 + matrix: include: - rvm: 2.6.5 diff --git a/Gemfile b/Gemfile index 2ca2bab..a5960f9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source 'http://rubygems.org' +source 'https://rubygems.org' gemspec diff --git a/spec/lib/blacklight_advanced_search/render_constraints_override_spec.rb b/spec/lib/blacklight_advanced_search/render_constraints_override_spec.rb index 3f73aa4..fec28d4 100644 --- a/spec/lib/blacklight_advanced_search/render_constraints_override_spec.rb +++ b/spec/lib/blacklight_advanced_search/render_constraints_override_spec.rb @@ -18,7 +18,8 @@ end end - subject(:rendered) { helper.render_constraints_filters({}) } + let (:search_state) { Blacklight::SearchState.new(params, blacklight_config)} + subject(:rendered) { helper.render_constraints_filters(search_state) } context 'with an array of facet params' do let(:params) { ActionController::Parameters.new f_inclusive: { 'type' => ['a'] } } From 82e41f9628be46f897a5ac16cde06175181faf15 Mon Sep 17 00:00:00 2001 From: Chad Nelson Date: Thu, 24 Sep 2020 15:09:39 -0400 Subject: [PATCH 2/2] Bionic the nodehog --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7f79923..2861f53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,8 @@ +dist: bionic + notifications: email: false -before_install: - nvm install 12 - matrix: include: - rvm: 2.6.5