txgh 5.2.0 → 5.2.1

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: 9badcf50c28fbfa108cb28d46e8ef1ab30124c90
4
- data.tar.gz: 630fa6728dc82d464d612b93e026d1d7b11a2ab3
3
+ metadata.gz: 97175fd8099ee50431a4c1abcf8a249b05c7a091
4
+ data.tar.gz: 68467be9147b7a8bb40add48f6aee5429a496db1
5
5
  SHA512:
6
- metadata.gz: fa347e54e198f0f0ba725d82976c8b7fbbd3ca68a3b189a4c0dca453d07894568f7717f3617e3b141046cca416e6e49dec5410267e7da2939b1a6f7c67844b65
7
- data.tar.gz: a455b27ede3021c35852d08153e4a22407530ee4eec6e8c479cfb1f7bc139e1864ba75a784962848dc6ac7c67c0efdfcf72aa12591bcc7b8115b01d8e93e332e
6
+ metadata.gz: 6ae644e4e2cddd7e0ca293494dac030a2e2da040035d11691a1b56390a853670bd2f5cef56e129f29c096cc674d8d815ff644f8343c3b6398010959a55e289a5
7
+ data.tar.gz: a7f191ebfff106119727f35d517f5233c71ac81ac0cacd67d10b84a7a8710f8af035710f03e3aff5f170b75811553c21e4c09de20ff6d41be75ca4a3aa47a481
data/lib/txgh/utils.rb CHANGED
@@ -1,7 +1,10 @@
1
1
  module Txgh
2
2
  module Utils
3
- def slugify(str)
4
- str.gsub('/', '_')
3
+ def slugify(text)
4
+ text
5
+ .gsub('/', '_')
6
+ .gsub(/[^\w\s_-]/, '')
7
+ .gsub(/[-\s]+/, '-')
5
8
  end
6
9
 
7
10
  def absolute_branch(branch)
data/lib/txgh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Txgh
2
- VERSION = '5.2.0'
2
+ VERSION = '5.2.1'
3
3
  end
data/spec/utils_spec.rb CHANGED
@@ -11,6 +11,10 @@ describe Utils do
11
11
  it 'does not replace underscores' do
12
12
  expect(Utils.slugify('abc_def/ghi')).to eq('abc_def_ghi')
13
13
  end
14
+
15
+ it 'does not allow periods' do
16
+ expect(Utils.slugify('abc/def-4.0.13')).to eq('abc_def-4013')
17
+ end
14
18
  end
15
19
 
16
20
  describe '.absolute_branch' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: txgh
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Jackowski
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-06-22 00:00:00.000000000 Z
12
+ date: 2016-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: abroad