acamargo-geoip_city 1.0 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/geoip_city.c +2 -2
- metadata +24 -32
data/geoip_city.c
CHANGED
@@ -53,7 +53,7 @@ static VALUE rb_geoip_new(int argc, VALUE *argv, VALUE self)
|
|
53
53
|
|
54
54
|
if(RTEST(check_cache)) flag |= GEOIP_CHECK_CACHE;
|
55
55
|
|
56
|
-
if(gi = GeoIP_open(
|
56
|
+
if(gi = GeoIP_open(StringValuePtr(filename), flag)) {
|
57
57
|
database = Data_Wrap_Struct(cDB, 0, GeoIP_delete, gi);
|
58
58
|
rb_obj_call_init(database, 0, 0);
|
59
59
|
} else {
|
@@ -113,7 +113,7 @@ VALUE rb_geoip_look_up(VALUE self, VALUE addr) {
|
|
113
113
|
|
114
114
|
Check_Type(addr, T_STRING);
|
115
115
|
Data_Get_Struct(self, GeoIP, gi);
|
116
|
-
if(record = GeoIP_record_by_addr(gi,
|
116
|
+
if(record = GeoIP_record_by_addr(gi, StringValuePtr(addr))) {
|
117
117
|
hash = rb_record_to_hash(record);
|
118
118
|
GeoIPRecord_delete(record);
|
119
119
|
}
|
metadata
CHANGED
@@ -1,59 +1,51 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: acamargo-geoip_city
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.1'
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
|
-
authors:
|
7
|
-
-
|
7
|
+
authors:
|
8
|
+
- André Camargo
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
|
12
|
-
date: 2010-02-03 00:00:00 -02:00
|
13
|
-
default_executable:
|
12
|
+
date: 2011-09-07 00:00:00.000000000Z
|
14
13
|
dependencies: []
|
15
|
-
|
16
14
|
description: Generic GeoIP lookup tool. Based on the geoip_city RubyGem by Ryan Dahl
|
17
15
|
email: andre@boaideia.inf.br
|
18
16
|
executables: []
|
19
|
-
|
20
|
-
extensions:
|
17
|
+
extensions:
|
21
18
|
- extconf.rb
|
22
19
|
extra_rdoc_files: []
|
23
|
-
|
24
|
-
files:
|
20
|
+
files:
|
25
21
|
- extconf.rb
|
26
22
|
- geoip_city.c
|
27
23
|
- Rakefile
|
28
24
|
- README.md
|
29
25
|
- test.rb
|
30
|
-
has_rdoc: true
|
31
26
|
homepage: http://github.com/acamargo/geoip-city
|
32
27
|
licenses: []
|
33
|
-
|
34
28
|
post_install_message:
|
35
29
|
rdoc_options: []
|
36
|
-
|
37
|
-
require_paths:
|
30
|
+
require_paths:
|
38
31
|
- .
|
39
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
32
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
51
44
|
requirements: []
|
52
|
-
|
53
45
|
rubyforge_project:
|
54
|
-
rubygems_version: 1.
|
46
|
+
rubygems_version: 1.8.6
|
55
47
|
signing_key:
|
56
48
|
specification_version: 3
|
57
49
|
summary: A Ruby binding to the GeoIP C Library
|
58
|
-
test_files:
|
50
|
+
test_files:
|
59
51
|
- test.rb
|