headingify 1.2.0 → 1.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 +4 -4
- data/bin/headingify +1 -3
- data/lib/headingify/core_ext/string.rb +11 -1
- data/lib/headingify/info.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31b6d22444c239ee297eb53cc596f8aefe0b4562
|
4
|
+
data.tar.gz: eed0d4a5ae4760e21e87728275bacdc5e225d4ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31f006f6a2f7d708c70b7117ec20d5dc245e13a1da53cb50b014b63cc37192c5fc52dba98f8473aa16f545b05932fa68b69c6819c94ff4a98647458c5136517b
|
7
|
+
data.tar.gz: 7aa13216020ba2a1f92a05af333abe2a663c7ed1ac5a047a3aba15f6fa3288aedab5e0785d8eaa411fed4820f85abccb1ed7b910bfb35cdecad983be03a8d570
|
data/bin/headingify
CHANGED
@@ -50,7 +50,17 @@ class String
|
|
50
50
|
|
51
51
|
# capitalize only what's necessary
|
52
52
|
working.each_with_index do |s, i|
|
53
|
-
|
53
|
+
if s.include? "\%"
|
54
|
+
working[i] = s.delete "\\%"
|
55
|
+
|
56
|
+
# buckass patch for executable access
|
57
|
+
if working[i][0] == "\\" || working[i][working.length - 1] == "\\"
|
58
|
+
working[i].delete! "\\"
|
59
|
+
end
|
60
|
+
|
61
|
+
next
|
62
|
+
end
|
63
|
+
|
54
64
|
next if s =~ /^o'.*$/
|
55
65
|
if blacklist.include?(s) && i == 0; s.capitalize!; next; end
|
56
66
|
blacklist.include?(s) ? s.downcase! : s.capitalize!
|
data/lib/headingify/info.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
module Headingify
|
2
2
|
TITLE = "Ruby String.headingify Core Extension"
|
3
|
-
VERSION = "1.2.
|
3
|
+
VERSION = "1.2.1"
|
4
4
|
UPDATE = "2014-12-29"
|
5
|
-
REVISION = "
|
5
|
+
REVISION = "43"
|
6
6
|
USAGE = "headingify \"string\" | \"an \\%ESCAPED\\% string\""
|
7
7
|
EXAMPLE_INPUT = "\"garlic is as \\%GOOD\\% as ten mothers\""
|
8
8
|
EXAMPLE_OUTPUT = "Garlic Is as GOOD as Ten Mothers"
|
9
9
|
|
10
10
|
def self.usage
|
11
|
-
"
|
11
|
+
"usage: #{USAGE}"
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.example
|