lib/fastly.rb in fastly-0.97 vs lib/fastly.rb in fastly-0.98

- old
+ new

@@ -3,11 +3,11 @@ # License:: Distributes under the same terms as Ruby # A client library for interacting with the Fastly web acceleration service class Fastly # The current version of the library - VERSION = "0.97" + VERSION = "0.98" require 'fastly/fetcher' require 'fastly/client' require 'fastly/base' @@ -49,20 +49,20 @@ end # Whether or not we're fully (username and password) authed # Some methods require full username and password rather than just auth token def fully_authed? - client.authed? # for now - #client.fully_authed? + client.fully_authed? end # Return a Customer object representing the customer of the current logged in user. def current_customer - raise Fastly::FullAuthRequired unless self.fully_authed? + raise Fastly::AuthRequired unless self.authed? @current_customer ||= get(Customer) end # Return a User object representing the current logged in user. + # NOTE: requires you to be fully authed - will not work with only an API key def current_user raise Fastly::FullAuthRequired unless self.fully_authed? @current_user ||= get(User) end