pt 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +5 -1
- data/lib/pt.rb +1 -1
- data/lib/pt/client.rb +6 -2
- data/lib/pt/ui.rb +14 -4
- metadata +11 -11
data/Changelog.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# pt changelog
|
2
2
|
|
3
|
-
## v0.
|
3
|
+
## v0.5.2
|
4
|
+
|
5
|
+
Made create agnostic of order for assignee / type, and use defaults of you / feature ( orta )
|
6
|
+
|
7
|
+
## v0.5.1
|
4
8
|
|
5
9
|
Extra commands added, they can be accessed through 'pt help' ( orta )
|
6
10
|
Fix for 1.9.3 not getting deprecation warnings
|
data/lib/pt.rb
CHANGED
data/lib/pt/client.rb
CHANGED
@@ -33,8 +33,12 @@ class PT::Client
|
|
33
33
|
PivotalTracker::Iteration.current(project)
|
34
34
|
end
|
35
35
|
|
36
|
-
def get_activities(project)
|
37
|
-
|
36
|
+
def get_activities(project, limit)
|
37
|
+
if limit
|
38
|
+
project.activities.all :limit => limit
|
39
|
+
else
|
40
|
+
project.activities.all
|
41
|
+
end
|
38
42
|
end
|
39
43
|
|
40
44
|
def get_my_work(project, user_name)
|
data/lib/pt/ui.rb
CHANGED
@@ -45,9 +45,9 @@ class PT::UI
|
|
45
45
|
def create
|
46
46
|
if @params[0]
|
47
47
|
name = @params[0]
|
48
|
-
owner = find_owner
|
48
|
+
owner = find_owner(@params[1]) || find_owner(@params[2]) || @local_config[:user_name]
|
49
49
|
requester = @local_config[:user_name]
|
50
|
-
task_type = @params[2] || 'feature'
|
50
|
+
task_type = task_type_or_nil(@params[1]) || task_type_or_nil(@params[2]) || 'feature'
|
51
51
|
else
|
52
52
|
title("Let's create a new task:")
|
53
53
|
name = ask("Name for the new task:")
|
@@ -366,7 +366,7 @@ class PT::UI
|
|
366
366
|
end
|
367
367
|
|
368
368
|
def updates
|
369
|
-
activities = @client.get_activities(@project)
|
369
|
+
activities = @client.get_activities(@project, @params[0])
|
370
370
|
tasks = @client.get_my_work(@project, @local_config[:user_name])
|
371
371
|
title("Recent Activity on #{project_to_s}")
|
372
372
|
activities.each do |activity|
|
@@ -396,7 +396,7 @@ class PT::UI
|
|
396
396
|
message("pt find [query] # looks in your tasks by title and presents it")
|
397
397
|
message("pt done [id] ~[0-3] ~[comment] # lazy mans finish task, does everything")
|
398
398
|
message("pt list [member] # list all tasks for another pt user")
|
399
|
-
message("pt updates
|
399
|
+
message("pt updates [number] # shows number recent activity from your current project")
|
400
400
|
message("")
|
401
401
|
message("All commands can be ran without arguments for a wizard like UI.")
|
402
402
|
end
|
@@ -519,6 +519,13 @@ class PT::UI
|
|
519
519
|
def project_to_s
|
520
520
|
"Project #{@local_config[:project_name].upcase}"
|
521
521
|
end
|
522
|
+
|
523
|
+
def task_type_or_nil query
|
524
|
+
if (["feature", "bug", "chore"].index query)
|
525
|
+
return query
|
526
|
+
end
|
527
|
+
nil
|
528
|
+
end
|
522
529
|
|
523
530
|
def find_task query
|
524
531
|
members = @client.get_members(@project)
|
@@ -545,6 +552,9 @@ class PT::UI
|
|
545
552
|
if member.name.downcase.index query
|
546
553
|
return member
|
547
554
|
end
|
555
|
+
if member.initials.downcase.index query
|
556
|
+
return member
|
557
|
+
end
|
548
558
|
end
|
549
559
|
nil
|
550
560
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-01-
|
12
|
+
date: 2012-01-30 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pivotal-tracker
|
16
|
-
requirement: &
|
16
|
+
requirement: &70258634819440 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.4.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70258634819440
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: hirb
|
27
|
-
requirement: &
|
27
|
+
requirement: &70258634818920 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.4.5
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70258634818920
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: colored
|
38
|
-
requirement: &
|
38
|
+
requirement: &70258634818460 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '1.2'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70258634818460
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: highline
|
49
|
-
requirement: &
|
49
|
+
requirement: &70258634817960 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 1.6.1
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70258634817960
|
58
58
|
description: Minimalist, opinionated client to manage your Pivotal Tracker tasks from
|
59
59
|
the command line.
|
60
60
|
email:
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project: pt
|
99
|
-
rubygems_version: 1.8.
|
99
|
+
rubygems_version: 1.8.11
|
100
100
|
signing_key:
|
101
101
|
specification_version: 3
|
102
102
|
summary: Client to use Pivotal Tracker from the console.
|