govspeak 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ## 3.1.0
2
+
3
+ * Allow a call to `#valid?` on a `Govspeak::Document` to accept validation options.
4
+
1
5
  ## 3.0.0
2
6
 
3
7
  * Add an `allowed_image_hosts` options to `HtmlValidator` (and `HtmlSanitizer`)
@@ -49,8 +49,8 @@ module Govspeak
49
49
  HTMLEntities.new.decode(to_html.gsub(/(?:<[^>]+>|\s)+/, " ").strip)
50
50
  end
51
51
 
52
- def valid?
53
- Govspeak::HtmlValidator.new(@source).valid?
52
+ def valid?(validation_options = {})
53
+ Govspeak::HtmlValidator.new(@source, validation_options).valid?
54
54
  end
55
55
 
56
56
  def headers
@@ -1,8 +1,8 @@
1
1
  class Govspeak::HtmlValidator
2
- attr_reader :string
2
+ attr_reader :govspeak_string
3
3
 
4
- def initialize(string, sanitization_options = {})
5
- @string = string.dup.force_encoding(Encoding::UTF_8)
4
+ def initialize(govspeak_string, sanitization_options = {})
5
+ @govspeak_string = govspeak_string.dup.force_encoding(Encoding::UTF_8)
6
6
  @sanitization_options = sanitization_options
7
7
  end
8
8
 
@@ -22,6 +22,6 @@ class Govspeak::HtmlValidator
22
22
  end
23
23
 
24
24
  def govspeak_to_html
25
- Govspeak::Document.new(string).to_html
25
+ Govspeak::Document.new(govspeak_string).to_html
26
26
  end
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module Govspeak
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govspeak
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-08-14 00:00:00.000000000 Z
13
+ date: 2014-08-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: kramdown
@@ -184,7 +184,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
184
184
  version: '0'
185
185
  segments:
186
186
  - 0
187
- hash: -1089488848379077838
187
+ hash: 453983176966331010
188
188
  required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  none: false
190
190
  requirements:
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  version: '0'
194
194
  segments:
195
195
  - 0
196
- hash: -1089488848379077838
196
+ hash: 453983176966331010
197
197
  requirements: []
198
198
  rubyforge_project:
199
199
  rubygems_version: 1.8.23