blacklight_range_limit 7.0.0 → 7.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9a1df533f008f45eb3b248ee4e6e57fa6df93025
4
- data.tar.gz: fb650f88d4d59bb30434d62377558e9cc57cf4a7
2
+ SHA256:
3
+ metadata.gz: fcbdbc78c473e59d57bd6453adf5f6c09eec1786f5a537b57b53077a736602c8
4
+ data.tar.gz: 0eccabe9cd9231a0cb62d80d470762a056881aa93e34ea655a28268369d034ee
5
5
  SHA512:
6
- metadata.gz: afb426238097c41d11212ea824a41925242a948a43b5abe80d5208ecdbbaeeaa4b95beb1726b86232ff552312aec3c2908e0168fc62d684926c02f66696e01c9
7
- data.tar.gz: ca5957d0215cd424cccc44ed8d44d110b05cfaa079e73aa6e1148bc5b8fe977e095685fcd471c96492267ebbce8221830cbbfd8a0a2b1cee32083a848a38b733
6
+ metadata.gz: 34088b2dab05fb33d092fca7b4e407e8d0418e4531995c58fc3371da00ff7dd1a27bb6d4e2a52ecb47ed27309ca586befb24ae52c03ce4d3e3e10793a2cade13
7
+ data.tar.gz: a6f1480b8b63f8ba8f1a2bed53518f45f9dca2efe42f73ff92af2553814650f25d74e46fc2c07222f7225afa06c9da287fa6f158c2d47041dc0019df103872de
@@ -1,13 +1,18 @@
1
1
  notifications:
2
2
  email: false
3
3
 
4
+ addons:
5
+ chrome: stable
6
+
4
7
  language: ruby
5
8
  sudo: false
6
9
  rvm:
7
- - 2.3.1
10
+ - 2.5.5
8
11
 
9
12
  before_install:
10
13
  - gem install bundler
14
+ - google-chrome-stable --headless --no-sandbox --disable-gpu --remote-debugging-port=9222 http://localhost &
15
+
11
16
 
12
17
  notifications:
13
18
  irc: "irc.freenode.org#blacklight"
data/README.md CHANGED
@@ -6,24 +6,24 @@ BlacklightRangeLimit: integer range limiting and profiling for Blacklight appli
6
6
 
7
7
  # Description
8
8
 
9
- The BlacklightRangeLimit plugin provides a 'facet' or limit for integer fields, that lets the user enter range limits with a text box or a slider, and also provides area charts giving a sense of the distribution of values (with drill down).
9
+ The BlacklightRangeLimit plugin provides a 'facet' or limit for integer fields, that lets the user enter range limits with a text box or a slider, and also provides area charts giving a sense of the distribution of values (with drill down).
10
10
 
11
- The primary use case of this plugin is for 'year' data, but it should work for any integer field. It may not work right for negative numbers, however.
11
+ The primary use case of this plugin is for 'year' data, but it should work for any integer field. It may not work right for negative numbers, however.
12
12
 
13
- Decimal numbers and Dates are NOT supported; they theoretically could be in the future, although it gets tricky.
13
+ Decimal numbers and Dates are NOT supported; they theoretically could be in the future, although it gets tricky.
14
14
 
15
15
 
16
16
  # Requirements
17
17
 
18
- A Solr integer field. Depending on your data, it may or may not be advantageous to use a tint (trie with non-zero precision) type field.
18
+ A Solr integer field. Depending on your data, it may or may not be advantageous to use a tint (trie with non-zero precision) type field.
19
19
 
20
20
  ## Note on solr field types
21
21
 
22
- If all your integers are the same number of digits, you can use just about any solr type, including string/type, and all will be well. But if your integers vary in digits, strings won't sort correctly, making your numbers behave oddly in partitions and limits. This is also true if you use a pre-1.4 "integer"/pint/solr.IntField field -- these are not "sortable".
22
+ If all your integers are the same number of digits, you can use just about any solr type, including string/type, and all will be well. But if your integers vary in digits, strings won't sort correctly, making your numbers behave oddly in partitions and limits. This is also true if you use a pre-1.4 "integer"/pint/solr.IntField field -- these are not "sortable".
23
23
 
24
- You need to use a "sortable" numeric-type field. In Solr 1.4, the standard "int"/solr.TrieIntField should work fine and is probably prefered. For some distributions of data, it may be more efficient to use "tint" (solr.TrieIntField with non-zero precision).
24
+ You need to use a "sortable" numeric-type field. In Solr 1.4, the standard "int"/solr.TrieIntField should work fine and is probably prefered. For some distributions of data, it may be more efficient to use "tint" (solr.TrieIntField with non-zero precision).
25
25
 
26
- The pre Solr 1.4 now deprecated sint or slong types should work fine too.
26
+ The pre Solr 1.4 now deprecated sint or slong types should work fine too.
27
27
 
28
28
  # Installation
29
29
 
@@ -33,9 +33,9 @@ Add
33
33
 
34
34
  gem "blacklight_range_limit"
35
35
 
36
- to your Gemfile. Run "bundle install".
36
+ to your Gemfile. Run "bundle install".
37
37
 
38
- Then run
38
+ Then run
39
39
 
40
40
  rails generate blacklight_range_limit:install
41
41
 
@@ -46,43 +46,43 @@ This will install some asset references in your application.js and application.c
46
46
  You have at least one solr field you want to display as a range limit, that's why you've installed this plugin. In your CatalogController, the facet configuration should look like:
47
47
 
48
48
  ```ruby
49
- config.add_facet_field 'pub_date', label: 'Publication Year', range: true
49
+ config.add_facet_field 'pub_date', label: 'Publication Year', range: true
50
50
  ```
51
-
52
- You should now get range limit display. More complicated configuration is available if desired, see Range Facet Configuration below.
51
+
52
+ You should now get range limit display. More complicated configuration is available if desired, see Range Facet Configuration below.
53
53
 
54
54
 
55
55
  You can also configure the look and feel of the Flot chart using the jQuery .data() method. On the `.facet_limit` container you want to configure, add a Flot options associative array (documented at http://people.iola.dk/olau/flot/API.txt) as the `plot-config` key. The `plot-config` key to set the `plot-config` key on the appropriate `.facet_limit` container. In order to customize the plot colors, for example, you could use this code:
56
56
 
57
57
  ```javascript
58
- $('.blacklight-year_i').data('plot-config', {
59
- selection: { color: '#C0FF83' },
60
- colors: ['#ffffff'],
61
- series: { lines: { fillColor: 'rgba(255,255,255, 0.5)' }},
62
- grid: { color: '#aaaaaa', tickColor: '#aaaaaa', borderWidth: 0 }
58
+ $('.blacklight-year_i').data('plot-config', {
59
+ selection: { color: '#C0FF83' },
60
+ colors: ['#ffffff'],
61
+ series: { lines: { fillColor: 'rgba(255,255,255, 0.5)' }},
62
+ grid: { color: '#aaaaaa', tickColor: '#aaaaaa', borderWidth: 0 }
63
63
  });
64
64
  ```
65
65
  You can add this configuration in app/assets/javascript/application.js, or anywhere else loaded before the blacklight range limit javascript.
66
66
 
67
67
  ## A note on AJAX use
68
68
 
69
- In order to calculate distribution segment ranges, we need to first know the min and max boundaries. But we don't really know that until we've fetched the result set (we use the Solr Stats component to get min and max with a result set).
69
+ In order to calculate distribution segment ranges, we need to first know the min and max boundaries. But we don't really know that until we've fetched the result set (we use the Solr Stats component to get min and max with a result set).
70
70
 
71
- So, ordinarily, after we've gotten the result set, only then can we calculate the segment ranges, and then we need to do another Solr request to actually fetch the segment range counts.
71
+ So, ordinarily, after we've gotten the result set, only then can we calculate the segment ranges, and then we need to do another Solr request to actually fetch the segment range counts.
72
72
 
73
- The plugin uses an AJAX request on the result page to do this. This means that for every application results display that includes any values at all in your range field, your application will get a second AJAX http request, and make a second solr request.
73
+ The plugin uses an AJAX request on the result page to do this. This means that for every application results display that includes any values at all in your range field, your application will get a second AJAX http request, and make a second solr request.
74
74
 
75
- If you'd like to avoid this, you can turn off segment display altogether with the :segment option below; or you can set :assumed_boundaries below to use fixed boundaries for not-yet-limited segments instead of taking boundaries from the result set.
75
+ If you'd like to avoid this, you can turn off segment display altogether with the :segment option below; or you can set :assumed_boundaries below to use fixed boundaries for not-yet-limited segments instead of taking boundaries from the result set.
76
76
 
77
77
  Note that a drill-down will never require the second request, because boundaries on a drill-down are always taken from the specified limits.
78
78
 
79
-
79
+
80
80
  ## Range Facet Configuration
81
81
 
82
- Instead of simply passing "true", you can pass a hash with additional configuration. Here's an example with all the available keys, you don't need to use them all, just the ones you want to set to non-default values.
82
+ Instead of simply passing "true", you can pass a hash with additional configuration. Here's an example with all the available keys, you don't need to use them all, just the ones you want to set to non-default values.
83
83
 
84
84
  ```ruby
85
- config.add_facet_field 'pub_date', label: 'Publication Year',
85
+ config.add_facet_field 'pub_date', label: 'Publication Year',
86
86
  range: {
87
87
  num_segments: 6,
88
88
  assumed_boundaries: [1100, Time.now.year + 2],
@@ -92,31 +92,29 @@ config.add_facet_field 'pub_date', label: 'Publication Year',
92
92
  ```
93
93
 
94
94
  * **:num_segments** :
95
- * Default 10. Approximately how many segments to divide the range into for segment facets, which become segments on the chart. Actual segments are calculated to be 'nice' values, so may not exactly match your setting.
95
+ * Default 10. Approximately how many segments to divide the range into for segment facets, which become segments on the chart. Actual segments are calculated to be 'nice' values, so may not exactly match your setting.
96
96
  * **:assumed_boundaries** :
97
- * Default null. For a result set that has not yet been limited, instead of taking boundaries from results and making a second AJAX request to fetch segments, just assume these given boundaries. If you'd like to avoid this second AJAX Solr call, you can set :assumed_boundaries to a two-element array of integers instead, and the assumed boundaries will always be used. Note this is live ruby code, you can put calculations in there like Time.now.year + 2.
97
+ * Default null. For a result set that has not yet been limited, instead of taking boundaries from results and making a second AJAX request to fetch segments, just assume these given boundaries. If you'd like to avoid this second AJAX Solr call, you can set :assumed_boundaries to a two-element array of integers instead, and the assumed boundaries will always be used. Note this is live ruby code, you can put calculations in there like Time.now.year + 2.
98
98
  * **:segments** :
99
- * Default true. If set to false, then distribution segment facets will not be loaded at all.
99
+ * Default true. If set to false, then distribution segment facets will not be loaded at all.
100
100
  * **:maxlength** :
101
101
  * Default 4. Changes the value of the `maxlength` attribute of the text boxes, which determines how many digits can be entered.
102
-
103
- ## Javascript dependencies
104
102
 
105
- The selectable histograms/barcharts are done with Javascript, using [Flot](http://code.google.com/p/flot/). Flot requires JQuery, as well as support for the HTML5 canvas element. In IE previous to IE9, canvas element support can be added with [excanvas](http://excanvas.sourceforge.net/). For the slider, [bootstrap-slider](http://www.eyecon.ro/bootstrap-slider/) is used (bootstrap-slider is actually third party, not officially bootstrap). Flot and bootstrap-slider are both directly included in blacklight_range_limit in vendor.
103
+ ## Javascript dependencies
106
104
 
107
- A `require 'blacklight_range_limit'` in a Rails asset pipeline manifest file will automatically include all of these things. The blacklight_range_limit adds just this line to your `app/assets/application.js`.
105
+ The selectable histograms/barcharts are done with Javascript, using [Flot](http://code.google.com/p/flot/). Flot requires JQuery, as well as support for the HTML5 canvas element. In IE previous to IE9, canvas element support can be added with [excanvas](http://excanvas.sourceforge.net/). For the slider, [bootstrap-slider](http://www.eyecon.ro/bootstrap-slider/) is used (bootstrap-slider is actually third party, not officially bootstrap). Flot and bootstrap-slider are both directly included in blacklight_range_limit in vendor, rather than referenced as dependencies.
108
106
 
109
- There is a copy of flot vendored in this gem for this purpose. jquery is obtained from the jquery-rails gem, which this gem depends on.
107
+ The blacklight_range_limit installer will add `require 'blacklight_range_limit'` to your `application.js` sprockets manifest. This will include flot, bootstrap-slider, and the blacklight_range_limit glue JS.
110
108
 
111
- Note this means a copy of jquery, from the jquery-rails gem, will be included in your assets by blacklight_range_limit even if you didn't include it yourself explicitly in application.js. Flot will also be included.
109
+ Both flot and blacklight_range_limit's own JS depend on JQuery; the host app is expected to include JQuery; a default Blacklight-generated app already does. (Jquery 1, 2, or 3 should work)
112
110
 
113
- If you don't want any of this gem's JS, you can simply remove the `require 'blacklight_range_limit'` line from your application.js, and hack something else together yourself.
111
+ If you don't want any of this gem's JS, you can simply remove the `require 'blacklight_range_limit'` line from your application.js, and hack something else together yourself.
114
112
 
115
113
  ## IE8, excanvas
116
114
 
117
- IE8 and below do not support the 'canvas' element, needed for flot to render the chart.
115
+ IE8 and below do not support the 'canvas' element, needed for flot to render the chart.
118
116
  Without canvas, view will cleanly degrade to an ordinary textual listing of range segments
119
- as facets.
117
+ as facets.
120
118
 
121
119
  Or, you can use excanvas.js to add canvas support to IE. `blacklight_range_limit` includes
122
120
  the `excanvas.js` file, but you'll have to manually add a reference to it to your Rails layout
@@ -130,17 +128,17 @@ local custom layout instead. Then add this to the html `<head>` section:
130
128
  For touch screens, one wants the UI to work well. The slider used is
131
129
  [bootstrap_slider](http://www.eyecon.ro/bootstrap-slider/), which says if you add
132
130
  Modernizr to your page, touch events will be supported. We haven't tested it
133
- ourselves yet.
131
+ ourselves yet.
134
132
 
135
133
  Also not sure how well the flot select UI works on a touch screen. The slider
136
- is probably the best touch UI anyway, if it can be made to work well.
134
+ is probably the best touch UI anyway, if it can be made to work well.
137
135
 
138
136
  # Tests
139
137
 
140
138
  Test coverage is not great, but there are some tests, using rspec. Run `bundle exec rake ci` or just `bundle exec rake` to seed and
141
- start a demo jetty server, build a clean test app, and run tests.
139
+ start a demo jetty server, build a clean test app, and run tests.
142
140
 
143
- Just `bundle exec rake spec` to just run tests against an existing test app and jetty server.
141
+ Just `bundle exec rake spec` to just run tests against an existing test app and jetty server.
144
142
 
145
143
  ## Local Testing
146
144
  If you want to iterate on a test locally and do not want to rebuild the
@@ -159,7 +157,7 @@ Once you are done iterating on your test you will need to stop the application s
159
157
 
160
158
  # Possible future To Do
161
159
 
162
- * StatsComponent replacement. We use StatsComponent to get min/max of result set, as well as missing count. StatsComponent is included on every non-drilldown request, so ranges and slider can be displayed. However, StatsComponent really can slow down the solr response with a large result set. So replace StatsComponent with other strategies. No ideal ones, we can use facet.missing to get missing count instead, but RSolr makes it harder than it should be to grab this info. We can use seperate solr queries to get min/max (sort on our field, asc and desc), but this is more complicated, more solr queries, and possibly requires redesign of AJAXy stuff, so even a lone slider can have min/max.
160
+ * StatsComponent replacement. We use StatsComponent to get min/max of result set, as well as missing count. StatsComponent is included on every non-drilldown request, so ranges and slider can be displayed. However, StatsComponent really can slow down the solr response with a large result set. So replace StatsComponent with other strategies. No ideal ones, we can use facet.missing to get missing count instead, but RSolr makes it harder than it should be to grab this info. We can use seperate solr queries to get min/max (sort on our field, asc and desc), but this is more complicated, more solr queries, and possibly requires redesign of AJAXy stuff, so even a lone slider can have min/max.
163
161
  * tests
164
- * In cases where an AJAX request is needed to fetch more results, don't trigger the AJAX until the range facet has actually been opened/shown. Currently it's done on page load.
165
- * If :assumed_boundaries ends up popular, we could provide a method to fetch min and max values from entire corpus on app startup or in a rake task, and automatically use these as :assumed_boundaries.
162
+ * In cases where an AJAX request is needed to fetch more results, don't trigger the AJAX until the range facet has actually been opened/shown. Currently it's done on page load.
163
+ * If :assumed_boundaries ends up popular, we could provide a method to fetch min and max values from entire corpus on app startup or in a rake task, and automatically use these as :assumed_boundaries.
data/Rakefile CHANGED
@@ -6,8 +6,6 @@ require 'rspec/core/rake_task'
6
6
  require 'engine_cart/rake_task'
7
7
  require 'solr_wrapper'
8
8
 
9
- EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc
10
-
11
9
  task :default => :ci
12
10
 
13
11
  desc "Run specs"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.0.0
1
+ 7.1.0
@@ -1,8 +1,10 @@
1
1
  // Master manifest file for engine, so local app can require
2
2
  // this one file, but get all our files -- and local app
3
3
  // require does not need to change if we change file list.
4
+ //
5
+ // Note JQuery is required to be loaded for flot and blacklight_range_limit
6
+ // JS to work, expect host app to load it.
4
7
 
5
- //= require 'jquery'
6
8
 
7
9
  //= require 'flot/jquery.flot.js'
8
10
  //= require 'flot/jquery.flot.selection.js'
@@ -13,10 +13,10 @@
13
13
  <li class="selected">
14
14
  <span class="facet-label">
15
15
  <span class="selected"><%= range_display(field_name) %></span>
16
- <%= link_to remove_range_param(field_name), :class=>"remove", :title => t('blacklight.range_limit.remove_limit') do %>
17
- <span class="glyphicon glyphicon-remove"></span>
16
+ <%= link_to remove_range_param(field_name), :class=>"remove", :title => t('blacklight.range_limit.remove_limit') do %>
17
+ <span class="remove-icon">✖</span>
18
18
  <span class="sr-only">[<%= t('blacklight.range_limit.remove_limit') %>]</span>
19
- <% end %>
19
+ <% end %>
20
20
  </span>
21
21
  <span class="selected facet-count"><%= number_with_delimiter(@response.total) %></span>
22
22
  </li>
@@ -51,7 +51,7 @@
51
51
 
52
52
  <% if (min = range_results_endpoint(field_name, :min)) &&
53
53
  (max = range_results_endpoint(field_name, :max)) %>
54
- <p class="range subsection <%= "slider_js" unless field_config[:slider_js] == false %>">
54
+ <p class="range subsection <%= "slider_js" unless field_config[:slider_js] == false %>">
55
55
  Current results range from <span class="min"><%= range_results_endpoint(field_name, :min) %></span> to <span class="max"><%= range_results_endpoint(field_name, :max) %></span>
56
56
  </p>
57
57
 
@@ -71,17 +71,15 @@
71
71
  <% end %>
72
72
  <% end %>
73
73
 
74
-
75
-
76
74
  <% if (stats = stats_for_field(field_name)) && stats["missing"] > 0 %>
77
75
  <ul class="missing list-unstyled facet-values subsection">
78
76
  <li>
79
77
  <span class="facet-label">
80
78
  <%= link_to BlacklightRangeLimit.labels[:missing], add_range_missing(field_name) %>
81
79
  </span>
82
- <span class="facet-count">
83
- <%= number_with_delimiter(stats["missing"]) %>
84
- </span>
80
+ <%# note important there be no whitespace inside facet-count to avoid
81
+ bug in some versions of Blacklight (including 7.1.0.alpha) %>
82
+ <span class="facet-count"><%= number_with_delimiter(stats["missing"]) %></span>
85
83
  </li>
86
84
  </ul>
87
85
  <% end %>
@@ -18,9 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.license = 'Apache 2.0'
19
19
 
20
20
  s.add_dependency 'rails', '>= 3.0'
21
- s.add_dependency 'jquery-rails' # our JS needs jquery_rails
22
- s.add_dependency 'blacklight'
23
- s.add_dependency 'tether-rails'
21
+ s.add_dependency 'blacklight', '>= 7.0'
24
22
 
25
23
  s.add_development_dependency 'rspec', '~> 3.0'
26
24
  s.add_development_dependency 'rspec-rails'
@@ -28,5 +26,7 @@ Gem::Specification.new do |s|
28
26
  s.add_development_dependency 'sqlite3'
29
27
  s.add_development_dependency 'launchy'
30
28
  s.add_development_dependency 'solr_wrapper', '~> 0.14'
31
- s.add_development_dependency 'engine_cart', '~> 1.0'
29
+ s.add_development_dependency 'engine_cart', '~> 2.0'
30
+ s.add_development_dependency 'selenium-webdriver', '~> 3.12.0'
31
+ s.add_development_dependency 'webdrivers'
32
32
  end
@@ -1,8 +1,6 @@
1
1
  require 'blacklight'
2
2
  require 'blacklight_range_limit'
3
3
  require 'rails'
4
- require 'jquery-rails'
5
- require 'tether-rails'
6
4
 
7
5
  module BlacklightRangeLimit
8
6
  class Engine < Rails::Engine
@@ -41,9 +41,6 @@ module BlacklightRangeLimit
41
41
 
42
42
  }
43
43
  end
44
- inject_into_file 'app/assets/javascripts/application.js', before: '// Required by Blacklight' do
45
- "\n//= require tether\n"
46
- end
47
44
  end
48
45
 
49
46
 
@@ -16,7 +16,7 @@ module BlacklightRangeLimit
16
16
 
17
17
  def install_search_builder
18
18
  path = 'app/models/search_builder.rb'
19
- if File.exists? path
19
+ if File.exist? path
20
20
  inject_into_file path, after: /include Blacklight::Solr::SearchBuilderBehavior.*$/ do
21
21
  "\n include BlacklightRangeLimit::RangeLimitBuilder\n"
22
22
  end
@@ -25,8 +25,20 @@ module BlacklightRangeLimit
25
25
  end
26
26
  end
27
27
 
28
+ # Adds range limit behavior to search history controller
28
29
  def install_search_history_controller
29
- copy_file "search_history_controller.rb", "app/controllers/search_history_controller.rb"
30
+ path = 'app/controllers/search_history_controller.rb'
31
+
32
+ # If local copy of search history controller exists, add range limit helpers
33
+ if File.exist? path
34
+ inject_into_file path, after: /include Blacklight::SearchHistory.*$/ do
35
+ "\n helper BlacklightRangeLimit::ViewHelperOverride"\
36
+ "\n helper RangeLimitHelper"
37
+ end
38
+ # Otherwise copies search history controller to application
39
+ else
40
+ copy_file 'search_history_controller.rb', path
41
+ end
30
42
  end
31
43
 
32
44
  def install_routing_concern
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class SearchHistoryController < ApplicationController
2
3
  include Blacklight::SearchHistory
3
4
 
@@ -24,7 +24,7 @@ describe "Blacklight Range Limit" do
24
24
  click_link 'View distribution'
25
25
  click_link '2000 to 2008'
26
26
 
27
- expect(page).to have_content "2000 to 2008 [remove] 12"
27
+ expect(page).to have_content "2000 to 2008 [remove] 12"
28
28
  end
29
29
 
30
30
  it "should not include page parameter" do
@@ -61,9 +61,9 @@ describe "Blacklight Range Limit with configured input labels" do
61
61
  maxlength: 6
62
62
  }
63
63
  config.default_solr_params[:'facet.field'] = config.facet_fields.keys
64
- end
65
- end
66
-
64
+ end
65
+ end
66
+
67
67
  it "should show the range limit facet with configured labels and maxlength" do
68
68
  visit '/catalog'
69
69
  expect(page).to have_selector 'label.sr-only[for="range_pub_date_si_begin"]', :text => 'from publication date'
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe 'JavaScript', js: true do
6
+ it 'initializes canvas chart' do
7
+ visit search_catalog_path
8
+ click_link 'Publication Date'
9
+ expect(page).to have_css '.flot-base'
10
+ end
11
+ end
@@ -5,6 +5,9 @@ EngineCart.load_application!
5
5
 
6
6
  require 'rspec/rails'
7
7
  require 'capybara/rspec'
8
+ require 'selenium-webdriver'
9
+
10
+ Capybara.javascript_driver = :selenium_chrome_headless
8
11
 
9
12
  RSpec.configure do |config|
10
13
  # rspec-rails 3 will no longer automatically infer an example group's spec type
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight_range_limit
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-17 00:00:00.000000000 Z
12
+ date: 2019-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -25,48 +25,20 @@ dependencies:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '3.0'
28
- - !ruby/object:Gem::Dependency
29
- name: jquery-rails
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: '0'
35
- type: :runtime
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- version: '0'
42
28
  - !ruby/object:Gem::Dependency
43
29
  name: blacklight
44
30
  requirement: !ruby/object:Gem::Requirement
45
31
  requirements:
46
32
  - - ">="
47
33
  - !ruby/object:Gem::Version
48
- version: '0'
49
- type: :runtime
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: '0'
56
- - !ruby/object:Gem::Dependency
57
- name: tether-rails
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0'
34
+ version: '7.0'
63
35
  type: :runtime
64
36
  prerelease: false
65
37
  version_requirements: !ruby/object:Gem::Requirement
66
38
  requirements:
67
39
  - - ">="
68
40
  - !ruby/object:Gem::Version
69
- version: '0'
41
+ version: '7.0'
70
42
  - !ruby/object:Gem::Dependency
71
43
  name: rspec
72
44
  requirement: !ruby/object:Gem::Requirement
@@ -157,14 +129,42 @@ dependencies:
157
129
  requirements:
158
130
  - - "~>"
159
131
  - !ruby/object:Gem::Version
160
- version: '1.0'
132
+ version: '2.0'
161
133
  type: :development
162
134
  prerelease: false
163
135
  version_requirements: !ruby/object:Gem::Requirement
164
136
  requirements:
165
137
  - - "~>"
166
138
  - !ruby/object:Gem::Version
167
- version: '1.0'
139
+ version: '2.0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: selenium-webdriver
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: 3.12.0
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: 3.12.0
154
+ - !ruby/object:Gem::Dependency
155
+ name: webdrivers
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
168
  description:
169
169
  email:
170
170
  - blacklight-development@googlegroups.com
@@ -229,6 +229,7 @@ files:
229
229
  - solr/conf/xslt/luke.xsl
230
230
  - solr/sample_solr_documents.yml
231
231
  - spec/features/blacklight_range_limit_spec.rb
232
+ - spec/features/javascript_spec.rb
232
233
  - spec/fixtures/solr_documents/zero_year.yml
233
234
  - spec/helpers/blacklight_range_limit_helper_spec.rb
234
235
  - spec/lib/blacklight_range_limit/segment_calculation_spec.rb
@@ -260,8 +261,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
261
  version: '0'
261
262
  requirements: []
262
263
  rubyforge_project:
263
- rubygems_version: 2.6.14.3
264
+ rubygems_version: 2.7.6
264
265
  signing_key:
265
266
  specification_version: 4
266
267
  summary: Blacklight Range Limit plugin
267
- test_files: []
268
+ test_files:
269
+ - spec/features/blacklight_range_limit_spec.rb
270
+ - spec/features/javascript_spec.rb
271
+ - spec/fixtures/solr_documents/zero_year.yml
272
+ - spec/helpers/blacklight_range_limit_helper_spec.rb
273
+ - spec/lib/blacklight_range_limit/segment_calculation_spec.rb
274
+ - spec/spec_helper.rb
275
+ - spec/test_app_templates/Gemfile.extra
276
+ - spec/test_app_templates/lib/generators/test_app_generator.rb