cityhash 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.
data/README.rdoc CHANGED
@@ -2,13 +2,17 @@
2
2
 
3
3
  Ruby wrapper for google's cityhash.
4
4
 
5
+ == Install
6
+
7
+ gem install cityhash
8
+
5
9
  == Usage
6
10
 
7
- require 'cityhash'
11
+ require 'cityhash'
8
12
 
9
- CityHash.city_hash64("test", 4) # => 17703940110308125106
10
- CityHash.city_hash64_with_seed("test", 4, 12345) # => 14900027982776226655
11
- CityHash.city_hash64_with_seeds("test", 4, 12345, 54321) # => 11136353178704814373
13
+ CityHash.city_hash64("test", 4) # => 17703940110308125106
14
+ CityHash.city_hash64_with_seed("test", 4, 12345) # => 14900027982776226655
15
+ CityHash.city_hash64_with_seeds("test", 4, 12345, 54321) # => 11136353178704814373
12
16
 
13
17
  == Contributing to cityhash
14
18
 
data/cityhash.gemspec ADDED
@@ -0,0 +1,73 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{cityhash}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["nashby"]
12
+ s.date = %q{2011-04-22}
13
+ s.description = %q{ffi wrapper for google's cityhash}
14
+ s.email = %q{younash@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "LICENSE.txt",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "cityhash.gemspec",
27
+ "lib/cityhash.rb",
28
+ "lib/cityhash/ext/libcity.so",
29
+ "lib/cityhash/ext/src/Makefile",
30
+ "lib/cityhash/ext/src/city.cc",
31
+ "lib/cityhash/ext/src/city.h",
32
+ "lib/cityhash/version.rb",
33
+ "test/helper.rb",
34
+ "test/test_cityhash.rb"
35
+ ]
36
+ s.homepage = %q{http://github.com/nashby/cityhash}
37
+ s.licenses = ["MIT"]
38
+ s.require_paths = ["lib"]
39
+ s.rubygems_version = %q{1.6.2}
40
+ s.summary = %q{ffi wrapper for google's cityhash}
41
+ s.test_files = [
42
+ "test/helper.rb",
43
+ "test/test_cityhash.rb"
44
+ ]
45
+
46
+ if s.respond_to? :specification_version then
47
+ s.specification_version = 3
48
+
49
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
50
+ s.add_runtime_dependency(%q<ffi>, [">= 0"])
51
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
52
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
53
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
54
+ s.add_development_dependency(%q<rcov>, [">= 0"])
55
+ s.add_runtime_dependency(%q<ffi>, [">= 0"])
56
+ else
57
+ s.add_dependency(%q<ffi>, [">= 0"])
58
+ s.add_dependency(%q<shoulda>, [">= 0"])
59
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
60
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
61
+ s.add_dependency(%q<rcov>, [">= 0"])
62
+ s.add_dependency(%q<ffi>, [">= 0"])
63
+ end
64
+ else
65
+ s.add_dependency(%q<ffi>, [">= 0"])
66
+ s.add_dependency(%q<shoulda>, [">= 0"])
67
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
68
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
69
+ s.add_dependency(%q<rcov>, [">= 0"])
70
+ s.add_dependency(%q<ffi>, [">= 0"])
71
+ end
72
+ end
73
+
data/lib/cityhash.rb CHANGED
@@ -3,7 +3,7 @@ require 'ffi'
3
3
  module CityHash
4
4
  extend FFI::Library
5
5
 
6
- ffi_lib "lib/cityhash/ext/libcity.so"
6
+ ffi_lib File.dirname(__FILE__)+"/cityhash/ext/libcity.so"
7
7
  attach_function :city_hash64, :CityHash64, [:string, :size_t], :uint64
8
8
  attach_function :city_hash64_with_seed, :CityHash64WithSeed, [:string, :size_t, :uint64], :uint64
9
9
  attach_function :city_hash64_with_seeds, :CityHash64WithSeeds, [:string, :size_t, :uint64, :uint64], :uint64
@@ -3,7 +3,7 @@ module CityHash
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 1
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.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - nashby
@@ -95,13 +95,13 @@ files:
95
95
  - LICENSE.txt
96
96
  - README.rdoc
97
97
  - Rakefile
98
+ - cityhash.gemspec
98
99
  - lib/cityhash.rb
99
100
  - lib/cityhash/ext/libcity.so
100
101
  - lib/cityhash/ext/src/Makefile
101
102
  - lib/cityhash/ext/src/city.cc
102
103
  - lib/cityhash/ext/src/city.h
103
104
  - lib/cityhash/version.rb
104
- - lib/libcity.so
105
105
  - test/helper.rb
106
106
  - test/test_cityhash.rb
107
107
  has_rdoc: true
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
119
  - - ">="
120
120
  - !ruby/object:Gem::Version
121
- hash: 133207375
121
+ hash: 223389711
122
122
  segments:
123
123
  - 0
124
124
  version: "0"
data/lib/libcity.so DELETED
Binary file