prop 0.7.7 → 0.7.8

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.
data/lib/prop.rb CHANGED
@@ -2,7 +2,7 @@ require "prop/limiter"
2
2
  require "forwardable"
3
3
 
4
4
  module Prop
5
- VERSION = "0.7.7"
5
+ VERSION = "0.7.8"
6
6
 
7
7
  # Short hand for accessing Prop::Limiter methods
8
8
  class << self
@@ -8,7 +8,7 @@ module Prop
8
8
  interval = options.fetch(:interval).to_i
9
9
  threshold = options.fetch(:threshold).to_i
10
10
 
11
- super("#{handle} threshold of #{threshold}/#{interval}s exceeded for key '#{cache_key}'")
11
+ super("#{handle} threshold of #{threshold} tries per #{interval}s exceeded for key '#{options[:key].inspect}', hash #{cache_key}")
12
12
 
13
13
  self.description = options[:description]
14
14
  self.handle = handle
data/prop.gemspec CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'prop'
16
- s.version = '0.7.7'
17
- s.date = '2012-04-07'
16
+ s.version = '0.7.8'
17
+ s.date = '2012-04-24'
18
18
  s.rubyforge_project = 'prop'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
data/test/test_prop.rb CHANGED
@@ -167,7 +167,7 @@ class TestProp < Test::Unit::TestCase
167
167
  fail
168
168
  rescue Prop::RateLimited => e
169
169
  assert_equal :hello, e.handle
170
- assert_match "hello threshold of 5/10s exceeded for key", e.message
170
+ assert_match "5 tries per 10s exceeded for key", e.message
171
171
  assert_equal "Boom!", e.description
172
172
  assert e.retry_after
173
173
  end
@@ -18,7 +18,7 @@ class TestRateLimited < Test::Unit::TestCase
18
18
  assert_equal "foo", @error.handle
19
19
  assert_equal "wibble", @error.cache_key
20
20
  assert_equal "Boom!", @error.description
21
- assert_equal "foo threshold of 10/60s exceeded for key 'wibble'", @error.message
21
+ assert_equal "foo threshold of 10 tries per 60s exceeded for key 'nil', hash wibble", @error.message
22
22
  assert_equal 20, @error.retry_after
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prop
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 7
10
- version: 0.7.7
9
+ - 8
10
+ version: 0.7.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Morten Primdahl
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-07 00:00:00 Z
18
+ date: 2012-04-24 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rake