pt 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,8 @@
1
1
  # pt changelog
2
2
 
3
+ ## v0.3.0
4
+ Added --debug option to see the interaction with PT's API
5
+
3
6
  ## v0.2.2
4
7
  Fix: list of tasks to start
5
8
 
data/lib/pt.rb CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  module PT
4
4
  class InputError < StandardError; end
5
- VERSION = '0.2.2'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
 
8
8
  require 'pt/client'
@@ -0,0 +1,23 @@
1
+ # Nasty tricks to debug the interaction with the Pivotal Tracker API
2
+
3
+ module RestClient
4
+ class Request
5
+
6
+ alias_method :rest_client_execute, :execute
7
+ def execute &block
8
+ puts "\nRequest: #{method.upcase} #{url}"
9
+ rest_client_execute &block
10
+ end
11
+ end
12
+ end
13
+
14
+ module HappyMapper
15
+ module ClassMethods
16
+ alias_method :pivotal_tracker_parse, :parse
17
+ def parse(xml, options={})
18
+ xml = xml.to_s if xml.is_a?(RestClient::Response)
19
+ puts "\nResponse:\n#{xml}\n"
20
+ pivotal_tracker_parse(xml, options)
21
+ end
22
+ end
23
+ end
@@ -8,6 +8,7 @@ class PT::UI
8
8
  LOCAL_CONFIG_PATH = Dir.pwd + '/.pt'
9
9
 
10
10
  def initialize(args)
11
+ require 'pt/debugger' if ARGV.delete('--debug')
11
12
  @io = HighLine.new
12
13
  @global_config = load_global_config
13
14
  @client = PT::Client.new(@global_config[:api_number])
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
8
- - 2
9
- version: 0.2.2
7
+ - 3
8
+ - 0
9
+ version: 0.3.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Raul Murciano
@@ -82,6 +82,7 @@ files:
82
82
  - lib/pt/client.rb
83
83
  - lib/pt/data_row.rb
84
84
  - lib/pt/data_table.rb
85
+ - lib/pt/debugger.rb
85
86
  - lib/pt/ui.rb
86
87
  - lib/pt.rb
87
88
  - Changelog.md