sterile 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
+ *.gem
1
2
  pkg/*
2
3
  doc/*
3
- *.gem
4
+ .yardoc
4
5
  .bundle
5
6
  .DS_Store
6
7
  make
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
@@ -1,6 +1,7 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Sterile
4
+ # @private
4
5
  CODEPOINTS = [
5
6
  [
6
7
  nil,
@@ -1,6 +1,7 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Sterile
4
+ # @private
4
5
  HTML_ENTITIES = {
5
6
  "quot" => 34,
6
7
  "amp" => 38,
@@ -1,6 +1,7 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Sterile
4
+ # @private
4
5
  SMART_FORMAT_RULES = [
5
6
  ["'tain't", "’tain’t"],
6
7
  ["'twere", "’twere"],
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Sterile
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
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}.smart_format # => “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.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
- - sterilize.gemspec
39
+ - sterile.gemspec
40
40
  has_rdoc: true
41
41
  homepage: https://github.com/pbhogan/sterile
42
42
  licenses: []
File without changes