lib/chatterbot/client.rb
def generate_authorize_url(request_token)
      request = consumer.create_signed_request(:get,
        consumer.authorize_path, request_token,
        {:oauth_callback => 'oob'})

      params = request['Authorization'].sub(/^OAuth\s+/, '').split(/,\s+/).map do |param|
        key, value = param.split('=')
        value =~ /"(.*?)"/
        "#{key}=#{CGI::escape($1)}"
      end.join('&')

      "#{base_url}#{request.path}?#{params}"
    end
def generate_authorize_url(request_token)
      request = consumer.create_signed_request(:get,
        consumer.authorize_path, request_token,
        {:oauth_callback => 'oob'})

      params = request['Authorization'].sub(/^OAuth\s+/, '').split(/,\s+/).map do |param|
        key, value = param.split('=')
        value =~ /"(.*?)"/
        "#{key}=#{CGI::escape($1)}"
      end.join('&')

      "#{base_url}#{request.path}?#{params}"
    end
def generate_authorize_url ( request_token ) request = consumer . create_signed_request ( :get , consumer . authorize_path , request_token , { :oauth_callback => 'oob' } ) params = request [ 'Authorization' ] . sub ( / \s / , '' ) . split ( / \s / ) . map do | param | key , value = param . split ( '=' ) value =~ / / "#{key}=#{CGI::escape($1)}" end . join ( '&' ) "#{base_url}#{request.path}?#{params}" end
copied from t, the awesome twitter cli app
 @see https://github.com/sferik/t/blob/master/lib/t/authorizable.rb
copied from t the awesome twitter cli app