ruby-limiter 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c8b855660b5c5b40e96437d66444cbba63b07af6
4
- data.tar.gz: f4486818e1c73464c3b6545ee35601282a1cb798
2
+ SHA256:
3
+ metadata.gz: b5539b1f191ad06d89a530968e52be20b50668a3a3697cbd1c860875158cd888
4
+ data.tar.gz: 778c400b703c08064b34651f879e26d6cb68fc1b3525d3459a7a3ccd1559d0e4
5
5
  SHA512:
6
- metadata.gz: 53f3886fe4a1f71c5f7454eebfbc764b4880cca6ab1026bfadc3e2ee16709a95c5f01e4e2ff732b49b8a0332ffba06206715fda1561032d0916c47850f289f89
7
- data.tar.gz: 4b33aeea30a63521f97adbaa290604cc176788e7a8ea4ea643a94bf08604ce779b53fcb36b9ec8f44c6a5d1d684897d1596635e21c4c3d6ee4cbdd8f3c8443a9
6
+ metadata.gz: 927ac894b0f0b5c55fcf7c877a8514d35ecb6db7be85a9b3ff286107666718652ec83c9fd4d767a8d3a60fd845a7831d11c37c46b4878ae43527e4c7ef82eb01
7
+ data.tar.gz: 7bbc065f4b96be1a69158e5dc7d586bf6b4b25cd6042e3c50e593124faf5d173f8d0b5f5cffacc80830666ae712d15ed531ab680f9c75b42a5713c4fff2b2990
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v1.0.2
4
+
5
+ - DOCFIX: fix name of gem in README
6
+ - BUGFIX: add ruby-limiter.rb so that it works better with bundler
7
+
3
8
  ## v1.0.1
4
9
 
5
10
  - BUGFIX: support arguments for throttled methods
data/README.md CHANGED
@@ -7,7 +7,7 @@ This gem implements a simple mechanism to throttle or rate-limit operations in R
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'limiter'
10
+ gem 'ruby-limiter'
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -16,13 +16,13 @@ And then execute:
16
16
 
17
17
  Or install it yourself as:
18
18
 
19
- $ gem install limiter
19
+ $ gem install ruby-limiter
20
20
 
21
21
  ## Usage
22
22
 
23
23
  ### Basic Usage
24
24
 
25
- To rate limit calling an instance method, a mixin is provided. Simply specify the method to me limited, and the maximum
25
+ To rate limit calling an instance method, a mixin is provided. Simply specify the method to be limited, and the maximum
26
26
  rate that the method can be called. This rate is (by default) a number of requests per minute.
27
27
 
28
28
  ``` ruby
@@ -61,7 +61,7 @@ the `interval` parameter is optional (and defaults to 1 minute).
61
61
  class Widget
62
62
  def initialize
63
63
  # create a rate-limited queue which allows 10000 operations per hour
64
- @queue = RateQueue.new(10000, interval: 3600)
64
+ @queue = Limiter::RateQueue.new(10000, interval: 3600)
65
65
  end
66
66
 
67
67
  def tick
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Limiter
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  end
@@ -0,0 +1 @@
1
+ require 'limiter'
@@ -14,6 +14,12 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = 'https://github.com/Shopify/limiter'
15
15
  spec.license = 'MIT'
16
16
 
17
+ if spec.respond_to?(:metadata)
18
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
19
+ else
20
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
21
+ end
22
+
17
23
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
24
  f.match(%r{^(test|spec|features)/})
19
25
  end
@@ -21,7 +27,7 @@ Gem::Specification.new do |spec|
21
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
28
  spec.require_paths = %w(lib)
23
29
 
24
- spec.add_development_dependency 'bundler', '~> 1.15'
30
+ spec.add_development_dependency 'bundler'
25
31
  spec.add_development_dependency 'minitest', '~> 5.0'
26
32
  spec.add_development_dependency 'rake', '~> 10.0'
27
33
  spec.add_development_dependency 'rubocop', '~> 0.56'
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-limiter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - S. Brent Faulkner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-06 00:00:00.000000000 Z
11
+ date: 2020-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.15'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.15'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -103,11 +103,13 @@ files:
103
103
  - lib/limiter/mixin.rb
104
104
  - lib/limiter/rate_queue.rb
105
105
  - lib/limiter/version.rb
106
+ - lib/ruby-limiter.rb
106
107
  - limiter.gemspec
107
108
  homepage: https://github.com/Shopify/limiter
108
109
  licenses:
109
110
  - MIT
110
- metadata: {}
111
+ metadata:
112
+ allowed_push_host: https://rubygems.org
111
113
  post_install_message:
112
114
  rdoc_options: []
113
115
  require_paths:
@@ -123,8 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
125
  - !ruby/object:Gem::Version
124
126
  version: '0'
125
127
  requirements: []
126
- rubyforge_project:
127
- rubygems_version: 2.6.14
128
+ rubygems_version: 3.0.3
128
129
  signing_key:
129
130
  specification_version: 4
130
131
  summary: Simple Ruby rate limiting mechanism.