Skip to content

Commit

Permalink
Rename WasSeedComponent to Legacy::WasSeedComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jan 30, 2025
1 parent a5925b8 commit c245036
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 17 deletions.
18 changes: 8 additions & 10 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# This configuration was generated by
# `rubocop --auto-gen-config --auto-gen-only-exclude`
# on 2023-12-01 19:40:01 UTC using RuboCop version 1.57.2.
# on 2025-01-30 22:10:33 UTC using RuboCop version 1.71.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 3
# Offense count: 2
Capybara/SpecificActions:
Exclude:
- 'spec/features/geo_viewer_spec.rb'
Expand All @@ -33,12 +33,11 @@ Metrics/MethodLength:
- 'app/viewers/embed/viewer/m3_viewer.rb'
- 'lib/embed/request.rb'

# Offense count: 14
# Offense count: 13
RSpec/AnyInstance:
Exclude:
- 'spec/components/embed/was_seed_component_spec.rb'
- 'spec/components/legacy/was_seed_component_spec.rb'
- 'spec/features/was_seed_viewer_spec.rb'
- 'spec/lib/embed/viewer/common_viewer_spec.rb'
- 'spec/lib/embed/viewer/m3_viewer_spec.rb'
- 'spec/models/embed/purl_spec.rb'
- 'spec/models/embed/was_time_map_spec.rb'
Expand All @@ -54,7 +53,7 @@ RSpec/ContextWording:
# Offense count: 23
RSpec/ExpectInHook:
Exclude:
- 'spec/components/embed/was_seed_component_spec.rb'
- 'spec/components/legacy/was_seed_component_spec.rb'
- 'spec/features/was_seed_viewer_spec.rb'
- 'spec/lib/embed/response_spec.rb'
- 'spec/lib/embed/viewer/file_spec.rb'
Expand All @@ -65,12 +64,12 @@ RSpec/IteratedExpectation:
Exclude:
- 'spec/models/embed/was_time_map_spec.rb'

# Offense count: 28
# Offense count: 29
# Configuration parameters: EnforcedStyle.
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
Exclude:
- 'spec/components/embed/was_seed_component_spec.rb'
- 'spec/components/legacy/was_seed_component_spec.rb'
- 'spec/features/was_seed_viewer_spec.rb'
- 'spec/lib/embed/request_spec.rb'
- 'spec/lib/embed/response_spec.rb'
Expand All @@ -94,12 +93,11 @@ RSpec/StubbedMock:
Exclude:
- 'spec/lib/embed/request_spec.rb'
- 'spec/lib/embed/response_spec.rb'
- 'spec/lib/embed/viewer/common_viewer_spec.rb'
- 'spec/lib/embed/viewer/file_spec.rb'
- 'spec/lib/embed/viewer/m3_viewer_spec.rb'
- 'spec/lib/embed/viewer/was_seed_spec.rb'

# Offense count: 65
# Offense count: 66
# Configuration parameters: AllowedConstants.
Style/Documentation:
Enabled: false
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module Embed
module Legacy
class WasSeedComponent < ViewComponent::Base
def initialize(viewer:)
@viewer = viewer
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions app/viewers/embed/viewer/was_seed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ class WasSeed < CommonViewer
delegate :druid, to: :@purl_object

def component
WasSeedComponent
Legacy::WasSeedComponent
end

def importmap
'webarchive'
'legacy_webarchive'
end

def stylesheet
'was_seed.css'
'legacy_was_seed.css'
end

def capture_list
Expand Down
2 changes: 1 addition & 1 deletion config/importmap.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Pin npm packages by running ./bin/importmap

pin "media", preload: true
pin "webarchive", preload: true
pin "legacy_webarchive", preload: true
pin "file", preload: true
pin "document", preload: true
pin "3d", preload: true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"test": "jest -c jest.config.js",
"build:css": "sass ./app/assets/stylesheets/companion_window.scss:./app/assets/builds/companion_window.css ./app/assets/stylesheets/media.scss:./app/assets/builds/media.css ./app/assets/stylesheets/file.scss:./app/assets/builds/file.css ./app/assets/stylesheets/geo.scss:./app/assets/builds/geo.css ./app/assets/stylesheets/m3.scss:./app/assets/builds/m3.css ./app/assets/stylesheets/model.scss:./app/assets/builds/model.css ./app/assets/stylesheets/was_seed.scss:./app/assets/builds/was_seed.css ./app/assets/stylesheets/sul_icons.scss:./app/assets/builds/sul_icons.css --no-source-map --load-path=node_modules --load-path=vendor/assets/javascripts"
"build:css": "sass ./app/assets/stylesheets/companion_window.scss:./app/assets/builds/companion_window.css ./app/assets/stylesheets/media.scss:./app/assets/builds/media.css ./app/assets/stylesheets/file.scss:./app/assets/builds/file.css ./app/assets/stylesheets/geo.scss:./app/assets/builds/geo.css ./app/assets/stylesheets/m3.scss:./app/assets/builds/m3.css ./app/assets/stylesheets/model.scss:./app/assets/builds/model.css ./app/assets/stylesheets/legacy_was_seed.scss:./app/assets/builds/legacy_was_seed.css ./app/assets/stylesheets/sul_icons.scss:./app/assets/builds/sul_icons.css --no-source-map --load-path=node_modules --load-path=vendor/assets/javascripts"
},
"private": true,
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'rails_helper'

RSpec.describe Embed::WasSeedComponent, type: :component do
RSpec.describe Legacy::WasSeedComponent, type: :component do
include WasTimeMapFixtures

let(:embed_request) do
Expand Down

0 comments on commit c245036

Please sign in to comment.