Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make GH actions actually run #1

Merged
merged 11 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ jobs:
strategy:
matrix:
ruby:
- '2.6'
# - '2.6'
- '3.2'
runs-on: "self-hosted"
services:
# mysql:
# image: mysql:5.7
Expand All @@ -68,6 +67,10 @@ jobs:
bundler-cache: true
- name: "Tests and Lint"
run: bundle exec rake
# env:
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
TESTOPTS: "--fail-fast"
# MYSQL_HOST: 127.0.0.1
# MYSQL_PORT: 3306
4 changes: 2 additions & 2 deletions lib/pecorino/throttle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ def initialize(from_throttle, state)
# @param block_for[Numeric] the number of seconds to block any further requests for
# @param leaky_bucket_options Options for `Pecorino::LeakyBucket.new`
# @see PecorinoLeakyBucket.new
def initialize(key:, block_for: 30, **leaky_bucket_options)
def initialize(key:, block_for: 30, **)
@key = key.to_s
@block_for = block_for.to_f
@bucket = Pecorino::LeakyBucket.new(key:, **leaky_bucket_options)
@bucket = Pecorino::LeakyBucket.new(key:, **)
end

# Tells whether the throttle will let this number of requests pass without raising
Expand Down
3 changes: 2 additions & 1 deletion pecorino.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ Gem::Specification.new do |spec|

# Uncomment to register a new dependency of your gem
spec.add_dependency "activerecord", "~> 7"
spec.add_dependency "pg"
spec.add_development_dependency "pg"
spec.add_development_dependency "activesupport", "~> 7.0"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "minitest", "~> 5.0"
spec.add_development_dependency "standard"
spec.add_development_dependency "magic_frozen_string_literal"
spec.add_development_dependency "minitest-fail-fast"

# For more information and examples about making a new gem, checkout our
# guide at: https://bundler.io/guides/creating_gem.html
Expand Down