git-story-workflow 0.0.5 → 0.0.6

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
  SHA1:
3
- metadata.gz: 0c1dcd060414a45aacdcf14faefdab5a744de468
4
- data.tar.gz: f951c300bcad12a52b92452e1e6aaa3b83a52486
3
+ metadata.gz: d4c20550b1d7acae8a4c07063bf9fe5595fe765f
4
+ data.tar.gz: ec6b8237bec95f699b29ac6205f5e5c2c5df33a5
5
5
  SHA512:
6
- metadata.gz: 44e4654b97cecbded6e1a7124cebdb333b0f1b66a0401d9fc90e3533369d5a312d49069b7d01c2ac2b8cc4c7fab6f8dd938bd871203d7095d6a8cafa79392e02
7
- data.tar.gz: 7110a3b58f5f4ecb690d384688a9c774102b891e11d2bf8888df7c1b29b3d046340f33230165afd6856fd48aaae005d84ebf5a3fbe27946c328b0637e2b330dc
6
+ metadata.gz: afa3fdd4e4596e3ff713f2b4f762ca8601e2e3ac38d98dc57c87ca2039579f4e2879cdd94bbff5e9b37a2d28f6460aefdc2041cb594a28b4078875c62ce6f522
7
+ data.tar.gz: 73af0f031ef420fa7fe548f35b7faf63edde671452c6629fb775d2f8253b05df29633dda7f168516be01f2c83c6b8890ac643e7257e0b7e66689b1f07f9eec53
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: git-story-workflow 0.0.5 ruby lib
2
+ # stub: git-story-workflow 0.0.6 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "git-story-workflow".freeze
6
- s.version = "0.0.5"
6
+ s.version = "0.0.6"
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 = "2017-09-11"
11
+ s.date = "2017-10-05"
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
@@ -67,7 +67,11 @@ class Git::Story::App
67
67
  return
68
68
  end
69
69
  if name = fetch_story_name(@story_id)
70
- [ 'story', normalize_name(name), @story_id ] * ?_
70
+ name = normalize_name(
71
+ name,
72
+ max_size: 128 - 'story'.size - @story_id.to_s.size - 2 * ?_.size
73
+ ).full? || name
74
+ [ 'story', name, @story_id ] * ?_
71
75
  else
72
76
  @reason = "name for ##@story_id could not be fetched from tracker"
73
77
  return
@@ -171,12 +175,14 @@ class Git::Story::App
171
175
 
172
176
  private
173
177
 
174
- def normalize_name(name)
178
+ def normalize_name(name, max_size: nil)
175
179
  name = name.downcase
176
180
  name = name.tr('äöü', 'aou').tr(?ß, 'ss')
177
181
  name = name.gsub(/[^a-z0-9-]+/, '-')
178
182
  name = name.gsub(/(\A-*|[\-0-9]*\z)/, '')
179
183
  name = name.gsub(/-+/, ?-)
184
+ max_size and name = name[0, max_size]
185
+ name
180
186
  end
181
187
 
182
188
  def apply_pattern(pattern, stories)
@@ -1,6 +1,6 @@
1
1
  module Git::Story
2
2
  # Git::Story version
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
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.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-11 00:00:00.000000000 Z
11
+ date: 2017-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar