autometal-geoip 0.3.5 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -75,6 +75,8 @@ You can override the attribute used to geolocate by overriding +geo_attr+
75
75
  sudo install_geoip (unless already installed)
76
76
 
77
77
  == CHANGELOG
78
+ * 0.3.7
79
+ Installation now checks for sudo command, and runs accordingly. Bear in mind that if you are not root and sudo does not exist, the installation will fail as it will not have enough permissions to install binaries.
78
80
  * 0.3.5
79
81
  Documentation fixes
80
82
  * 0.3.4
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{autometal-geoip}
5
- s.version = "0.3.4"
5
+ s.version = "0.3.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Achillefs Charmpilas"]
9
- s.date = %q{2010-12-08}
9
+ s.date = %q{2011-01-12}
10
10
  s.default_executable = %q{install_geoip}
11
11
  s.description = %q{A wrapper to MaxMind's GeoIP services, that can work with both free and paid versions.
12
12
  Also provides geo-location methods to Active Record and Sequel Models.
data/lib/geoip.rb CHANGED
@@ -3,7 +3,7 @@ $:.unshift(File.dirname(__FILE__)) unless
3
3
 
4
4
  module Autometal
5
5
  class Geoip
6
- VERSION = '0.3.5'
6
+ VERSION = '0.3.7'
7
7
  DATA_FILE_PATH = "/usr/local/share/GeoIP/"
8
8
  BIN = "geoiplookup"
9
9
  def initialize ip_or_domain
@@ -2,6 +2,12 @@
2
2
  mkdir ./tmp && cd ./tmp
3
3
  wget $1
4
4
  tar -xzvf *.gz && cd GeoIP*
5
- ./configure && make && make check && sudo make install
5
+ ./configure && make && make check
6
+ if which sudo
7
+ then
8
+ sudo make install
9
+ else
10
+ make install
11
+ fi
6
12
  cd ../..
7
13
  rm -rf ./tmp
@@ -3,7 +3,13 @@ mkdir ./tmp
3
3
  cd ./tmp
4
4
  wget $1
5
5
  gunzip *.gz
6
- sudo mkdir -p /usr/local/share/GeoIP/
7
- sudo mv *.dat /usr/local/share/GeoIP/
6
+ if which sudo
7
+ then
8
+ sudo mkdir -p /usr/local/share/GeoIP/
9
+ sudo mv *.dat /usr/local/share/GeoIP/
10
+ else
11
+ mkdir -p /usr/local/share/GeoIP/
12
+ mv *.dat /usr/local/share/GeoIP/
13
+ fi
8
14
  cd ..
9
15
  rm -rf ./tmp
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autometal-geoip
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 5
10
- version: 0.3.5
9
+ - 7
10
+ version: 0.3.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Achillefs Charmpilas
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-11 00:00:00 +01:00
18
+ date: 2011-01-12 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency