git-story-workflow 0.5.3 → 0.6.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: 91b2ba9f8da9a74b7b786c3632db0fe24789b40fa64d1a7fb9a503f614bc5ac9
4
- data.tar.gz: 40ebc08064474eb912a726028c3384e1e1e4d8e68a266a99196866211764ca3a
3
+ metadata.gz: f051c084b13ff9adfe54646e03a41df9866a182298fc77a507cd5535c936ff82
4
+ data.tar.gz: a522c43ff824e0ed757d5a3a7a7c602696e84c62d1f1f3d60974f726716f7def
5
5
  SHA512:
6
- metadata.gz: c8d2592d20eda25b45776b9ae13ca8a070495e6f2db31ac4c6d9246b99088b53c00c4b596b4962d47defa9ab31fe9f299798eceabc54850613bcb2bcf70bf4f8
7
- data.tar.gz: d24cb416fe27e201a7b981ff7c2b262909d58443dc58b4864c86b4a964b317a0447d47079e5dec1da023fc948ff47289b6af958d440b71b65bb782b2d24ccb9d
6
+ metadata.gz: fda7276dd59d69a127858d43d011e07906ef3f6054f988b6f038f2772823f2af06f9118fa699a3fe2f357810fde36de0f56a4d42c0ce09816656627cea3b8dbf
7
+ data.tar.gz: '05822b553b342f8c7ae211e461c07c3591f160a26508a0f568bac71c08c9d6cfbfc54ce5d4edcd46d95556b4df7eaa7cca24073ac1912c71fb371e7d19b4db62'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.3
1
+ 0.6.0
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: git-story-workflow 0.5.3 ruby lib
2
+ # stub: git-story-workflow 0.6.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "git-story-workflow".freeze
6
- s.version = "0.5.3"
6
+ s.version = "0.6.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 = "2018-09-03"
11
+ s.date = "2018-11-06"
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]
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.homepage = "http://flori.github.com/git-story-workflow".freeze
18
18
  s.licenses = ["Apache-2.0".freeze]
19
19
  s.rdoc_options = ["--title".freeze, "Git-story-workflow".freeze, "--main".freeze, "README.md".freeze]
20
- s.rubygems_version = "2.7.6".freeze
20
+ s.rubygems_version = "2.7.7".freeze
21
21
  s.summary = "Gem abstracting a git workflow".freeze
22
22
  s.test_files = ["spec/git/story/app_spec.rb".freeze, "spec/spec_helper.rb".freeze]
23
23
 
@@ -29,7 +29,8 @@ class Git::Story::App
29
29
  end
30
30
 
31
31
  def initialize(argv = ARGV.dup, debug: ENV['DEBUG'].to_i == 1)
32
- @argv = argv
32
+ @rest_argv = (sep = argv.index('--')) ? argv.slice!(sep..-1).tap(&:shift) : []
33
+ @argv = argv
33
34
  @opts = go 'n:', @argv
34
35
  @command = @argv.shift&.to_sym
35
36
  @debug = debug
@@ -38,7 +39,11 @@ class Git::Story::App
38
39
  def run
39
40
  Git::Story::Setup.perform
40
41
  if command_of(@command)
41
- puts __send__(@command, *@argv)
42
+ if method(@command).parameters.include?(%i[key rest])
43
+ puts __send__(@command, *@argv, rest: @rest_argv)
44
+ else
45
+ puts __send__(@command, *@argv)
46
+ end
42
47
  else
43
48
  @command and @command = @command.inspect
44
49
  @command ||= 'n/a'
@@ -248,24 +253,27 @@ class Git::Story::App
248
253
  end
249
254
 
250
255
  command doc: 'output log of changes since last production deploy tag'
251
- def deploy_log(ref = deploy_tags.last, last_ref = nil)
256
+ def deploy_log(ref = deploy_tags.last, last_ref = nil, rest: [])
252
257
  fetch_tags
253
- opts = '--pretty=tformat:"%C(yellow)%h%Creset %C(green)%ci%Creset %s (%Cred%an <%ae>%Creset)"'
258
+ opts = ([
259
+ '--color',
260
+ '--pretty=tformat:"%C(yellow)%h%Creset %C(green)%ci%Creset %s (%Cred%an <%ae>%Creset)"'
261
+ ] | rest) * ' '
254
262
  capture("git log #{opts} #{ref}..#{last_ref}")
255
263
  end
256
264
 
257
265
  command doc: '[REF] output diff since last production deploy tag'
258
- def deploy_diff(ref = nil)
266
+ def deploy_diff(ref = nil, rest: [])
259
267
  fetch_tags
260
- opts = '-u'
261
- capture("git diff --color #{opts} #{ref} #{deploy_tags.last}")
268
+ opts = (%w[ --color -u ] | rest) * ' '
269
+ capture("git diff #{opts} #{ref} #{deploy_tags.last}")
262
270
  end
263
271
 
264
272
  command doc: '[REF] output migration diff since last production deploy tag'
265
- def deploy_migrate_diff(ref = nil)
273
+ def deploy_migrate_diff(ref = nil, rest: [])
266
274
  fetch_tags
267
- opts = '-u'
268
- capture("git diff --color #{opts} #{deploy_tags.last} #{ref} -- db/migrate")
275
+ opts = (%w[ --color -u ] | rest) * ' '
276
+ capture("git diff #{opts} #{deploy_tags.last} #{ref} -- db/migrate")
269
277
  end
270
278
 
271
279
  command doc: '[STORYID] create a story for story STORYID'
@@ -1,6 +1,6 @@
1
1
  module Git::Story
2
2
  # Git::Story version
3
- VERSION = '0.5.3'
3
+ VERSION = '0.6.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.5.3
4
+ version: 0.6.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: 2018-09-03 00:00:00.000000000 Z
11
+ date: 2018-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  requirements: []
194
194
  rubyforge_project:
195
- rubygems_version: 2.7.6
195
+ rubygems_version: 2.7.7
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: Gem abstracting a git workflow