Sha256: c3cb854e84dfca73e444a639ad52661fb7c0ed211a1716d7de6cbd4d8aa13700

Contents?: true

Size: 551 Bytes

Versions: 13

Compression:

Stored size: 551 Bytes

Contents

# Nasty tricks to debug the interaction with the Pivotal Tracker API

module RestClient
  class Request
    alias_method :rest_client_execute, :execute
    def execute &block
      puts "\nRequest: #{method.to_s.upcase} #{url}"
      rest_client_execute &block
    end
  end
end

module HappyMapper
  module ClassMethods
    alias_method :pivotal_tracker_parse, :parse
    def parse(xml, options={})
      xml = xml.to_s if xml.is_a?(RestClient::Response)
      puts "\nResponse:\n#{xml}\n"
      pivotal_tracker_parse(xml, options)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
pt-0.5.5 lib/pt/debugger.rb
pt-0.5.4 lib/pt/debugger.rb
pt-0.5.2 lib/pt/debugger.rb
pt-0.5.1 lib/pt/debugger.rb
pt-0.5 lib/pt/debugger.rb
pt-0.3.9 lib/pt/debugger.rb
pt-0.3.8 lib/pt/debugger.rb
pt-0.3.7 lib/pt/debugger.rb
pt-0.3.6 lib/pt/debugger.rb
pt-0.3.5 lib/pt/debugger.rb
pt-0.3.4 lib/pt/debugger.rb
pt-0.3.3 lib/pt/debugger.rb
pt-0.3.2 lib/pt/debugger.rb