cityhash 0.4.0 → 0.5.0

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.
@@ -5,13 +5,14 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cityhash}
8
- s.version = "0.4.0"
8
+ s.version = "0.5.0"
9
9
 
10
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-23}
11
+ s.authors = [%q{nashby}]
12
+ s.date = %q{2011-10-28}
13
13
  s.description = %q{ffi wrapper for google's cityhash}
14
14
  s.email = %q{younash@gmail.com}
15
+ s.extensions = [%q{ext/cityhash/extconf.rb}]
15
16
  s.extra_rdoc_files = [
16
17
  "LICENSE.txt",
17
18
  "README.md"
@@ -24,21 +25,20 @@ Gem::Specification.new do |s|
24
25
  "README.md",
25
26
  "Rakefile",
26
27
  "cityhash.gemspec",
28
+ "ext/cityhash/city.cc",
29
+ "ext/cityhash/city.h",
30
+ "ext/cityhash/city_ruby_bridge.cpp",
31
+ "ext/cityhash/city_ruby_bridge.h",
32
+ "ext/cityhash/extconf.rb",
27
33
  "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/ext/src/city_ruby_bridge.cpp",
33
- "lib/cityhash/ext/src/city_ruby_bridge.h",
34
34
  "lib/cityhash/version.rb",
35
35
  "test/helper.rb",
36
36
  "test/test_cityhash.rb"
37
37
  ]
38
38
  s.homepage = %q{http://github.com/nashby/cityhash}
39
- s.licenses = ["MIT"]
40
- s.require_paths = ["lib"]
41
- s.rubygems_version = %q{1.6.2}
39
+ s.licenses = [%q{MIT}]
40
+ s.require_paths = [%q{lib}]
41
+ s.rubygems_version = %q{1.8.6}
42
42
  s.summary = %q{ffi wrapper for google's cityhash}
43
43
  s.test_files = [
44
44
  "test/helper.rb",
@@ -0,0 +1,12 @@
1
+ require 'mkmf'
2
+
3
+ have_library('objc') if RUBY_PLATFORM =~ /darwin/
4
+
5
+ %w{g O3 Wall rdynamic}.each do |flag|
6
+ flag = "-#{flag}"
7
+ $CPPFLAGS += " #{flag}" unless $CPPFLAGS.split.include? flag
8
+ end
9
+
10
+ CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
11
+
12
+ create_makefile('cityhash')
@@ -8,7 +8,17 @@ module CityHash
8
8
  module Internal
9
9
  extend FFI::Library
10
10
 
11
- ffi_lib File.dirname(__FILE__)+"/cityhash/ext/libcity.so"
11
+ ffi_lib(
12
+ case RUBY_PLATFORM
13
+ when /darwin/
14
+ File.join(File.dirname(__FILE__), '..', 'ext', 'cityhash', 'cityhash.bundle')
15
+ when /mingw|mswin|linux/
16
+ File.join(File.dirname(__FILE__), '..', 'ext', 'cityhash', 'cityhash.so')
17
+ else
18
+ File.join(File.dirname(__FILE__), '..', 'ext', 'cityhash', "cityhash.#{RbConfig::CONFIG['DLEXT']}")
19
+ end
20
+ )
21
+
12
22
  attach_function :city_hash64, :CityHash64, [:string, :size_t], :uint64
13
23
  attach_function :city_hash64_with_seed, :CityHash64WithSeed, [:string, :size_t, :uint64], :uint64
14
24
  attach_function :city_hash64_with_seeds, :CityHash64WithSeeds, [:string, :size_t, :uint64, :uint64], :uint64
@@ -1,12 +1,12 @@
1
1
  module CityHash
2
-
2
+
3
3
  module Version
4
4
  MAJOR = 0
5
- MINOR = 4
5
+ MINOR = 5
6
6
  PATCH = 0
7
7
  BUILD = nil
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
10
10
  end
11
-
11
+
12
12
  end
metadata CHANGED
@@ -1,94 +1,91 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: cityhash
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.0
4
5
  prerelease:
5
- version: 0.4.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - nashby
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-04-23 00:00:00 +03:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2011-10-28 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: ffi
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &24780520 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
24
22
  type: :runtime
25
23
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *24780520
25
+ - !ruby/object:Gem::Dependency
28
26
  name: shoulda
29
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ requirement: &24779860 !ruby/object:Gem::Requirement
30
28
  none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
35
33
  type: :development
36
34
  prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *24779860
36
+ - !ruby/object:Gem::Dependency
39
37
  name: bundler
40
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirement: &24779220 !ruby/object:Gem::Requirement
41
39
  none: false
42
- requirements:
40
+ requirements:
43
41
  - - ~>
44
- - !ruby/object:Gem::Version
42
+ - !ruby/object:Gem::Version
45
43
  version: 1.0.0
46
44
  type: :development
47
45
  prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
46
+ version_requirements: *24779220
47
+ - !ruby/object:Gem::Dependency
50
48
  name: jeweler
51
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ requirement: &24778500 !ruby/object:Gem::Requirement
52
50
  none: false
53
- requirements:
51
+ requirements:
54
52
  - - ~>
55
- - !ruby/object:Gem::Version
53
+ - !ruby/object:Gem::Version
56
54
  version: 1.5.2
57
55
  type: :development
58
56
  prerelease: false
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
57
+ version_requirements: *24778500
58
+ - !ruby/object:Gem::Dependency
61
59
  name: rcov
62
- requirement: &id005 !ruby/object:Gem::Requirement
60
+ requirement: &24777780 !ruby/object:Gem::Requirement
63
61
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
68
66
  type: :development
69
67
  prerelease: false
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
68
+ version_requirements: *24777780
69
+ - !ruby/object:Gem::Dependency
72
70
  name: ffi
73
- requirement: &id006 !ruby/object:Gem::Requirement
71
+ requirement: &24776560 !ruby/object:Gem::Requirement
74
72
  none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: "0"
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
79
77
  type: :runtime
80
78
  prerelease: false
81
- version_requirements: *id006
79
+ version_requirements: *24776560
82
80
  description: ffi wrapper for google's cityhash
83
81
  email: younash@gmail.com
84
82
  executables: []
85
-
86
- extensions: []
87
-
88
- extra_rdoc_files:
83
+ extensions:
84
+ - ext/cityhash/extconf.rb
85
+ extra_rdoc_files:
89
86
  - LICENSE.txt
90
87
  - README.md
91
- files:
88
+ files:
92
89
  - .document
93
90
  - Gemfile
94
91
  - Gemfile.lock
@@ -96,47 +93,43 @@ files:
96
93
  - README.md
97
94
  - Rakefile
98
95
  - cityhash.gemspec
96
+ - ext/cityhash/city.cc
97
+ - ext/cityhash/city.h
98
+ - ext/cityhash/city_ruby_bridge.cpp
99
+ - ext/cityhash/city_ruby_bridge.h
100
+ - ext/cityhash/extconf.rb
99
101
  - lib/cityhash.rb
100
- - lib/cityhash/ext/libcity.so
101
- - lib/cityhash/ext/src/Makefile
102
- - lib/cityhash/ext/src/city.cc
103
- - lib/cityhash/ext/src/city.h
104
- - lib/cityhash/ext/src/city_ruby_bridge.cpp
105
- - lib/cityhash/ext/src/city_ruby_bridge.h
106
102
  - lib/cityhash/version.rb
107
103
  - test/helper.rb
108
104
  - test/test_cityhash.rb
109
- has_rdoc: true
110
105
  homepage: http://github.com/nashby/cityhash
111
- licenses:
106
+ licenses:
112
107
  - MIT
113
108
  post_install_message:
114
109
  rdoc_options: []
115
-
116
- require_paths:
110
+ require_paths:
117
111
  - lib
118
- required_ruby_version: !ruby/object:Gem::Requirement
112
+ required_ruby_version: !ruby/object:Gem::Requirement
119
113
  none: false
120
- requirements:
121
- - - ">="
122
- - !ruby/object:Gem::Version
123
- hash: 282303183
124
- segments:
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ segments:
125
119
  - 0
126
- version: "0"
127
- required_rubygems_version: !ruby/object:Gem::Requirement
120
+ hash: -4372501756799673446
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
122
  none: false
129
- requirements:
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- version: "0"
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
133
127
  requirements: []
134
-
135
128
  rubyforge_project:
136
- rubygems_version: 1.6.2
129
+ rubygems_version: 1.8.6
137
130
  signing_key:
138
131
  specification_version: 3
139
132
  summary: ffi wrapper for google's cityhash
140
- test_files:
133
+ test_files:
141
134
  - test/helper.rb
142
135
  - test/test_cityhash.rb
Binary file
@@ -1,2 +0,0 @@
1
- all:
2
- g++ -shared -fPIC city.cc city_ruby_bridge.cpp -o ../libcity.so