model_xml 1.0.1 → 1.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/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  *.sw*
2
- model_xml-1.0.0.gem
2
+ model_xml-1.0.0.gem
3
+ *.gem
@@ -109,7 +109,8 @@ module ModelXML
109
109
 
110
110
  # builder will screw up the indentation of embedded xml objects, so use nokogiri to format it nicely
111
111
  output = xml.target!.gsub("\n","").gsub(" ","")
112
- Nokogiri.parse(output).to_s
112
+ xml = Nokogiri.parse(output)
113
+ options[:skip_instruct] ? xml.root.to_s : xml.to_s
113
114
 
114
115
  end
115
116
  end
data/model_xml.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "model_xml"
3
- s.version = '1.0.1'
3
+ s.version = '1.0.2'
4
4
  s.authors = "Rob Anderson"
5
5
  s.email = "rob.anderson@paymentcardsolutions.co.uk"
6
6
  s.summary = "Ruby object to xml converter"
@@ -75,12 +75,10 @@ class ModelXMLTest < Test::Unit::TestCase
75
75
  model_xml :foo, :bar
76
76
  end
77
77
 
78
- res = '<?xml version="1.0"?>
79
- <teststruct>
78
+ res = '<teststruct>
80
79
  <foo>1</foo>
81
80
  <bar>2</bar>
82
- </teststruct>
83
- '
81
+ </teststruct>'
84
82
  assert_equal res, @t.to_xml(:skip_instruct => true)
85
83
 
86
84
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: model_xml
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rob Anderson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-10 00:00:00 Z
18
+ date: 2012-04-11 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: builder