lib/survey_gizmo/survey_gizmo.rb in survey-gizmo-ruby-1.0.5 vs lib/survey_gizmo/survey_gizmo.rb in survey-gizmo-ruby-2.0.0

- old
+ new

@@ -1,25 +1,26 @@ -require "active_support/core_ext/string" -require "active_support/core_ext/module" -require "active_support/core_ext/hash" -require "active_support/core_ext/object/blank" -require "active_support/concern" -require "virtus" -require "httparty" -require "digest/md5" +require 'active_support/core_ext/string' +require 'active_support/core_ext/module' +require 'active_support/core_ext/hash' +require 'active_support/core_ext/object/blank' +require 'active_support/concern' +require 'awesome_print' +require 'virtus' +require 'httparty' +require 'digest/md5' -require "survey_gizmo/resource" -require "survey_gizmo/collection" +require 'survey_gizmo/resource' +require 'survey_gizmo/rest_response' -require "survey_gizmo/api/survey" -require "survey_gizmo/api/survey_campaign" -require "survey_gizmo/api/question" -require "survey_gizmo/api/option" -require "survey_gizmo/api/page" -require "survey_gizmo/api/contact" -require "survey_gizmo/api/response" -require "survey_gizmo/api/email_message" +require 'survey_gizmo/api/survey' +require 'survey_gizmo/api/survey_campaign' +require 'survey_gizmo/api/question' +require 'survey_gizmo/api/option' +require 'survey_gizmo/api/page' +require 'survey_gizmo/api/contact' +require 'survey_gizmo/api/response' +require 'survey_gizmo/api/email_message' module SurveyGizmo include HTTParty debug_output $stderr if ENV['GIZMO_DEBUG'] default_timeout 600 # 10 minutes, SurveyGizmo has serious problems. @@ -40,9 +41,13 @@ # The username for your account. Usually your email address # @option opts [#to_s] :password # The account password def self.setup(opts = {}) self.options = opts - default_params({ "user:md5" => "#{opts[:user]}:#{Digest::MD5.hexdigest(opts[:password])}" }) + default_params({ 'user:md5' => "#{opts[:user]}:#{Digest::MD5.hexdigest(opts[:password])}" }) end -end \ No newline at end of file + def self.reset + @@options = {} + default_params({}) + end +end