html_terminator 0.0.1 → 0.0.2

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/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ script: bundle exec rspec
2
+ language: ruby
3
+ rvm:
4
+ - 2.0.0
5
+ - 1.9.3
data/README.md CHANGED
@@ -28,6 +28,8 @@
28
28
 
29
29
  # HtmlTerminator
30
30
 
31
+ [![Build Status](https://travis-ci.org/polleverywhere/html_terminator.png?branch=master)](https://travis-ci.org/polleverywhere/html_terminator)
32
+
31
33
  Visits Active Record fields and terminates unsafe HTML.
32
34
 
33
35
  ## Installation
@@ -1,3 +1,3 @@
1
1
  module HtmlTerminator
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -7,7 +7,7 @@ module HtmlTerminator
7
7
  }
8
8
 
9
9
  def self.sanitize(val)
10
- Sanitize.clean(val, SANITIZE_OPTIONS).strip
10
+ Sanitize.clean(val, SANITIZE_OPTIONS).strip unless val.nil?
11
11
  end
12
12
 
13
13
  module ClassMethods
@@ -23,4 +23,10 @@ describe HtmlTerminator do
23
23
  @student.last_name = "Hello <img>"
24
24
  @student.last_name.should == "Hello"
25
25
  end
26
+
27
+ it "should not blow up if value is nil" do
28
+ @student = Student.new
29
+ @student.first_name = nil
30
+ @student.first_name.should == nil
31
+ end
26
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html_terminator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -69,6 +69,7 @@ extensions: []
69
69
  extra_rdoc_files: []
70
70
  files:
71
71
  - .gitignore
72
+ - .travis.yml
72
73
  - Gemfile
73
74
  - Guardfile
74
75
  - LICENSE.txt