sn_filterable 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: c1b9cd4e29b1ae510d91132581e2bbd2f161ce990fc1e7ec6608d6f7bdb1b41c
4
- data.tar.gz: 88eca5cf836c294bfb9853dc8bf321d63d7896115e6bdafc35faa8218c66f726
3
+ metadata.gz: 4d4ca6d509892a2c953861a953127b8488669f6b8b5a4ffad77e18c70797961c
4
+ data.tar.gz: f395268a282728c7b7632a9638cc7ee325eca5de6e3c9ff46f346f897794cc85
5
5
  SHA512:
6
- metadata.gz: d0ac7e1edc645cb96066facb446d424237abfb064c2143863a97cc88dbc758483f62be811403728fb0b14e3436a654877bbedcc9783c0b59e27a30b9c7b3c09b
7
- data.tar.gz: 39991b7cfacb996f545bb0aae07a4f18a6c316ca65f884b78b2b5fe7f4082c8cab0bf6cabe208aafa870392f9be09d8a2c1b5c0dbefac70ede1d4986b97daed8
6
+ metadata.gz: 4dd00f9138cc3b36004a984e9285d339b2eab51e939ba45a8f0049e9a051b3b4d6970eee191a0b7954d1511f5f215b00591efc378da22920f18018c8c6ce1748
7
+ data.tar.gz: 23901c70d787118584e856012389a20440dc274768479057102e35bbcafa16ce6e1d035de49dac2390290f7af8183974ed5fe9d201cf38eb66cec572fb162c70
data/README.md CHANGED
@@ -53,6 +53,13 @@ en:
53
53
  <%= SnFilterable.load_js %>
54
54
  ```
55
55
 
56
+ If your application does not allow for use of `.js.erb` files the JavaScript can be loaded by adding the following to your layout:
57
+ ```javascript
58
+ <%= javascript_tag nonce: true do %>
59
+ <%= SnFilterable.load_js.html_safe %>
60
+ <% end %>
61
+ ```
62
+
56
63
  3. Configure your app's Tailwind to scan the gem
57
64
  ```javascript
58
65
  // tailwind.config.js
@@ -190,8 +197,29 @@ Now the test suite can be run from the project root using
190
197
  bundle exec rspec
191
198
  ```
192
199
 
200
+ ### Using a Development Version
201
+
202
+ Your changes can be tested manually by making one of the following additions to an App's Gemfile:
203
+
204
+ For using a local version:
205
+ ```ruby
206
+ gem "sn_filterable", path: "path/to/gem/sn_filterable"
207
+ ```
208
+
209
+ For using a GitHub branch:
210
+ ```ruby
211
+ gem "sn_filterable", git: "https://github.com/ibm-skills-network/sn_filterable.git", branch: "defaults_to_main"
212
+ ```
213
+
214
+
193
215
  ## Contributing
194
216
 
217
+ Once you have made your updates to the codebase do the following to ensure a smooth merge:
218
+
219
+ 1. Update `lib/sn_filterable/version.rb` to follow [Semantic Versioning](https://semver.org)
220
+
221
+ 2. Run `bundle` to update the `Gemfile.lock` with your new version
222
+
195
223
  Bug reports and pull requests are welcome on [GitHub](https://github.com/ibm-skills-network/sn_filterable).
196
224
 
197
225
  ## License
@@ -33,9 +33,8 @@ module SnFilterable
33
33
  filter_params = filter_params(params)
34
34
  sort_params = sort_params(params)
35
35
  other_params = other_params(params, items)
36
-
37
- items = perform_filter(items, filter_params)
38
36
  items, sort_name, reverse_order = perform_sort(items, sort_params, default_sort)
37
+ items = perform_filter(items, filter_params)
39
38
  items = items.page(other_params[:page]).per(other_params[:per]) if pagination_enabled
40
39
 
41
40
  Filtered.new(self, items, generate_url_queries(filter_params, sort_params, other_params), sort_name, reverse_order)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SnFilterable
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sn_filterable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chase McDougall
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-04 00:00:00.000000000 Z
11
+ date: 2023-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: heroicon
@@ -287,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
287
287
  - !ruby/object:Gem::Version
288
288
  version: '0'
289
289
  requirements: []
290
- rubygems_version: 3.4.1
290
+ rubygems_version: 3.4.10
291
291
  signing_key:
292
292
  specification_version: 4
293
293
  summary: Skills Network - Item filtering component