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

Stop using and depending on REXML #123

Merged
merged 2 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions app/controllers/admin/dashboard_controller.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# frozen_string_literal: true

class Admin::DashboardController < Admin::BaseController
require "open-uri"
require "time"
require "rexml/document"

def index
today = Time.zone.now.strftime("%Y-%m-%d 00:00")

Expand Down
4 changes: 0 additions & 4 deletions app/controllers/admin/themes_controller.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# frozen_string_literal: true

require "open-uri"
require "time"
require "rexml/document"

class Admin::ThemesController < Admin::BaseController
def index
@themes = Theme.find_all
Expand Down
5 changes: 1 addition & 4 deletions lib/publify_core/testing_support/feed_assertions.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# frozen_string_literal: true

require "feedjira"
require "rexml/document"

module PublifyCore
module TestingSupport
module FeedAssertions
# TODO: Clean up use of these Test::Unit style expectations
def assert_xml(xml)
expect(xml).not_to be_empty
expect do
assert REXML::Document.new(xml)
end.not_to raise_error
expect { Nokogiri::XML.parse(xml) }.not_to raise_error
end

def assert_atom10(feed, count)
Expand Down