geoip 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ == 0.8.1 2009-06-04
2
+
3
+ * Added GeoIP#close method to close the file descriptor
4
+
1
5
  == 0.8.0 2008-08-29
2
6
 
3
7
  * Added Mutex protection around file I/O for thread safety
@@ -473,6 +473,11 @@ class GeoIP
473
473
  end
474
474
  end
475
475
 
476
+ # Close the file handle for the GeoIP data file.
477
+ def close
478
+ @file.close
479
+ end
480
+
476
481
  # Search the GeoIP database for the specified host, returning country info
477
482
  #
478
483
  # +hostname+ is a String holding the host's DNS name or numeric IP address.
@@ -2,7 +2,7 @@ module Geoip #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 8
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -33,69 +33,37 @@
33
33
  <h1>geoip</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/geoip"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/geoip" class="numbers">0.8.0</a>
36
+ <a href="http://rubyforge.org/projects/geoip" class="numbers">0.8.1</a>
37
37
  </div>
38
- <h2>&#x2192; &#8216;Geographic info for an IP address&#8217;</h2>
39
-
40
-
41
- <h2>What</h2>
42
-
43
-
44
- <p>GeoIP searches a GeoIP database for a given host or IP address, and
38
+ <h2>&amp;#x2192; &#8216;Geographic info for an IP address&#8217;</h2>
39
+ <h2>What</h2>
40
+ <p>GeoIP searches a GeoIP database for a given host or IP address, and<br />
45
41
  returns information about the country where the IP address is allocated.</p>
46
-
47
-
48
- <h2>Installing</h2>
49
-
50
-
51
- <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">geoip</span></pre></p>
52
-
53
-
54
- <h2>Prerequisites</h2>
55
-
56
-
57
- <p>You need at least the free GeoIP.dat, for which the last known download
58
- location is <a href="http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz">http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz</a>
59
- This <span class="caps">API</span> requires the file to be decompressed for searching. Other versions
60
- of this database are available for purchase which contain more detailed
61
- information, but this information is not returned by this implementation.
42
+ <h2>Installing</h2>
43
+ <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">geoip</span></pre></p>
44
+ <h2>Prerequisites</h2>
45
+ <p>You need at least the free GeoIP.dat, for which the last known download<br />
46
+ location is <a href="http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz">http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz</a><br />
47
+ This <span class="caps">API</span> requires the file to be decompressed for searching. Other versions<br />
48
+ of this database are available for purchase which contain more detailed<br />
49
+ information, but this information is not returned by this implementation.<br />
62
50
  See www.maxmind.com for more information.</p>
63
-
64
-
65
- <h2>Example</h2>
66
-
67
-
68
- <pre><code>require 'geoip'
69
- GeoIP.new('GeoIP.dat').country("www.netscape.sk")
70
- =&gt; ["www.netscape.sk", "217.67.16.35", 196, "SK", "SVK", "Slovakia", "EU"]</code></pre>
71
-
72
-
73
- <h2>How to submit patches</h2>
74
-
75
-
76
- <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8z-email">8z: Submit patch</a>, email me on the link below.</p>
77
-
78
-
79
- <p>The trunk repository is <code>svn://rubyforge.org/var/svn/geoip/trunk</code> for anonymous access.</p>
80
-
81
-
82
- <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
83
-
84
-
85
- <h2>License</h2>
86
-
87
-
88
- <p>This code is free to use under the terms of the <span class="caps">GPL</span> license.
89
- I don&#8217;t normally use the <span class="caps">GPL</span> license, but this one is derived
51
+ <h2>Example</h2>
52
+ require &#8216;geoip&#8217;
53
+ GeoIP.new(&#8216;GeoIP.dat&#8217;).country(&#8220;www.netscape.sk&#8221;)
54
+ =&gt; [&#8220;www.netscape.sk&#8221;, &#8220;217.67.16.35&#8221;, 196, &#8220;SK&#8221;, &#8220;<span class="caps">SVK</span>&#8221;, &#8220;Slovakia&#8221;, &#8220;EU&#8221;]
55
+ <h2>How to submit patches</h2>
56
+ <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8z-email">8z: Submit patch</a>, email me on the link below.</p>
57
+ <p>The trunk repository is <code>svn://rubyforge.org/var/svn/geoip/trunk</code> for anonymous access.</p>
58
+ <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
59
+ <h2>License</h2>
60
+ <p>This code is free to use under the terms of the <span class="caps">GPL</span> license.<br />
61
+ I don&#8217;t normally use the <span class="caps">GPL</span> license, but this one is derived<br />
90
62
  from Maxmind&#8217;s code, so I use the license they use.</p>
91
-
92
-
93
- <h2>Contact</h2>
94
-
95
-
96
- <p>Comments are welcome. Send an email to <a href="mailto:cjheath@rubyforge.org">Clifford Heath</a> .</p>
63
+ <h2>Contact</h2>
64
+ <p>Comments are welcome. Send an email to <a href="mailto:cjheath@rubyforge.org">Clifford Heath</a> .</p>
97
65
  <p class="coda">
98
- <a href="cjheath@rubyforge.org">Clifford Heath</a>, 24th October 2007<br>
66
+ <a href="cjheath@rubyforge.org">Clifford Heath</a>, 25th May 2009<br>
99
67
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
100
68
  </p>
101
69
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clifford Heath
@@ -9,10 +9,19 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-29 00:00:00 +10:00
12
+ date: 2009-06-04 00:00:00 +10:00
13
13
  default_executable:
14
- dependencies: []
15
-
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hoe
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.8.0
24
+ version:
16
25
  description: description of gem
17
26
  email: cjheath@rubyforge.org
18
27
  executables: []
@@ -52,6 +61,8 @@ files:
52
61
  - website/template.rhtml
53
62
  has_rdoc: true
54
63
  homepage: http://geoip.rubyforge.org
64
+ licenses: []
65
+
55
66
  post_install_message:
56
67
  rdoc_options:
57
68
  - --main
@@ -73,9 +84,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
84
  requirements: []
74
85
 
75
86
  rubyforge_project: geoip
76
- rubygems_version: 1.2.0
87
+ rubygems_version: 1.3.3
77
88
  signing_key:
78
- specification_version: 2
89
+ specification_version: 3
79
90
  summary: description of gem
80
91
  test_files:
81
92
  - test/test_geoip.rb