simple_geolocation 0.0.6 → 0.0.7
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.
- data/Gemfile +2 -0
- data/README +0 -2
- data/lib/simple_geolocation/geocoder.rb +1 -1
- data/lib/simple_geolocation/location.rb +2 -0
- data/lib/simple_geolocation/version.rb +1 -1
- data/lib/simple_geolocation.rb +1 -1
- metadata +74 -72
data/Gemfile
CHANGED
data/README
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
This gem was created with geolocation in mind, meaning that the main goal is to get a latitude and longitude, but it will return additional data if available. With this gem you can pass an IP number or an ZIP number or an ordinary address and it will try to get as many information as possible about the given argument.
|
2
2
|
|
3
|
-
* IMPORTANT: At this moment only brazilian zipcode is supported. Feel free to add suport for zip codes from other countries.
|
4
|
-
|
5
3
|
@usage
|
6
4
|
|
7
5
|
gem install simple_geolocation
|
@@ -8,7 +8,7 @@ module SimpleGeolocation
|
|
8
8
|
Location::ATTRIBUTES + [:completeness]
|
9
9
|
end
|
10
10
|
|
11
|
-
delegate :lat, :lng, :city, :state, :country, :provider, :zip, :street, :district, :number, :completeness, :to => :location
|
11
|
+
delegate :lat, :lng, :city, :state, :country, :provider, :zip, :zipcode, :street, :district, :number, :completeness, :to => :location
|
12
12
|
|
13
13
|
def initialize(raw_location)
|
14
14
|
@raw_location = raw_location
|
@@ -2,6 +2,8 @@ module SimpleGeolocation
|
|
2
2
|
class Location
|
3
3
|
ATTRIBUTES = [:lat, :lng, :city, :state, :country, :provider, :zip, :street, :district, :number]
|
4
4
|
attr_accessor *ATTRIBUTES
|
5
|
+
alias :zipcode :zip
|
6
|
+
alias :zipcode= :zip=
|
5
7
|
|
6
8
|
def initialize(attributes = {})
|
7
9
|
unknown_attributes = attributes.keys.reject { |k| ATTRIBUTES.include?(k) }
|
data/lib/simple_geolocation.rb
CHANGED
@@ -2,6 +2,6 @@ require 'active_support/core_ext'
|
|
2
2
|
require File.join(File.dirname(__FILE__), 'simple_geolocation/utils/remove_accents')
|
3
3
|
module SimpleGeolocation
|
4
4
|
autoload :Geocoder , 'simple_geolocation/geocoder'
|
5
|
-
autoload :Location
|
5
|
+
autoload :Location , 'simple_geolocation/location'
|
6
6
|
autoload :Geoworkers , 'simple_geolocation/geoworkers/geoworkers'
|
7
7
|
end
|
metadata
CHANGED
@@ -1,83 +1,82 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_geolocation
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.7
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.6
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Esdras Mayrink
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-03-02 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: rspec
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70243604251040 !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
25
22
|
type: :development
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: geokit
|
29
23
|
prerelease: false
|
30
|
-
|
24
|
+
version_requirements: *70243604251040
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: geokit
|
27
|
+
requirement: &70243604250540 !ruby/object:Gem::Requirement
|
31
28
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
36
33
|
type: :runtime
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: geoip
|
40
34
|
prerelease: false
|
41
|
-
|
35
|
+
version_requirements: *70243604250540
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: geoip
|
38
|
+
requirement: &70243604249780 !ruby/object:Gem::Requirement
|
42
39
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
47
44
|
type: :runtime
|
48
|
-
version_requirements: *id003
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: activesupport
|
51
45
|
prerelease: false
|
52
|
-
|
46
|
+
version_requirements: *70243604249780
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: activesupport
|
49
|
+
requirement: &70243604248920 !ruby/object:Gem::Requirement
|
53
50
|
none: false
|
54
|
-
requirements:
|
55
|
-
- -
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version:
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
58
55
|
type: :runtime
|
59
|
-
version_requirements: *id004
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
name: brcep
|
62
56
|
prerelease: false
|
63
|
-
|
57
|
+
version_requirements: *70243604248920
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: brcep
|
60
|
+
requirement: &70243604248420 !ruby/object:Gem::Requirement
|
64
61
|
none: false
|
65
|
-
requirements:
|
66
|
-
- -
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version:
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
69
66
|
type: :runtime
|
70
|
-
|
71
|
-
|
72
|
-
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70243604248420
|
69
|
+
description: ! "\n This gem is used with geolocation in mind, meaning that the
|
70
|
+
main goal is to get a latitude and longitude, but it will return additional data
|
71
|
+
if\n available. With this gem you can pass an IP number or an ZIP number or an
|
72
|
+
ordinary address and it will try to get as many information as possible\n about
|
73
|
+
the given argument.\n "
|
74
|
+
email:
|
73
75
|
- falecom@oesdras.com.br
|
74
76
|
executables: []
|
75
|
-
|
76
77
|
extensions: []
|
77
|
-
|
78
78
|
extra_rdoc_files: []
|
79
|
-
|
80
|
-
files:
|
79
|
+
files:
|
81
80
|
- .gitignore
|
82
81
|
- Gemfile
|
83
82
|
- README
|
@@ -95,33 +94,36 @@ files:
|
|
95
94
|
- lib/simple_geolocation/version.rb
|
96
95
|
- simple_geolocation.gemspec
|
97
96
|
- spec/simple_geolocation_spec.rb
|
98
|
-
has_rdoc: true
|
99
97
|
homepage: https://github.com/esdras/SimpleGeolocation
|
100
98
|
licenses: []
|
101
|
-
|
102
99
|
post_install_message:
|
103
100
|
rdoc_options: []
|
104
|
-
|
105
|
-
require_paths:
|
101
|
+
require_paths:
|
106
102
|
- lib
|
107
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
104
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version:
|
113
|
-
|
105
|
+
requirements:
|
106
|
+
- - ! '>='
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
segments:
|
110
|
+
- 0
|
111
|
+
hash: -4192126495364420408
|
112
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
113
|
none: false
|
115
|
-
requirements:
|
116
|
-
- -
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
version:
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
segments:
|
119
|
+
- 0
|
120
|
+
hash: -4192126495364420408
|
119
121
|
requirements: []
|
120
|
-
|
121
122
|
rubyforge_project: simple_geolocation
|
122
|
-
rubygems_version: 1.
|
123
|
+
rubygems_version: 1.8.11
|
123
124
|
signing_key:
|
124
125
|
specification_version: 3
|
125
|
-
summary: A gem that fetch locations based on IP, ZIP and ordinary address through
|
126
|
-
|
126
|
+
summary: A gem that fetch locations based on IP, ZIP and ordinary address through
|
127
|
+
several existing geolocation gems.
|
128
|
+
test_files:
|
127
129
|
- spec/simple_geolocation_spec.rb
|