diff --git a/Gemfile.d/other_stuff.rb b/Gemfile.d/other_stuff.rb index 9aa045eb001..3f88a1fc393 100644 --- a/Gemfile.d/other_stuff.rb +++ b/Gemfile.d/other_stuff.rb @@ -58,8 +58,6 @@ gem 'json', '1.8.2' gem 'oj', '2.5.5' gem 'jwt', '1.2.1' -# native xml parsing, diigo -gem 'libxml-ruby', '2.7.0', :require => 'xml/libxml' gem 'macaddr', '1.0.0' # macaddr 1.2.0 tries to require 'systemu' which isn't a dependency gem 'mail', '2.5.4' gem 'treetop', '1.4.15' diff --git a/app/models/bookmark_service.rb b/app/models/bookmark_service.rb index 056292831e2..3f15be28593 100644 --- a/app/models/bookmark_service.rb +++ b/app/models/bookmark_service.rb @@ -71,9 +71,8 @@ class BookmarkService < UserService response = http.request(request) case response when Net::HTTPSuccess - require 'libxml' - document = LibXML::XML::Parser.string(response.body).parse - document.find('/posts/post').each do |post| + document = Nokogiri::XML(response.body) + document.search('/posts/post').each do |post| bookmarks << { :title => post['description'], :url => post['href'], diff --git a/config/application.rb b/config/application.rb index cafa4442d8c..76f3af581d9 100644 --- a/config/application.rb +++ b/config/application.rb @@ -173,7 +173,7 @@ module CanvasRails Dir.glob("#{Rails.root}/lib/ext/**/*.rb").each { |file| require file } # tell Rails to use the native XML parser instead of REXML - ActiveSupport::XmlMini.backend = 'LibXML' + ActiveSupport::XmlMini.backend = 'Nokogiri' class NotImplemented < StandardError; end diff --git a/gems/canvas_kaltura/canvas_kaltura.gemspec b/gems/canvas_kaltura/canvas_kaltura.gemspec index f6c3ac6b7b7..ce22cda05cb 100644 --- a/gems/canvas_kaltura/canvas_kaltura.gemspec +++ b/gems/canvas_kaltura/canvas_kaltura.gemspec @@ -16,7 +16,6 @@ Gem::Specification.new do |spec| spec.add_dependency "nokogiri" - spec.add_dependency "libxml-ruby", "~> 2.7" spec.add_dependency "canvas_http" spec.add_dependency "canvas_sort" spec.add_dependency "multipart" diff --git a/gems/canvas_kaltura/lib/canvas_kaltura/kaltura_client_v3.rb b/gems/canvas_kaltura/lib/canvas_kaltura/kaltura_client_v3.rb index bbadac8ce47..9daa052eaf2 100644 --- a/gems/canvas_kaltura/lib/canvas_kaltura/kaltura_client_v3.rb +++ b/gems/canvas_kaltura/lib/canvas_kaltura/kaltura_client_v3.rb @@ -21,7 +21,6 @@ require 'csv' require 'net/http' require 'uri' require 'nokogiri' -require 'libxml' require 'multipart' diff --git a/gems/plugins/moodle_importer/moodle_importer.gemspec b/gems/plugins/moodle_importer/moodle_importer.gemspec index 30ecf5f6b24..a1eb75fb7a3 100644 --- a/gems/plugins/moodle_importer/moodle_importer.gemspec +++ b/gems/plugins/moodle_importer/moodle_importer.gemspec @@ -18,6 +18,5 @@ Gem::Specification.new do |s| s.add_dependency "rails", ">= 3.2", "< 4.2" s.add_dependency "moodle2cc", "0.2.16" - s.add_dependency "happymapper", "0.4.1" s.add_dependency "thor", "0.18.1" end diff --git a/lib/delicious.rb b/lib/delicious.rb index 91de94c2a32..63d311b47c1 100644 --- a/lib/delicious.rb +++ b/lib/delicious.rb @@ -33,8 +33,7 @@ module Delicious response = http.request(request) case response when Net::HTTPSuccess - require 'libxml' - updated = LibXML::XML::Parser.string(response.body).parse.child["time"] + updated = Nokogiri::XML(response.body).root["time"] return Time.parse(updated) else response.error! @@ -47,8 +46,7 @@ module Delicious response = http.request(request) case response when Net::HTTPSuccess - require 'libxml' - code = LibXML::XML::Parser.string(response.body).parse.child["code"] + code = Nokogiri::XML(response.body).root["code"] return code == 'done' else response.error!