ardb 0.27.1 → 0.27.2

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
- data.tar.gz: bd6e2e2855ebc107bc3da24642e8a996da2fa06b
4
- metadata.gz: fb550afe9e0c76af643938e94fb4fcab9fe1afeb
3
+ metadata.gz: 311d362f1bd82654a1495a7d44cf65220ac90950
4
+ data.tar.gz: 5eb5ec19f2388b1113d4949f0b12e7bd0a4b10ea
5
5
  SHA512:
6
- data.tar.gz: bdd10e94e00e33f2800be95666efed91518da00f3109e73e1878e341fa6ad5a384f5a7d78f5ebaa07b7ed136bd6b122fdd29dea43c2242c746986a71d9fb092e
7
- metadata.gz: 51e6669ff3c303a14bcec3e5eb15c0dbb7442216257a1479421588de0a4e675eb9dc54bd068d9519b9dc1bbbccbf8756cba59d563529fa6dff6ad71d2debccd1
6
+ metadata.gz: 88d482971f3b0f023a62091432392508b1a4107032593eeae7bca5350e05083e770789d0b5c8c658f9be3b5339921627885edd3a418cb7ef4d9fb3fc0cb0bbdf
7
+ data.tar.gz: 493d4e295d894418be638db6c7fddeb116a5fee72244b57fa9ab27924ddcb2b3574a87e0ed9c10c75455e0a46adbb281b5c730c36009da656cfe5d5eb8bd0694
@@ -86,7 +86,7 @@ module Ardb
86
86
  allow_underscores = options[:allow_underscores]
87
87
  regexp_escaped_sep = Regexp.escape(separator)
88
88
 
89
- slug = preprocessor.call(string.to_s)
89
+ slug = preprocessor.call(string.to_s.dup)
90
90
  # Turn unwanted chars into the separator
91
91
  slug.gsub!(/[^\w#{regexp_escaped_sep}]+/, separator)
92
92
  # Turn underscores into the separator, unless allowing
@@ -1,3 +1,3 @@
1
1
  module Ardb
2
- VERSION = "0.27.1"
2
+ VERSION = "0.27.2"
3
3
  end
@@ -247,6 +247,11 @@ module Ardb::HasSlug
247
247
 
248
248
  should have_imeths :new
249
249
 
250
+ should "always dup the given string" do
251
+ string = Factory.string
252
+ assert_not_same string, subject.new(string, @args)
253
+ end
254
+
250
255
  should "not change strings that are made up of valid chars" do
251
256
  string = Factory.string
252
257
  assert_equal string, subject.new(string, @args)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ardb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.1
4
+ version: 0.27.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Redding
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2016-03-09 00:00:00 Z
13
+ date: 2016-03-17 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: assert