pat 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/README.rdoc +1 -2
  2. data/VERSION +1 -1
  3. data/lib/pat.rb +7 -1
  4. data/pat.gemspec +19 -26
  5. metadata +55 -63
  6. data/.gitignore +0 -21
@@ -54,8 +54,7 @@ Use the results (returned as a hash)
54
54
  * Timely Information Project by Dave Harte: http://daveharte.com
55
55
  * Adrian Short for the idea http://twitter.com/adrianshort
56
56
 
57
- * Ordance Survey for seeing the light and making UK Postcode data available
58
- http://www.ordnancesurvey.co.uk/oswebsite/opendata/
57
+ * Ordance Survey for seeing the light and making UK Postcode data available http://www.ordnancesurvey.co.uk/oswebsite/opendata/
59
58
 
60
59
  == Note on Patches/Pull Requests
61
60
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.2.0
data/lib/pat.rb CHANGED
@@ -1,8 +1,14 @@
1
1
  require 'rubygems'
2
2
  require 'weary'
3
3
 
4
+ class PatClient < Weary::Client
5
+ domain "http://www.uk-postcodes.com"
6
+
7
+ get :get, "/postcode/{code}.json"
8
+ end
9
+
4
10
  class Pat
5
11
  def self.get(code)
6
- (Weary.get "http://www.uk-postcodes.com/postcode/#{code.gsub(' ', '')}.json").perform
12
+ PatClient.new.get(:code => code.gsub(' ', '')).perform
7
13
  end
8
14
  end
@@ -1,48 +1,41 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{pat}
8
- s.version = "0.1.2"
7
+ s.name = "pat"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["steflewandowski"]
12
- s.date = %q{2010-04-13}
13
- s.description = %q{Allows you to find geo-position for a UK postcode, as well as which local authority and ward the postcode resides.}
14
- s.email = %q{stef@stef.io}
12
+ s.date = "2012-08-31"
13
+ s.description = "Allows you to find geo-position for a UK postcode, as well as which local authority and ward the postcode resides."
14
+ s.email = "stef@stef.io"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "lib/pat.rb",
27
- "pat.gemspec",
28
- "spec/pat_spec.rb",
29
- "spec/spec_helper.rb"
30
- ]
31
- s.homepage = %q{http://github.com/steflewandowski/pat}
32
- s.rdoc_options = ["--charset=UTF-8"]
33
- s.require_paths = ["lib"]
34
- s.rubygems_version = %q{1.3.6}
35
- s.summary = %q{Ultra-simple UK postcode to geodata lookup}
36
- s.test_files = [
21
+ "LICENSE",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "lib/pat.rb",
26
+ "pat.gemspec",
37
27
  "spec/pat_spec.rb",
38
- "spec/spec_helper.rb"
28
+ "spec/spec_helper.rb"
39
29
  ]
30
+ s.homepage = "http://github.com/steflewandowski/pat"
31
+ s.require_paths = ["lib"]
32
+ s.rubygems_version = "1.8.22"
33
+ s.summary = "Ultra-simple UK postcode to geodata lookup"
40
34
 
41
35
  if s.respond_to? :specification_version then
42
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
43
36
  s.specification_version = 3
44
37
 
45
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
38
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
39
  s.add_development_dependency(%q<rspec>, [">= 0"])
47
40
  s.add_runtime_dependency(%q<weary>, [">= 0"])
48
41
  else
metadata CHANGED
@@ -1,58 +1,58 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: pat
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 2
9
- version: 0.1.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - steflewandowski
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-04-13 00:00:00 +01:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-08-31 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rspec
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- version: "0"
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
30
22
  type: :development
31
- version_requirements: *id001
32
- - !ruby/object:Gem::Dependency
33
- name: weary
34
23
  prerelease: false
35
- requirement: &id002 !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- segments:
40
- - 0
41
- version: "0"
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: weary
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
42
38
  type: :runtime
43
- version_requirements: *id002
44
- description: Allows you to find geo-position for a UK postcode, as well as which local authority and ward the postcode resides.
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: Allows you to find geo-position for a UK postcode, as well as which local
47
+ authority and ward the postcode resides.
45
48
  email: stef@stef.io
46
49
  executables: []
47
-
48
50
  extensions: []
49
-
50
- extra_rdoc_files:
51
+ extra_rdoc_files:
51
52
  - LICENSE
52
53
  - README.rdoc
53
- files:
54
+ files:
54
55
  - .document
55
- - .gitignore
56
56
  - LICENSE
57
57
  - README.rdoc
58
58
  - Rakefile
@@ -61,36 +61,28 @@ files:
61
61
  - pat.gemspec
62
62
  - spec/pat_spec.rb
63
63
  - spec/spec_helper.rb
64
- has_rdoc: true
65
64
  homepage: http://github.com/steflewandowski/pat
66
65
  licenses: []
67
-
68
66
  post_install_message:
69
- rdoc_options:
70
- - --charset=UTF-8
71
- require_paths:
67
+ rdoc_options: []
68
+ require_paths:
72
69
  - lib
73
- required_ruby_version: !ruby/object:Gem::Requirement
74
- requirements:
75
- - - ">="
76
- - !ruby/object:Gem::Version
77
- segments:
78
- - 0
79
- version: "0"
80
- required_rubygems_version: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- segments:
85
- - 0
86
- version: "0"
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
87
82
  requirements: []
88
-
89
83
  rubyforge_project:
90
- rubygems_version: 1.3.6
84
+ rubygems_version: 1.8.22
91
85
  signing_key:
92
86
  specification_version: 3
93
87
  summary: Ultra-simple UK postcode to geodata lookup
94
- test_files:
95
- - spec/pat_spec.rb
96
- - spec/spec_helper.rb
88
+ test_files: []
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC