diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 297dd51..0cb5021 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,9 +40,8 @@ jobs: strategy: matrix: ruby: - - '2.6' + # - '2.6' - '3.2' - runs-on: "self-hosted" services: # mysql: # image: mysql:5.7 @@ -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 diff --git a/lib/pecorino/throttle.rb b/lib/pecorino/throttle.rb index 3073bb5..6d9b43d 100644 --- a/lib/pecorino/throttle.rb +++ b/lib/pecorino/throttle.rb @@ -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 diff --git a/pecorino.gemspec b/pecorino.gemspec index 6fb259d..a6a08e8 100644 --- a/pecorino.gemspec +++ b/pecorino.gemspec @@ -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