prawn-rails 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -29,7 +29,7 @@ For more documentation go to [the manual](http://prawn.majesticseacreature.com/m
29
29
 
30
30
  ### Build in helpers
31
31
  * *html_strip(html)*
32
- Removes the html tags from a string
32
+ Removes the html tags from a string
33
33
 
34
34
  ## Examples
35
35
 
@@ -6,6 +6,7 @@ module PrawnRailsHelper
6
6
  # @return [String] the string with out the tags
7
7
  ##
8
8
  def html_strip html
9
+ return html if html.nil?
9
10
  html
10
11
  text = html.
11
12
  gsub(/( |\n|\s)+/im, ' ').squeeze(' ').strip.
@@ -1,3 +1,3 @@
1
1
  module PrawnRails
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1288,3 +1288,15 @@ Completed 200 OK in 89ms (Views: 89.1ms | ActiveRecord: 0.0ms)
1288
1288
  Processing by PdfController#render_pdf as HTML
1289
1289
  Rendered pdf/render_pdf.pdf.prawn (73.0ms)
1290
1290
  Completed 200 OK in 102ms (Views: 101.2ms | ActiveRecord: 0.0ms)
1291
+ Processing by PdfController#render_pdf as HTML
1292
+ Rendered pdf/render_pdf.pdf.prawn (153.6ms)
1293
+ Completed 200 OK in 172ms (Views: 171.3ms | ActiveRecord: 0.0ms)
1294
+ Processing by PdfController#render_pdf as HTML
1295
+ Rendered pdf/render_pdf.pdf.prawn (86.8ms)
1296
+ Completed 200 OK in 103ms (Views: 102.4ms | ActiveRecord: 0.0ms)
1297
+ Processing by PdfController#render_pdf as HTML
1298
+ Rendered pdf/render_pdf.pdf.prawn (86.3ms)
1299
+ Completed 200 OK in 102ms (Views: 102.0ms | ActiveRecord: 0.0ms)
1300
+ Processing by PdfController#render_pdf as HTML
1301
+ Rendered pdf/render_pdf.pdf.prawn (87.2ms)
1302
+ Completed 200 OK in 103ms (Views: 102.6ms | ActiveRecord: 0.0ms)
@@ -1,7 +1,11 @@
1
1
  require 'test_helper'
2
+ require "prawn-rails/prawn_rails_helper"
2
3
 
3
4
  class PrawnRailsTest < ActiveSupport::TestCase
4
- test "truth" do
5
- assert_kind_of Module, PrawnRails
5
+ include PrawnRailsHelper
6
+ test "html_strip" do
7
+
8
+ assert_nil(html_strip(nil))
9
+ assert_not_nil(html_strip(""))
6
10
  end
7
11
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Carlos Ortiz
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-02-21 00:00:00 -06:00
18
+ date: 2012-02-22 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency