consistent_hashing 0.1.0 → 0.1.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.
@@ -1,3 +1,8 @@
1
+ == 0.1.1 2007-10-04
2
+
3
+ * 1 minor bug fix:
4
+ * The number of anchors per server was off by one.
5
+
1
6
  == 0.1.0 2007-06-15
2
7
 
3
8
  * 1 major enhancement:
@@ -75,7 +75,7 @@ module ConsistentHashing
75
75
  end
76
76
 
77
77
  def create_anchors_for_server(server)
78
- [*0..anchors_per_server * server.weight].map do |i|
78
+ [* 0...(anchors_per_server * server.weight) ].map do |i|
79
79
  Anchor.new(hash_to_unit_circle("#{server.address}:#{i}"), server)
80
80
  end
81
81
  end
@@ -2,7 +2,7 @@ module ConsistentHashing #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -529,7 +529,7 @@ class TestMemCache < Test::Unit::TestCase
529
529
  @cache.servers = []
530
530
  @cache.add_server(server)
531
531
 
532
- expected = {"localhost:11211"=>{"pid"=>"20188", "total_items"=>"32"}}
532
+ expected = {"localhost:11211"=>{"pid"=>20188, "total_items"=>32}}
533
533
  assert_equal expected, @cache.stats
534
534
 
535
535
  assert_equal "stats\r\n", socket.written.string
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: consistent_hashing
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.0
7
- date: 2007-06-15 00:00:00 -05:00
6
+ version: 0.1.1
7
+ date: 2007-10-04 00:00:00 -07:00
8
8
  summary: An implementation of consistent hashing, and a subclass of MemCache (from the memcache-client gem) that uses it.
9
9
  require_paths:
10
10
  - lib