dev_flow 0.2.3 → 0.2.4

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.
@@ -63,6 +63,11 @@ module DevFlow
63
63
 
64
64
  info "Delete closed branch #{current_task.branch_name}"
65
65
  `git branch -d #{current_task.branch_name}`
66
+
67
+ if @config["git_remote"]
68
+ info "Delete closed branch remotely"
69
+ `git push #{@config["git_remote"]} :#{current_task.branch_name}`
70
+ end
66
71
  end
67
72
 
68
73
  end # class
@@ -13,7 +13,9 @@ module DevFlow
13
13
  on_branch = sprintf "(=> %s, %02d%%)", self.branch_name.bold, self.progress
14
14
  end
15
15
 
16
- title = sprintf("%s[%s]%s (%s-%s) %s", ' '*(self.level-1), header, name, DateName.zh(self.start_date).bold, DateName.zh(self.end_date).bold, on_branch)
16
+ d1 = DateName.zh(self.start_date, DateTime.now.strftime("%F")).bold
17
+ d2 = DateName.zh(self.end_date, DateTime.now.strftime("%F")).bold
18
+ title = sprintf("%s[%s]%s (%s-%s) %s", ' '*(self.level-1), header, name, d1, d2, on_branch)
17
19
  end
18
20
 
19
21
  ## a task is completable if all children complated
@@ -1,3 +1,3 @@
1
1
  module DevFlow
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
@@ -31,5 +31,15 @@ describe DateName do
31
31
  it "can handle before 11 days on last year" do
32
32
  DateName.zh(DateTime.parse("2011-12-20"), DateTime.parse("2012-1-1")).should eq('2011年12月20日')
33
33
  end
34
+
35
+ it "can handle today" do
36
+ DateName.zh('2013/04/12', '2013/04/12').should eq('今天')
37
+ end
38
+
39
+ it "can handle tomorrow" do
40
+ DateName.zh('2013/04/13', '2013/04/12').should eq('明天')
41
+ end
42
+
34
43
  end
44
+
35
45
  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.2.3
4
+ version: 0.2.4
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-04-08 00:00:00.000000000 Z
12
+ date: 2013-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: term-ansicolor