snail 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/snail.rb +1 -1
- data/test/snail_test.rb +1 -1
- metadata +2 -2
data/lib/snail.rb
CHANGED
@@ -79,7 +79,7 @@ class Snail
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def to_html
|
82
|
-
|
82
|
+
CGI.escapeHTML(to_s).gsub("\n", '<br />').html_safe
|
83
83
|
end
|
84
84
|
|
85
85
|
# this method will get much larger. completeness is out of my scope at this time.
|
data/test/snail_test.rb
CHANGED
@@ -138,7 +138,7 @@ class SnailTest < ActiveSupport::TestCase
|
|
138
138
|
test "to_html" do
|
139
139
|
s = Snail.new(@ca)
|
140
140
|
s.name = 'John & Jane Doe'
|
141
|
-
assert_equal "
|
141
|
+
assert_equal "John & Jane Doe<br />12345 5th St<br />Somewheres NY 12345<br />CANADA", s.to_html
|
142
142
|
assert s.to_html.html_safe?
|
143
143
|
end
|
144
144
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: International snail mail addressing is a pain. This begins to make it
|
15
15
|
easier.
|