lib/finix.rb in finix-0.10 vs lib/finix.rb in finix-0.11
- old
+ new
@@ -5,18 +5,29 @@
module Finix
@client = nil
@config = {:root_url => 'https://localhost/processing'}
@hypermedia_registry = {}
+ @errors_registry = {
+ :unknown => Finix::ResourceErrors,
+ 400 => Finix::BadRequest,
+ 401 => Finix::Unauthorized,
+ 403 => Finix::Forbidden,
+ 404 => Finix::NotFound,
+ 405 => Finix::MethodNotAllowed,
+ 422 => Finix::UnprocessableEntity,
+ 500 => Finix::ServerError
+ }
class << self
attr_accessor :client
attr_accessor :config
attr_accessor :hypermedia_registry
+ attr_accessor :errors_registry
def configure(options={})
- unless options[:root_url].nil? # reset us/pass as well if user update :root_url
+ unless options[:root_url].nil?
@config = {}
end
@config = @config.merge(options)
@config[:user] = @config[:user].strip unless @config[:user].nil?
\ No newline at end of file