lib/domoscio_rails.rb in domoscio_rails-0.2.23 vs lib/domoscio_rails.rb in domoscio_rails-0.2.24

- old
+ new

@@ -43,13 +43,11 @@ require 'domoscio_rails/metadata/delta_object' module DomoscioRails class Configuration - attr_accessor :preproduction, :test, :dev, :root_url, - :client_id, :client_passphrase, :client_identifier, - :temp_dir, :disabled, :version + attr_accessor :preproduction, :test, :dev, :root_url, :client_id, :client_passphrase, :temp_dir, :disabled, :version def disabled @disabled || false end @@ -139,28 +137,10 @@ data = {} end end end - - ############### TEMP!!!! ####################################################### - #pp method, uri.request_uri, params #, filters, headers - #pp res, data - #puts - - # if (!(res.is_a? Net::HTTPOK)) - # ex = DomoscioRails::ResponseError.new(uri, res.code, data) - # ############## TEMP!!!! ######################################################## - # #pp ex, data - # raise ex - # end - - # copy pagination info if any - # ['x-number-of-pages', 'x-number-of-items'].each { |k| -# filters[k.gsub('x-number-of-', 'total_')] = res[k].to_i if res[k] -# } - data end def self.send_request(uri, method, params, headers, before_request_proc) @@ -192,11 +172,10 @@ 'uname lookup failed' end def self.request_headers auth_token = DomoscioRails::AuthorizationToken::Manager.get_token - client_identifier = DomoscioRails.configuration.client_identifier if !auth_token.is_a? String headers = { 'user_agent' => "DomoscioRails V2 RubyBindings/#{DomoscioRails::VERSION}", 'AccessToken' => "#{auth_token[:access_token]}", @@ -208,13 +187,8 @@ 'user_agent' => "DomoscioRails V2 RubyBindings/#{DomoscioRails::VERSION}", 'Authorization' => "Token token=#{DomoscioRails.configuration.client_passphrase}",#"#{auth_token['token_type']} #{auth_token['access_token']}", 'Content-Type' => 'application/json' } end - headers['VizToken'] = client_identifier if !client_identifier.nil? - headers - end - - end