Skip to content

Commit bc7fe4c

Browse files
authored
Merge pull request #159 from dblock/use-github-token
Use GH_TOKEN to work around rate limits.
2 parents d884403 + 3e0247f commit bc7fe4c

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

.github/workflows/test-mongodb.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
with:
2020
ruby-version: ${{ matrix.entry.ruby }}
2121
- uses: browser-actions/setup-geckodriver@latest
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
2224
- run: geckodriver --version
2325
- uses: supercharge/[email protected]
2426
with:

.github/workflows/test-postgresql.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
with:
1818
ruby-version: ${{ matrix.entry.ruby }}
1919
- uses: browser-actions/setup-geckodriver@latest
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
2022
- run: geckodriver --version
2123
- uses: harmon758/postgresql-action@v1
2224
with:

lib/slack-ruby-bot-server.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
require 'slack-ruby-client'
44
require 'grape-swagger'
5-
require 'pagy'
6-
require 'pagy_cursor/pagy/extras/cursor'
75

86
require_relative 'slack-ruby-bot-server/loggable'
97
require_relative 'slack-ruby-bot-server/service'

lib/slack-ruby-bot-server/api/helpers/cursor_helpers.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module Api
33
module Helpers
44
module CursorHelpers
55
extend ActiveSupport::Concern
6-
include Pagy::Cursor::Backend
76

87
# apply cursor-based pagination to a collection
98
# returns a hash:
@@ -26,6 +25,8 @@ def paginate_by_cursor(coll, _options)
2625
results
2726
end
2827
elsif SlackRubyBotServer::Config.activerecord?
28+
include Pagy::Cursor::Backend
29+
2930
def paginate_by_cursor(coll, options)
3031
raise 'Both cursor and offset parameters are present, these are mutually exclusive.' if params.key?(:offset) && params.key?(:cursor)
3132

lib/slack-ruby-bot-server/config/database_adapters/activerecord.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
require_relative '../../models/team/activerecord.rb'
22

3+
require 'pagy'
4+
require 'pagy_cursor/pagy/extras/cursor'
5+
36
module SlackRubyBotServer
47
module DatabaseAdapter
58
def self.check!

0 commit comments

Comments
 (0)