pat 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.rdoc +38 -32
  2. data/VERSION +1 -1
  3. data/pat.gemspec +1 -1
  4. metadata +2 -2
data/README.rdoc CHANGED
@@ -1,55 +1,61 @@
1
- = postie
1
+ = Pat
2
2
 
3
- Get information on UK postcodes like this:
3
+ An extremely simple, lightweight way of requesting the Geolocation (lat, long, easting, northing) for any UK Postcode, as well as district and ward details.
4
4
 
5
- # Install the gem
5
+ = Get information on a UK postcode
6
6
 
7
- sudo gem install pat
7
+ Requirements
8
8
 
9
- # Include the gem in your project
9
+ * Ruby
10
+ * Rubygems
10
11
 
11
- require 'pat'
12
+ Install the gem
12
13
 
13
- # Request a postcode
14
+ sudo gem sources -a http://gemcutter.org
15
+ sudo gem install pat
14
16
 
15
- @postcode = Pat.get("N1 1AA")
17
+ Include the gem in your project
16
18
 
17
- # Use the results
19
+ require 'pat'
18
20
 
19
- puts @postcode["geo"]["lat"]
21
+ Request a postcode
20
22
 
21
- puts @postcode["geo"]["lng"]
23
+ @postcode = Pat.get("N1 1AA")
22
24
 
23
- puts @postcode["geo"]["easting"]
25
+ Use the results (returned as a hash)
24
26
 
25
- puts @postcode["geo"]["northing"]
27
+ puts @postcode["geo"]["lat"]
28
+ puts @postcode["geo"]["lng"]
29
+ puts @postcode["geo"]["easting"]
30
+ puts @postcode["geo"]["northing"]
31
+ puts @postcode["geo"]["geohash"]
32
+ puts @postcode["administrative"]
33
+ puts @postcode["administrative"]["district"]
34
+ puts @postcode["administrative"]["district"]["title"]
35
+ puts @postcode["administrative"]["district"]["uri"]
36
+ puts @postcode["administrative"]["ward"]
37
+ puts @postcode["administrative"]["ward"]["title"]
38
+ puts @postcode["administrative"]["ward"]["uri"]
39
+ puts @postcode["postcode"]
26
40
 
27
- puts @postcode["geo"]["geohash"]
41
+ == Try it out
28
42
 
29
- puts @postcode["administrative"]
43
+ irb -r rubygems -r pat
30
44
 
31
- puts @postcode["administrative"]["district"]
45
+ p = Pat.get("<your postcode here>")
32
46
 
33
- puts @postcode["administrative"]["district"]["title"]
47
+ p["geo"]
34
48
 
35
- puts @postcode["administrative"]["district"]["uri"]
49
+ p["administrative"]
36
50
 
37
- puts @postcode["administrative"]["ward"]
51
+ == Thanks to
38
52
 
39
- puts @postcode["administrative"]["ward"]["title"]
53
+ * UK-Postcodes by Pezholio http://github.com/pezholio/UK-Postcodes
54
+ * Timely Information Project by Dave Harte: http://daveharte.com
55
+ * Adrian Short for the idea http://twitter.com/adrianshort
40
56
 
41
- puts @postcode["administrative"]["ward"]["uri"]
42
-
43
- puts @postcode["postcode"]
44
-
45
-
46
- # Try it out
47
-
48
- irb -r rubygems -r pat
49
-
50
- p = Pat.get(<your postcode>)
51
- p["geo"]
52
- p[""]
57
+ * Ordance Survey for seeing the light and making UK Postcode data available
58
+ http://www.ordnancesurvey.co.uk/oswebsite/opendata/
53
59
 
54
60
  == Note on Patches/Pull Requests
55
61
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/pat.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pat}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["steflewandowski"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - steflewandowski