lib/hungry.rb in hungry-0.0.1 vs lib/hungry.rb in hungry-0.1.0

- old
+ new

@@ -1,31 +1,43 @@ $LOAD_PATH << File.expand_path('..', __FILE__) - + require 'support/presence' require 'support/symbolize_keys' module Hungry - VERSION = '0.0.1' + VERSION = '0.1.0' class << self - attr_accessor :api_url + attr_accessor :api_url, :json_parser, :logger end - self.api_url = 'http://api.eet.nu/' + self.api_url = 'https://api.eet.nu/' + self.json_parser = lambda do |json| + require 'json' + JSON.parse(json) + end ### LIBRARY: - autoload :City, 'hungry/city' + # Utility: autoload :Collection, 'hungry/collection' - autoload :Country, 'hungry/country' + autoload :Resource, 'hungry/resource' + autoload :Util, 'hungry/util' + + # Helpers: autoload :Geolocation, 'hungry/geolocation' autoload :Location, 'hungry/location' + + # Models: + autoload :City, 'hungry/city' + autoload :Country, 'hungry/country' + autoload :Menu, 'hungry/menu' autoload :Region, 'hungry/region' - autoload :Resource, 'hungry/resource' autoload :Review, 'hungry/review' + autoload :Response, 'hungry/response' autoload :Site, 'hungry/site' autoload :Tag, 'hungry/tag' - autoload :Util, 'hungry/util' + autoload :User, 'hungry/user' autoload :Venue, 'hungry/venue' ### EXCEPTIONS: # Exception raised when a geolocation is required, but it is not given: