Sha256: 478ea724b8de6105372bd1ff402bab46ce8a72d9e075a419d0f5035c1f506ad7

Contents?: true

Size: 969 Bytes

Versions: 3

Compression:

Stored size: 969 Bytes

Contents

require 'rubygems'
require 'rufus/tokyo/tyrant'
require 'json'
require 'yaml'
require 'open-uri'
require 'timeout'

$:.unshift(File.dirname(__FILE__))

require 'postalcoder/config'
require 'postalcoder/formats'
require 'postalcoder/geocoding_api'
require 'postalcoder/persistence'
require 'postalcoder/resolver'


module PostalCoder

  module Errors
    class Error < StandardError; end
    class MalformedPostalCodeError < Error; end
    class BlankQueryError < Error; end
    class QueryTimeoutError < Error; end
    class NoAPIKeyError < Error; end
    class APIMalformedRequestError < Error; end
    class APIGeocodingError < Error; end
    class TTUnableToConnectError < Error; end
    class InvalidStorageValueError < Error; end
    class UnknownFormatSymbolError < Error; end
  end


  module ProxyMethods
    def PostalCoder.config=(hsh)
      Config.update(hsh)
    end

    def PostalCoder.connect(options = {})
      Resolver.new(options)
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
heycarsten-postalcoder-0.1.3 lib/postalcoder.rb
heycarsten-postalcoder-0.1.4 lib/postalcoder.rb
heycarsten-postalcoder-0.2.0 lib/postalcoder.rb