Skip to content

Commit

Permalink
Rename FileComponent to be the Legacy::FileComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne authored and thatbudakguy committed Jan 31, 2025
1 parent c3bedea commit 87e41e4
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module Embed
module Legacy
class FileComponent < ViewComponent::Base
def initialize(viewer:)
@viewer = viewer
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions app/viewers/embed/viewer/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ module Embed
module Viewer
class File < CommonViewer
def component
FileComponent
Legacy::FileComponent
end

def importmap
'file'
'legacy_file'
end

def height
Expand Down
2 changes: 1 addition & 1 deletion config/importmap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pin "media", preload: true
pin "legacy_webarchive", preload: true
pin "file", preload: true
pin "legacy_file", preload: true
pin "document", preload: true
pin "legacy_3d", preload: true
pin "geo", preload: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'rails_helper'

RSpec.describe Embed::FileComponent, type: :component do
RSpec.describe Legacy::FileComponent, type: :component do
let(:request) do
Embed::Request.new(url: 'http://purl.stanford.edu/abc123')
end
Expand Down

0 comments on commit 87e41e4

Please sign in to comment.