Skip to content

Commit

Permalink
Merge pull request #168 from projectblacklight/view_component3
Browse files Browse the repository at this point in the history
Stop supporting ViewComponent 2
  • Loading branch information
corylown authored Dec 18, 2024
2 parents 9f72bed + dc805ac commit fbde545
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 43 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
experimental: [false]
additional_engine_cart_rails_options: [""]
additional_name: [""]
view_component_version: ["~> 3.12"]
include:
- ruby: "3.1"
rails_version: 6.1.7
Expand All @@ -36,12 +35,6 @@ jobs:
blacklight_version: "github"
experimental: true
additional_name: Blacklight main branch
- ruby: "3.2"
rails_version: "7.0.4"
blacklight_version: "~> 7.0"
experimental: false
view_component_version: "~> 2.83"
additional_name: "/ ViewComponent 2"
- ruby: "3.3"
rails_version: "8.0.0"
blacklight_version: "~> 8.0"
Expand All @@ -57,7 +50,6 @@ jobs:
env:
RAILS_VERSION: ${{ matrix.rails_version }}
BLACKLIGHT_VERSION: ${{ matrix.blacklight_version }}
VIEW_COMPONENT_VERSION: ${{ matrix.view_component_version }}
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-action-cable --skip-coffee --skip-test ${{ matrix.additional_engine_cart_rails_options }}"
steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@
end

it 'renders the correct slide number' do
if VIEW_COMPONENT_VERSION < 3
expect(rendered).to have_css '[data-slide-to=\"4\"][data-bs-slide-to=\"4\"]'
else
expect(rendered).to have_css '[data-slide-to=\"5\"][data-bs-slide-to=\"5\"]'
end
expect(rendered).to have_css '[data-slide-to=\"5\"][data-bs-slide-to=\"5\"]'
end

context 'when the presenter returns nothing' do
Expand Down
6 changes: 0 additions & 6 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
require 'rspec/its'
require 'rspec/rails'
require 'rspec/active_model/mocks'
require 'view_component_v2_test_helpers'

require 'selenium-webdriver'

Expand All @@ -20,9 +19,4 @@
RSpec.configure do |c|
c.infer_spec_type_from_file_location!
c.include ViewComponent::TestHelpers, type: :component
view_component_version = Gem.loaded_specs['view_component'].version
VIEW_COMPONENT_VERSION = view_component_version.segments.first
if VIEW_COMPONENT_VERSION < 3
c.include ViewComponentV2TestHelpers, type: :component
end
end
4 changes: 0 additions & 4 deletions spec/test_app_templates/Gemfile.extra
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@ if ENV['BLACKLIGHT_VERSION'] == 'github'
elsif ENV['BLACKLIGHT_VERSION'] && !ENV['BLACKLIGHT_VERSION'].empty?
gem 'blacklight', ENV['BLACKLIGHT_VERSION']
end

unless ENV['VIEW_COMPONENT_VERSION'].to_s == ""
gem 'view_component', ENV.fetch('VIEW_COMPONENT_VERSION')
end
20 changes: 0 additions & 20 deletions spec/view_component_v2_test_helpers.rb

This file was deleted.

0 comments on commit fbde545

Please sign in to comment.