pretty_xml 0.0.2.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/printers/pretty_print.rb +4 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 578aa9d36b024370da16c72305da36292033ba7c
4
- data.tar.gz: da002a5a557455a31b1efaa19a05612d1734bc14
3
+ metadata.gz: 6f00830dad1ae727633c37a256586974b0d574fc
4
+ data.tar.gz: a6b699d0af7832faca77fd6d8b07b98cc06cc9ac
5
5
  SHA512:
6
- metadata.gz: 98eaf3a93d453abe0a2af07ed64d3d01211381c23b28239f587a78dd0aeaa6b3e283c01033d5b1fed1b366eda982096208f90e0c8898698672ffb78e2ba9c72f
7
- data.tar.gz: fd5caee63898b65329f561e769af3355ac855dc2d07dc51d1bd65594b7862c6f5b53c7aae1f1dda043f5e1fe1a2266a9490af5053b32383d143a69a3269e1798
6
+ metadata.gz: 5a436192caad4998bad6846f6921f1cd69198f19b0dd60ccb90ad39945ae35b3f6970eb6eb008fbd35fbdb3076ee39b90fde719459c74cc10e15218d37c76886
7
+ data.tar.gz: '059adbd303421d90788c82e9158a36356876201889cff87e7f539ddf9ae8e858c17ee8e2e49c230ef342d67481db451c779895c874f96a93b0598da1a052f6d1'
@@ -5,6 +5,7 @@ module PrettyXML
5
5
  def initialize(options)
6
6
  @handler = SaxPrinter.new(options)
7
7
  @printer = Nokogiri::XML::SAX::Parser.new(handler)
8
+ @normalize = options[:normalize]
8
9
  end
9
10
 
10
11
  def pp(doc)
@@ -16,7 +17,9 @@ module PrettyXML
16
17
  handler.instructions = instrs
17
18
  printer.parse(d)
18
19
  instrs << dn if dn
19
- instrs.empty? ? pretty : "#{instrs.join("\n")}\n#{pretty}"
20
+ out = instrs.empty? ? pretty : "#{instrs.join("\n")}\n#{pretty}"
21
+ out.unicode_normalize! if @normalize
22
+ out
20
23
  end
21
24
 
22
25
  def verify_doc(doc)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pretty_xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Corrigan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-10 00:00:00.000000000 Z
11
+ date: 2017-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.2.2
122
+ rubygems_version: 2.6.8
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: For printing human-readable XML docs