headingify 1.1.1 → 1.1.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
- metadata.gz: 44a0f56f8073d869caf5d8a1847617fb7bdcbaf7
4
- data.tar.gz: 659e58c62ec8ff269eeafcfc47652ee47d3035fc
3
+ metadata.gz: 46b07b6c0913390f5e8e0d9b977ce499df45adb1
4
+ data.tar.gz: 1b9f9823622578038a93d367bd40735ca3e33467
5
5
  SHA512:
6
- metadata.gz: 5abfbc173023a97488c787e33c5d23d50a57e952e206f8ac0bff93c308f7216bb0ad7f416b614b70c25acd09577ef6e140ae182dbc956dee90ea331e345bbe03
7
- data.tar.gz: 37ae433f3caf97b95cce4bffa1acb8f442e71740bfd283479442a059c3b8c8255c16af4be52a22a3b2deec2ecb0946125753f5d4b90b22d0cbd1e14ff0f6a3c2
6
+ metadata.gz: 91a60d1388ba154dead5f07eac78da6bec1786648aafa207da1710238204b4f895366248fc6db1893c7f4a68ff43889f956f714a105ea6a7f7b0735468ae8461
7
+ data.tar.gz: 6b1852d5fa94bcffe0c0789fbf3dd29a4c5290d971bebf4423a5421de6da2d496f5444ffa804e7b1af5f6b619ddf351949ddc353eee38b526fb0f12938a82814
@@ -47,7 +47,7 @@ class String
47
47
 
48
48
  # capitalize only what's necessary
49
49
  working.each_with_index do |s, i|
50
- working[i] = /\\%(.*)\\%/.match(s)[1] if s.include?("\%")
50
+ working[i] = s.gsub /\%/, "" if s.include? "\%"
51
51
  next if s =~ /^o'.*$/
52
52
  if blacklist.include?(s) && i == 0; s.capitalize!; next; end
53
53
  blacklist.include?(s) ? s.downcase! : s.capitalize!
@@ -1,6 +1,6 @@
1
1
  module Headingify
2
2
  TITLE = "Ruby String.headingify Core Extension"
3
- VERSION = "1.1.1"
3
+ VERSION = "1.1.2"
4
4
  UPDATE = "2014-11-19"
5
5
  REVISION = "41"
6
6
  USAGE = "headingify \"string\" | \"an \\%ESCAPED\\% string\""
@@ -10,7 +10,9 @@ describe Headingify do
10
10
  "dad, what are you doing? it's 'shark week'!",
11
11
  "i want to roll you into a little ball and shove you up my vagina.",
12
12
  "i traveled 500 miles to give you my seed!",
13
- "a simple string, including the preposition 'with'."]
13
+ "a simple string, including the preposition 'with'.",
14
+ "this is a \%QuIcK\% test",
15
+ "\%PI\%"]
14
16
 
15
17
  output = ["I'm Dale, but You Have to Call Me Dragon.",
16
18
  "I Swear, I'm so Pissed off at My Mom.",
@@ -20,7 +22,9 @@ describe Headingify do
20
22
  "Dad, What Are You Doing? It's 'Shark Week'!",
21
23
  "I Want to Roll You into a Little Ball and Shove You up My Vagina.",
22
24
  "I Traveled 500 Miles to Give You My Seed!",
23
- "A Simple String, including the Preposition 'with'."]
25
+ "A Simple String, including the Preposition 'with'.",
26
+ "This Is a QuIcK Test",
27
+ "PI"]
24
28
 
25
29
  input.each_with_index do |s, i|
26
30
  expect(s.headingify).to eq(output[i])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: headingify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Calo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-20 00:00:00.000000000 Z
11
+ date: 2014-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec