git-story-workflow 0.8.0 → 0.9.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f6c3dc177ec79d537e3e345a353a263d81010564fc28ff8ed163c5a35b7d559
4
- data.tar.gz: f9cf57b5600ce2c7d88645aca0e117ddee5b86ae6a8c8d9ed52c3863c579458b
3
+ metadata.gz: b60723c83440d9be9775bebc731dacd51d746e0e4637a805b4b1f346a4f75ba2
4
+ data.tar.gz: ece49a56673c38568b3f03280628e95a8bba1117a84fc61c674043b40246479d
5
5
  SHA512:
6
- metadata.gz: 41e58403c7074b473e1beeb64e972a857474b79c7965108f2d285a7ebdfbfcedc35e04b682019ab387620cf4c94e17ad433d9f4fdb1bad588b3786fa589a1cc8
7
- data.tar.gz: 42bfb0756bda52dd744d8c96f1a8ddbd7a3e6731302176fe0b173d168bec4cba508ceb759f1798680c73ba201ff83d2a42047120a6709ecd00ef1ee20f981281
6
+ metadata.gz: dc17c056874f7b5895bf5c2c9dfdbd5e73b128721a98c1087bfcea748a1c6031c1e28fb3c4f67013a0b9d219729896d94e2163df8308aa7e4c5128d5790e74e6
7
+ data.tar.gz: 8c16b14a5676e369e4a34249446f896fca136ed344dbc9f862861d0f88432d6d21e0ee420cb5b5aae34298e1e918e699a6f9b181f26f9562c8ca7c9f9d9bc2c3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.9.0
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: git-story-workflow 0.8.0 ruby lib
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.8.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]
@@ -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 list_details(author = nil, mark_red: current(check: false))
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 deploy_list
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 = deploy_tags.last, last_ref = nil, rest: [])
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}..#{last_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 = deploy_tags.last, last_ref = nil, rest: [])
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}..#{last_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 = nil, rest: [])
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} #{deploy_tags.last}")
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 = nil, rest: [])
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} #{deploy_tags.last} #{ref} -- db/migrate")
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?
@@ -1,6 +1,6 @@
1
1
  module Git::Story
2
2
  # Git::Story version
3
- VERSION = '0.8.0'
3
+ VERSION = '0.9.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-story-workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank