Skip to content

Commit

Permalink
Merge pull request #48 from sul-dlss/cbeer-patch-1
Browse files Browse the repository at this point in the history
Update travis build matrix
  • Loading branch information
Jessie Keck committed Jan 9, 2020
2 parents ec03553 + 5ec6154 commit 7717748
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 42 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
language: ruby
sudo: false

script: bundle exec rake ci

notifications:
email: false

rvm:
- 2.3.0
- 2.5.3

env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true

before_script:
- jdk_switcher use oraclejdk8
jdk: openjdk11
15 changes: 5 additions & 10 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gem 'coveralls', require: false
# gem 'byebug', group: [:development, :test]

# BEGIN ENGINE_CART BLOCK
# engine_cart: 1.0.1
# engine_cart: 2.3.0
# engine_cart stanza: 0.10.0
# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
Expand All @@ -39,14 +39,9 @@ else
gem 'rails', ENV['RAILS_VERSION']
end
end

case ENV['RAILS_VERSION']
when /^4.2/
gem 'responders', '~> 2.0'
gem 'sass-rails', '>= 5.0'
gem 'coffee-rails', '~> 4.1.0'
when /^4.[01]/
gem 'sass-rails', '< 5.0'
end
end
# END ENGINE_CART BLOCK

unless File.exist?(file)
eval_gemfile File.expand_path('spec/test_app_templates/Gemfile.extra', File.dirname(__FILE__))
end
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ load 'tasks/blacklight_heatmaps.rake'

require 'engine_cart/rake_task'

task default: :spec
task default: [:ci]
4 changes: 2 additions & 2 deletions blacklight_heatmaps.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Gem::Specification.new do |s|

s.add_development_dependency 'sqlite3'
s.add_development_dependency 'rspec-rails', '~> 3.4'
s.add_development_dependency 'engine_cart', '~> 1.0'
s.add_development_dependency 'engine_cart', '~> 2.0'
s.add_development_dependency 'solr_wrapper'
s.add_development_dependency 'capybara'
s.add_development_dependency 'poltergeist'
s.add_development_dependency 'webdrivers'
end
2 changes: 0 additions & 2 deletions solr/conf/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
Expand All @@ -317,7 +316,6 @@
<fieldType class="solr.TextField" name="textSuggest" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
Expand Down
5 changes: 3 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@

Dir[Pathname.new(File.expand_path("../support/**/*.rb", __FILE__))].each { |f| require f }

require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
require 'webdrivers/chromedriver'

Capybara.javascript_driver = :selenium_chrome_headless

require 'blacklight'
require 'blacklight_heatmaps'
Expand Down
1 change: 1 addition & 0 deletions spec/test_app_templates/Gemfile.extra
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gem 'sprockets', '< 4'
8 changes: 1 addition & 7 deletions tasks/blacklight_heatmaps.rake
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
require 'solr_wrapper'
require 'engine_cart/rake_task'
require 'rspec/core/rake_task'

desc 'Run specs'
RSpec::Core::RakeTask.new do |t|
end


EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc
RSpec::Core::RakeTask.new(:spec)

desc 'Run test suite'
task ci: ['blacklight_heatmaps:generate'] do
Expand Down
15 changes: 1 addition & 14 deletions vendor/assets/javascripts/leaflet_solr_heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,7 @@ L.SolrHeatmap = L.GeoJSON.extend({

_computeHeatmapObject: function (data) {
var _this = this;
_this.facetHeatmap = {},
facetHeatmapArray = data.response.facet_heatmaps[this.options.field];

// Convert array to an object
$.each(facetHeatmapArray, function (index, value) {
if ((index + 1) % 2 !== 0) {
// Set object keys for even items
_this.facetHeatmap[value] = '';
}else {
// Set object values for odd items
_this.facetHeatmap[facetHeatmapArray[index - 1]] = value;
}
});

_this.facetHeatmap = data.response.facet_heatmaps[this.options.field];
this._computeIntArrays();
},

Expand Down

0 comments on commit 7717748

Please sign in to comment.