github_issue_branch 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 4db2e3794d9e0fff0a55bffe47317cd4b48ec362
4
- data.tar.gz: 564da3dcfac09fa7f8185c5ad5c34897c28e4da5
3
+ metadata.gz: 587e69f3cbc52105661ce6b75eb603319efe15df
4
+ data.tar.gz: d53b94c4fa4dfe65a71ee644ad9d3818bfd3158c
5
5
  SHA512:
6
- metadata.gz: 35e457edac6a648c62c657232a3b62912cdeefbe994e95e19d76b433898d602a0366c178660ce3e2233cb6abf36b3258ee3aed3fe7b723009eff0ebd71ff65d8
7
- data.tar.gz: 32d3845d31326bc61c08ba19419e717701a7ff20fe9513d5c221c803f949a45fb8fb297067ad06078f8bdc7a8d9a0d0725eb0dcfeab80f59827082356e0fcbda
6
+ metadata.gz: ed2211bc10a0409e442a23c051001e1ad15ec00960612a6c2301f4a66258b8049ed94a8695eab375951ef32ab0a5b72653cb0d3d3d6e6e20e018e263145fcfdd
7
+ data.tar.gz: d4904d8342a8b0d0dd9583fe9cd91c252ae93bcadc0a803c805112b08f46937451c294dd20bb727d2f232364da785ec0ae36768b7a25d0f1cdf29f184af401a8
@@ -4,10 +4,12 @@ class StringUtils
4
4
  end
5
5
 
6
6
  def self.sanitize string
7
- string.strip!
8
- string.gsub!(/^.*(\\|\/)/, '')
9
- string.gsub!(/[^0-9A-Za-z.\-]/, '-')
10
- string.gsub!(' ', '-')
11
- string
7
+ sanitized = string.strip
8
+ sanitized.downcase!
9
+ sanitized.gsub!(/[`~!@#\$%^*()_+\-=\[\]\{\}\|\\'";:\?<>,.]/,'')
10
+ sanitized.gsub!(/[&\/]/,' ')
11
+ sanitized.gsub!(/\s+/, ' ')
12
+ sanitized.gsub!(' ', '-')
13
+ sanitized
12
14
  end
13
15
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module GithubIssueBranch
2
- VERSION='0.0.1'
2
+ VERSION='0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_issue_branch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rui Baltazar