cityhash 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,20 +1,20 @@
1
- = cityhash
1
+ ### cityhash
2
2
 
3
3
  Ruby wrapper for google's cityhash.
4
4
 
5
- == Install
6
-
7
- gem install cityhash
5
+ ### Install
6
+
7
+ gem install cityhash
8
8
 
9
- == Usage
9
+ ### Usage
10
10
 
11
- require 'cityhash'
11
+ require 'cityhash'
12
12
 
13
- CityHash.hash64("test") # => 17703940110308125106
14
- CityHash.hash64("test", 12345) # => 14900027982776226655
15
- CityHash.hash64("test", 12345, 54321) # => 11136353178704814373
13
+ CityHash.hash64("test") # => 17703940110308125106
14
+ CityHash.hash64("test", 12345) # => 14900027982776226655
15
+ CityHash.hash64("test", 12345, 54321) # => 11136353178704814373
16
16
 
17
- == Contributing to cityhash
17
+ ### Contributing to cityhash
18
18
 
19
19
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
20
20
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
@@ -24,15 +24,14 @@ Ruby wrapper for google's cityhash.
24
24
  * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
25
25
  * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
26
26
 
27
- Authors
28
- =======
29
- ### [Contributors](http://github.com/nashby/cityhash/contributors)
27
+ ### Authors
28
+
29
+ #### [Contributors](http://github.com/nashby/cityhash/contributors)
30
30
  - [Johannes Holzfuß](http://github.com/DataWraith)
31
31
 
32
32
  [Vasiliy Ermolovich](http://github.com/nashby/)<br/>
33
33
 
34
- == Copyright
34
+ ### Copyright
35
35
 
36
36
  Copyright (c) 2011 nashby. See LICENSE.txt for
37
37
  further details.
38
-
data/cityhash.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cityhash}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["nashby"]
@@ -14,14 +14,14 @@ Gem::Specification.new do |s|
14
14
  s.email = %q{younash@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE.txt",
17
- "README.rdoc"
17
+ "README.md"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
21
  "Gemfile",
22
22
  "Gemfile.lock",
23
23
  "LICENSE.txt",
24
- "README.rdoc",
24
+ "README.md",
25
25
  "Rakefile",
26
26
  "cityhash.gemspec",
27
27
  "lib/cityhash.rb",
data/lib/cityhash.rb CHANGED
@@ -24,14 +24,14 @@ module CityHash
24
24
  end
25
25
 
26
26
  if seed1.nil?
27
- return CityHash::Internal.city_hash64(input, len)
27
+ return CityHash::Internal.city_hash64(input_str, len)
28
28
  end
29
29
 
30
30
  if seed2.nil?
31
- return CityHash::Internal.city_hash64_with_seed(input, len, seed1.to_i)
31
+ return CityHash::Internal.city_hash64_with_seed(input_str, len, seed1.to_i)
32
32
  end
33
33
 
34
- return CityHash::Internal.city_hash64_with_seeds(input, len, seed1.to_i, seed2.to_i)
34
+ return CityHash::Internal.city_hash64_with_seeds(input_str, len, seed1.to_i, seed2.to_i)
35
35
  end
36
36
 
37
37
  def self.hash128(input, seed = nil)
@@ -45,11 +45,11 @@ module CityHash
45
45
  len = input_str.size
46
46
  end
47
47
 
48
- if seed1.nil?
49
- return CityHash::Internal.city_hash128(input, len)
48
+ if seed.nil?
49
+ return CityHash::Internal.city_hash128(input_str, len)
50
50
  end
51
51
 
52
- return CityHash::Internal.city_hash128_with_seed(input, len, seed.to_i)
52
+ return CityHash::Internal.city_hash128_with_seed(input_str, len, seed.to_i)
53
53
  end
54
54
 
55
55
  end
@@ -3,7 +3,7 @@ module CityHash
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 2
6
- PATCH = 0
6
+ PATCH = 1
7
7
  BUILD = nil
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cityhash
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - nashby
@@ -87,13 +87,13 @@ extensions: []
87
87
 
88
88
  extra_rdoc_files:
89
89
  - LICENSE.txt
90
- - README.rdoc
90
+ - README.md
91
91
  files:
92
92
  - .document
93
93
  - Gemfile
94
94
  - Gemfile.lock
95
95
  - LICENSE.txt
96
- - README.rdoc
96
+ - README.md
97
97
  - Rakefile
98
98
  - cityhash.gemspec
99
99
  - lib/cityhash.rb
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
119
  - - ">="
120
120
  - !ruby/object:Gem::Version
121
- hash: 738874061
121
+ hash: -574838995
122
122
  segments:
123
123
  - 0
124
124
  version: "0"