git-story-workflow 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/git-story-workflow.gemspec +2 -2
- data/lib/git/story/app.rb +18 -12
- data/lib/git/story/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b60723c83440d9be9775bebc731dacd51d746e0e4637a805b4b1f346a4f75ba2
|
4
|
+
data.tar.gz: ece49a56673c38568b3f03280628e95a8bba1117a84fc61c674043b40246479d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc17c056874f7b5895bf5c2c9dfdbd5e73b128721a98c1087bfcea748a1c6031c1e28fb3c4f67013a0b9d219729896d94e2163df8308aa7e4c5128d5790e74e6
|
7
|
+
data.tar.gz: 8c16b14a5676e369e4a34249446f896fca136ed344dbc9f862861d0f88432d6d21e0ee420cb5b5aae34298e1e918e699a6f9b181f26f9562c8ca7c9f9d9bc2c3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.0
|
data/git-story-workflow.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: git-story-workflow 0.
|
2
|
+
# stub: git-story-workflow 0.9.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "git-story-workflow".freeze
|
6
|
-
s.version = "0.
|
6
|
+
s.version = "0.9.0"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
data/lib/git/story/app.rb
CHANGED
@@ -209,13 +209,14 @@ class Git::Story::App
|
|
209
209
|
end
|
210
210
|
|
211
211
|
command doc: '[AUTHOR] list all stories with details'
|
212
|
-
def
|
212
|
+
def details(author = nil, mark_red: current(check: false))
|
213
213
|
stories.sort_by { |b| -b.story_created_at.to_f }.map { |b|
|
214
214
|
next if author && !b.story_author.include?(author)
|
215
215
|
name = (bn = b.story_base_name) == mark_red ? bn.red : bn.green
|
216
216
|
"#{name} #{b.story_author} #{b.story_created_at.iso8601.yellow}"
|
217
217
|
}.compact
|
218
218
|
end
|
219
|
+
alias list_details details
|
219
220
|
|
220
221
|
command doc: 'list all production deploy tags'
|
221
222
|
def deploy_tags
|
@@ -223,9 +224,10 @@ class Git::Story::App
|
|
223
224
|
end
|
224
225
|
|
225
226
|
command doc: 'output the times of all production deploys'
|
226
|
-
def
|
227
|
+
def deploys
|
227
228
|
deploy_tags.map { |t| format_tag(t) }
|
228
229
|
end
|
230
|
+
alias deploy_list deploys
|
229
231
|
|
230
232
|
command doc: 'output the last production deploy tag'
|
231
233
|
def deploy_tags_last
|
@@ -238,43 +240,43 @@ class Git::Story::App
|
|
238
240
|
format_tag(tag)
|
239
241
|
end
|
240
242
|
|
241
|
-
command doc: 'output log of changes since last production deploy tag'
|
242
|
-
def deploy_log(ref =
|
243
|
+
command doc: '[REF] output log of changes since last production deploy tag'
|
244
|
+
def deploy_log(ref = default_ref, rest: [])
|
243
245
|
fetch_commits
|
244
246
|
fetch_tags
|
245
247
|
opts = ([
|
246
248
|
'--color',
|
247
249
|
'--pretty=tformat:"%C(yellow)%h%Creset %C(green)%ci%Creset %s (%Cred%an <%ae>%Creset)"'
|
248
250
|
] | rest) * ' '
|
249
|
-
capture("git log #{opts} #{ref}
|
251
|
+
capture("git log #{opts} #{ref}")
|
250
252
|
end
|
251
253
|
|
252
|
-
command doc: 'List all stories scheduled for next deploy'
|
253
|
-
def deploy_stories(ref =
|
254
|
+
command doc: '[REF] List all stories scheduled for next deploy'
|
255
|
+
def deploy_stories(ref = default_ref, rest: [])
|
254
256
|
fetch_commits
|
255
257
|
fetch_tags
|
256
258
|
opts = ([
|
257
259
|
'--color=never',
|
258
260
|
'--pretty=%B'
|
259
261
|
] | rest) * ' '
|
260
|
-
output = capture("git log #{opts} #{ref}
|
262
|
+
output = capture("git log #{opts} #{ref}")
|
261
263
|
pivotal_ids = SortedSet[]
|
262
264
|
output.scan(/\[\s*#\s*(\d+)\s*\]/) { pivotal_ids << $1.to_i }
|
263
265
|
pivotal_ids.map { |pid| status(pid) } * (?┄ * Tins::Terminal.cols << ?\n)
|
264
266
|
end
|
265
267
|
|
266
268
|
command doc: '[REF] output diff since last production deploy tag'
|
267
|
-
def deploy_diff(ref =
|
269
|
+
def deploy_diff(ref = default_ref, rest: [])
|
268
270
|
fetch_commits
|
269
271
|
opts = (%w[ --color -u ] | rest) * ' '
|
270
|
-
capture("git diff #{opts} #{ref}
|
272
|
+
capture("git diff #{opts} #{ref}")
|
271
273
|
end
|
272
274
|
|
273
275
|
command doc: '[REF] output migration diff since last production deploy tag'
|
274
|
-
def deploy_migrate_diff(ref =
|
276
|
+
def deploy_migrate_diff(ref = default_ref, rest: [])
|
275
277
|
fetch_commits
|
276
278
|
opts = (%w[ --color -u ] | rest) * ' '
|
277
|
-
capture("git diff #{opts} #{
|
279
|
+
capture("git diff #{opts} #{ref} -- db/migrate")
|
278
280
|
end
|
279
281
|
|
280
282
|
command doc: '[STORYID] create a story for story STORYID'
|
@@ -339,6 +341,10 @@ class Git::Story::App
|
|
339
341
|
|
340
342
|
private
|
341
343
|
|
344
|
+
def default_ref
|
345
|
+
"#{deploy_tags.last}.."
|
346
|
+
end
|
347
|
+
|
342
348
|
def tags
|
343
349
|
fetch_tags
|
344
350
|
if command = complex_config.story.deploy_tag_command?
|
data/lib/git/story/version.rb
CHANGED