simple_rate_limiter 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81b19634dfcd6b79468f1ff80d0f8325b80e7c993dec2c7b1250f867a011de58
4
- data.tar.gz: b8e4eefd61cc3cf91ebbda37593f160a93a8a93c2abc49119744a20919f7d8f6
3
+ metadata.gz: b4b88e4725a9b8c68a7c5ec2d10c8b42effa289e0c9a7b81a377b37533344cad
4
+ data.tar.gz: 6339d1767b1665a887a61d86a1d521aa75fef8ca969ccacef693a8ba4d97bd92
5
5
  SHA512:
6
- metadata.gz: 812e3106c57a324067aaa459eab0292515ed46d01444d7864cbfb09ef2de8c59f5063a6285b0049ec47559e169be9cd701922e60e925c4b76e657588697c6597
7
- data.tar.gz: e56a537845579752bc5f1a8d6857bc59684972f0a85a0221c462b3b7a05f2ac4aa99afa590824178d4f93ecc87469419de7ee11e544b4f595254e92fa3a7cd2a
6
+ metadata.gz: 6f7f3c3f8cc51a6a27dabad46458eb522cd5d552199f6b04fe9a3122ae33432195b6b7eb4521785a8631468e95c5d32af4846cb3c82efcdded47c250f08c302f
7
+ data.tar.gz: 6e46164b51285d74c899afde644ccb09070b4c591ea2efcc54a073c95581d99a54f24306f2d9f59c34b91e3e56b257b9d95f6f3dfc8439eaf31ba588629dfa7e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_rate_limiter (0.1.8)
4
+ simple_rate_limiter (0.2.0)
5
5
  redis (~> 4.2.2)
6
6
 
7
7
  GEM
@@ -20,7 +20,7 @@ GEM
20
20
  concurrent-ruby (~> 1.0)
21
21
  minitest (5.14.2)
22
22
  rake (12.3.3)
23
- redis (4.2.2)
23
+ redis (4.2.5)
24
24
  rspec (3.9.0)
25
25
  rspec-core (~> 3.9.0)
26
26
  rspec-expectations (~> 3.9.0)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # RateLimiter
1
+ # SimpleRateLimiter
2
2
 
3
3
  Welcome to my first gem! This is a simple rate limiting gem.
4
4
 
@@ -29,10 +29,10 @@ Or install it yourself as:
29
29
 
30
30
  ```ruby
31
31
  redis = Redis.new
32
- redis_record_repository = RateLimiter::Repositories::RedisRecordRepository.build(redis)
33
- rate_limiter = RateLimiter::Service.new(redis_record_repository)
32
+ redis_record_repository = SimpleRateLimiter::Repositories::RedisRecordRepository.build(redis)
33
+ rate_limiter = SimpleRateLimiter::Service.new(redis_record_repository)
34
34
 
35
- limited = rate_limiter.check('create_user', 'unique_user_identifier', 3, 30, 2)
35
+ limited = rate_limiter.check('create_user', 'unique_user_identifier', 3, 30, 2) # returns true if limited
36
36
  ```
37
37
 
38
38
  ## Development
@@ -1,3 +1,3 @@
1
1
  module RateLimiter
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -15,7 +15,7 @@ module SimpleRateLimiter
15
15
  result = @redis.set('test', test_hash)
16
16
  received = @redis.get('test')
17
17
  unless result == 'OK' && received == test_hash
18
- raise RateLimiter::Application::Exceptions::RedisConnectionException, 'redis connection unsuccessful, make sure redis is installed and configuration variables are set'
18
+ raise SimpleRateLimiter::Application::Exceptions::RedisConnectionException, 'redis connection unsuccessful, make sure redis is installed and configuration variables are set'
19
19
  end
20
20
  end
21
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_rate_limiter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ediz Arca