branch-name 2.0.0.pre.beta → 2.0.1.pre.beta
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 +4 -4
- data/CHANGELOG.md +2 -3
- data/Gemfile.lock +1 -1
- data/lib/branch/name/normalizable.rb +2 -2
- data/lib/branch/name/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: 98513393fd480585d05e2e733a6a5174db7dc07e04f561fde59cd927a11af3c9
|
|
4
|
+
data.tar.gz: f4b7171f6c4dbd8f817b7c0d2f41bc56b4d4fa194ba2c33465b63135e18f2b03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c66f3841c5aa04056f19556423a5ee358e8635a59dc328346a623c730d611600c8fbca1064a4819cd77fc145f72e6ade2aa2e073fa997576a9c206eb9619a68c
|
|
7
|
+
data.tar.gz: d8cdcfa78609de1af4b2661f7a871c292e3f78bd24352aeaf9c94645ac05964f3a5460574cd5dcac78aa6fcc4472a4f92213f3d041ed63cbbeef91f946f26f42
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Branch
|
|
4
4
|
module Name
|
|
5
5
|
module Normalizable
|
|
6
|
-
NON_WORD_CHARS_REGEX = /[
|
|
6
|
+
NON_WORD_CHARS_REGEX = /[\W_]/
|
|
7
7
|
|
|
8
8
|
def normalize_branch_name(ticket_description, ticket)
|
|
9
9
|
normalized_ticket_description = normalize_ticket_description ticket_description
|
|
@@ -26,10 +26,10 @@ module Branch
|
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def normalize_token(token)
|
|
29
|
+
token = token.gsub(NON_WORD_CHARS_REGEX, ' ')
|
|
29
30
|
token = token.strip
|
|
30
31
|
.squeeze(' ')
|
|
31
32
|
.split.join(options[:separator])
|
|
32
|
-
token = token.gsub(NON_WORD_CHARS_REGEX, '')
|
|
33
33
|
token = token.squeeze(options[:separator])
|
|
34
34
|
token = token.downcase if options[:downcase]
|
|
35
35
|
token
|
data/lib/branch/name/version.rb
CHANGED