geoip_server 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Rakefile +3 -0
  2. data/VERSION +1 -1
  3. data/lib/geoip_server.rb +2 -2
  4. metadata +50 -6
data/Rakefile CHANGED
@@ -7,6 +7,9 @@ begin
7
7
  gem.email = "gitcommit@6brand.com"
8
8
  gem.homepage = "http://github.com/JackDanger/geoip_server"
9
9
  gem.authors = ["Jack Danger Canty"]
10
+ gem.add_dependency "sinatra", ">= 1.0.0"
11
+ gem.add_dependency "active_support", ">= 0"
12
+ gem.add_dependency "geoip", ">= 0"
10
13
  gem.add_development_dependency "shoulda", ">= 0"
11
14
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
12
15
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
data/lib/geoip_server.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  gem 'sinatra', :version => '1.0'
3
3
  require 'sinatra'
4
4
  require 'geoip'
5
- require 'json'
5
+ require 'active_support'
6
6
 
7
7
  data_file = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', 'GeoLiteCity.dat'))
8
8
 
@@ -34,7 +34,7 @@ get '/:ip' do
34
34
 
35
35
  return "{}" unless data
36
36
 
37
- encode(data).to_json
37
+ ActiveSupport::JSON.encode(encode(data))
38
38
 
39
39
  end
40
40
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoip_server
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 0
10
- version: 1.0.0
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jack Danger Canty
@@ -15,13 +15,57 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-27 00:00:00 -08:00
18
+ date: 2010-11-29 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: shoulda
22
+ name: sinatra
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 23
30
+ segments:
31
+ - 1
32
+ - 0
33
+ - 0
34
+ version: 1.0.0
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: active_support
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ type: :runtime
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: geoip
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
62
+ version: "0"
63
+ type: :runtime
64
+ version_requirements: *id003
65
+ - !ruby/object:Gem::Dependency
66
+ name: shoulda
67
+ prerelease: false
68
+ requirement: &id004 !ruby/object:Gem::Requirement
25
69
  none: false
26
70
  requirements:
27
71
  - - ">="
@@ -31,7 +75,7 @@ dependencies:
31
75
  - 0
32
76
  version: "0"
33
77
  type: :development
34
- version_requirements: *id001
78
+ version_requirements: *id004
35
79
  description: Query the MaxMind GeoIP data records via a web service
36
80
  email: gitcommit@6brand.com
37
81
  executables: []