title_case 0.2.4 → 0.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 861151a9f9e23d6cbd15be6bca51788114861d51
4
- data.tar.gz: 8abf39a6f6d36c4c4535f4f14ed1f530697dc4ea
3
+ metadata.gz: 5300e45aa2b12550e165a91f5c60fc20f5de6f07
4
+ data.tar.gz: e5c379db31d3a41197b9c40a1326e293e9544466
5
5
  SHA512:
6
- metadata.gz: 863b291a7722c99770c6870a207fa20577cf2ab04ed6c2d0d214577b92460c57a5f4b8f9934318aaf3c571fc1fbb1cc57019b353d959b1c260154780076b1d0a
7
- data.tar.gz: 6a130ac9d4c52ecb13f8e26a152c88509b9a70e430cc0100094a4b2a50905edd830bb3420eef98398094f8494feb66368c70290709a66c63b6aa1a278f8ebb83
6
+ metadata.gz: 45fe97f9d7acad4ad5c05211eff39547b267a419dae7c707f85deebba492d882c981a977b10e238edaf5e188a90f2848de42dd84123d842a61b5a63fa5d10e3e
7
+ data.tar.gz: 6d133b42b4d01ff53ebbd70674aa467bd48dbf21e49d8d335e3cbec4d276dcf8a058ab912b4f2c1c85cad21c11878f25d34636704922bb408c5175920f0e6302
data/README.md CHANGED
@@ -49,3 +49,112 @@ MIT license
49
49
 
50
50
 
51
51
 
52
+ <html>
53
+ <head>
54
+ <meta name="generator" content="groff -Thtml, see www.gnu.org">
55
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
56
+ <meta name="Content-Style" content="text/css">
57
+ <title>titlecase</title>
58
+
59
+ </head>
60
+ <body>
61
+
62
+ <h1 align="center">titlecase</h1>
63
+
64
+ <a href="#NAME">NAME</a><br>
65
+ <a href="#SYNOPSIS">SYNOPSIS</a><br>
66
+ <a href="#DESCRIPTION">DESCRIPTION</a><br>
67
+ <a href="#OPTIONS">OPTIONS</a><br>
68
+ <a href="#EXAMPLES">EXAMPLES</a><br>
69
+ <a href="#SEE ALSO">SEE ALSO</a><br>
70
+ <a href="#BUGS">BUGS</a><br>
71
+ <a href="#LICENSE">LICENSE</a><br>
72
+
73
+ <hr>
74
+
75
+
76
+ <h2>NAME
77
+ <a name="NAME"></a>
78
+ </h2>
79
+
80
+
81
+ <p style="margin-left:11%; margin-top: 1em">titlecase
82
+ &minus; capitalize a phrase like a newspaper editor
83
+ would</p>
84
+
85
+ <h2>SYNOPSIS
86
+ <a name="SYNOPSIS"></a>
87
+ </h2>
88
+
89
+
90
+ <p style="margin-left:11%; margin-top: 1em"><b>titlecase
91
+ [FILE]</b></p>
92
+
93
+ <h2>DESCRIPTION
94
+ <a name="DESCRIPTION"></a>
95
+ </h2>
96
+
97
+
98
+
99
+ <p style="margin-left:11%; margin-top: 1em"><b>titlecase</b>
100
+ converts a byte-stream to title-casing &mdash; the first
101
+ letter of most words is converted to upper-case. Exceptions
102
+ are:</p>
103
+
104
+ <p style="margin-left:22%; margin-top: 1em">words that
105
+ already have some capitalization (Jones, AT&amp;T, iPhone)
106
+ or numbers (x0xb0x, left4dead)</p>
107
+
108
+ <p style="margin-left:22%; margin-top: 1em">a list of short
109
+ (less than 4 characters) conjunctions, prepositions, and
110
+ articles; unless they are at the beginning of the
111
+ byte-stream</p>
112
+
113
+ <h2>OPTIONS
114
+ <a name="OPTIONS"></a>
115
+ </h2>
116
+
117
+
118
+ <p style="margin-left:11%; margin-top: 1em">none</p>
119
+
120
+ <h2>EXAMPLES
121
+ <a name="EXAMPLES"></a>
122
+ </h2>
123
+
124
+
125
+ <p style="margin-left:22%; margin-top: 1em"><b>echo
126
+ &rsquo;old McDonald had a farm&rsquo; | titlecase</b></p>
127
+
128
+ <p style="margin-left:22%; margin-top: 1em">Old McDonald
129
+ Had a Farm</p>
130
+
131
+ <h2>SEE ALSO
132
+ <a name="SEE ALSO"></a>
133
+ </h2>
134
+
135
+
136
+ <p style="margin-left:11%; margin-top: 1em"><i>ruby(1) <br>
137
+ http://daringfireball.net/2008/05/title_case <br>
138
+ http://rubygems.org/gems/titlecase</i></p>
139
+
140
+ <h2>BUGS
141
+ <a name="BUGS"></a>
142
+ </h2>
143
+
144
+
145
+ <p style="margin-left:11%; margin-top: 1em">Capitalizes
146
+ Dutch abbreviations <b>&rsquo;s, &rsquo;t, &rsquo;n.</b>
147
+ Probably others.</p>
148
+
149
+ <h2>LICENSE
150
+ <a name="LICENSE"></a>
151
+ </h2>
152
+
153
+
154
+ <p style="margin-left:11%; margin-top: 1em">Copyright 2014
155
+ Noah Birnel</p>
156
+
157
+ <p style="margin-left:11%; margin-top: 1em">MIT license</p>
158
+ <hr>
159
+ </body>
160
+ </html>
data/lib/title_case.rb CHANGED
@@ -1,3 +1,22 @@
1
+ module TitleCase
2
+
3
+ class Version
4
+ MAJOR = 0
5
+ MINOR = 2
6
+ PATCH = 5
7
+
8
+ class << self
9
+ def to_s
10
+ [MAJOR, MINOR, PATCH].join('.')
11
+ end
12
+ end
13
+ end
14
+
15
+ VERSION = Version.to_s
16
+
17
+ end
18
+
19
+
1
20
  class String
2
21
  ##
3
22
  # title_case_word upcases the first alpha character in a string.
@@ -1,7 +1,4 @@
1
- load "#{File.dirname(__FILE__)}/../lib/title_case.rb"
2
-
3
- #FIXME can't seem to do the fancy ruby native relative path thing
4
- # without naming our program title_case.rb, which I don't want
1
+ require "#{File.dirname(__FILE__)}/../lib/title_case"
5
2
 
6
3
  describe "title_case_word" do
7
4
  it "title_cases a single word" do
data/title_case.gemspec CHANGED
@@ -1,7 +1,9 @@
1
+ require './lib/title_case'
2
+
1
3
  Gem::Specification.new do |s|
2
4
  s.name = 'title_case'
3
- s.version = '0.2.4'
4
- s.date = '2014-02-14'
5
+ s.version = TitleCase::VERSION
6
+ s.date = '2014-03-14'
5
7
  s.summary = 'String Methods and CLI to Properly Title Case a Headline.'
6
8
  s.description = "title_case is a set of Ruby String methods for title casing,
7
9
  and a command-line utility using those methods. Not to be
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: title_case
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Birnel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-14 00:00:00.000000000 Z
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: "title_case is a set of Ruby String methods for title casing,\n and
14
14
  a command-line utility using those methods. Not to be \n confused