dev_flow 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/dev_flow/app.rb CHANGED
@@ -146,7 +146,7 @@ module DevFlow
146
146
  puts "This is the DevFlow console, version: " + VERSION
147
147
  puts hrh
148
148
  puts "You are on branch #{@git.current_branch.bold.green}" if @git.current_branch
149
- puts "You task is: #{self.task.display_name.bold}" if self.task
149
+ puts "You task is: #{self.task.display_name.bold}, progress #{self.task.progress.to_s.bold}" if self.task
150
150
  puts "You are the #{'leader'.bold} of the project." if self.i_am_leader?
151
151
  puts "You are the #{'moderator'.bold} of the project." if self.i_am_moderator?
152
152
  puts "You are the #{'supervisor'.bold} of the project." if self.i_am_supervisor?
@@ -14,9 +14,18 @@ module DevFlow
14
14
  # commit you current branch and push
15
15
  progress = ARGV[1]
16
16
  progress = progress.to_i if progress
17
- unless (progress and progress > 0 and progress < 99)
18
- error "invalid progress. Use percentage between 1 to 98."
17
+
18
+ if (progress and progress > 0 and progress < 99)
19
+ warn "draw back complete percentage from #{current_task.progress.to_s.bold} to #{progress.to_s.bold}" if current_task.progress > progress
20
+ else
21
+ if progress
22
+ error "invalid progress. Use percentage between 1 to 98."
23
+ else
24
+ puts "Current progress for task #{current_task.display_name.to_s.bold} is #{current_task.progress.to_s.bold}."
25
+ exit
26
+ end
19
27
  end
28
+
20
29
  message = ARGV[2] || "update progress to #{progress}"
21
30
  message = "[progress] " + message
22
31
 
@@ -1,3 +1,3 @@
1
1
  module DevFlow
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-23 00:00:00.000000000 Z
12
+ date: 2013-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: term-ansicolor