ransack 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 400fa6bc00b27207224ee94101cd526a602076669e1824c605e9897d3fd6ba7c
4
- data.tar.gz: df6443d69d67e1a59ab97378784c8ddbb3966d3dd6376e3362bacae0afea72c6
3
+ metadata.gz: 2599d5bd405561f9dd3c9b1b585baef6132a23653ebaf079f65aa7a326b20998
4
+ data.tar.gz: '0899eeb3faebe29e31c6ec2ec248d1b106f6fdb5175532fdb55b82abce928d19'
5
5
  SHA512:
6
- metadata.gz: e620b446afd597cfa16e20be2f20d762791d496cd24ec3441f8553697b81a0ac50280da1ec07a068962f06937cfb7fdbaeeab33dd17fbdb0233226cd42f95d6a
7
- data.tar.gz: 30b74e2d17fbb7e215ff60a129f1bf4af779e0b1d6d62865e1d8dfb8b9215d6a06f0008f1704e6fb25ab83e25dafa0f2fa219c57588eafe5260b14a0f9c5f0f0
6
+ metadata.gz: 0cd85c2c70494e50e4ce67351a3abb7822424372fbe5e3062415b7c3471094883f955cf6c6c57f1f783442b68d18593c0d8a220e4f1f1e68c9e1e48d80b2d9be
7
+ data.tar.gz: 24c878aceb15a2a914f4c99743df78af82aef65fda072301678bde8307ed0dfafc5506366929babf19524a221d2a57d191d7d3e4ebb2bf73760f5b4b6928d082
@@ -0,0 +1,35 @@
1
+ name: Deploy to GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ deploy:
10
+ name: Deploy to GitHub Pages
11
+
12
+ runs-on: ubuntu-20.04
13
+
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+
17
+ - uses: actions/setup-node@v3
18
+ with:
19
+ node-version: 16
20
+ cache: yarn
21
+ cache-dependency-path: docs/yarn.lock
22
+
23
+ - name: Install dependencies
24
+ run: yarn install --frozen-lockfile
25
+ working-directory: docs
26
+
27
+ - name: Build website
28
+ run: yarn build
29
+ working-directory: docs
30
+
31
+ - name: Deploy to GitHub Pages
32
+ uses: peaceiris/actions-gh-pages@v3
33
+ with:
34
+ github_token: ${{ secrets.GITHUB_TOKEN }}
35
+ publish_dir: docs/build
@@ -0,0 +1,29 @@
1
+ name: Test deploy to GitHub Pages
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ test-deploy:
10
+ name: Test deploy to GitHub Pages
11
+
12
+ runs-on: ubuntu-20.04
13
+
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+
17
+ - uses: actions/setup-node@v3
18
+ with:
19
+ node-version: 16
20
+ cache: yarn
21
+ cache-dependency-path: docs/yarn.lock
22
+
23
+ - name: Install dependencies
24
+ run: yarn install --frozen-lockfile
25
+ working-directory: docs
26
+
27
+ - name: Test build website
28
+ run: yarn build
29
+ working-directory: docs
data/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.0.1 - 2022-04-08
6
+
7
+ * Fix `:data` option to `sort_link` being incorrectly appended to the generated
8
+ link query parameters.
9
+ PR [1301](https://github.com/activerecord-hackery/ransack/pull/1301)
10
+
11
+ * Fix "Edit this page" links in documentation site
12
+ PR [1303](https://github.com/activerecord-hackery/ransack/pull/1303)
13
+
14
+ * Auto deploy documentation site after merging PRs
15
+ PR [1302](https://github.com/activerecord-hackery/ransack/pull/1302)
16
+
17
+ * Add list of former wiki contributors to documentation site
18
+ PR [1300](https://github.com/activerecord-hackery/ransack/pull/1300)
19
+
20
+ * Reduce gem package size
21
+ PR [1297](https://github.com/activerecord-hackery/ransack/pull/1297)
22
+
5
23
  ## 3.0.0 - 2022-03-30
6
24
 
7
25
  * Move documentation into Docusaurus.
data/README.md CHANGED
@@ -96,7 +96,7 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
96
96
  <a href="https://opencollective.com/ransack/sponsor/1/website" target="_blank"><img src="https://opencollective.com/ransack/sponsor/1/avatar.svg" /></a>
97
97
  <a href="https://opencollective.com/ransack/sponsor/2/website" target="_blank"><img src="https://opencollective.com/ransack/sponsor/2/avatar.svg" /></a>
98
98
  <a href="https://opencollective.com/ransack/sponsor/3/website" target="_blank"><img src="https://opencollective.com/ransack/sponsor/3/avatar.svg" /></a>
99
- <a href="https://opencollective.com/ransack/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ransack/sponsor/4/avatar.svg"/ ></a>
99
+ <a href="https://opencollective.com/ransack/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ransack/sponsor/4/avatar.svg" /></a>
100
100
  <a href="https://opencollective.com/ransack/sponsor/5/website" target="_blank"><img src="https://opencollective.com/ransack/sponsor/5/avatar.svg" /></a>
101
101
  <a href="https://opencollective.com/ransack/sponsor/6/website" target="_blank"><img src="https://opencollective.com/ransack/sponsor/6/avatar.svg" /></a>
102
102
  <a href="https://opencollective.com/ransack/sponsor/7/website" target="_blank"><img src="https://opencollective.com/ransack/sponsor/7/avatar.svg" /></a>
data/docs/.gitignore CHANGED
@@ -15,6 +15,5 @@
15
15
  .env.test.local
16
16
  .env.production.local
17
17
 
18
- npm-debug.log*
19
18
  yarn-debug.log*
20
19
  yarn-error.log*
@@ -7,12 +7,24 @@ Ransack uses [Docusaurus](https://docusaurus.io/) for documentation. To contribu
7
7
 
8
8
  ### Local Development
9
9
 
10
+ Switch to docs folder
11
+
10
12
  ```
11
13
  cd docs
12
- yarn start
13
14
  ```
14
15
 
15
- This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
16
+ Install docusaurus and other dependencies
17
+
18
+ ```
19
+ yarn install
20
+ ```
21
+
22
+
23
+ Start a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
24
+
25
+ ```
26
+ yarn start
27
+ ```
16
28
 
17
29
  ### Build
18
30
 
@@ -0,0 +1,82 @@
1
+ ---
2
+ title: Wiki Contributors
3
+ sidebar_position: 12
4
+ ---
5
+
6
+ Ransack previously had documentation contained in a GitHub Wiki, and this content has been merged into this documentation website. The following long list of _amazing_ people all made contributions to the Wiki:
7
+
8
+ * Abinoam P. Marques Jr
9
+ * Alex Stophel
10
+ * Andrea Schiavini
11
+ * Andrew Vit
12
+ * Ben Koshy
13
+ * Brainkurv
14
+ * Brandan Lennox
15
+ * Brendon Muir
16
+ * Chris Salzberg
17
+ * Colleen McGuckin
18
+ * David Aldridge
19
+ * Davidson Mohanty
20
+ * Denis Tataurov
21
+ * Drew Moore
22
+ * Eike Send
23
+ * Feodor Cherashev
24
+ * Glauco Custódio
25
+ * Grey Baker
26
+ * Harold.Luo
27
+ * Herman Singh
28
+ * Ian Smith
29
+ * Jake Haber
30
+ * Jan Klimo
31
+ * Jared Beck
32
+ * Jon Atack
33
+ * Juanito Fatas
34
+ * JungaJk
35
+ * Leo Chen
36
+ * Leon Miller-Out
37
+ * Luca F
38
+ * Marc Poris
39
+ * Matt Oakley
40
+ * Michael Kopchick
41
+ * Nathan Colgate
42
+ * Nguyen Phi Viet(Sun*)
43
+ * Nguyễn Đức Long
44
+ * NielsKSchjoedt
45
+ * Patrick Copeland
46
+ * Pedro Chambino
47
+ * Rene Hopf
48
+ * Richa Arora
49
+ * Rob Jones
50
+ * Roman Sokhan
51
+ * Ryan Bates
52
+ * Ryan Bigg
53
+ * Sean
54
+ * Sean Linsley
55
+ * Sergey
56
+ * Sunny Ripert
57
+ * Tanbir Hasan
58
+ * ThuyNguyen97
59
+ * Vanda
60
+ * Yana Agun Siswanto
61
+ * bonyiii
62
+ * charly
63
+ * chifung7
64
+ * colorfulberry
65
+ * ddonahue99
66
+ * ernie
67
+ * gaaady
68
+ * gingerlime
69
+ * grumpit
70
+ * itsalongstory
71
+ * jonatack
72
+ * kogre
73
+ * nguyentrungson97
74
+ * nslocum
75
+ * omitter
76
+ * radar
77
+ * rilian
78
+ * terraplane
79
+ * tyronewilson
80
+ * vansy61
81
+ * willnet
82
+ * wzcolon
@@ -25,12 +25,11 @@ const config = {
25
25
  docs: {
26
26
  routeBasePath: '/',
27
27
  sidebarPath: require.resolve('./sidebars.js'),
28
- editUrl: 'https://github.com/activerecord-hackery/ransack/docs/docs/',
28
+ editUrl: 'https://github.com/activerecord-hackery/ransack/edit/main/docs/',
29
29
  },
30
30
  blog: {
31
31
  showReadingTime: true,
32
- editUrl:
33
- 'https://github.com/activerecord-hackery/ransack/docs/blog/',
32
+ editUrl: 'https://github.com/activerecord-hackery/ransack/edit/main/blog/',
34
33
  },
35
34
  theme: {
36
35
  customCss: require.resolve('./src/css/custom.css'),
@@ -130,7 +130,7 @@ module Ransack
130
130
 
131
131
  def url_options
132
132
  @params.merge(
133
- @options.except(:class).merge(
133
+ @options.except(:class, :data).merge(
134
134
  @search.context.search_key => search_and_sort_params))
135
135
  end
136
136
 
@@ -1,3 +1,3 @@
1
1
  module Ransack
2
- VERSION = '3.0.0'
2
+ VERSION = '3.0.1'
3
3
  end
@@ -758,6 +758,18 @@ module Ransack
758
758
  end
759
759
  end
760
760
 
761
+ describe '#sort_link with data option' do
762
+ subject { @controller.view_context
763
+ .sort_link(
764
+ [:main_app, Person.ransack(sorts: ['name desc'])],
765
+ :name,
766
+ data: { turbo_action: :advance }, controller: 'people'
767
+ )
768
+ }
769
+ it { should match /data-turbo-action="advance"/ }
770
+ it { should_not match /people\?data%5Bturbo_action%5D=advance/ }
771
+ end
772
+
761
773
  describe '#search_form_for with default format' do
762
774
  subject { @controller.view_context
763
775
  .search_form_for(Person.ransack) {} }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ransack
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernie Miller
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2022-03-30 00:00:00.000000000 Z
15
+ date: 2022-04-07 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activerecord
@@ -70,7 +70,9 @@ files:
70
70
  - ".github/FUNDING.yml"
71
71
  - ".github/SECURITY.md"
72
72
  - ".github/workflows/cronjob.yml"
73
+ - ".github/workflows/deploy.yml"
73
74
  - ".github/workflows/rubocop.yml"
75
+ - ".github/workflows/test-deploy.yml"
74
76
  - ".github/workflows/test.yml"
75
77
  - ".gitignore"
76
78
  - ".nojekyll"
@@ -109,9 +111,9 @@ files:
109
111
  - docs/docs/going-further/release_process.md
110
112
  - docs/docs/going-further/saving-queries.md
111
113
  - docs/docs/going-further/searching-postgres.md
114
+ - docs/docs/going-further/wiki-contributors.md
112
115
  - docs/docs/intro.md
113
116
  - docs/docusaurus.config.js
114
- - docs/package-lock.json
115
117
  - docs/package.json
116
118
  - docs/sidebars.js
117
119
  - docs/src/components/HomepageFeatures/index.js
@@ -251,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
253
  - !ruby/object:Gem::Version
252
254
  version: '0'
253
255
  requirements: []
254
- rubygems_version: 3.2.32
256
+ rubygems_version: 3.3.11
255
257
  signing_key:
256
258
  specification_version: 4
257
259
  summary: Object-based searching for Active Record.