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

Replaces libxml with Nokogiri #375

Merged
merged 4 commits into from
Nov 17, 2017
Merged

Replaces libxml with Nokogiri #375

merged 4 commits into from
Nov 17, 2017

Conversation

philnash
Copy link
Contributor

I realise that I'm touching some generated code here, but I wanted to see if this could be done and potentially influence the generator. I also wanted to open a PR to see the results of the CI run.

What do you think?

Nokogiri has much wider adoption with Ruby users than libxml.
Some developers were having trouble with libxml installation.
libxml doesn't work on JRuby, but Nokogiri will.
The API doesn't change.

Bonus
The unused indent argument to TwiML has been removed.

Nokogiri has much wider adoption with Ruby users than libxml.
Some developers were having trouble with libxml installation.
libxml doesn't work on JRuby, but Nokogiri will.
The API doesn't change.

Bonus
The unused `indent` argument to `TwiML` has been removed.
Adds jruby to Travis CI config.

opts = { encoding: 'UTF-8', indent: 0 }
document = Nokogiri::XML::Document.new
xml = self.xml(document).to_xml(opts).gsub(/\n/, '')
Copy link

@lemuelbarango lemuelbarango Dec 11, 2017

Choose a reason for hiding this comment

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

@philnash any reason for replacing the new-line character here?

@Korayem
Copy link

Korayem commented Jan 12, 2019

I solved this by running

gem install libxml-ruby -v '3.0.0' -- --with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config --with-xml2-dir=/usr/local/opt/libxml2 --with-xml2-lib=/usr/local/opt/libxml2/lib --with-xml2-include=/usr/local/opt/libxml2/include

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-generation issue deals with generated code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants