git-story-workflow 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbd2f324c2fcd22807e724f7edb4088d010a45c2174bc6798e192687ce4cefcb
4
- data.tar.gz: ef9ccc0e85caf7e887e5d2bb3f4b06070398beee7945d7f3a3a97d544b8486ab
3
+ metadata.gz: 6f6c3dc177ec79d537e3e345a353a263d81010564fc28ff8ed163c5a35b7d559
4
+ data.tar.gz: f9cf57b5600ce2c7d88645aca0e117ddee5b86ae6a8c8d9ed52c3863c579458b
5
5
  SHA512:
6
- metadata.gz: 481f565b395cec0641abd6449225944e2a06772c0a1cd53dd62a98d3b99264b54368c34abc656a5904f996ff7b9bf6b79640a5e9e99f51367ab8a5b509337776
7
- data.tar.gz: b96a6015f925ee525fad3c17ff1f6f1571ba4fa510c7c7b7fe914b7e85a6a51e6f40a08fb48d30fffb4f720b777b9334ee4f59a8b8d52f3f4e4bc72a36edfb89
6
+ metadata.gz: 41e58403c7074b473e1beeb64e972a857474b79c7965108f2d285a7ebdfbfcedc35e04b682019ab387620cf4c94e17ad433d9f4fdb1bad588b3786fa589a1cc8
7
+ data.tar.gz: 42bfb0756bda52dd744d8c96f1a8ddbd7a3e6731302176fe0b173d168bec4cba508ceb759f1798680c73ba201ff83d2a42047120a6709ecd00ef1ee20f981281
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.8.0
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: git-story-workflow 0.7.1 ruby lib
2
+ # stub: git-story-workflow 0.8.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "git-story-workflow".freeze
6
- s.version = "0.7.1"
6
+ s.version = "0.8.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]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2019-04-26"
11
+ s.date = "2019-05-08"
12
12
  s.description = "Gem abstracting a git workflow\u2026".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["git-story".freeze]
data/lib/git/story/app.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'time'
2
2
  require 'open-uri'
3
3
  require 'tins/go'
4
+ require 'set'
4
5
 
5
6
  class Git::Story::App
6
7
  class ::String
@@ -168,7 +169,7 @@ class Git::Story::App
168
169
  cs.green
169
170
  else
170
171
  cs.yellow
171
- end
172
+ end.italic
172
173
  color_type =
173
174
  case t = story.story_type
174
175
  when 'bug'
@@ -180,7 +181,7 @@ class Git::Story::App
180
181
  else
181
182
  t
182
183
  end
183
- <<~end
184
+ result = <<~end
184
185
  Id: #{(?# + story.id.to_s).green}
185
186
  Name: #{story.name.inspect.bold}
186
187
  Type: #{color_type}
@@ -189,8 +190,11 @@ class Git::Story::App
189
190
  Branch: #{current_branch_checked?&.color('#ff5f00')}
190
191
  Labels: #{story.labels.map(&:name).join(' ').on_color(91)}
191
192
  Pivotal: #{story.url}
192
- Github: #{github_url(current_branch_checked?)}
193
193
  end
194
+ if url = github_url(current_branch_checked?)
195
+ result << "Github: #{url}\n"
196
+ end
197
+ result
194
198
  end
195
199
  rescue => e
196
200
  "Getting pivotal story status => #{e.class}: #{e}".red
@@ -245,6 +249,20 @@ class Git::Story::App
245
249
  capture("git log #{opts} #{ref}..#{last_ref}")
246
250
  end
247
251
 
252
+ command doc: 'List all stories scheduled for next deploy'
253
+ def deploy_stories(ref = deploy_tags.last, last_ref = nil, rest: [])
254
+ fetch_commits
255
+ fetch_tags
256
+ opts = ([
257
+ '--color=never',
258
+ '--pretty=%B'
259
+ ] | rest) * ' '
260
+ output = capture("git log #{opts} #{ref}..#{last_ref}")
261
+ pivotal_ids = SortedSet[]
262
+ output.scan(/\[\s*#\s*(\d+)\s*\]/) { pivotal_ids << $1.to_i }
263
+ pivotal_ids.map { |pid| status(pid) } * (?┄ * Tins::Terminal.cols << ?\n)
264
+ end
265
+
248
266
  command doc: '[REF] output diff since last production deploy tag'
249
267
  def deploy_diff(ref = nil, rest: [])
250
268
  fetch_commits
@@ -1,6 +1,6 @@
1
1
  module Git::Story
2
2
  # Git::Story version
3
- VERSION = '0.7.1'
3
+ VERSION = '0.8.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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-story-workflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-26 00:00:00.000000000 Z
11
+ date: 2019-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar