dcentralized-api 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +55 -0
- data/Rakefile +1 -0
- data/dcentralized.gemspec +26 -0
- data/lib/dcentralized.rb +60 -0
- data/lib/dcentralized/invalid_postcode_exception.rb +5 -0
- data/lib/dcentralized/version.rb +3 -0
- data/spec/lib/dcentralized_spec.rb +59 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/vcr/auto_complete_high.yml +87 -0
- data/spec/vcr/auto_complete_low.yml +85 -0
- metadata +145 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0f55032b39a0672e4477ee78397ca1aa0b7f06bd
|
4
|
+
data.tar.gz: 4f70559bef2ae74f8b7712e5a1c9751eaf2a5685
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f28fa5eb68206b4bd64bd88eb6b548f73cef9a4b81797d53dda17c7f84d34dcb268ca89839c3420d1000873b303f3a043ebd65abad78bda7da1dec8f4fc01707
|
7
|
+
data.tar.gz: 650e671349214731cced22dbe7dcfab15a5b96d0febc629c0df0cd21a83cad7bae87b6982c46f9af778e2b46b0ec5a3ea1c1d1f3ec0542614b1909ba39534e28
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Nick den Engelsman
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
[![Build Status](https://travis-ci.org/nicka/dcentralized.png?branch=develop)](https://travis-ci.org/nicka/dcentralized) [![Code Climate](https://codeclimate.com/github/nicka/dcentralized.png)](https://codeclimate.com/github/nicka/dcentralized) [![Gem Version](https://badge.fury.io/rb/dcentralized.png)](http://badge.fury.io/rb/dcentralized)
|
2
|
+
|
3
|
+
# Dcentralized
|
4
|
+
|
5
|
+
API wrapper for Pro6PP zipcode database(d-centralize.nl).
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
gem 'dcentralized'
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install dcentralized
|
20
|
+
|
21
|
+
## Setup
|
22
|
+
|
23
|
+
Add file `config/initializers/dcentralized.rb`.
|
24
|
+
|
25
|
+
require 'dcentralized'
|
26
|
+
Dcentralized.configure do |config|
|
27
|
+
config.api_key = "123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ"
|
28
|
+
end
|
29
|
+
|
30
|
+
## Example usage
|
31
|
+
|
32
|
+
High detailed zipcode result:
|
33
|
+
|
34
|
+
response = Dcentralized.auto_complete("2564AZ")
|
35
|
+
# => #<OpenStruct nl_sixpp="2564AZ", street="Laan van Meerdervoort", city="'s-Gravenhage", municipality="'s-Gravenhage", province="Zuid-Holland", streetnumbers="1096-1126", lat="52.06751", lng="4.24733", areacode="070">
|
36
|
+
|
37
|
+
Low detailed zipcode result:
|
38
|
+
|
39
|
+
response = Dcentralized.auto_complete("2564")
|
40
|
+
# => #<OpenStruct nl_fourpp="2564", city="'s-Gravenhage", municipality="'s-Gravenhage", province="Zuid-Holland", areacode="070", lat="52.068", lng="4.25724">
|
41
|
+
|
42
|
+
You can then use:
|
43
|
+
|
44
|
+
response.street
|
45
|
+
# => "Laan van Meerdervoort"
|
46
|
+
response.province
|
47
|
+
# => "Zuid-Holland"
|
48
|
+
|
49
|
+
## Contributing
|
50
|
+
|
51
|
+
1. Fork it
|
52
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
53
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
54
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
55
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'dcentralized/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "dcentralized-api"
|
8
|
+
gem.version = Dcentralized::VERSION
|
9
|
+
gem.authors = ["Nick den Engelsman"]
|
10
|
+
gem.email = ["nickdenengelsman@codedrops.nl"]
|
11
|
+
gem.description = %q{API wrapper for d-centralize.nl}
|
12
|
+
gem.summary = %q{Retreive data from the Pro6PP zipcode database}
|
13
|
+
gem.homepage = "https://github.com/corklaassebos/dcentralized"
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
|
20
|
+
gem.add_runtime_dependency "rest-client", "~> 1.6"
|
21
|
+
gem.add_development_dependency "rspec", "~> 2.13"
|
22
|
+
gem.add_development_dependency "capybara", "~> 2.1"
|
23
|
+
gem.add_development_dependency "vcr", "~> 2.4"
|
24
|
+
gem.add_development_dependency "webmock", "~> 1.8"
|
25
|
+
gem.add_development_dependency "simplecov", "~> 0.7"
|
26
|
+
end
|
data/lib/dcentralized.rb
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
require "rest-client"
|
2
|
+
require "ostruct"
|
3
|
+
require "dcentralized/version"
|
4
|
+
require 'dcentralized/invalid_postcode_exception'
|
5
|
+
|
6
|
+
module Dcentralized
|
7
|
+
class << self
|
8
|
+
attr_accessor :api_url, :api_key
|
9
|
+
def configure(&blk); class_eval(&blk); end
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.auto_complete(zipcode, house_number = nil)
|
13
|
+
# Format the zipcode
|
14
|
+
zipcode = format_zipcode(zipcode)
|
15
|
+
# Setup request
|
16
|
+
params = {auth_key: @api_key}
|
17
|
+
zipcode.length == 6 ? params.merge!(nl_sixpp: zipcode) : params.merge!(nl_fourpp: zipcode)
|
18
|
+
params.merge!(format: 'json')
|
19
|
+
params.merge!(streetnumber: house_number) if house_number
|
20
|
+
|
21
|
+
# Perform request
|
22
|
+
response = JSON.parse(RestClient.get "#{@api_url}/autocomplete", {params: params})
|
23
|
+
|
24
|
+
if response["status"] == "ok"
|
25
|
+
return OpenStruct.new response["results"].first
|
26
|
+
elsif response["status"] == "error"
|
27
|
+
raise InvalidPostcodeException, response["error"]["message"]
|
28
|
+
else
|
29
|
+
raise Exception.new("Unknown exception in Pro6PP auto_complete response")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.format_zipcode(zipcode = nil)
|
34
|
+
if zipcode.nil? || zipcode == ""
|
35
|
+
raise InvalidPostcodeException.new("No zipcode provided")
|
36
|
+
elsif (zipcode =~ /^[0-9]{4}$|[0-9]{4}[\ ]{1}[a-zA-Z]{2}$|[0-9]{4}[a-zA-Z]{2}$/).nil?
|
37
|
+
raise InvalidPostcodeException.new("Wrong zipcode format (1234AB format expected)")
|
38
|
+
else
|
39
|
+
zipcode.gsub(" ", "").upcase
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.stringify(obj)
|
44
|
+
if obj.is_a? Array
|
45
|
+
obj.join
|
46
|
+
elsif obj.is_a? Hash
|
47
|
+
obj.merge( obj ) {|k, val| stringify val }
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.version_string
|
52
|
+
"Dcentralized version #{Dcentralized::VERSION}"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Set default configuration
|
57
|
+
Dcentralized.configure do
|
58
|
+
@api_url = "http://api.pro6pp.nl/v1"
|
59
|
+
@api_key = "123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ"
|
60
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Dcentralized do
|
4
|
+
it 'should remove spaces from zipcode' do
|
5
|
+
Dcentralized.format_zipcode("2564 AZ").should eq "2564AZ"
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'should upcase the zipcode' do
|
9
|
+
Dcentralized.format_zipcode("2564az").should eq "2564AZ"
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'should raise an exception' do
|
13
|
+
expect { Dcentralized.format_zipcode(nil) }.to raise_error
|
14
|
+
expect { Dcentralized.format_zipcode("") }.to raise_error
|
15
|
+
expect { Dcentralized.format_zipcode("111") }.to raise_error
|
16
|
+
expect { Dcentralized.format_zipcode("1111A") }.to raise_error
|
17
|
+
expect { Dcentralized.format_zipcode("11111A") }.to raise_error
|
18
|
+
expect { Dcentralized.format_zipcode("AAAA") }.to raise_error
|
19
|
+
expect { Dcentralized.format_zipcode("11AA") }.to raise_error
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'should return high detailed result' do
|
23
|
+
VCR.use_cassette('auto_complete_high') do
|
24
|
+
xml_response_mock = {
|
25
|
+
:nl_sixpp => "2564AZ",
|
26
|
+
:street => "Laan van Meerdervoort",
|
27
|
+
:city => "'s-Gravenhage",
|
28
|
+
:municipality => "'s-Gravenhage",
|
29
|
+
:province => "Zuid-Holland",
|
30
|
+
:streetnumbers => "1096-1126",
|
31
|
+
:lat => "52.06751",
|
32
|
+
:lng => "4.24733",
|
33
|
+
:areacode => "070"
|
34
|
+
}
|
35
|
+
Dcentralized.auto_complete("2564AZ").should eq OpenStruct.new(xml_response_mock)
|
36
|
+
Dcentralized.auto_complete("2564AZ").street.should eq "Laan van Meerdervoort"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'should return low detailed result' do
|
41
|
+
VCR.use_cassette('auto_complete_low') do
|
42
|
+
xml_response_mock = {
|
43
|
+
:nl_fourpp => "2564",
|
44
|
+
:city => "'s-Gravenhage",
|
45
|
+
:municipality => "'s-Gravenhage",
|
46
|
+
:province => "Zuid-Holland",
|
47
|
+
:areacode => "070",
|
48
|
+
:lat => "52.068",
|
49
|
+
:lng => "4.25724"
|
50
|
+
}
|
51
|
+
Dcentralized.auto_complete("2564").should eq OpenStruct.new(xml_response_mock)
|
52
|
+
Dcentralized.auto_complete("2564").street.should eq nil
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'should return correct version string' do
|
57
|
+
Dcentralized.version_string.should eq "Dcentralized version #{Dcentralized::VERSION}"
|
58
|
+
end
|
59
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'vcr'
|
3
|
+
require 'webmock'
|
4
|
+
require 'simplecov'
|
5
|
+
SimpleCov.start
|
6
|
+
require 'dcentralized'
|
7
|
+
|
8
|
+
RSpec.configure do |config|
|
9
|
+
config.color_enabled = true
|
10
|
+
config.formatter = 'documentation'
|
11
|
+
end
|
12
|
+
|
13
|
+
VCR.configure do |config|
|
14
|
+
config.cassette_library_dir = 'spec/vcr'
|
15
|
+
config.hook_into :webmock
|
16
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.pro6pp.nl/v1/autocomplete?auth_key=123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ&format=xml&nl_sixpp=2564AZ&pretty=True
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- no-cache
|
23
|
+
Content-Type:
|
24
|
+
- application/xml; charset=utf-8
|
25
|
+
Vary:
|
26
|
+
- Accept-Encoding
|
27
|
+
Date:
|
28
|
+
- Fri, 13 Sep 2013 15:02:48 GMT
|
29
|
+
Server:
|
30
|
+
- Google Frontend
|
31
|
+
Alternate-Protocol:
|
32
|
+
- 80:quic,80:quic
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<response>\n <status>ok</status>\n
|
38
|
+
\ <results>\n <result>\n <nl_sixpp>2564AZ</nl_sixpp>\n <street>Laan
|
39
|
+
van Meerdervoort</street>\n <city>'s-Gravenhage</city>\n <municipality>'s-Gravenhage</municipality>\n
|
40
|
+
\ <province>Zuid-Holland</province>\n <streetnumbers>1096-1126</streetnumbers>\n
|
41
|
+
\ <lat>52.06751</lat>\n <lng>4.24733</lng>\n <areacode>070</areacode>\n
|
42
|
+
\ </result>\n </results>\n</response>\n"
|
43
|
+
http_version:
|
44
|
+
recorded_at: Fri, 13 Sep 2013 15:02:48 GMT
|
45
|
+
- request:
|
46
|
+
method: get
|
47
|
+
uri: http://api.pro6pp.nl/v1/autocomplete?auth_key=123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ&format=xml&nl_sixpp=2564AZ&pretty=True
|
48
|
+
body:
|
49
|
+
encoding: US-ASCII
|
50
|
+
string: ''
|
51
|
+
headers:
|
52
|
+
Accept:
|
53
|
+
- ! '*/*; q=0.5, application/xml'
|
54
|
+
Accept-Encoding:
|
55
|
+
- gzip, deflate
|
56
|
+
User-Agent:
|
57
|
+
- Ruby
|
58
|
+
response:
|
59
|
+
status:
|
60
|
+
code: 200
|
61
|
+
message: OK
|
62
|
+
headers:
|
63
|
+
Cache-Control:
|
64
|
+
- no-cache
|
65
|
+
Content-Type:
|
66
|
+
- application/xml; charset=utf-8
|
67
|
+
Vary:
|
68
|
+
- Accept-Encoding
|
69
|
+
Date:
|
70
|
+
- Fri, 13 Sep 2013 15:02:48 GMT
|
71
|
+
Server:
|
72
|
+
- Google Frontend
|
73
|
+
Alternate-Protocol:
|
74
|
+
- 80:quic,80:quic
|
75
|
+
Transfer-Encoding:
|
76
|
+
- chunked
|
77
|
+
body:
|
78
|
+
encoding: US-ASCII
|
79
|
+
string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<response>\n <status>ok</status>\n
|
80
|
+
\ <results>\n <result>\n <nl_sixpp>2564AZ</nl_sixpp>\n <street>Laan
|
81
|
+
van Meerdervoort</street>\n <city>'s-Gravenhage</city>\n <municipality>'s-Gravenhage</municipality>\n
|
82
|
+
\ <province>Zuid-Holland</province>\n <streetnumbers>1096-1126</streetnumbers>\n
|
83
|
+
\ <lat>52.06751</lat>\n <lng>4.24733</lng>\n <areacode>070</areacode>\n
|
84
|
+
\ </result>\n </results>\n</response>\n"
|
85
|
+
http_version:
|
86
|
+
recorded_at: Fri, 13 Sep 2013 15:02:49 GMT
|
87
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,85 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.pro6pp.nl/v1/autocomplete?auth_key=123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ&format=xml&nl_fourpp=2564&pretty=True
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- ! '*/*; q=0.5, application/xml'
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
User-Agent:
|
15
|
+
- Ruby
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Cache-Control:
|
22
|
+
- no-cache
|
23
|
+
Content-Type:
|
24
|
+
- application/xml; charset=utf-8
|
25
|
+
Vary:
|
26
|
+
- Accept-Encoding
|
27
|
+
Date:
|
28
|
+
- Fri, 13 Sep 2013 15:02:49 GMT
|
29
|
+
Server:
|
30
|
+
- Google Frontend
|
31
|
+
Alternate-Protocol:
|
32
|
+
- 80:quic,80:quic
|
33
|
+
Transfer-Encoding:
|
34
|
+
- chunked
|
35
|
+
body:
|
36
|
+
encoding: US-ASCII
|
37
|
+
string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<response>\n <status>ok</status>\n
|
38
|
+
\ <results>\n <result>\n <nl_fourpp>2564</nl_fourpp>\n <city>'s-Gravenhage</city>\n
|
39
|
+
\ <municipality>'s-Gravenhage</municipality>\n <province>Zuid-Holland</province>\n
|
40
|
+
\ <areacode>070</areacode>\n <lat>52.068</lat>\n <lng>4.25724</lng>\n
|
41
|
+
\ </result>\n </results>\n</response>\n"
|
42
|
+
http_version:
|
43
|
+
recorded_at: Fri, 13 Sep 2013 15:02:49 GMT
|
44
|
+
- request:
|
45
|
+
method: get
|
46
|
+
uri: http://api.pro6pp.nl/v1/autocomplete?auth_key=123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ&format=xml&nl_fourpp=2564&pretty=True
|
47
|
+
body:
|
48
|
+
encoding: US-ASCII
|
49
|
+
string: ''
|
50
|
+
headers:
|
51
|
+
Accept:
|
52
|
+
- ! '*/*; q=0.5, application/xml'
|
53
|
+
Accept-Encoding:
|
54
|
+
- gzip, deflate
|
55
|
+
User-Agent:
|
56
|
+
- Ruby
|
57
|
+
response:
|
58
|
+
status:
|
59
|
+
code: 200
|
60
|
+
message: OK
|
61
|
+
headers:
|
62
|
+
Cache-Control:
|
63
|
+
- no-cache
|
64
|
+
Content-Type:
|
65
|
+
- application/xml; charset=utf-8
|
66
|
+
Vary:
|
67
|
+
- Accept-Encoding
|
68
|
+
Date:
|
69
|
+
- Fri, 13 Sep 2013 15:02:49 GMT
|
70
|
+
Server:
|
71
|
+
- Google Frontend
|
72
|
+
Alternate-Protocol:
|
73
|
+
- 80:quic,80:quic
|
74
|
+
Transfer-Encoding:
|
75
|
+
- chunked
|
76
|
+
body:
|
77
|
+
encoding: US-ASCII
|
78
|
+
string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<response>\n <status>ok</status>\n
|
79
|
+
\ <results>\n <result>\n <nl_fourpp>2564</nl_fourpp>\n <city>'s-Gravenhage</city>\n
|
80
|
+
\ <municipality>'s-Gravenhage</municipality>\n <province>Zuid-Holland</province>\n
|
81
|
+
\ <areacode>070</areacode>\n <lat>52.068</lat>\n <lng>4.25724</lng>\n
|
82
|
+
\ </result>\n </results>\n</response>\n"
|
83
|
+
http_version:
|
84
|
+
recorded_at: Fri, 13 Sep 2013 15:02:49 GMT
|
85
|
+
recorded_with: VCR 2.4.0
|
metadata
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dcentralized-api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.6
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Nick den Engelsman
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-01-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rest-client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.13'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.13'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: capybara
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.1'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: vcr
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.4'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.4'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webmock
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.8'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.8'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.7'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.7'
|
97
|
+
description: API wrapper for d-centralize.nl
|
98
|
+
email:
|
99
|
+
- nickdenengelsman@codedrops.nl
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".travis.yml"
|
106
|
+
- Gemfile
|
107
|
+
- LICENSE.txt
|
108
|
+
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- dcentralized.gemspec
|
111
|
+
- lib/dcentralized.rb
|
112
|
+
- lib/dcentralized/invalid_postcode_exception.rb
|
113
|
+
- lib/dcentralized/version.rb
|
114
|
+
- spec/lib/dcentralized_spec.rb
|
115
|
+
- spec/spec_helper.rb
|
116
|
+
- spec/vcr/auto_complete_high.yml
|
117
|
+
- spec/vcr/auto_complete_low.yml
|
118
|
+
homepage: https://github.com/corklaassebos/dcentralized
|
119
|
+
licenses: []
|
120
|
+
metadata: {}
|
121
|
+
post_install_message:
|
122
|
+
rdoc_options: []
|
123
|
+
require_paths:
|
124
|
+
- lib
|
125
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
requirements: []
|
136
|
+
rubyforge_project:
|
137
|
+
rubygems_version: 2.4.8
|
138
|
+
signing_key:
|
139
|
+
specification_version: 4
|
140
|
+
summary: Retreive data from the Pro6PP zipcode database
|
141
|
+
test_files:
|
142
|
+
- spec/lib/dcentralized_spec.rb
|
143
|
+
- spec/spec_helper.rb
|
144
|
+
- spec/vcr/auto_complete_high.yml
|
145
|
+
- spec/vcr/auto_complete_low.yml
|