pat 0.1.0 → 0.1.1

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 +30 -3
  2. data/VERSION +1 -1
  3. data/pat.gemspec +1 -1
  4. metadata +2 -2
data/README.rdoc CHANGED
@@ -2,28 +2,55 @@
2
2
 
3
3
  Get information on UK postcodes like this:
4
4
 
5
- # Include the gem
6
- require 'postie'
5
+ # Install the gem
6
+
7
+ sudo gem install pat
8
+
9
+ # Include the gem in your project
10
+
11
+ require 'pat'
7
12
 
8
13
  # Request a postcode
9
- @postcode = Postie.get("N1 1AA")
14
+
15
+ @postcode = Pat.get("N1 1AA")
10
16
 
11
17
  # Use the results
18
+
12
19
  puts @postcode["geo"]["lat"]
20
+
13
21
  puts @postcode["geo"]["lng"]
22
+
14
23
  puts @postcode["geo"]["easting"]
24
+
15
25
  puts @postcode["geo"]["northing"]
26
+
16
27
  puts @postcode["geo"]["geohash"]
28
+
17
29
  puts @postcode["administrative"]
30
+
18
31
  puts @postcode["administrative"]["district"]
32
+
19
33
  puts @postcode["administrative"]["district"]["title"]
34
+
20
35
  puts @postcode["administrative"]["district"]["uri"]
36
+
21
37
  puts @postcode["administrative"]["ward"]
38
+
22
39
  puts @postcode["administrative"]["ward"]["title"]
40
+
23
41
  puts @postcode["administrative"]["ward"]["uri"]
42
+
24
43
  puts @postcode["postcode"]
25
44
 
26
45
 
46
+ # Try it out
47
+
48
+ irb -r rubygems -r pat
49
+
50
+ p = Pat.get(<your postcode>)
51
+ p["geo"]
52
+ p[""]
53
+
27
54
  == Note on Patches/Pull Requests
28
55
 
29
56
  * Fork the project.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
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.0"
8
+ s.version = "0.1.1"
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
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - steflewandowski