sterile 1.0.0 → 1.0.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.
- data/.gitignore +2 -1
- data/README.markdown +22 -0
- data/lib/sterile/codepoints.rb +1 -0
- data/lib/sterile/html_entities.rb +1 -0
- data/lib/sterile/smart_format_rules.rb +1 -0
- data/lib/sterile/version.rb +1 -1
- data/lib/sterile.rb +1 -1
- metadata +2 -2
- /data/{sterilize.gemspec → sterile.gemspec} +0 -0
data/.gitignore
CHANGED
data/README.markdown
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Sterile
|
|
2
|
+
=======
|
|
3
|
+
|
|
4
|
+
Sterilize your strings! Transliterate, generate slugs, smart format, strip tags, encode/decode entities and more.
|
|
5
|
+
|
|
6
|
+
Examples
|
|
7
|
+
--------
|
|
8
|
+
|
|
9
|
+
TODO
|
|
10
|
+
|
|
11
|
+
Installation
|
|
12
|
+
------------
|
|
13
|
+
|
|
14
|
+
Install with RubyGems:
|
|
15
|
+
|
|
16
|
+
gem install sterile
|
|
17
|
+
|
|
18
|
+
License
|
|
19
|
+
-------
|
|
20
|
+
|
|
21
|
+
Copyright (c) 2011 Patrick Hogan, released under the MIT License.
|
|
22
|
+
http://www.opensource.org/licenses/mit-license
|
data/lib/sterile/codepoints.rb
CHANGED
data/lib/sterile/version.rb
CHANGED
data/lib/sterile.rb
CHANGED
|
@@ -125,7 +125,7 @@ module Sterile
|
|
|
125
125
|
# Turn Unicode characters into their HTML equivilents.
|
|
126
126
|
# If a valid HTML entity is not possible, it will create a numeric entity.
|
|
127
127
|
#
|
|
128
|
-
# q{“Economy Hits Bottom,” ran the headline}.
|
|
128
|
+
# q{“Economy Hits Bottom,” ran the headline}.encode_entities # => “Economy Hits Bottom,” ran the headline
|
|
129
129
|
#
|
|
130
130
|
def encode_entities(string)
|
|
131
131
|
transmogrify(string) do |mapping, codepoint|
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sterile
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 1.0.
|
|
5
|
+
version: 1.0.1
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Patrick Hogan
|
|
@@ -36,7 +36,7 @@ files:
|
|
|
36
36
|
- lib/sterile/html_entities.rb
|
|
37
37
|
- lib/sterile/smart_format_rules.rb
|
|
38
38
|
- lib/sterile/version.rb
|
|
39
|
-
-
|
|
39
|
+
- sterile.gemspec
|
|
40
40
|
has_rdoc: true
|
|
41
41
|
homepage: https://github.com/pbhogan/sterile
|
|
42
42
|
licenses: []
|
|
File without changes
|