rack_rate_limiting 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7aff6cea5f0811eaed535e5d463cfba9be66584d86abb89555393c68afee4b54
4
+ data.tar.gz: b34e11788a9fe866193c6f2bd422eb53f6addf0929b3439aee5fbdd990318fa0
5
+ SHA512:
6
+ metadata.gz: '059c1fefec0fa03c1acd2ba3be564c9d6857e6f4869bc16c5ae7266cbdb9d93aa0e1ee01ccdd16a3f74ab2217037e675c81ccf713902ad14ac9e51d2ecee4075'
7
+ data.tar.gz: f0d660e49304bf57a702624c57f89569636131ae6e1db17861229470e014f4cb4ecb3a310522d1fc9c06825fc8fb8826d31ec3c9df2c9c17018125dd62913d06
data/.byebug_history ADDED
@@ -0,0 +1,5 @@
1
+ c
2
+ middleware.storage
3
+ middleware.instance_variable
4
+ middleware.storage
5
+ middleware
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2025-04-11
4
+
5
+ - Initial release
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Abdul Rahman Khan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,140 @@
1
+ # RateLimiter
2
+
3
+ A flexible rate limiting gem for Rack-based Ruby applications. Provides multiple storage options and easy configuration for API rate limiting.
4
+
5
+ ## Installation
6
+
7
+ Install the gem and add to the application's Gemfile by executing:
8
+
9
+ ```bash
10
+ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
11
+ ```
12
+
13
+ Alternatively, add this line to your application's Gemfile:
14
+
15
+ ```ruby
16
+ gem 'UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG'
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ ```bash
22
+ $ bundle install
23
+ ```
24
+
25
+ If bundler is not being used to manage dependencies, install the gem by executing:
26
+
27
+ ```bash
28
+ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
29
+ ```
30
+
31
+ ## Usage
32
+
33
+ ### Basic Setup
34
+
35
+ Add the middleware to your application:
36
+
37
+ #### For Rails Applications
38
+
39
+ ```ruby
40
+ # config/application.rb
41
+ module YourApp
42
+ class Application < Rails::Application
43
+ config.middleware.use RateLimiter::Middleware
44
+ end
45
+ end
46
+ ```
47
+
48
+ #### For Rack Applications
49
+
50
+ ```ruby
51
+ # config.ru
52
+ require 'rate_limiter'
53
+
54
+ RateLimiter.configure do |config|
55
+ config.requests_per_minute = 100
56
+ end
57
+
58
+ use RateLimiter::Middleware
59
+ run YourApp
60
+ ```
61
+
62
+ ### Configuration
63
+
64
+ Configure the rate limiter with your desired settings:
65
+
66
+ ```ruby
67
+ # config/initializers/rate_limiter.rb (for Rails)
68
+ RateLimiter.configure do |config|
69
+ config.requests_per_minute = 100 # Number of requests allowed per minute
70
+ config.storage_type = :memory # Choose storage type (:memory, :redis, :memcache)
71
+
72
+ # Redis configuration (if using Redis storage)
73
+ config.redis_options = {
74
+ host: 'localhost',
75
+ port: 6379
76
+ }
77
+ end
78
+ ```
79
+
80
+ ### Storage Options
81
+
82
+ The gem supports multiple storage backends:
83
+
84
+ #### Memory Storage (Default)
85
+ ```ruby
86
+ RateLimiter.configure do |config|
87
+ config.storage_type = :memory
88
+ end
89
+ ```
90
+
91
+ #### Memcache Storage
92
+ ```ruby
93
+ RateLimiter.configure do |config|
94
+ config.storage_type = :memcache
95
+ end
96
+ ```
97
+
98
+ #### Redis Storage
99
+ ```ruby
100
+ RateLimiter.configure do |config|
101
+ config.storage_type = :redis
102
+ config.redis_options = {
103
+ host: 'localhost',
104
+ port: 6379
105
+ }
106
+ end
107
+ ```
108
+
109
+ ### Rate Limit Exceeded Response
110
+
111
+ When the rate limit is exceeded, the middleware returns:
112
+
113
+ - Status: `429 Too Many Requests`
114
+ - Body: "Rate limit exceeded. Try again later."
115
+
116
+
117
+ ## Development
118
+
119
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
120
+
121
+ To install this gem onto your local machine, run `bundle exec rake install`.
122
+
123
+ ## Contributing
124
+
125
+ TODO: Update the github url below
126
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rate_limiter.
127
+
128
+ 1. Fork it
129
+ 2. Create your feature branch (`git checkout -b feature/my-new-feature`)
130
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
131
+ 4. Push to the branch (`git push origin feature/my-new-feature`)
132
+ 5. Create a new Pull Request
133
+
134
+ ## License
135
+
136
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
137
+
138
+ ## Code of Conduct
139
+
140
+ Everyone interacting in the RateLimiter project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -0,0 +1,15 @@
1
+ module RateLimiter
2
+ class Configuration
3
+ attr_accessor :requests_per_minute, :storage_type, :redis_options
4
+
5
+ def initialize
6
+ @requests_per_minute = 60
7
+ @storage_type = :memory
8
+ @redis_options = { host: 'localhost', port: 6379 }
9
+ end
10
+
11
+ def storage_type=(type)
12
+ @storage_type = type.to_sym
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,25 @@
1
+ # lib/rate_limiter/middleware.rb
2
+ module RateLimiter
3
+ class Middleware
4
+ def initialize(app)
5
+ @app = app
6
+ @config = RateLimiter.config
7
+ @storage = RateLimiter.storage
8
+ end
9
+
10
+ def call(request)
11
+ client_id = request['REMOTE_ADDR']
12
+ @storage.add_request(client_id)
13
+
14
+ puts "********************************************************"
15
+ puts "Requests in last minute: #{@storage.requests_in_last_minute(client_id).size}"
16
+ puts "********************************************************"
17
+
18
+ if @storage.requests_in_last_minute(client_id).size > @config.requests_per_minute
19
+ [429, { 'Content-Type' => 'text/plain' }, ['Rate limit exceeded. Try again later.']]
20
+ else
21
+ @app.call(request)
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,13 @@
1
+ module RateLimiter
2
+ module Storage
3
+ class Base
4
+ def add_request(client_id)
5
+ raise NotImplementedError, "Subclasses must implement this method"
6
+ end
7
+
8
+ def requests_in_last_minute(client_id)
9
+ raise NotImplementedError, "Subclasses must implement this method"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,18 @@
1
+ module RateLimiter
2
+ module Storage
3
+ class Factory
4
+ def self.create(config)
5
+ case config.storage_type
6
+ when :memory
7
+ Memory.new
8
+ when :memcache
9
+ Memcache.new
10
+ when :redis
11
+ Redis.new(config.redis_options)
12
+ else
13
+ raise ArgumentError, "Unknown storage type: #{config.storage_type}"
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,25 @@
1
+ module RateLimiter
2
+ module Storage
3
+ class Memcache < Base
4
+ # Compare Memcache with the rack-attack gem code
5
+ # https://github.com/kickstarter/rack-attack/blob/master/lib/rack/attack/storage/memcache.rb
6
+ def initialize
7
+ @cache = Dalli::Client.new
8
+ end
9
+
10
+ def add_request(client_id)
11
+ key = "rate_limit:#{client_id}"
12
+ timestamps = @cache.get(key) || []
13
+ timestamps << Time.now.to_i
14
+ @cache.set(key, timestamps, 60) # Set to expire as defined in the configuration
15
+ end
16
+
17
+ def requests_in_last_minute(client_id)
18
+ key = "rate_limit:#{client_id}"
19
+ timestamps = @cache.get(key) || []
20
+ one_minute_ago = Time.now.to_i - 60
21
+ timestamps.select { |timestamp| timestamp > one_minute_ago }
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,23 @@
1
+ module RateLimiter
2
+ module Storage
3
+ class Memory < Base
4
+ def initialize
5
+ @store = Hash.new { |hash, key| hash[key] = [] }
6
+ @mutex = Mutex.new
7
+ end
8
+
9
+ def add_request(client_id)
10
+ @mutex.synchronize do
11
+ @store[client_id] << Time.now
12
+ end
13
+ end
14
+
15
+ def requests_in_last_minute(client_id)
16
+ @mutex.synchronize do
17
+ one_minute_ago = Time.now - 60
18
+ @store[client_id].select { |timestamp| timestamp > one_minute_ago }
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,43 @@
1
+ # lib/rate_limiter/storage/redis.rb
2
+ module RateLimiter
3
+ module Storage
4
+ class Redis < Base
5
+ EXPIRATION_TIME = 60 # 60 seconds = 1 minute
6
+
7
+ def initialize(options = {})
8
+ default_options = {
9
+ host: 'localhost',
10
+ port: 6379
11
+ }
12
+
13
+ default_options[:namespace] = 'rate_limiter'
14
+
15
+ @options = default_options.merge(options)
16
+ @redis = ::Redis.new(@options)
17
+ end
18
+
19
+ def add_request(client_id)
20
+ key = cache_key(client_id)
21
+ @redis.multi do |redis|
22
+ redis.lpush(key, Time.now.to_i)
23
+ redis.expire(key, EXPIRATION_TIME)
24
+ end
25
+ end
26
+
27
+ def requests_in_last_minute(client_id)
28
+ key = cache_key(client_id)
29
+ one_minute_ago = Time.now.to_i - EXPIRATION_TIME
30
+
31
+ @redis.lrange(key, 0, -1).map(&:to_i).select do |timestamp|
32
+ timestamp > one_minute_ago
33
+ end
34
+ end
35
+
36
+ private
37
+
38
+ def cache_key(client_id)
39
+ [@options[:namespace], 'rate_limit', client_id].compact.join(':')
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RateLimiter
4
+ VERSION = "0.1.3"
5
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thread'
4
+ require 'dalli'
5
+ require_relative 'rate_limiter/version'
6
+ require_relative 'rate_limiter/configuration'
7
+ require_relative 'rate_limiter/storage/base'
8
+ require_relative 'rate_limiter/storage/memory'
9
+ require_relative 'rate_limiter/storage/memcache'
10
+ require_relative 'rate_limiter/storage/redis'
11
+ require_relative 'rate_limiter/storage/factory'
12
+ require_relative 'rate_limiter/middleware'
13
+
14
+ module RateLimiter
15
+ class Error < StandardError; end
16
+
17
+ def self.configure
18
+ @config ||= Configuration.new
19
+ yield(@config) if block_given?
20
+ end
21
+
22
+ def self.config
23
+ @config
24
+ end
25
+
26
+ def self.storage
27
+ @storage ||= Storage::Factory.create(config)
28
+ end
29
+ end
@@ -0,0 +1,14 @@
1
+ # test_middleware.rb
2
+ require 'byebug'
3
+ require_relative 'lib/rate_limiter'
4
+
5
+ RateLimiter.configure do |config|
6
+ config.requests_per_minute = 100
7
+ end
8
+
9
+ app = ->(env) { [200, { 'Content-Type' => 'text/plain' }, ['Hello, World!']] }
10
+ middleware = RateLimiter::Middleware.new(app, RateLimiter.config, RateLimiter.storage)
11
+
12
+ # Simulate a request
13
+ env = { 'REMOTE_ADDR' => '127.0.0.1' }
14
+ middleware.call(env)
@@ -0,0 +1,4 @@
1
+ module RateLimiter
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,159 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rack_rate_limiting
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ platform: ruby
6
+ authors:
7
+ - Hassan Tahir
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-04-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rack
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: redis
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '4.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '4.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: dalli
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '13.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '13.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.10'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.10'
83
+ - !ruby/object:Gem::Dependency
84
+ name: timecop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.9.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.9.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: byebug
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description:
112
+ email:
113
+ - hassantahirjaura@gmail.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".byebug_history"
119
+ - ".rspec"
120
+ - CHANGELOG.md
121
+ - CODE_OF_CONDUCT.md
122
+ - LICENSE.txt
123
+ - README.md
124
+ - Rakefile
125
+ - lib/rate_limiter.rb
126
+ - lib/rate_limiter/configuration.rb
127
+ - lib/rate_limiter/middleware.rb
128
+ - lib/rate_limiter/storage/base.rb
129
+ - lib/rate_limiter/storage/factory.rb
130
+ - lib/rate_limiter/storage/memcache.rb
131
+ - lib/rate_limiter/storage/memory.rb
132
+ - lib/rate_limiter/storage/redis.rb
133
+ - lib/rate_limiter/version.rb
134
+ - lib/tasks/test_middleware.rb
135
+ - sig/rate_limiter.rbs
136
+ homepage:
137
+ licenses:
138
+ - MIT
139
+ metadata: {}
140
+ post_install_message:
141
+ rdoc_options: []
142
+ require_paths:
143
+ - lib
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ version: 3.0.0
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ requirements: []
155
+ rubygems_version: 3.5.22
156
+ signing_key:
157
+ specification_version: 4
158
+ summary: Use this gem to rate limit your API requests.
159
+ test_files: []