filterrific 5.0.0 → 5.2.2

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
2
  SHA1:
3
- metadata.gz: b450ac700cb2087731e8d30c8c4e94bc7f90df26
4
- data.tar.gz: fce6b4218644562383de7f9a9bfdf9d71fd75c5f
3
+ metadata.gz: 5226106f7944a5b6c08d8f568185d4e6fcf0c561
4
+ data.tar.gz: 2e4b24d697de15d10a5dddf6a7b444b5564950ed
5
5
  SHA512:
6
- metadata.gz: 2137ab79b5a0bdd7d40d07046208ec8f5b3d73ad7f883f2ea3d5516c00c5c1fb5eb17c811b30bb6f4001549eb5168ec3b38b7038bbca925d87c969591c423b81
7
- data.tar.gz: 4397b2c6d32ff3acc39fe4d3ea31f9d6799583b65c55a75bf7bf1e3f759eeb2b7ecd90d5ec853cfe9dc859085f0955b13fcbab3bebfc423a7bda8a8d278339e3
6
+ metadata.gz: 7829c794eb5e1a2e19a95cbb2e9651550f8c6cb5c123709a78c5fd5658c569a2c78963144f68b07cb30de9d28372ad3bfaf0087499a91f48f2e5c0597ed09d02
7
+ data.tar.gz: 4c7894ba6c9c1e9e5cde222bd69a088761dda82ccc01c0a1c12a1db4ed9e489b1f03b008bdc09dad8563355d95f138491cc17bd5c78174f1b9f6b46c3a4f0ec9
data/CHANGELOG.md CHANGED
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  Filterrific major versions match the Ruby on Rails major versions they work with.
9
9
 
10
+ ## [5.2.2] - Jul. 11, 2021
11
+
12
+ * Fixed Ruby 2.7 deprecated warning when trying to regex match an Integer.
13
+ * Added ability to pass custom url parameter instead of default :filterrific.
14
+ * Added basic Aria attrs to spinner for accessibility.
15
+ * Improved concurrent ajax requests: Abort prior request when new ones are triggered.
16
+
17
+ ## [5.2.1] - Aug. 5, 2019
18
+
19
+ * Fixed issue where uncommitted code was pushed to rubygems and broke array filters.
20
+
21
+ ## [5.2.0] - Jul. 21, 2019
22
+
23
+ * Make Filterrific master branch compatible with Rails 5 and 6.
24
+ * Trigger synthetic JS events before and after form submission ajax requests.
25
+
26
+ ## [5.1.0] - Aug. 3, 2018
27
+
28
+ * Breaking change: all Filterrific params are sanitized by default to prevent XSS attacks. You can disable sanitization (you really shouldn't!) by setting the :sanitize_params option to false when calling #initialize_filterrific in the controller.
29
+
30
+ ## [5.0.1] - Jan. 2, 2018
31
+
32
+ * Changed all instances of #deep_stringify_keys back to #stringify_keys. This was changed in 5.0.0, but it shouldn't have been changed.
33
+
10
34
  ## [5.0.0] - Dec. 31, 2017
11
35
 
12
36
  * We're switching to a new versioning strategy for Filterrific: Filterrific major releases (the first number in the version) will be matched with the supported major version of Rails. Minor and path versions may diverge from Rails. That means for any version of Rails 5.x you will use the most current version of Filterrific 5.x.
data/README.md CHANGED
@@ -39,13 +39,13 @@ to find out more!
39
39
 
40
40
  Every commit to Filterrific is automatically tested against the following scenarios:
41
41
 
42
- |Filterrific version | Rails version | Ruby environments | Database adapters | Build status |
43
- |--------------------|---------------|--------------------------------|------------------------------------|--------------|
44
- | 5.x | Rails 5.x | MRI 2.0.0, 2.1.7, 2.2.3, 2.3.1 | mysql2, postgresql |[![Build Status](https://travis-ci.org/jhund/filterrific_demo.svg?branch=rails-5.x)](https://travis-ci.org/jhund/filterrific_demo)|
45
- | 4.x | Rails 4.x | MRI 2.0.0, 2.1.7, 2.2.3, 2.3.1 | mysql, mysql2, postgresql, sqlite3 |[![Build Status](https://travis-ci.org/jhund/filterrific_demo.svg?branch=rails-4.x)](https://travis-ci.org/jhund/filterrific_demo)|
46
- | 3.x | Rails 3.2 | MRI 2.0.0, 2.1.7 | mysql, mysql2, postgresql, sqlite3 |[![Build Status](https://travis-ci.org/jhund/filterrific_demo.svg?branch=rails-3.x)](https://travis-ci.org/jhund/filterrific_demo)|
47
- | 2.x | Rails 3.2 | MRI 1.9.3 | mysql, mysql2, postgresql, sqlite3 | [N/A]
48
- | 1.x | < 3.2 | MRI <= 1.9.3 | mysql, mysql2, postgresql, sqlite3 | [N/A]
42
+ |Filterrific version | Rails version | Ruby environments | Database adapters | Build status |
43
+ |--------------------|----------------|--------------------------------|------------------------------------|--------------|
44
+ | 5.x | Rails 5.x, 6.x | MRI 2.0.0, 2.1.7, 2.2.3, 2.3.1 | mysql2, postgresql |[![Build Status](https://travis-ci.org/jhund/filterrific_demo.svg?branch=rails-5.x)](https://travis-ci.org/jhund/filterrific_demo)|
45
+ | 4.x | Rails 4.x | MRI 2.0.0, 2.1.7, 2.2.3, 2.3.1 | mysql, mysql2, postgresql, sqlite3 |[![Build Status](https://travis-ci.org/jhund/filterrific_demo.svg?branch=rails-4.x)](https://travis-ci.org/jhund/filterrific_demo)|
46
+ | 3.x | Rails 3.2 | MRI 2.0.0, 2.1.7 | mysql, mysql2, postgresql, sqlite3 | Not tested|
47
+ | 2.x | Rails 3.2 | MRI 1.9.3 | mysql, mysql2, postgresql, sqlite3 | Not tested|
48
+ | 1.x | < 3.2 | MRI <= 1.9.3 | mysql, mysql2, postgresql, sqlite3 | Not tested|
49
49
 
50
50
  ### Guidelines for submitting issues
51
51
 
@@ -66,7 +66,8 @@ If you think you've found a bug, or have a feature request, then create an issue
66
66
  ### Resources
67
67
 
68
68
  * [Documentation](http://filterrific.clearcove.ca)
69
- * [Live demo](http://filterrific-demo.herokuapp.com)
69
+ * [Live demo](https://filterrific-demo.herokuapp.com) using classic Rails views.
70
+ * [Live JSON API demo](https://filterrific-json-api-demo.herokuapp.com/) using React and Mobx.
70
71
  * [Changelog](https://github.com/jhund/filterrific/blob/master/CHANGELOG.md)
71
72
  * [Source code (github)](https://github.com/jhund/filterrific)
72
73
  * [Issues](https://github.com/jhund/filterrific/issues)
@@ -85,4 +86,4 @@ If you think you've found a bug, or have a feature request, then create an issue
85
86
 
86
87
  ### Copyright
87
88
 
88
- Copyright (c) 2010 - 2017 Jo Hund. See [(MIT) LICENSE](https://github.com/jhund/filterrific/blob/master/MIT-LICENSE) for details.
89
+ Copyright (c) 2010 - 2019 Jo Hund. See [(MIT) LICENSE](https://github.com/jhund/filterrific/blob/master/MIT-LICENSE) for details.
@@ -21,15 +21,25 @@ if (typeof Filterrific === 'undefined') {
21
21
  Filterrific.submitFilterForm = function(){
22
22
  var form = $(this).parents("form"),
23
23
  url = form.attr("action");
24
+ // send before event
25
+ $(form).trigger('loadingFilterrificResults');
24
26
  // turn on spinner
25
27
  $('.filterrific_spinner').show();
28
+
29
+ // Abort previous ajax request
30
+ if (Filterrific.lastRequest && Filterrific.lastRequest.readyState != 4) {
31
+ Filterrific.lastRequest.abort();
32
+ }
33
+
26
34
  // Submit ajax request
27
- $.ajax({
35
+ Filterrific.lastRequest = $.ajax({
28
36
  url: url,
29
37
  data: form.serialize(),
30
38
  type: 'GET',
31
39
  dataType: 'script'
32
40
  }).done(function( msg ) {
41
+ // send after event
42
+ $(form).trigger('loadedFilterrificResults');
33
43
  $('.filterrific_spinner').hide();
34
44
  });
35
45
  };
@@ -0,0 +1,12 @@
1
+ # Filterrific JS handling
2
+
3
+ Filterrific JS and assets can be used in a number of scenarios:
4
+
5
+ ## Rails Sprockets (asset pipeline)
6
+
7
+ ## Rails with webpacker
8
+
9
+ * https://www.reddit.com/r/rails/comments/d4o691/can_webpacker_pull_in_assets_from_a_rails_engine/
10
+
11
+ ## No JS assets, just API mode
12
+
@@ -1,3 +1,7 @@
1
+ Flexport's style guide has interesting guidelines for filter widgets:
2
+
3
+ https://www.flexport.com/design/guidelines/filtering
4
+
1
5
  All view related aspects of filterrific are handled via the view API:
2
6
 
3
7
  <%= filterrific_form_for @filterrific do |f| %>
data/doc/meta.md CHANGED
@@ -15,9 +15,10 @@ For more info see: https://github.com/svenfuchs/gem-release#usage
15
15
  * `gem bump --version major` # 0.0.1 -> 1.0.0
16
16
  * `gem bump --version minor` # 0.0.1 -> 0.1.0
17
17
  * `gem bump --version patch` # 0.0.1 -> 0.0.2
18
- 4. Release it.
18
+ 4. Make sure there are no uncommitted changes! They will be pushed to rubygems.
19
+ 5. Release it.
19
20
  * `gem release`
20
- 5. Create a git tag and push to origin.
21
+ 6. Create a git tag and push to origin.
21
22
  `gem tag`
22
23
 
23
24
 
@@ -37,8 +38,8 @@ a branch for each minor version of Rails that is tested and supported.
37
38
  Sequence of a release:
38
39
 
39
40
  * finish updates in filterrific
40
- * run specs in each filterrific_demo branch (via `rake`)
41
- * when all specs pass, release filterrific (see above for steps)
41
+ * update filterrific_demo Gemfile to refer to local filterrific via path: "../filterrific"
42
+ * start the app and exercise it (currently there are no automated tests)
43
+ * when everything works as expected, release filterrific (see above for steps)
42
44
  * after new filterrific is released, add new release version to each branch in
43
- filterrific_demo and push each branch to trigger a Travis CI build for the
44
- new filterrific release.
45
+ filterrific_demo.
data/doc/scratchpad.md CHANGED
@@ -1,13 +1,38 @@
1
1
  # Filterrific scratchpad
2
2
 
3
+ ## 2021 Initiative
4
+
5
+ * Update for Rails 6
6
+ * Implement API only version (no frontend)
7
+ * Update scope docs to use AREL
8
+ * Implement/document various front end scenarios:
9
+ * React
10
+ * Stimulus
11
+ * jQuery
12
+ * sprockets/webpacker
13
+ * Thoughts: Support the rails defaults (webpacker or sprockets?) out of the box, batteries included. Document how to do everything else.
14
+ * Work through issues and pull requests
15
+
16
+ improve the filterrific frontend handling:
17
+
18
+ * Remove invocation of init, document for devs to do it manually
19
+ https://github.com/jhund/filterrific/issues/199
20
+ * Replace jquery with vanilla JS
21
+ * Provide filterrific API version
22
+ * Make compatible with Rails 6
23
+ * Remove jquery dependency, make it easier to use with webpacker, document how to do init
24
+ https://github.com/jhund/filterrific/issues/198
25
+
26
+ * Support the following js scenarios:
27
+ * Sprockets
28
+ * Webpacker
29
+ * API only (e.g., for React)
30
+
31
+
3
32
  ## TODO
4
33
 
5
- * [x] Go to deep_stringify_keys (in ActionControllerExtension#initialize_filterrific)
6
- * [x] Lock Gemfile to correct version of Rails
7
- * [x] Add Rails major version check to filterrific.rb
8
- * [ ] In ParamSet#condition_filterrific_params: Why are we type casting integers?
9
- * [ ] add check that no filter_name conflicts with existing methods on included ActiveRecord class (See https://github.com/jhund/filterrific/issues/17)
10
- * [x] I think this is done: fix reset url, make controller method, helper method
34
+ * add check that no filter_name conflicts with existing methods on included ActiveRecord class (See https://github.com/jhund/filterrific/issues/17)
35
+ * Update SW architecture and documentation according to Osterhuis Philosophy of software architecture/design book (mark advanced controller options as such to keep interface to learn simple)
11
36
 
12
37
  ## Travis
13
38
 
@@ -30,7 +55,6 @@ Ruby 1.8.7
30
55
  Ruby 1.9.3
31
56
  Ruby 2.0
32
57
  Ruby 2.1
33
- Ruby 2.2 No No No No
34
58
 
35
59
  Each combination is also tested for postgres and mysql
36
60
 
data/lib/filterrific.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
- if Rails::VERSION::MAJOR != 5
4
- raise "\n\nThis version of Filterrific only works with Rails 5.x.\nPlease see the Filterrific README for the correct version of Filterrific to use with your version of Rails!\n\n"
3
+ if ![5,6].include?(Rails::VERSION::MAJOR)
4
+ raise "\n\nThis version of Filterrific only works with Rails 5 and 6.\nPlease see the Filterrific README for the correct version of Filterrific to use with your version of Rails!\n\n"
5
5
  end
6
6
 
7
7
  require 'filterrific/version'
@@ -10,8 +10,9 @@ module Filterrific
10
10
  protected
11
11
 
12
12
  # @param model_class [Class]
13
- # @param filterrific_params [Hash] typically the Rails request params under
14
- # the :filterrific key (params[:filterrific]), however can be any Hash.
13
+ # @param filterrific_params [ActionController::Params, Hash] typically the
14
+ # Rails request params under the :filterrific key (params[:filterrific]),
15
+ # however can be any Hash.
15
16
  # @param opts [Hash, optional]
16
17
  # @option opts [Array<String>, optional] :available_filters
17
18
  # further restrict which of the filters specified in the model are
@@ -25,10 +26,13 @@ module Filterrific
25
26
  # @option opts [Hash, optional] :select_options
26
27
  # these are available in the view to populate select lists and other
27
28
  # dynamic values.
29
+ # @option opts [Boolean, optional] :sanitize_params
30
+ # if true, sanitizes all filterrific params to prevent reflected (or stored) XSS attacks.
31
+ # Defaults to true.
28
32
  # @return [Filterrific::ParamSet]
29
33
  def initialize_filterrific(model_class, filterrific_params, opts = {})
30
- f_params = (filterrific_params || {}).deep_stringify_keys
31
- opts = opts.deep_stringify_keys
34
+ f_params = (filterrific_params || {}).stringify_keys
35
+ opts = opts.stringify_keys
32
36
  pers_id = if false == opts['persistence_id']
33
37
  nil
34
38
  else
@@ -57,19 +61,50 @@ module Filterrific
57
61
  # Computes filterrific params using a number of strategies. Limits params
58
62
  # to 'available_filters' if given via opts.
59
63
  # @param model_class [ActiveRecord::Base]
60
- # @param filterrific_params [Hash]
64
+ # @param filterrific_params [ActionController::Params, Hash]
61
65
  # @param opts [Hash]
66
+ # @option opts [Boolean, optional] "sanitize_params"
67
+ # if true, sanitizes all filterrific params to prevent reflected (or stored) XSS attacks.
68
+ # Defaults to true.
62
69
  # @param persistence_id [String, nil]
63
70
  def compute_filterrific_params(model_class, filterrific_params, opts, persistence_id)
71
+ opts = { "sanitize_params" => true }.merge(opts.stringify_keys)
64
72
  r = (
65
73
  filterrific_params.presence || # start with passed in params
66
74
  (persistence_id && session[persistence_id].presence) || # then try session persisted params if persistence_id is present
67
75
  opts['default_filter_params'] || # then use passed in opts
68
76
  model_class.filterrific_default_filter_params # finally use model_class defaults
69
- ).deep_stringify_keys
77
+ ).stringify_keys
70
78
  r.slice!(*opts['available_filters'].map(&:to_s)) if opts['available_filters']
79
+ # Sanitize params to prevent reflected XSS attack
80
+ if opts["sanitize_params"]
81
+ r.each { |k,v| r[k] = sanitize_filterrific_param(r[k]) }
82
+ end
71
83
  r
72
84
  end
73
85
 
86
+ # Sanitizes value to prevent xss attack.
87
+ # Uses Rails ActionView::Helpers::SanitizeHelper.
88
+ # @param val [Object] the value to sanitize. Can be any kind of object. Collections
89
+ # will have their members sanitized recursively.
90
+ def sanitize_filterrific_param(val)
91
+ case val
92
+ when Array
93
+ # Return Array
94
+ val.map { |e| sanitize_filterrific_param(e) }
95
+ when Hash
96
+ # Return Hash
97
+ val.inject({}) { |m, (k,v)| m[k] = sanitize_filterrific_param(v); m }
98
+ when NilClass
99
+ # Nothing to do, use val as is
100
+ val
101
+ when String
102
+ helpers.sanitize(val)
103
+ else
104
+ # Nothing to do, use val as is
105
+ val
106
+ end
107
+ end
108
+
74
109
  end
75
110
  end
@@ -27,7 +27,7 @@ module Filterrific
27
27
  def render_filterrific_spinner
28
28
  %(
29
29
  <span class="filterrific_spinner" style="display:none;">
30
- #{ image_tag('filterrific/filterrific-spinner.gif') }
30
+ #{ image_tag('filterrific/filterrific-spinner.gif', alt: '', role: 'presentation') }
31
31
  </span>
32
32
  ).html_safe
33
33
  end
@@ -74,6 +74,7 @@ module Filterrific
74
74
  :label => sort_key.to_s.humanize,
75
75
  :sorting_scope_name => :sorted_by,
76
76
  :url_for_attrs => {},
77
+ :as => :filterrific
77
78
  }.merge(opts)
78
79
  opts.merge!(
79
80
  :html_attrs => opts[:html_attrs].with_indifferent_access,
@@ -110,7 +111,7 @@ module Filterrific
110
111
  new_filterrific_params = filterrific.to_hash
111
112
  .with_indifferent_access
112
113
  .merge(opts[:sorting_scope_name] => new_sorting)
113
- url_for_attrs = opts[:url_for_attrs].merge(:filterrific => new_filterrific_params)
114
+ url_for_attrs = opts[:url_for_attrs].merge(opts[:as] => new_filterrific_params)
114
115
  link_to(
115
116
  safe_join([opts[:label], opts[:current_sort_direction_indicator]], ' '),
116
117
  url_for(url_for_attrs),
@@ -133,7 +134,7 @@ module Filterrific
133
134
  new_filterrific_params = filterrific.to_hash
134
135
  .with_indifferent_access
135
136
  .merge(opts[:sorting_scope_name] => new_sorting)
136
- url_for_attrs = opts[:url_for_attrs].merge(:filterrific => new_filterrific_params)
137
+ url_for_attrs = opts[:url_for_attrs].merge(opts[:as] => new_filterrific_params)
137
138
  link_to(
138
139
  opts[:label],
139
140
  url_for(url_for_attrs),
@@ -98,7 +98,7 @@ module Filterrific
98
98
  def assign_filterrific_default_filter_params(opts)
99
99
  self.filterrific_default_filter_params = (
100
100
  opts['default_filter_params'] || {}
101
- ).deep_stringify_keys
101
+ ).stringify_keys
102
102
  end
103
103
 
104
104
  def validate_filterrific_default_filter_params
@@ -101,7 +101,7 @@ module Filterrific
101
101
  # type cast Hash to OpenStruct so that nested params render correctly
102
102
  # in the form
103
103
  fp[key] = OpenStruct.new(fp[key])
104
- when val =~ integer_detector_regex
104
+ when val.is_a?(String) && val =~ integer_detector_regex
105
105
  # type cast integer
106
106
  fp[key] = fp[key].to_i
107
107
  end
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  module Filterrific
4
- VERSION = "5.0.0"
4
+ VERSION = "5.2.2"
5
5
  end
@@ -1,5 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'filterrific/action_controller_extension'
3
+ require 'action_view/helpers/sanitize_helper'
3
4
 
4
5
  module Filterrific
5
6
 
@@ -9,6 +10,12 @@ module Filterrific
9
10
  include ActionControllerExtension
10
11
  def action_name; 'index'; end
11
12
  def controller_name; 'test_controller'; end
13
+ # In a production app the #helpers method makes Rails helpers available in
14
+ # a controller instance. For testing our module outside of rails, we just
15
+ # include the required helpers in the TestController class
16
+ # and then delegate #helpers to self.
17
+ include ActionView::Helpers::SanitizeHelper
18
+ def helpers; self; end
12
19
  def session
13
20
  {
14
21
  'test_controller#index' => {
@@ -100,6 +107,46 @@ module Filterrific
100
107
  ).must_equal({ 'filter1' => 1 })
101
108
  end
102
109
 
110
+ it "sanitizes filterrific params by default" do
111
+ TestController.new.send(
112
+ :compute_filterrific_params,
113
+ TestModelClass,
114
+ { 'filter1' => "1' <script>alert('xss attack!');</script>" },
115
+ { },
116
+ 'test_controller#index'
117
+ ).must_equal({ 'filter1' => "1' alert('xss attack!');" })
118
+ end
119
+
120
+ it "sanitizes filterrific Array params" do
121
+ TestController.new.send(
122
+ :compute_filterrific_params,
123
+ TestModelClass,
124
+ { 'filter1' => ["1' <script>alert('xss attack!');</script>", 3] },
125
+ { },
126
+ 'test_controller#index'
127
+ ).must_equal({ 'filter1' => ["1' alert('xss attack!');", 3] })
128
+ end
129
+
130
+ it "sanitizes filterrific Hash params" do
131
+ TestController.new.send(
132
+ :compute_filterrific_params,
133
+ TestModelClass,
134
+ { 'filter1' => { 1 => "1' <script>alert('xss attack!');</script>", 2 => 3} },
135
+ { },
136
+ 'test_controller#index'
137
+ ).must_equal({ 'filter1' => { 1 => "1' alert('xss attack!');", 2 => 3 } })
138
+ end
139
+
140
+ it "skips param sanitization if told so via options" do
141
+ TestController.new.send(
142
+ :compute_filterrific_params,
143
+ TestModelClass,
144
+ { 'filter1' => "1' <script>alert('xss attack!');</script>" },
145
+ { :sanitize_params => false },
146
+ 'test_controller#index'
147
+ ).must_equal({ 'filter1' => "1' <script>alert('xss attack!');</script>" })
148
+ end
149
+
103
150
  end
104
151
 
105
152
  describe '#reset_filterrific_url' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filterrific
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jo Hund
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-30 00:00:00.000000000 Z
11
+ date: 2021-07-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Filterrific is a Rails Engine plugin that makes it easy to filter, search,
14
14
  and sort your ActiveRecord lists.
@@ -28,6 +28,7 @@ files:
28
28
  - doc/Overview diagram.graffle/image1.tiff
29
29
  - doc/development_notes/api_design.txt
30
30
  - doc/development_notes/controller_api.txt
31
+ - doc/development_notes/javascript_handling.md
31
32
  - doc/development_notes/model_api.rb
32
33
  - doc/development_notes/view_api.txt
33
34
  - doc/meta.md
@@ -37,11 +38,9 @@ files:
37
38
  - lib/filterrific/action_view_extension.rb
38
39
  - lib/filterrific/active_record_extension.rb
39
40
  - lib/filterrific/engine.rb
40
- - lib/filterrific/engine_api.rb
41
41
  - lib/filterrific/has_reset_filterrific_url_mixin.rb
42
42
  - lib/filterrific/param_set.rb
43
43
  - lib/filterrific/version.rb
44
- - lib/filterrific_api.rb
45
44
  - spec/filterrific/action_controller_extension_spec.rb
46
45
  - spec/filterrific/action_view_extension_spec.rb
47
46
  - spec/filterrific/active_record_extension_spec.rb
@@ -68,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
67
  version: '0'
69
68
  requirements: []
70
69
  rubyforge_project:
71
- rubygems_version: 2.6.11
70
+ rubygems_version: 2.6.14.3
72
71
  signing_key:
73
72
  specification_version: 4
74
73
  summary: A Rails engine plugin for filtering ActiveRecord lists.
@@ -1,26 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- require 'filterrific/param_set'
4
-
5
- require 'filterrific/action_controller_extension'
6
- require 'filterrific/active_record_extension'
7
-
8
- module Filterrific
9
- class EngineApi < ::Rails::Engine
10
-
11
- TODO: Since this is API only, I don't think we need an engine!
12
- # It's an engine so that we can add javascript and image assets
13
- # to the asset pipeline.
14
-
15
- isolate_namespace Filterrific
16
-
17
- ActiveSupport.on_load :action_controller do
18
- include Filterrific::ActionControllerExtension
19
- end
20
-
21
- ActiveSupport.on_load :active_record do
22
- extend Filterrific::ActiveRecordExtension
23
- end
24
-
25
- end
26
- end
@@ -1,7 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- require 'filterrific/version'
4
- require 'filterrific/engine_api'
5
-
6
- module Filterrific
7
- end