pt-flow 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -3
- data/lib/pt-flow/ui.rb +15 -12
- data/lib/pt-flow/version.rb +1 -1
- data/spec/support/webmock.rb +0 -4
- metadata +15 -68
- data/spec/fixtures/activity.xml +0 -177
- data/spec/fixtures/backup_stories.xml +0 -270
- data/spec/fixtures/bugs.xml +0 -279
- data/spec/fixtures/created_note.xml +0 -14
- data/spec/fixtures/created_story.xml +0 -14
- data/spec/fixtures/iterations_all.xml +0 -243
- data/spec/fixtures/iterations_backlog.xml +0 -166
- data/spec/fixtures/iterations_current.xml +0 -48
- data/spec/fixtures/iterations_current_backlog.xml +0 -211
- data/spec/fixtures/iterations_done.xml +0 -34
- data/spec/fixtures/notes.xml +0 -33
- data/spec/fixtures/project_activity.xml +0 -177
- data/spec/fixtures/tasks.xml +0 -24
- data/spec/fixtures/update_tasks.xml +0 -8
data/README.md
CHANGED
@@ -22,16 +22,16 @@ $ flow start
|
|
22
22
|
|
23
23
|
$ flow finish
|
24
24
|
# pushes branch, finishes task on pt, and opens github new pull request page.
|
25
|
-
# follow with cap staging deploy:migrations BRANCH=325325 etc...
|
25
|
+
# follow with cap staging deploy:migrations BRANCH=master-325325 etc...
|
26
26
|
```
|
27
27
|
|
28
28
|
### Reviewer
|
29
29
|
|
30
30
|
```bash
|
31
31
|
$ git fetch
|
32
|
-
$ git checkout 325325
|
32
|
+
$ git checkout master-325325
|
33
33
|
# run tests, review code etc...
|
34
34
|
|
35
35
|
$ flow deliver
|
36
|
-
# merges
|
36
|
+
# merges and pushes target branch, deletes local/remote branch, and delivers task on pt
|
37
37
|
# follow with cap production deploy:migrations etc...
|
data/lib/pt-flow/ui.rb
CHANGED
@@ -39,11 +39,16 @@ class PT::Flow::UI < PT::UI
|
|
39
39
|
def cleanup
|
40
40
|
# Update our list of remotes
|
41
41
|
run("git fetch")
|
42
|
-
run("git remote prune origin")
|
43
42
|
|
44
43
|
# Remove local branches fully merged with origin/master
|
45
44
|
run("git branch --merged origin/master | grep -v 'master$' | xargs git branch -D")
|
46
45
|
|
46
|
+
# Remove remote branches fully merged with origin/master
|
47
|
+
run("git branch -r --merged origin/master | sed 's/ *origin\\///' | grep -v 'master$' | xargs -I% git push origin :%")
|
48
|
+
|
49
|
+
# Prune!
|
50
|
+
run("git remote prune origin")
|
51
|
+
|
47
52
|
congrats('All clean!')
|
48
53
|
end
|
49
54
|
|
@@ -70,11 +75,6 @@ class PT::Flow::UI < PT::UI
|
|
70
75
|
end
|
71
76
|
end
|
72
77
|
|
73
|
-
def error(*msg)
|
74
|
-
super
|
75
|
-
exit(false)
|
76
|
-
end
|
77
|
-
|
78
78
|
def github_page_url
|
79
79
|
repo_url = `git config --get remote.origin.url`.strip
|
80
80
|
stub = repo_url.match(/:(\S+\/\S+)\.git/)[1]
|
@@ -86,18 +86,21 @@ class PT::Flow::UI < PT::UI
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def current_target
|
89
|
-
current_branch.
|
89
|
+
current_branch.sub(current_task_id, '').chomp('-')
|
90
90
|
end
|
91
91
|
|
92
92
|
def current_task_id
|
93
|
-
current_branch
|
93
|
+
current_branch[/\d+$/] || ''
|
94
94
|
end
|
95
95
|
|
96
96
|
def run(command)
|
97
97
|
title(command)
|
98
|
-
unless system(command)
|
99
|
-
|
100
|
-
|
101
|
-
|
98
|
+
error("Error running: #{command}") unless system(command)
|
99
|
+
end
|
100
|
+
|
101
|
+
def error(*msg)
|
102
|
+
super
|
103
|
+
exit(false)
|
102
104
|
end
|
105
|
+
|
103
106
|
end
|
data/lib/pt-flow/version.rb
CHANGED
data/spec/support/webmock.rb
CHANGED
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.
|
4
|
+
version: 0.3.0
|
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-
|
12
|
+
date: 2012-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pt
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70225619639680 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,15 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
24
|
+
version_requirements: *70225619639680
|
30
25
|
- !ruby/object:Gem::Dependency
|
31
26
|
name: rspec
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &70225619638420 !ruby/object:Gem::Requirement
|
33
28
|
none: false
|
34
29
|
requirements:
|
35
30
|
- - ~>
|
@@ -37,15 +32,10 @@ dependencies:
|
|
37
32
|
version: '2.9'
|
38
33
|
type: :development
|
39
34
|
prerelease: false
|
40
|
-
version_requirements:
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '2.9'
|
35
|
+
version_requirements: *70225619638420
|
46
36
|
- !ruby/object:Gem::Dependency
|
47
37
|
name: webmock
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &70225619637260 !ruby/object:Gem::Requirement
|
49
39
|
none: false
|
50
40
|
requirements:
|
51
41
|
- - ! '>='
|
@@ -53,15 +43,10 @@ dependencies:
|
|
53
43
|
version: '0'
|
54
44
|
type: :development
|
55
45
|
prerelease: false
|
56
|
-
version_requirements:
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
46
|
+
version_requirements: *70225619637260
|
62
47
|
- !ruby/object:Gem::Dependency
|
63
48
|
name: guard
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirement: &70225619636300 !ruby/object:Gem::Requirement
|
65
50
|
none: false
|
66
51
|
requirements:
|
67
52
|
- - ! '>='
|
@@ -69,15 +54,10 @@ dependencies:
|
|
69
54
|
version: '0'
|
70
55
|
type: :development
|
71
56
|
prerelease: false
|
72
|
-
version_requirements:
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ! '>='
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
57
|
+
version_requirements: *70225619636300
|
78
58
|
- !ruby/object:Gem::Dependency
|
79
59
|
name: guard-rspec
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirement: &70225619635260 !ruby/object:Gem::Requirement
|
81
61
|
none: false
|
82
62
|
requirements:
|
83
63
|
- - ! '>='
|
@@ -85,12 +65,7 @@ dependencies:
|
|
85
65
|
version: '0'
|
86
66
|
type: :development
|
87
67
|
prerelease: false
|
88
|
-
version_requirements:
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
68
|
+
version_requirements: *70225619635260
|
94
69
|
description: Some extra methods for the pt gem to use in our dev flow.
|
95
70
|
email:
|
96
71
|
- jens@balvig.com
|
@@ -110,23 +85,11 @@ files:
|
|
110
85
|
- lib/pt-flow/ui.rb
|
111
86
|
- lib/pt-flow/version.rb
|
112
87
|
- pt-flow.gemspec
|
113
|
-
- spec/fixtures/activity.xml
|
114
|
-
- spec/fixtures/backup_stories.xml
|
115
|
-
- spec/fixtures/bugs.xml
|
116
|
-
- spec/fixtures/created_note.xml
|
117
|
-
- spec/fixtures/created_story.xml
|
118
88
|
- spec/fixtures/features.xml
|
119
89
|
- spec/fixtures/global_config.yml
|
120
|
-
- spec/fixtures/iterations_all.xml
|
121
|
-
- spec/fixtures/iterations_backlog.xml
|
122
|
-
- spec/fixtures/iterations_current.xml
|
123
|
-
- spec/fixtures/iterations_current_backlog.xml
|
124
|
-
- spec/fixtures/iterations_done.xml
|
125
90
|
- spec/fixtures/local_config.yml
|
126
91
|
- spec/fixtures/memberships.xml
|
127
|
-
- spec/fixtures/notes.xml
|
128
92
|
- spec/fixtures/project.xml
|
129
|
-
- spec/fixtures/project_activity.xml
|
130
93
|
- spec/fixtures/projects.xml
|
131
94
|
- spec/fixtures/stories.xml
|
132
95
|
- spec/fixtures/story-4459994.xml
|
@@ -134,8 +97,6 @@ files:
|
|
134
97
|
- spec/fixtures/story-4460598.xml
|
135
98
|
- spec/fixtures/story-4473735.xml
|
136
99
|
- spec/fixtures/story.xml
|
137
|
-
- spec/fixtures/tasks.xml
|
138
|
-
- spec/fixtures/update_tasks.xml
|
139
100
|
- spec/lib/pt-flow/ui_spec.rb
|
140
101
|
- spec/spec_helper.rb
|
141
102
|
- spec/support/dummy.rb
|
@@ -156,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
117
|
version: '0'
|
157
118
|
segments:
|
158
119
|
- 0
|
159
|
-
hash: -
|
120
|
+
hash: -3027269139786448864
|
160
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
122
|
none: false
|
162
123
|
requirements:
|
@@ -165,31 +126,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
126
|
version: '0'
|
166
127
|
segments:
|
167
128
|
- 0
|
168
|
-
hash: -
|
129
|
+
hash: -3027269139786448864
|
169
130
|
requirements: []
|
170
131
|
rubyforge_project:
|
171
|
-
rubygems_version: 1.8.
|
132
|
+
rubygems_version: 1.8.11
|
172
133
|
signing_key:
|
173
134
|
specification_version: 3
|
174
135
|
summary: Some extra methods for the pt gem to use in our dev flow.
|
175
136
|
test_files:
|
176
|
-
- spec/fixtures/activity.xml
|
177
|
-
- spec/fixtures/backup_stories.xml
|
178
|
-
- spec/fixtures/bugs.xml
|
179
|
-
- spec/fixtures/created_note.xml
|
180
|
-
- spec/fixtures/created_story.xml
|
181
137
|
- spec/fixtures/features.xml
|
182
138
|
- spec/fixtures/global_config.yml
|
183
|
-
- spec/fixtures/iterations_all.xml
|
184
|
-
- spec/fixtures/iterations_backlog.xml
|
185
|
-
- spec/fixtures/iterations_current.xml
|
186
|
-
- spec/fixtures/iterations_current_backlog.xml
|
187
|
-
- spec/fixtures/iterations_done.xml
|
188
139
|
- spec/fixtures/local_config.yml
|
189
140
|
- spec/fixtures/memberships.xml
|
190
|
-
- spec/fixtures/notes.xml
|
191
141
|
- spec/fixtures/project.xml
|
192
|
-
- spec/fixtures/project_activity.xml
|
193
142
|
- spec/fixtures/projects.xml
|
194
143
|
- spec/fixtures/stories.xml
|
195
144
|
- spec/fixtures/story-4459994.xml
|
@@ -197,8 +146,6 @@ test_files:
|
|
197
146
|
- spec/fixtures/story-4460598.xml
|
198
147
|
- spec/fixtures/story-4473735.xml
|
199
148
|
- spec/fixtures/story.xml
|
200
|
-
- spec/fixtures/tasks.xml
|
201
|
-
- spec/fixtures/update_tasks.xml
|
202
149
|
- spec/lib/pt-flow/ui_spec.rb
|
203
150
|
- spec/spec_helper.rb
|
204
151
|
- spec/support/dummy.rb
|
data/spec/fixtures/activity.xml
DELETED
@@ -1,177 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<activities type="array">
|
3
|
-
<activity>
|
4
|
-
<id type="integer">24492385</id>
|
5
|
-
<version type="integer">206</version>
|
6
|
-
<event_type>story_create</event_type>
|
7
|
-
<occurred_at type="datetime">2010/07/29 19:13:04 UTC</occurred_at>
|
8
|
-
<author>Test Suite Access</author>
|
9
|
-
<project_id type="integer">102622</project_id>
|
10
|
-
<description>Test Suite Access added "Create stuff"</description>
|
11
|
-
<stories>
|
12
|
-
<story>
|
13
|
-
<id type="integer">4492080</id>
|
14
|
-
<url>http://www.pivotaltracker.com/services/v3/projects/102622/stories/4492080</url>
|
15
|
-
<name>Create stuff</name>
|
16
|
-
<story_type>feature</story_type>
|
17
|
-
<current_state>unscheduled</current_state>
|
18
|
-
</story>
|
19
|
-
</stories>
|
20
|
-
</activity>
|
21
|
-
<activity>
|
22
|
-
<id type="integer">24492375</id>
|
23
|
-
<version type="integer">205</version>
|
24
|
-
<event_type>story_create</event_type>
|
25
|
-
<occurred_at type="datetime">2010/07/29 19:13:01 UTC</occurred_at>
|
26
|
-
<author>Test Suite Access</author>
|
27
|
-
<project_id type="integer">102622</project_id>
|
28
|
-
<description>Test Suite Access added "Create stuff"</description>
|
29
|
-
<stories>
|
30
|
-
<story>
|
31
|
-
<id type="integer">4492078</id>
|
32
|
-
<url>http://www.pivotaltracker.com/services/v3/projects/102622/stories/4492078</url>
|
33
|
-
<name>Create stuff</name>
|
34
|
-
<story_type>feature</story_type>
|
35
|
-
<current_state>unscheduled</current_state>
|
36
|
-
</story>
|
37
|
-
</stories>
|
38
|
-
</activity>
|
39
|
-
<activity>
|
40
|
-
<id type="integer">24492239</id>
|
41
|
-
<version type="integer">200</version>
|
42
|
-
<event_type>story_create</event_type>
|
43
|
-
<occurred_at type="datetime">2010/07/29 19:11:43 UTC</occurred_at>
|
44
|
-
<author>Test Suite Access</author>
|
45
|
-
<project_id type="integer">102622</project_id>
|
46
|
-
<description>Test Suite Access added "Create stuff"</description>
|
47
|
-
<stories>
|
48
|
-
<story>
|
49
|
-
<id type="integer">4492060</id>
|
50
|
-
<url>http://www.pivotaltracker.com/services/v3/projects/102622/stories/4492060</url>
|
51
|
-
<name>Create stuff</name>
|
52
|
-
<story_type>feature</story_type>
|
53
|
-
<current_state>unscheduled</current_state>
|
54
|
-
</story>
|
55
|
-
</stories>
|
56
|
-
</activity>
|
57
|
-
<activity>
|
58
|
-
<id type="integer">24492220</id>
|
59
|
-
<version type="integer">199</version>
|
60
|
-
<event_type>story_create</event_type>
|
61
|
-
<occurred_at type="datetime">2010/07/29 19:11:38 UTC</occurred_at>
|
62
|
-
<author>Test Suite Access</author>
|
63
|
-
<project_id type="integer">102622</project_id>
|
64
|
-
<description>Test Suite Access added "Create stuff"</description>
|
65
|
-
<stories>
|
66
|
-
<story>
|
67
|
-
<id type="integer">4492059</id>
|
68
|
-
<url>http://www.pivotaltracker.com/services/v3/projects/102622/stories/4492059</url>
|
69
|
-
<name>Create stuff</name>
|
70
|
-
<story_type>feature</story_type>
|
71
|
-
<current_state>unscheduled</current_state>
|
72
|
-
</story>
|
73
|
-
</stories>
|
74
|
-
</activity>
|
75
|
-
<activity>
|
76
|
-
<id type="integer">24491968</id>
|
77
|
-
<version type="integer">194</version>
|
78
|
-
<event_type>story_create</event_type>
|
79
|
-
<occurred_at type="datetime">2010/07/29 19:09:26 UTC</occurred_at>
|
80
|
-
<author>Test Suite Access</author>
|
81
|
-
<project_id type="integer">102622</project_id>
|
82
|
-
<description>Test Suite Access added "Create stuff"</description>
|
83
|
-
<stories>
|
84
|
-
<story>
|
85
|
-
<id type="integer">4491973</id>
|
86
|
-
<url>http://www.pivotaltracker.com/services/v3/projects/102622/stories/4491973</url>
|
87
|
-
<name>Create stuff</name>
|
88
|
-
<story_type>feature</story_type>
|
89
|
-
<current_state>unscheduled</current_state>
|
90
|
-
</story>
|
91
|
-
</stories>
|
92
|
-
</activity>
|
93
|
-
<activity>
|
94
|
-
<id type="integer">24491959</id>
|
95
|
-
<version type="integer">193</version>
|
96
|
-
<event_type>story_create</event_type>
|
97
|
-
<occurred_at type="datetime">2010/07/29 19:09:24 UTC</occurred_at>
|
98
|
-
<author>Test Suite Access</author>
|
99
|
-
<project_id type="integer">102622</project_id>
|
100
|
-
<description>Test Suite Access added "Create stuff"</description>
|
101
|
-
<stories>
|
102
|
-
<story>
|
103
|
-
<id type="integer">4491971</id>
|
104
|
-
<url>http://www.pivotaltracker.com/services/v3/projects/102622/stories/4491971</url>
|
105
|
-
<name>Create stuff</name>
|
106
|
-
<story_type>feature</story_type>
|
107
|
-
<current_state>unscheduled</current_state>
|
108
|
-
</story>
|
109
|
-
</stories>
|
110
|
-
</activity>
|
111
|
-
<activity>
|
112
|
-
<id type="integer">24491880</id>
|
113
|
-
<version type="integer">192</version>
|
114
|
-
<event_type>story_update</event_type>
|
115
|
-
<occurred_at type="datetime">2010/07/29 19:08:43 UTC</occurred_at>
|
116
|
-
<author>Jon</author>
|
117
|
-
<project_id type="integer">102622</project_id>
|
118
|
-
<description>Jon edited "Movable Story"</description>
|
119
|
-
<stories>
|
120
|
-
<story>
|
121
|
-
<id type="integer">4490874</id>
|
122
|
-
<url>http://www.pivotaltracker.com/services/v3/projects/102622/stories/4490874</url>
|
123
|
-
<estimate type="integer">0</estimate>
|
124
|
-
</story>
|
125
|
-
</stories>
|
126
|
-
</activity>
|
127
|
-
<activity>
|
128
|
-
<id type="integer">24491859</id>
|
129
|
-
<version type="integer">191</version>
|
130
|
-
<event_type>story_update</event_type>
|
131
|
-
<occurred_at type="datetime">2010/07/29 19:08:36 UTC</occurred_at>
|
132
|
-
<author>Jon</author>
|
133
|
-
<project_id type="integer">102622</project_id>
|
134
|
-
<description>Jon edited "Movable Story"</description>
|
135
|
-
<stories>
|
136
|
-
<story>
|
137
|
-
<id type="integer">4490874</id>
|
138
|
-
<url>http://www.pivotaltracker.com/services/v3/projects/102622/stories/4490874</url>
|
139
|
-
<current_state>unstarted</current_state>
|
140
|
-
</story>
|
141
|
-
</stories>
|
142
|
-
</activity>
|
143
|
-
<activity>
|
144
|
-
<id type="integer">24491236</id>
|
145
|
-
<version type="integer">158</version>
|
146
|
-
<event_type>story_update</event_type>
|
147
|
-
<occurred_at type="datetime">2010/07/29 19:04:29 UTC</occurred_at>
|
148
|
-
<author>Jon</author>
|
149
|
-
<project_id type="integer">102622</project_id>
|
150
|
-
<description>Jon edited "Movable Story"</description>
|
151
|
-
<stories>
|
152
|
-
<story>
|
153
|
-
<id type="integer">4490874</id>
|
154
|
-
<url>http://www.pivotaltracker.com/services/v3/projects/102622/stories/4490874</url>
|
155
|
-
<name>Movable Story</name>
|
156
|
-
</story>
|
157
|
-
</stories>
|
158
|
-
</activity>
|
159
|
-
<activity>
|
160
|
-
<id type="integer">24490623</id>
|
161
|
-
<version type="integer">153</version>
|
162
|
-
<event_type>story_create</event_type>
|
163
|
-
<occurred_at type="datetime">2010/07/29 18:58:45 UTC</occurred_at>
|
164
|
-
<author>Test Suite Access</author>
|
165
|
-
<project_id type="integer">102622</project_id>
|
166
|
-
<description>Test Suite Access added "Create stuff"</description>
|
167
|
-
<stories>
|
168
|
-
<story>
|
169
|
-
<id type="integer">4491800</id>
|
170
|
-
<url>http://www.pivotaltracker.com/services/v3/projects/102622/stories/4491800</url>
|
171
|
-
<name>Create stuff</name>
|
172
|
-
<story_type>feature</story_type>
|
173
|
-
<current_state>unscheduled</current_state>
|
174
|
-
</story>
|
175
|
-
</stories>
|
176
|
-
</activity>
|
177
|
-
</activities>
|