pt 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/Changelog.md +3 -0
  2. data/README.md +7 -1
  3. data/lib/pt.rb +1 -1
  4. data/lib/pt/ui.rb +17 -0
  5. metadata +3 -3
data/Changelog.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # pt changelog
2
2
 
3
+ ## v0.3.5
4
+ New 'show' command largely based on craftycode's (Anthony Crumley) contribution
5
+
3
6
  ## v0.3.4
4
7
  Improved charset support
5
8
 
data/README.md CHANGED
@@ -18,6 +18,8 @@ Run `pt create` to create a new bug, chore or feature.
18
18
 
19
19
  The rest of the commands will open you a list of your tasks and let you interact with it:
20
20
 
21
+ pt show # shows detailed info about a task
22
+
21
23
  pt open # open a task in the browser
22
24
 
23
25
  pt assign # assign owner
@@ -40,8 +42,12 @@ The rest of the commands will open you a list of your tasks and let you interact
40
42
 
41
43
  You can [open a new issue](https://github.com/raul/pt/issues/new). It can be helpful to include a trace of the requests and responses you're getting from Pivotal Tracker: you can get it by adding the `--debug` parameter while invoking `pt` (remember to remove all sensible data though).
42
44
 
43
- ## Thanks to...
45
+ # Contributors
44
46
 
47
+ [Anthony Crumley](https://github.com/craftycode)
48
+
49
+ ## Thanks to...
50
+ - the contributors mentioned above and all the issue reporters
45
51
  - the [Pivotal Tracker](https://www.pivotaltracker.com) guys for making a planning tool that doesn't suck and has an API
46
52
  - [Justin Smestad](https://github.com/jsmestad) for his nice `pivotal-tracker` gem
47
53
  - [Bryan Liles](http://smartic.us/) for letting me take over the gem name
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.3.4'
5
+ VERSION = '0.3.5'
6
6
  end
7
7
 
8
8
  require 'pt/client'
data/lib/pt/ui.rb CHANGED
@@ -162,6 +162,14 @@ class PT::UI
162
162
  end
163
163
  end
164
164
 
165
+ def show
166
+ title("Tasks for #{user_s} in #{project_to_s}")
167
+ tasks = @client.get_my_work(@project, @local_config[:user_name])
168
+ table = PT::TasksTable.new(tasks)
169
+ task = select("Please select a story to show", table)
170
+ result = show_task(task)
171
+ end
172
+
165
173
  def reject
166
174
  title("Tasks for #{user_s} in #{project_to_s}")
167
175
  tasks = @client.get_my_tasks_to_reject(@project, @local_config[:user_name])
@@ -299,4 +307,13 @@ class PT::UI
299
307
  "Project #{@local_config[:project_name].upcase}"
300
308
  end
301
309
 
310
+ def show_task(task)
311
+ title task.name
312
+ estimation = task.estimate == -1 ? "Unestimated" : "#{task.estimate} points"
313
+ message "#{task.current_state.capitalize} #{task.story_type} | #{estimation} | Req: #{task.requested_by} | Owns: #{task.owned_by}"
314
+ message task.description if task.description.any?
315
+ task.tasks.all.each{ |t| message "- #{t.complete ? "(done) " : "(pend)"} #{t.description}" }
316
+ task.notes.all.each{ |n| message "#{n.author}: \"#{n.text}\"" }
317
+ end
318
+
302
319
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pt
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 4
10
- version: 0.3.4
9
+ - 5
10
+ version: 0.3.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Raul Murciano