Skip to content

Commit

Permalink
added rematch gem and reset rematch stores
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed May 17, 2021
1 parent f62fa88 commit 8bda6a9
Show file tree
Hide file tree
Showing 25 changed files with 854 additions and 899 deletions.
1 change: 1 addition & 0 deletions .github/gemfiles/ruby-3.0
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ gem 'rake'
gem 'rack'
gem 'rake-manifest', require: false

gem 'rematch'
gem 'rubocop', '~> 1.11', require: false
gem 'rubocop-minitest', require: false
gem 'rubocop-packaging', require: false
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ gem 'rerun'
group :test do
gem 'codecov', require: false
gem 'minitest'
gem 'rematch'
gem 'rubocop'
gem 'rubocop-minitest'
gem 'rubocop-packaging'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ GEM
ffi (~> 1.0)
rbzip2 (0.2.0)
regexp_parser (2.1.1)
rematch (0.0.1)
rerun (0.13.1)
listen (~> 3.0)
rexml (3.2.5)
Expand Down Expand Up @@ -100,6 +101,7 @@ DEPENDENCIES
rack
rake
rake-manifest
rematch
rerun
rubocop
rubocop-minitest
Expand Down
7 changes: 0 additions & 7 deletions tasks/rematch_all.rake

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#test_0001_paginates response with defaults 1:
"[1] pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#test_0001_paginates response with defaults":
- R-a-41
- R-a-42
- R-a-43
Expand All @@ -20,18 +20,7 @@ pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#
- R-a-58
- R-a-59
- R-a-60
pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#test_0003_paginates with vars 1:
- R-b-11
- R-b-12
- R-b-13
- R-b-14
- R-b-15
- R-b-16
- R-b-17
- R-b-18
- R-b-19
- R-b-20
pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#test_0002_paginates records with defaults 1:
"[1] pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#test_0002_paginates records with defaults":
- R-a-41
- R-a-42
- R-a-43
Expand All @@ -52,7 +41,7 @@ pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#
- R-a-58
- R-a-59
- R-a-60
pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#test_0004_paginates with overflow 1:
"[1] pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#test_0004_paginates with overflow":
- R-b-991
- R-b-992
- R-b-993
Expand All @@ -63,7 +52,7 @@ pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#
- R-b-998
- R-b-999
- R-b-1000
pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#test_0003_paginates with vars 1:
"[1] pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch7_rails#test_0003_paginates with vars":
- R-b-11
- R-b-12
- R-b-13
Expand All @@ -74,7 +63,18 @@ pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#t
- R-b-18
- R-b-19
- R-b-20
pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#test_0001_paginates response with defaults 1:
"[1] pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#test_0004_paginates with overflow":
- R-b-991
- R-b-992
- R-b-993
- R-b-994
- R-b-995
- R-b-996
- R-b-997
- R-b-998
- R-b-999
- R-b-1000
"[1] pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#test_0001_paginates response with defaults":
- R-a-41
- R-a-42
- R-a-43
Expand All @@ -95,7 +95,7 @@ pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#t
- R-a-58
- R-a-59
- R-a-60
pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#test_0002_paginates records with defaults 1:
"[1] pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#test_0002_paginates records with defaults":
- R-a-41
- R-a-42
- R-a-43
Expand All @@ -116,14 +116,14 @@ pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#t
- R-a-58
- R-a-59
- R-a-60
pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#test_0004_paginates with overflow 1:
- R-b-991
- R-b-992
- R-b-993
- R-b-994
- R-b-995
- R-b-996
- R-b-997
- R-b-998
- R-b-999
- R-b-1000
"[1] pagy/extras/elasticsearch_rails::controller_methods::#pagy_elasticsearch_rails#test_0003_paginates with vars":
- R-b-11
- R-b-12
- R-b-13
- R-b-14
- R-b-15
- R-b-16
- R-b-17
- R-b-18
- R-b-19
- R-b-20

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
---
pagy/extras/headers::#pagy_headers_merge#test_0001_returns the full headers hash 1: !ruby/hash-with-ivars:Rack::Utils::HeaderHash
ivars:
:@names:
link: Link
current-page: Current-Page
page-items: Page-Items
total-pages: Total-Pages
total-count: Total-Count
elements:
Link: <https://example.com:8080/foo?page=1>; rel="first", <https://example.com:8080/foo?page=2>;
rel="prev", <https://example.com:8080/foo?page=4>; rel="next", <https://example.com:8080/foo?page=50>;
rel="last"
Current-Page: '3'
Page-Items: '20'
Total-Pages: '50'
Total-Count: '1000'
pagy/extras/headers::#pagy_headers#test_0001_returns the full headers hash 1:
"[1] pagy/extras/headers::#pagy_headers#test_0001_returns the full headers hash":
Link: <https://example.com:8080/foo?page=1>; rel="first", <https://example.com:8080/foo?page=2>;
rel="prev", <https://example.com:8080/foo?page=4>; rel="next", <https://example.com:8080/foo?page=50>;
rel="last"
Current-Page: '3'
Page-Items: '20'
Total-Pages: '50'
Total-Count: '1000'
pagy/extras/headers::#pagy_headers#test_0001_returns the full headers hash 2:
"[2] pagy/extras/headers::#pagy_headers#test_0001_returns the full headers hash":
Link:
first: https://example.com:8080/foo?page=1
prev: https://example.com:8080/foo?page=2
Expand All @@ -33,40 +17,40 @@ pagy/extras/headers::#pagy_headers#test_0001_returns the full headers hash 2:
Page-Items: '20'
Total-Pages: '50'
Total-Count: '1000'
pagy/extras/headers::#pagy_headers#test_0003_returns the countless headers hash 1:
Link: <https://example.com:8080/foo?page=1>; rel="first", <https://example.com:8080/foo?page=2>;
rel="prev", <https://example.com:8080/foo?page=4>; rel="next"
Current-Page: '3'
Page-Items: '20'
pagy/extras/headers::#pagy_headers#test_0003_returns the countless headers hash 2:
Link:
first: https://example.com:8080/foo?page=1
prev: https://example.com:8080/foo?page=2
next: https://example.com:8080/foo?page=4
Current-Page: '3'
Page-Items: '20'
pagy/extras/headers::#pagy_headers#test_0002_returns custom headers hash 1:
"[1] pagy/extras/headers::#pagy_headers#test_0002_returns custom headers hash":
Link: <https://example.com:8080/foo?page=1>; rel="first", <https://example.com:8080/foo?page=2>;
rel="prev", <https://example.com:8080/foo?page=4>; rel="next", <https://example.com:8080/foo?page=50>;
rel="last"
Per-Page: '20'
Total: '1000'
pagy/extras/headers::#pagy_headers#test_0002_returns custom headers hash 2:
"[2] pagy/extras/headers::#pagy_headers#test_0002_returns custom headers hash":
Link:
first: https://example.com:8080/foo?page=1
prev: https://example.com:8080/foo?page=2
next: https://example.com:8080/foo?page=4
last: https://example.com:8080/foo?page=50
Per-Page: '20'
Total: '1000'
pagy/extras/headers::#pagy_headers#test_0004_omit prev on first page 1:
"[1] pagy/extras/headers::#pagy_headers#test_0003_returns the countless headers hash":
Link: <https://example.com:8080/foo?page=1>; rel="first", <https://example.com:8080/foo?page=2>;
rel="prev", <https://example.com:8080/foo?page=4>; rel="next"
Current-Page: '3'
Page-Items: '20'
"[2] pagy/extras/headers::#pagy_headers#test_0003_returns the countless headers hash":
Link:
first: https://example.com:8080/foo?page=1
prev: https://example.com:8080/foo?page=2
next: https://example.com:8080/foo?page=4
Current-Page: '3'
Page-Items: '20'
"[1] pagy/extras/headers::#pagy_headers#test_0004_omit prev on first page":
Link: <https://example.com:8080/foo?page=1>; rel="first", <https://example.com:8080/foo?page=2>;
rel="next", <https://example.com:8080/foo?page=50>; rel="last"
Current-Page: '1'
Page-Items: '20'
Total-Pages: '50'
Total-Count: '1000'
pagy/extras/headers::#pagy_headers#test_0004_omit prev on first page 2:
"[2] pagy/extras/headers::#pagy_headers#test_0004_omit prev on first page":
Link:
first: https://example.com:8080/foo?page=1
next: https://example.com:8080/foo?page=2
Expand All @@ -75,14 +59,14 @@ pagy/extras/headers::#pagy_headers#test_0004_omit prev on first page 2:
Page-Items: '20'
Total-Pages: '50'
Total-Count: '1000'
pagy/extras/headers::#pagy_headers#test_0005_omit next on last page 1:
"[1] pagy/extras/headers::#pagy_headers#test_0005_omit next on last page":
Link: <https://example.com:8080/foo?page=1>; rel="first", <https://example.com:8080/foo?page=49>;
rel="prev", <https://example.com:8080/foo?page=50>; rel="last"
Current-Page: '50'
Page-Items: '20'
Total-Pages: '50'
Total-Count: '1000'
pagy/extras/headers::#pagy_headers#test_0005_omit next on last page 2:
"[2] pagy/extras/headers::#pagy_headers#test_0005_omit next on last page":
Link:
first: https://example.com:8080/foo?page=1
prev: https://example.com:8080/foo?page=49
Expand All @@ -91,3 +75,19 @@ pagy/extras/headers::#pagy_headers#test_0005_omit next on last page 2:
Page-Items: '20'
Total-Pages: '50'
Total-Count: '1000'
"[1] pagy/extras/headers::#pagy_headers_merge#test_0001_returns the full headers hash": !ruby/hash-with-ivars:Rack::Utils::HeaderHash
ivars:
:@names:
link: Link
current-page: Current-Page
page-items: Page-Items
total-pages: Total-Pages
total-count: Total-Count
elements:
Link: <https://example.com:8080/foo?page=1>; rel="first", <https://example.com:8080/foo?page=2>;
rel="prev", <https://example.com:8080/foo?page=4>; rel="next", <https://example.com:8080/foo?page=50>;
rel="last"
Current-Page: '3'
Page-Items: '20'
Total-Pages: '50'
Total-Count: '1000'
25 changes: 25 additions & 0 deletions test/pagy/extras/i18n_test.rb.rematch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
"[1] pagy/extras/i18n::#pagy_info with I18n#test_0002_renders with existing i18n key": <span
class="pagy-info">No Products found</span>
"[2] pagy/extras/i18n::#pagy_info with I18n#test_0002_renders with existing i18n key": <span
class="pagy-info">Displaying <b>1</b> Product</span>
"[3] pagy/extras/i18n::#pagy_info with I18n#test_0002_renders with existing i18n key": <span
class="pagy-info">Displaying <b>13</b> Products</span>
"[4] pagy/extras/i18n::#pagy_info with I18n#test_0002_renders with existing i18n key": <span
class="pagy-info">Displaying Products <b>41-60</b> of <b>100</b> in total</span>
"[5] pagy/extras/i18n::#pagy_info with I18n#test_0002_renders with existing i18n key": <span
class="pagy-info">No Products found</span>
"[6] pagy/extras/i18n::#pagy_info with I18n#test_0002_renders with existing i18n key": <span
class="pagy-info">Displaying <b>1</b> Product</span>
"[7] pagy/extras/i18n::#pagy_info with I18n#test_0002_renders with existing i18n key": <span
class="pagy-info">Displaying <b>13</b> Products</span>
"[8] pagy/extras/i18n::#pagy_info with I18n#test_0002_renders with existing i18n key": <span
class="pagy-info">Displaying Products <b>41-60</b> of <b>100</b> in total</span>
"[1] pagy/extras/i18n::#pagy_info with I18n#test_0001_renders info": <span class="pagy-info">No
items found</span>
"[2] pagy/extras/i18n::#pagy_info with I18n#test_0001_renders info": <span class="pagy-info">Displaying
<b>1</b> item</span>
"[3] pagy/extras/i18n::#pagy_info with I18n#test_0001_renders info": <span class="pagy-info">Displaying
<b>13</b> items</span>
"[4] pagy/extras/i18n::#pagy_info with I18n#test_0001_renders info": <span class="pagy-info">Displaying
items <b>41-60</b> of <b>100</b> in total</span>
25 changes: 0 additions & 25 deletions test/pagy/extras/i18n_test.rb.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
pagy/extras/items::view_methods#test_0001_renders items selector 1: '<span id="test-id"
"[1] pagy/extras/items::view_methods#test_0001_renders items selector": '<span id="test-id"
class="pagy-items-selector-js" data-pagy-json="[&quot;items_selector&quot;,41,&quot;<a
href=\&quot;/foo?page=__pagy_page__&items=__pagy_items__\&quot; style=\&quot;display:
none;\&quot;></a>&quot;]"><label>Show <input type="number" min="1" max="100" value="20"
style="padding: 0; text-align: center; width: 3rem;"> items per page</label></span>'
pagy/extras/items::view_methods#test_0001_renders items selector 2: '<span id="test-id"
"[2] pagy/extras/items::view_methods#test_0001_renders items selector": '<span id="test-id"
class="pagy-items-selector-js" data-pagy-json="[&quot;items_selector&quot;,41,&quot;<a
href=\&quot;/foo?page=__pagy_page__&items=__pagy_items__\&quot; style=\&quot;display:
none;\&quot;></a>&quot;]"><label>Show <input type="number" min="1" max="100" value="20"
style="padding: 0; text-align: center; width: 3rem;"> products per page</label></span>'
pagy/extras/items::view_methods#test_0001_renders items selector 3: '<span id="test-id"
"[3] pagy/extras/items::view_methods#test_0001_renders items selector": '<span id="test-id"
class="pagy-items-selector-js" data-pagy-json="[&quot;items_selector&quot;,41,&quot;<a
href=\&quot;/foo?page=__pagy_page__&items=__pagy_items__\&quot; style=\&quot;display:
none;\&quot;></a>&quot;]"><label>Show <input type="number" min="1" max="100" value="20"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
pagy/extras/items_trim#test_0001_renders items selector with trim 1: '<span id="test-id"
"[1] pagy/extras/items_trim#test_0001_renders items selector with trim": '<span id="test-id"
class="pagy-items-selector-js" data-pagy-json="[&quot;items_selector&quot;,41,&quot;<a
href=\&quot;/foo?page=__pagy_page__&items=__pagy_items__\&quot; style=\&quot;display:
none;\&quot;></a>&quot;,&quot;page&quot;]"><label>Show <input type="number" min="1"
max="100" value="20" style="padding: 0; text-align: center; width: 3rem;"> items
per page</label></span>'
pagy/extras/items_trim#test_0001_renders items selector with trim 2: '<span id="test-id"
"[2] pagy/extras/items_trim#test_0001_renders items selector with trim": '<span id="test-id"
class="pagy-items-selector-js" data-pagy-json="[&quot;items_selector&quot;,41,&quot;<a
href=\&quot;/foo?page=__pagy_page__&items=__pagy_items__\&quot; style=\&quot;display:
none;\&quot;></a>&quot;,&quot;page&quot;]"><label>Show <input type="number" min="1"
max="100" value="20" style="padding: 0; text-align: center; width: 3rem;"> products
per page</label></span>'
pagy/extras/items_trim#test_0001_renders items selector with trim 3: '<span id="test-id"
"[3] pagy/extras/items_trim#test_0001_renders items selector with trim": '<span id="test-id"
class="pagy-items-selector-js" data-pagy-json="[&quot;items_selector&quot;,41,&quot;<a
href=\&quot;/foo?page=__pagy_page__&items=__pagy_items__\&quot; style=\&quot;display:
none;\&quot;></a>&quot;,&quot;page&quot;]"><label>Show <input type="number" min="1"
max="100" value="20" style="padding: 0; text-align: center; width: 3rem;"> products
per page</label></span>'
pagy/extras/items_trim::#pagy_marked_link#test_0001_should return the marked link 1: '<a
"[1] pagy/extras/items_trim::#pagy_marked_link#test_0001_should return the marked link": '<a
href="/foo?page=__pagy_page__&items=20" style="display: none;"></a>'
pagy/extras/items_trim::#pagy_marked_link#test_0001_should return the marked link 2: '<a
"[2] pagy/extras/items_trim::#pagy_marked_link#test_0001_should return the marked link": '<a
href="/foo?p=__pagy_page__&items=20" style="display: none;"></a>'
pagy/extras/items_trim::#pagy_marked_link#test_0001_should return the marked link 3: '<a
"[3] pagy/extras/items_trim::#pagy_marked_link#test_0001_should return the marked link": '<a
href="/foo?page=__pagy_page__&i=20" style="display: none;"></a>'
pagy/extras/items_trim::#pagy_marked_link#test_0001_should return the marked link 4: '<a
"[4] pagy/extras/items_trim::#pagy_marked_link#test_0001_should return the marked link": '<a
href="/foo?p=__pagy_page__&i=20" style="display: none;"></a>'
Loading

0 comments on commit 8bda6a9

Please sign in to comment.