pt-flow 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/pt-flow/ui.rb CHANGED
@@ -14,13 +14,10 @@ class PT::Flow::UI < PT::UI
14
14
  task = select("Please select a task to start working on", table)
15
15
  end
16
16
 
17
- result = @client.assign_task(@project, task, @local_config[:user_name])
18
- if result.errors.any?
19
- error(result.errors.errors)
20
- else
21
- start_task(task)
22
- `git checkout -B #{task.id}`
23
- end
17
+ estimate_task(task, ask("How many points do you estimate for it? (#{@project.point_scale})")) if task.estimate < 0
18
+ assign_task(task, @local_config[:user_name])
19
+ start_task(task)
20
+ `git checkout -B #{task.id}`
24
21
  end
25
22
 
26
23
  def finish
@@ -69,6 +66,20 @@ class PT::Flow::UI < PT::UI
69
66
 
70
67
  private
71
68
 
69
+ def assign_task(task, owner)
70
+ result = @client.assign_task(@project, task, owner)
71
+ if result.errors.any?
72
+ error(result.errors.errors)
73
+ else
74
+ congrats("Task assigned to #{owner}")
75
+ end
76
+ end
77
+
78
+ def error(*msg)
79
+ super
80
+ exit(false)
81
+ end
82
+
72
83
  def github_page_url
73
84
  repo_url = `git config --get remote.origin.url`.strip
74
85
  stub = repo_url.match(/:(\S+\/\S+)\.git/)[1]
@@ -1,5 +1,5 @@
1
1
  module PT
2
2
  module Flow
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pt-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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-10-05 00:00:00.000000000 Z
12
+ date: 2012-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pt
16
- requirement: &70216886915660 !ruby/object:Gem::Requirement
16
+ requirement: &70322994337400 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70216886915660
24
+ version_requirements: *70322994337400
25
25
  description: Some extra methods for the pt gem to use in our dev flow.
26
26
  email:
27
27
  - jens@balvig.com
@@ -54,7 +54,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
54
54
  version: '0'
55
55
  segments:
56
56
  - 0
57
- hash: -853934079676521156
57
+ hash: 1281729086698705129
58
58
  required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  none: false
60
60
  requirements:
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  version: '0'
64
64
  segments:
65
65
  - 0
66
- hash: -853934079676521156
66
+ hash: 1281729086698705129
67
67
  requirements: []
68
68
  rubyforge_project:
69
69
  rubygems_version: 1.8.11