speakingurl-rails 8.0.2 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/speakingurl.js +7 -8
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cefcd22d767a300e3114532eef9c1a02882a03c0
4
- data.tar.gz: 6887a983ed6d7124297899ce45913340e8163d42
3
+ metadata.gz: 46a4e73c056f7f26dcc0a87a2fb3c1607f1ed58f
4
+ data.tar.gz: 9bb9db23fc7dc5f4882ddb6791329c822093df89
5
5
  SHA512:
6
- metadata.gz: 2c5ff0fa4a8e51e79b041298dd4653358e2d09b1d18734f71aea2c91614629a4c84a623080b91c3efd18efa16fea9c1ff56ab76cbc536407a3e7ad4d81f352dc
7
- data.tar.gz: 202536fa915e944cf4dd6e52ea231c60e6b2f1833c949e0eecea7a98366d73171e930ba7b97faca8e709b0bf85edc1ed41f8c217938531bd9d5b29aea3d3f54f
6
+ metadata.gz: aed382db31b5f5a834fb48632f7c2bf9969e57acd6322a07e8b86b5a65082405a3fd5a57acf0d6293e9afabfb3495def7105eea64863536915f9658b956838da
7
+ data.tar.gz: 7fd5cf1cfe274ffc6803bb598f9c50d90b243baea0a5efde2c7df92a99232d7b2124b125a2f233d3cbe62fac4f3c27058345f72116a3454b6b873fa63d254e31
data/README.md CHANGED
@@ -57,14 +57,14 @@ copy the file speakingurl.min.js to your script directory
57
57
  available versions:
58
58
 
59
59
  - [www.cdnjs.com/libraries/speakingurl/](http://cdnjs.com/libraries/speakingurl/)
60
- - use [//cdnjs.cloudflare.com/ajax/libs/speakingurl/8.0.2/speakingurl.min.js](https://cdnjs.cloudflare.com/ajax/libs/speakingurl/8.0.2/speakingurl.min.js)
60
+ - use [//cdnjs.cloudflare.com/ajax/libs/speakingurl/9.0.0/speakingurl.min.js](https://cdnjs.cloudflare.com/ajax/libs/speakingurl/9.0.0/speakingurl.min.js)
61
61
 
62
62
  #### [CDN/maxcdn](https://www.maxcdn.com/)
63
63
 
64
64
  available versions:
65
65
 
66
66
  - [www.jsdelivr.com/#!speakingurl](]http://www.jsdelivr.com/#!speakingurl)
67
- - use [//cdn.jsdelivr.net/speakingurl/8.0.2/speakingurl.min.js](https://cdn.jsdelivr.net/speakingurl/8.0.2/speakingurl.min.js)
67
+ - use [//cdn.jsdelivr.net/speakingurl/9.0.0/speakingurl.min.js](https://cdn.jsdelivr.net/speakingurl/9.0.0/speakingurl.min.js)
68
68
 
69
69
  Usage
70
70
  -----
data/lib/speakingurl.js CHANGED
@@ -1310,14 +1310,6 @@
1310
1310
 
1311
1311
  allowedChars += separator;
1312
1312
 
1313
- if (titleCase) {
1314
-
1315
- input = input.replace(/(\w)(\S*)/g, function (_, i, r) {
1316
- var j = i.toUpperCase() + (r !== null ? r : "");
1317
- return (Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0) ? j : j.toLowerCase();
1318
- });
1319
- }
1320
-
1321
1313
  // escape all necessary chars
1322
1314
  allowedChars = escapeChars(allowedChars);
1323
1315
 
@@ -1390,6 +1382,13 @@
1390
1382
  result += ch.replace(new RegExp('[^\\w\\s' + allowedChars + '_-]', 'g'), separator);
1391
1383
  }
1392
1384
 
1385
+ if (titleCase) {
1386
+ result = result.replace(/(\w)(\S*)/g, function (_, i, r) {
1387
+ var j = i.toUpperCase() + (r !== null ? r : "");
1388
+ return (Object.keys(customReplacements).indexOf(j.toLowerCase()) < 0) ? j : j.toLowerCase();
1389
+ });
1390
+ }
1391
+
1393
1392
  // eliminate duplicate separators
1394
1393
  // add separator
1395
1394
  // trim separators from start and end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: speakingurl-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.2
4
+ version: 9.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sascha Droste
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-05 00:00:00.000000000 Z
11
+ date: 2016-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties