cursor_paginator 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/build.yml +7 -9
- data/.github/workflows/dependabot-auto-merge.yml +17 -0
- data/.github/workflows/release.yml +36 -0
- data/.gitignore +1 -1
- data/.release-please-manifest.json +3 -0
- data/.rubocop.yml +12 -37
- data/.tool-versions +1 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile +1 -1
- data/README.md +86 -7
- data/cursor_paginator.gemspec +6 -6
- data/lib/cursor_paginator/pagination_result.rb +1 -1
- data/lib/cursor_paginator/paginator/active_record.rb +7 -2
- data/lib/cursor_paginator/paginator/array.rb +1 -1
- data/lib/cursor_paginator/paginator/base.rb +4 -0
- data/lib/cursor_paginator/version.rb +1 -1
- data/release-please-config.json +16 -0
- metadata +24 -19
- data/.github/workflows/create_release.yml +0 -34
- data/Gemfile.lock +0 -85
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 509dc28c74dfb711939217c8f6dd433930bb4d67f592f3fb56a1057e99df4a9a
|
4
|
+
data.tar.gz: de9f515b4e2c3226d6243d1f2c209ba904fb36d4646ec5a69d1b330b74729ee6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c53770c8b57dc2efdf66c92ba256a63b1b01d827d12041385ae9b6e0efe8e1a0317c0687ff3b074fba5bffd8e49823cd551313b32657f4886b47a1a5205c05a
|
7
|
+
data.tar.gz: a8ad68c429d4a2273e1be72ec0d93dfd999c6f1ff132f7c966b3c4c1ace9272238c85cd081e05505182fdf936b0c325e40e1fad0964cc2a3149b9cc6bbe1a9b2
|
data/.github/workflows/build.yml
CHANGED
@@ -4,21 +4,19 @@ on: [push]
|
|
4
4
|
|
5
5
|
jobs:
|
6
6
|
build:
|
7
|
-
|
8
7
|
runs-on: ubuntu-latest
|
9
8
|
|
10
9
|
steps:
|
11
|
-
- uses: actions/checkout@
|
12
|
-
|
13
|
-
- name: Set up Ruby
|
14
|
-
uses: actions/setup-ruby@v1
|
15
|
-
with:
|
16
|
-
ruby-version: 2.7.x
|
10
|
+
- uses: actions/checkout@v4
|
17
11
|
|
18
12
|
- name: Install Dependencies
|
19
13
|
run: |
|
20
|
-
|
21
|
-
|
14
|
+
sudo apt-get install libsqlite3-dev
|
15
|
+
|
16
|
+
- name: Setup Ruby
|
17
|
+
uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
bundler-cache: true
|
22
20
|
|
23
21
|
- name: Run Specs
|
24
22
|
run: |
|
@@ -0,0 +1,17 @@
|
|
1
|
+
name: Dependabot auto-merge
|
2
|
+
on: pull_request
|
3
|
+
|
4
|
+
permissions:
|
5
|
+
contents: write
|
6
|
+
pull-requests: write
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
dependabot:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
if: ${{ github.actor == 'dependabot[bot]' }}
|
12
|
+
steps:
|
13
|
+
- name: Enable auto-merge for Dependabot PRs
|
14
|
+
run: gh pr merge --auto --merge "$PR_URL"
|
15
|
+
env:
|
16
|
+
PR_URL: ${{github.event.pull_request.html_url}}
|
17
|
+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
release-please:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: google-github-actions/release-please-action@v4
|
13
|
+
id: release
|
14
|
+
with:
|
15
|
+
token: ${{ secrets.SOMLENG_PERSONAL_ACCESS_TOKEN }}
|
16
|
+
|
17
|
+
- uses: actions/checkout@v4
|
18
|
+
if: ${{ steps.release.outputs.release_created }}
|
19
|
+
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
if: ${{ steps.release.outputs.release_created }}
|
22
|
+
|
23
|
+
- run: bundle install
|
24
|
+
if: ${{ steps.release.outputs.release_created }}
|
25
|
+
|
26
|
+
- name: publish gem
|
27
|
+
if: ${{ steps.release.outputs.release_created }}
|
28
|
+
run: |
|
29
|
+
mkdir -p $HOME/.gem
|
30
|
+
touch $HOME/.gem/credentials
|
31
|
+
chmod 0600 $HOME/.gem/credentials
|
32
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
33
|
+
gem build *.gemspec
|
34
|
+
gem push *.gem
|
35
|
+
env:
|
36
|
+
GEM_HOST_API_KEY: "${{secrets.GEM_HOST_API_KEY}}"
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,50 +1,25 @@
|
|
1
1
|
require:
|
2
|
-
- rubocop-
|
3
|
-
- rubocop-
|
2
|
+
- "rubocop-rspec"
|
3
|
+
- "rubocop-performance"
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
Style/StringLiterals:
|
9
|
-
EnforcedStyle: double_quotes
|
10
|
-
|
11
|
-
Layout/LineLength:
|
12
|
-
Max: 100
|
5
|
+
# Omakase Ruby styling for Rails
|
6
|
+
inherit_gem:
|
7
|
+
rubocop-rails-omakase: rubocop.yml
|
13
8
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
Style/ClassAndModuleChildren:
|
18
|
-
Enabled: false
|
9
|
+
AllCops:
|
10
|
+
NewCops: enable
|
19
11
|
|
20
|
-
|
12
|
+
Lint:
|
21
13
|
Enabled: true
|
22
|
-
Exclude:
|
23
|
-
- spec/**/*.rb
|
24
14
|
|
25
|
-
Style/
|
26
|
-
Enabled: true
|
27
|
-
Exclude:
|
28
|
-
- spec/**/*.rb
|
29
|
-
|
30
|
-
Style/NumericLiterals:
|
15
|
+
Style/FrozenStringLiteralComment:
|
31
16
|
Enabled: false
|
32
17
|
|
33
|
-
DescribedClass:
|
18
|
+
RSpec/DescribedClass:
|
34
19
|
Enabled: false
|
35
20
|
|
36
|
-
|
21
|
+
RSpec/ExampleLength:
|
37
22
|
Enabled: false
|
38
23
|
|
39
|
-
|
40
|
-
Max: 10
|
41
|
-
|
42
|
-
RSpec/DescribeClass:
|
43
|
-
Enabled: true
|
44
|
-
Exclude:
|
45
|
-
- spec/system/**/*.rb
|
46
|
-
- spec/requests/**/*.rb
|
47
|
-
- spec/views/**/*.rb
|
48
|
-
|
49
|
-
RSpec/ExampleLength:
|
24
|
+
RSpec/MultipleExpectations:
|
50
25
|
Enabled: false
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.3.0
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [0.2.1](https://github.com/somleng/cursor_paginator/compare/v0.2.0...v0.2.1) (2024-04-19)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* Update README ([5c7e28b](https://github.com/somleng/cursor_paginator/commit/5c7e28b2ee86ca153b979f7cf82537a9cf3b5bcd))
|
9
|
+
|
10
|
+
## [0.2.0](https://github.com/somleng/cursor_paginator/compare/v0.1.0...v0.2.0) (2024-04-19)
|
11
|
+
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* Handle limits ([#3](https://github.com/somleng/cursor_paginator/issues/3)) ([3faf758](https://github.com/somleng/cursor_paginator/commit/3faf758eb282560f0321bdab44636d2937acb856))
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# CursorPaginator
|
2
2
|
|
3
|
-
|
3
|
+
[![Build](https://github.com/somleng/cursor_paginator/actions/workflows/build.yml/badge.svg)](https://github.com/somleng/cursor_paginator/actions/workflows/build.yml)
|
4
4
|
|
5
|
-
|
5
|
+
A ruby cursor pagination library inspired by [https://jsonapi.org/profiles/ethanresnick/cursor-pagination](https://jsonapi.org/profiles/ethanresnick/cursor-pagination/)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,17 +22,96 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
### Paginating in descending order (default)
|
26
|
+
|
27
|
+
By default CursorPaginator orders in descending order.
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
Post.create!(title: "old", id: 1)
|
31
|
+
Post.create!(title: "newer", id: 2)
|
32
|
+
Post.create!(title: "newest", id: 3)
|
33
|
+
|
34
|
+
pagination_result = CursorPaginator.paginate(Post.all)
|
35
|
+
|
36
|
+
pagination_result.map(&:title) # => ["newest", "newer", "old"]
|
37
|
+
pagination_result.prev_cursor_params # => { before: 3 } (newest)
|
38
|
+
pagination_result.next_cursor_params # => { after: nil }
|
39
|
+
```
|
40
|
+
|
41
|
+
In order fetch older records use the `after` option.
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
Post.create!(title: "oldest", id: 1)
|
45
|
+
Post.create!(title: "old", id: 2)
|
46
|
+
Post.create!(title: "newer", id: 3)
|
47
|
+
Post.create!(title: "newest", id: 4)
|
48
|
+
|
49
|
+
pagination_result = CursorPaginator.paginate(Post.all, page_options: { after: 3 }) # after (newer)
|
50
|
+
|
51
|
+
pagination_result.map(&:title) # => ["old", "oldest"]
|
52
|
+
pagination_result.prev_cursor_params # => { before: 2 } (old)
|
53
|
+
pagination_result.next_cursor_params # => { after: nil }
|
54
|
+
```
|
55
|
+
|
56
|
+
In order to fetch newer records use the `before` option.
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
Post.create!(title: "oldest", id: 1)
|
60
|
+
Post.create!(title: "old", id: 2)
|
61
|
+
Post.create!(title: "newer", id: 3)
|
62
|
+
Post.create!(title: "newest", id: 4)
|
63
|
+
|
64
|
+
pagination_result = CursorPaginator.paginate(Post.all, page_options: { before: 2 }) # after (old)
|
65
|
+
|
66
|
+
pagination_result.map(&:title) # => ["newest", "newer"]
|
67
|
+
pagination_result.prev_cursor_params # => { before: nil }
|
68
|
+
pagination_result.next_cursor_params # => { after: 3 } (newer)
|
69
|
+
```
|
70
|
+
|
71
|
+
### Paginating in ascending order
|
72
|
+
|
73
|
+
In order fetch newer records use the `after` option.
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
Post.create!(title: "oldest", id: 1)
|
77
|
+
Post.create!(title: "old", id: 2)
|
78
|
+
Post.create!(title: "newer", id: 3)
|
79
|
+
Post.create!(title: "newest", id: 4)
|
80
|
+
|
81
|
+
pagination_result = CursorPaginator.paginate(
|
82
|
+
Post.all,
|
83
|
+
page_options: { after: 2 }, # after (old)
|
84
|
+
paginator_options: { sort_direction: :asc }
|
85
|
+
)
|
86
|
+
|
87
|
+
pagination_result.map(&:title) # => ["newer", "newest"]
|
88
|
+
pagination_result.prev_cursor_params # => { before: 3 } (newer)
|
89
|
+
pagination_result.next_cursor_params # => { after: nil }
|
90
|
+
```
|
91
|
+
|
92
|
+
## Configuration (default)
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
CursorPaginator.paginator = CursorPaginator::Paginator::ActiveRecord
|
96
|
+
|
97
|
+
pagination_result = CursorPaginator.paginate(
|
98
|
+
Post.all,
|
99
|
+
page_options: { size: 10 },
|
100
|
+
paginator_options: {
|
101
|
+
order_key: :id,
|
102
|
+
primary_key: :id,
|
103
|
+
sort_direction: :desc
|
104
|
+
}
|
105
|
+
)
|
106
|
+
```
|
26
107
|
|
27
108
|
## Development
|
28
109
|
|
29
110
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
111
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
-
|
33
112
|
## Contributing
|
34
113
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
114
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/somleng/cursor_paginator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/somleng/cursor_paginator/blob/master/CODE_OF_CONDUCT.md).
|
36
115
|
|
37
116
|
## License
|
38
117
|
|
@@ -40,4 +119,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
119
|
|
41
120
|
## Code of Conduct
|
42
121
|
|
43
|
-
Everyone interacting in the CursorPaginator project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
122
|
+
Everyone interacting in the CursorPaginator project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/somleng/cursor_paginator/blob/master/CODE_OF_CONDUCT.md).
|
data/cursor_paginator.gemspec
CHANGED
@@ -3,12 +3,12 @@ require_relative "lib/cursor_paginator/version"
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "cursor_paginator"
|
5
5
|
spec.version = CursorPaginator::VERSION
|
6
|
-
spec.authors = ["David Wilkie", "Samnang Chhun"]
|
7
|
-
spec.email = ["dwilkie@
|
6
|
+
spec.authors = [ "David Wilkie", "Samnang Chhun" ]
|
7
|
+
spec.email = [ "dwilkie@someng.org", "samnang@somleng.org" ]
|
8
8
|
|
9
9
|
spec.summary = "Cursor pagination"
|
10
10
|
spec.description = "Cursor pagination for ruby"
|
11
|
-
spec.homepage = "https://github.com/
|
11
|
+
spec.homepage = "https://github.com/somleng/cursor_paginator"
|
12
12
|
spec.license = "MIT"
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
14
|
|
@@ -21,15 +21,15 @@ Gem::Specification.new do |spec|
|
|
21
21
|
end
|
22
22
|
spec.bindir = "exe"
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
-
spec.require_paths = ["lib"]
|
24
|
+
spec.require_paths = [ "lib" ]
|
25
25
|
|
26
26
|
spec.add_dependency "activesupport", ">= 3"
|
27
27
|
|
28
28
|
spec.add_development_dependency "activerecord"
|
29
|
-
spec.add_development_dependency "sqlite3"
|
30
29
|
spec.add_development_dependency "pry"
|
31
30
|
spec.add_development_dependency "rspec"
|
32
|
-
spec.add_development_dependency "rubocop"
|
31
|
+
spec.add_development_dependency "rubocop-rails-omakase"
|
33
32
|
spec.add_development_dependency "rubocop-performance"
|
34
33
|
spec.add_development_dependency "rubocop-rspec"
|
34
|
+
spec.add_development_dependency "sqlite3", "~> 1.7"
|
35
35
|
end
|
@@ -54,7 +54,7 @@ module CursorPaginator
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def load_records
|
57
|
-
records =
|
57
|
+
records = paginator.take_records(records_scope, paginator.page_size + 1)
|
58
58
|
@additional_record = records.pop if records.size > paginator.page_size
|
59
59
|
paginator.cursor_direction.after? ? records : records.reverse
|
60
60
|
end
|
@@ -5,8 +5,13 @@ module CursorPaginator
|
|
5
5
|
records = scope.reorder(paginator_options.fetch(:order_key) => order_direction)
|
6
6
|
records = filter_by_cursor(records) if options_parser.filter_required?
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
PaginationResult.new(records, self)
|
9
|
+
end
|
10
|
+
|
11
|
+
def take_records(records, limit)
|
12
|
+
return super if records.limit_value.blank?
|
13
|
+
|
14
|
+
super(records, [ records.limit_value, limit ].min)
|
10
15
|
end
|
11
16
|
|
12
17
|
private
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"bootstrap-sha": "f85974e958a5cff373dc6ba6b595e238bf8512d7",
|
3
|
+
"include-component-in-tag": false,
|
4
|
+
"version-file": "lib/cursor_paginator/version.rb",
|
5
|
+
"packages": {
|
6
|
+
".": {
|
7
|
+
"changelog-path": "CHANGELOG.md",
|
8
|
+
"release-type": "ruby",
|
9
|
+
"bump-minor-pre-major": true,
|
10
|
+
"bump-patch-for-minor-pre-major": false,
|
11
|
+
"draft": false,
|
12
|
+
"prerelease": false
|
13
|
+
}
|
14
|
+
},
|
15
|
+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
16
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cursor_paginator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Wilkie
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-04-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: pry
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: rspec
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
71
|
+
name: rubocop-rails-omakase
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
|
-
name: rubocop
|
85
|
+
name: rubocop-performance
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - ">="
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
-
name: rubocop-
|
99
|
+
name: rubocop-rspec
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - ">="
|
@@ -110,35 +110,39 @@ dependencies:
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
|
-
name:
|
113
|
+
name: sqlite3
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - "
|
116
|
+
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
118
|
+
version: '1.7'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - "
|
123
|
+
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
125
|
+
version: '1.7'
|
126
126
|
description: Cursor pagination for ruby
|
127
127
|
email:
|
128
|
-
- dwilkie@
|
129
|
-
- samnang@
|
128
|
+
- dwilkie@someng.org
|
129
|
+
- samnang@somleng.org
|
130
130
|
executables: []
|
131
131
|
extensions: []
|
132
132
|
extra_rdoc_files: []
|
133
133
|
files:
|
134
|
+
- ".github/dependabot.yml"
|
134
135
|
- ".github/workflows/build.yml"
|
135
|
-
- ".github/workflows/
|
136
|
+
- ".github/workflows/dependabot-auto-merge.yml"
|
137
|
+
- ".github/workflows/release.yml"
|
136
138
|
- ".gitignore"
|
139
|
+
- ".release-please-manifest.json"
|
137
140
|
- ".rspec"
|
138
141
|
- ".rubocop.yml"
|
142
|
+
- ".tool-versions"
|
143
|
+
- CHANGELOG.md
|
139
144
|
- CODE_OF_CONDUCT.md
|
140
145
|
- Gemfile
|
141
|
-
- Gemfile.lock
|
142
146
|
- LICENSE.txt
|
143
147
|
- README.md
|
144
148
|
- Rakefile
|
@@ -155,11 +159,12 @@ files:
|
|
155
159
|
- lib/cursor_paginator/paginator/base.rb
|
156
160
|
- lib/cursor_paginator/paginator/dynamoid.rb
|
157
161
|
- lib/cursor_paginator/version.rb
|
158
|
-
|
162
|
+
- release-please-config.json
|
163
|
+
homepage: https://github.com/somleng/cursor_paginator
|
159
164
|
licenses:
|
160
165
|
- MIT
|
161
166
|
metadata:
|
162
|
-
homepage_uri: https://github.com/
|
167
|
+
homepage_uri: https://github.com/somleng/cursor_paginator
|
163
168
|
post_install_message:
|
164
169
|
rdoc_options: []
|
165
170
|
require_paths:
|
@@ -175,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
180
|
- !ruby/object:Gem::Version
|
176
181
|
version: '0'
|
177
182
|
requirements: []
|
178
|
-
rubygems_version: 3.
|
183
|
+
rubygems_version: 3.5.3
|
179
184
|
signing_key:
|
180
185
|
specification_version: 4
|
181
186
|
summary: Cursor pagination
|
@@ -1,34 +0,0 @@
|
|
1
|
-
name: Create Release
|
2
|
-
on:
|
3
|
-
push:
|
4
|
-
branches:
|
5
|
-
- master
|
6
|
-
jobs:
|
7
|
-
release:
|
8
|
-
runs-on: ubuntu-latest
|
9
|
-
steps:
|
10
|
-
- uses: actions/checkout@v2
|
11
|
-
|
12
|
-
- name: Set up Ruby
|
13
|
-
uses: actions/setup-ruby@v1
|
14
|
-
with:
|
15
|
-
ruby-version: 2.6.x
|
16
|
-
|
17
|
-
- name: Install Dependencies
|
18
|
-
run: |
|
19
|
-
gem install bundler
|
20
|
-
bundle install --jobs 4 --retry 3
|
21
|
-
- name: Set up Git
|
22
|
-
run: |
|
23
|
-
git config --global user.email "dev@bongloy.com"
|
24
|
-
git config --global user.name "Bongloy"
|
25
|
-
|
26
|
-
- name: Bump version and publish release
|
27
|
-
env:
|
28
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
29
|
-
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
|
30
|
-
run: |
|
31
|
-
mkdir -p ~/.gem
|
32
|
-
echo -e "---\r\n:rubygems_api_key: $GEM_HOST_API_KEY" > ~/.gem/credentials
|
33
|
-
chmod 0600 ~/.gem/credentials
|
34
|
-
bundle exec rake release
|
data/Gemfile.lock
DELETED
@@ -1,85 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
cursor_paginator (0.1.0)
|
5
|
-
activesupport (>= 3)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activemodel (6.0.3)
|
11
|
-
activesupport (= 6.0.3)
|
12
|
-
activerecord (6.0.3)
|
13
|
-
activemodel (= 6.0.3)
|
14
|
-
activesupport (= 6.0.3)
|
15
|
-
activesupport (6.0.3)
|
16
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
-
i18n (>= 0.7, < 2)
|
18
|
-
minitest (~> 5.1)
|
19
|
-
tzinfo (~> 1.1)
|
20
|
-
zeitwerk (~> 2.2, >= 2.2.2)
|
21
|
-
ast (2.4.0)
|
22
|
-
coderay (1.1.2)
|
23
|
-
concurrent-ruby (1.1.6)
|
24
|
-
diff-lcs (1.3)
|
25
|
-
i18n (1.8.2)
|
26
|
-
concurrent-ruby (~> 1.0)
|
27
|
-
method_source (1.0.0)
|
28
|
-
minitest (5.14.1)
|
29
|
-
parallel (1.19.1)
|
30
|
-
parser (2.7.1.2)
|
31
|
-
ast (~> 2.4.0)
|
32
|
-
pry (0.13.1)
|
33
|
-
coderay (~> 1.1)
|
34
|
-
method_source (~> 1.0)
|
35
|
-
rainbow (3.0.0)
|
36
|
-
rake (12.3.3)
|
37
|
-
rexml (3.2.4)
|
38
|
-
rspec (3.9.0)
|
39
|
-
rspec-core (~> 3.9.0)
|
40
|
-
rspec-expectations (~> 3.9.0)
|
41
|
-
rspec-mocks (~> 3.9.0)
|
42
|
-
rspec-core (3.9.2)
|
43
|
-
rspec-support (~> 3.9.3)
|
44
|
-
rspec-expectations (3.9.2)
|
45
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
-
rspec-support (~> 3.9.0)
|
47
|
-
rspec-mocks (3.9.1)
|
48
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
49
|
-
rspec-support (~> 3.9.0)
|
50
|
-
rspec-support (3.9.3)
|
51
|
-
rubocop (0.83.0)
|
52
|
-
parallel (~> 1.10)
|
53
|
-
parser (>= 2.7.0.1)
|
54
|
-
rainbow (>= 2.2.2, < 4.0)
|
55
|
-
rexml
|
56
|
-
ruby-progressbar (~> 1.7)
|
57
|
-
unicode-display_width (>= 1.4.0, < 2.0)
|
58
|
-
rubocop-performance (1.5.2)
|
59
|
-
rubocop (>= 0.71.0)
|
60
|
-
rubocop-rspec (1.39.0)
|
61
|
-
rubocop (>= 0.68.1)
|
62
|
-
ruby-progressbar (1.10.1)
|
63
|
-
sqlite3 (1.4.2)
|
64
|
-
thread_safe (0.3.6)
|
65
|
-
tzinfo (1.2.7)
|
66
|
-
thread_safe (~> 0.1)
|
67
|
-
unicode-display_width (1.7.0)
|
68
|
-
zeitwerk (2.3.0)
|
69
|
-
|
70
|
-
PLATFORMS
|
71
|
-
ruby
|
72
|
-
|
73
|
-
DEPENDENCIES
|
74
|
-
activerecord
|
75
|
-
cursor_paginator!
|
76
|
-
pry
|
77
|
-
rake (~> 12.0)
|
78
|
-
rspec
|
79
|
-
rubocop
|
80
|
-
rubocop-performance
|
81
|
-
rubocop-rspec
|
82
|
-
sqlite3
|
83
|
-
|
84
|
-
BUNDLED WITH
|
85
|
-
2.1.4
|