slugster 0.1.0 → 0.1.1

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
- metadata.gz: 5f914424daf6b6d560696e48004ee38e6a1b1e34
4
- data.tar.gz: 05d4bef73f6f5ef8b5a09d5916027accb3081691
3
+ metadata.gz: 05a65064f0f4ff6b95dfdb15e8e611a40d6502c6
4
+ data.tar.gz: ce8a396d0454034c63260f73c64113af443395f9
5
5
  SHA512:
6
- metadata.gz: c5e39b9d9d2902e000256478b9b1ea21a349d0869d69479d20b8905037ea66dd3b547c882506bf44a9b31ebbf4804c7fdf1f2bc13c64f0bf458d5540812ed57d
7
- data.tar.gz: 423881d8d8d04037b1c246c2aa08ba275b78bc9cb68a2a502728e81a6ca3afbea47a9a3b061ba4c13ba64dc039a92096cd5be2461e9ed6225bb3deb6f1ce6a11
6
+ metadata.gz: b7fda9ebd779a8e148799556888aa225fa959f2dc1adcc37bdc306bead0d634b0d5dc76fcc7d47b2e4f2ec6ab0083ef43333541a9b7b4a8861480611312209b2
7
+ data.tar.gz: 649543c0ac4410f3db90d8b19f3a608872976db0261fe4bd5815ea50e083d1bac1e682731fa646db95a2d68914075fc7c95322744f1cc69e984587bbe2e3fd85
@@ -106,7 +106,7 @@ class String #reopen string class to include #slugify
106
106
  # Convert periods to dashs
107
107
  string = string.gsub(/[.]/,"-")
108
108
 
109
- unless options[:preserve_underscore]
109
+ unless options[:with_underscores]
110
110
  # Convert underscores to dashs
111
111
  string = string.gsub(/[_]/, "-")
112
112
  end
@@ -114,7 +114,7 @@ class String #reopen string class to include #slugify
114
114
  # Remove any characters that aren't alphanumeric (or a dash)
115
115
  string = string.gsub(/[^a-zA-Z0-9 \-_]/,"")
116
116
 
117
- #Replace multiple spaces with single space
117
+ # Replace multiple spaces with single space
118
118
  string = string.gsub(/[ ]+/," ")
119
119
 
120
120
  # Remove single quotes
@@ -123,25 +123,23 @@ class String #reopen string class to include #slugify
123
123
  # Replace non-word characters (\W) with a space
124
124
  string.gsub!(/\W+/, ' ')
125
125
 
126
- # A little off the edges
126
+ # A little off the edges, if you will.
127
127
  string.strip!
128
128
 
129
129
  # Replace single spaces with a URL friendly dash (-)
130
130
  string = string.gsub(/ /,"#{delimiter}")
131
131
 
132
- # Do a greedy replace on multiple dashes
132
+ # Replace multiple dashes
133
133
  string = string.gsub(/-+/,"-")
134
134
 
135
- # Do a greedy replace on multiple underscores
135
+ # Replace multiple underscores
136
136
  string = string.gsub(/_+/,"_")
137
137
 
138
138
  # Replace spaces with dashes
139
139
  string.gsub!(' ', '-')
140
140
 
141
- # All characters should be downcased
142
141
  string.downcase!
143
142
 
144
- # Return the resulting slug
145
143
  string
146
144
  end
147
145
  end
@@ -1,3 +1,3 @@
1
1
  module Slugster
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slugster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collin Graves
@@ -70,6 +70,7 @@ files:
70
70
  - bin/setup
71
71
  - lib/slugster.rb
72
72
  - lib/slugster/version.rb
73
+ - slugster-0.1.0.gem
73
74
  - slugster.gemspec
74
75
  homepage: http://github.com/collingraves/slugster
75
76
  licenses: