Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(rebase) Namespace writing - resolves #52 #59

Merged
merged 6 commits into from
Dec 1, 2017

Conversation

lostapathy
Copy link
Collaborator

This rebases #52 to add support for writing namespaces.

Like the original requester I'm open to feedback on this, I just wanted to get that PR updated and ready to either merge, ready for feedback on what else to do, or else reject the whole idea.

output.root = VApp.from_xml(@xml).to_xml
pending "Full namespace write support"
output.should == ROXML::XML.parse_string(@xml)
namespaces = {'vmw' => "http://foo.example.com", 'gronk' => "http://gronk.example.com"}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable isn't referenced

lib/roxml.rb Outdated
@@ -42,6 +42,7 @@ def to_xml(params = {})
ref.update_xml(root, value)
end
end
params[:namespaces].each { |prefix, url| root.add_namespace_definition(prefix, url) } if params[:namespaces]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you shorten this line? It looks on the long side...

@lostapathy
Copy link
Collaborator Author

Good catches - thanks for the review

@lostapathy
Copy link
Collaborator Author

lostapathy commented Nov 17, 2017

It turns out there was a logical issue in #32 - which caused empty elements without a default to get skipped in the output unless they had a default. I added a failing test of this, confirm that test passed prior to #32, then updated the code added on #32 to make it pass again.

Somehow I made a mess of the commit history, I will try to sort that out so it's cleaner to merge

@lostapathy
Copy link
Collaborator Author

Sorry for the noise - I reset my branch, rebased and reapplied the commits and I think this is ready to look at now.

@Empact Empact merged commit 899b540 into Empact:master Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants