Skip to content

Commit

Permalink
Drop ruby 2.7 and Rails 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-brousse committed Jul 13, 2024
1 parent 5d9f8b3 commit 2f64aa2
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 68 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,21 @@ jobs:
strategy:
matrix:
versions:
- { ruby: "2.7", rails: "6.0", rubygems: "default" }
- { ruby: "3.0", rails: "6.0", rubygems: "default" }
- { ruby: "2.7", rails: "6.1", rubygems: "default" }
- { ruby: "3.0", rails: "6.1", rubygems: "default" }
- { ruby: "3.1", rails: "6.1", rubygems: "default" }
- { ruby: "2.7", rails: "7.0", rubygems: "default" }
- { ruby: "3.2", rails: "6.1", rubygems: "default" }
- { ruby: "3.3", rails: "6.1", rubygems: "default" }
- { ruby: "3.0", rails: "7.0", rubygems: "default" }
- { ruby: "3.1", rails: "7.0", rubygems: "default" }
- { ruby: "3.2", rails: "7.0", rubygems: "default" }
- { ruby: "2.7", rails: "7.1", rubygems: "default" }
- { ruby: "3.3", rails: "7.0", rubygems: "default" }
- { ruby: "3.0", rails: "7.1", rubygems: "default" }
- { ruby: "3.1", rails: "7.1", rubygems: "default" }
- { ruby: "3.2", rails: "7.1", rubygems: "default" }
- { ruby: "3.0", rails: "head", rubygems: "latest" }
- { ruby: "3.3", rails: "7.1", rubygems: "default" }
- { ruby: "3.1", rails: "head", rubygems: "latest" }
- { ruby: "3.2", rails: "head", rubygems: "latest" }
- { ruby: "3.3", rails: "head", rubygems: "latest" }
action_text: ['with', 'without']
view_component: ['2.0', '3.0']

Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inherit_from: .rubocop_todo.yml

AllCops:
SuggestExtensions: false
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0
NewCops: enable
Exclude:
- '.git/**/*'
Expand Down
9 changes: 0 additions & 9 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# frozen_string_literal: true

appraise "rails-6.0_vc-2.0" do
gem "rails", "~> 6.0.0"
end

appraise "rails-6.0_vc-3.0" do
gem "rails", "~> 6.0.0"
gem "view_component", ">= 3.0.0", "< 4.0"
end

appraise "rails-6.1_vc-2.0" do
gem "rails", "~> 6.1.0"
end
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Added parent_component configuration for field components (#160)

### Removed
- Drop Ruby 2.7 support (#164)
- Drop Rails 6.0 support (#164)

## [0.2.6] - 2023-10-11
### Added
- Support for Rails 7.1 (#151)
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ PATH
remote: .
specs:
view_component-form (0.2.6)
actionview (>= 6.0.0, < 7.2)
activesupport (>= 6.0.0, < 7.2)
actionview (>= 6.1.0, < 7.2)
activesupport (>= 6.1.0, < 7.2)
view_component (>= 2.34.0, < 4.0)
zeitwerk (~> 2.5)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Development of this gem is sponsored by:

## Compatibility

> [!WARNING]
> [!WARNING]
> **This is an early release, and the API is subject to change until `v1.0.0`.**
This gem is tested on:

- Rails 6.0+ (with or without ActionText)
- Ruby 2.7+
- Rails 6.1+ (with or without ActionText)
- Ruby 3.0+

## Installation

Expand Down
20 changes: 0 additions & 20 deletions gemfiles/rails_6.0_vc_2.0.gemfile

This file was deleted.

21 changes: 0 additions & 21 deletions gemfiles/rails_6.0_vc_3.0.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ApplicationController < ActionController::Base
require "capybara/rspec"
require "ostruct"

Dir["./spec/support/**/*.rb"].sort.each { |f| require f }
Dir["./spec/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
Expand Down
5 changes: 4 additions & 1 deletion spec/view_component/form/builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
let(:default_form_builder_output) { default_form_builder.public_send(method_name, *args, **kwargs, &block) }

context "when calling ##{method_name}" do
it { is_expected.to eq(default_form_builder_output) }
# NOTE: freeze time to force #time_select test use same time
freeze_time do
it { is_expected.to eq(default_form_builder_output) }
end
end
end

Expand Down
6 changes: 3 additions & 3 deletions view_component-form.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Gem::Specification.new do |spec|
spec.files = Dir["CHANGELOG.md", "LICENSE.txt", "README.md", "app/**/*", "lib/**/*"]
spec.require_paths = ["lib"]

spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")

spec.add_dependency "actionview", [">= 6.0.0", "< 7.2"]
spec.add_dependency "activesupport", [">= 6.0.0", "< 7.2"]
spec.add_dependency "actionview", [">= 6.1.0", "< 7.2"]
spec.add_dependency "activesupport", [">= 6.1.0", "< 7.2"]
spec.add_dependency "view_component", [">= 2.34.0", "< 4.0"]
spec.add_dependency "zeitwerk", ["~> 2.5"]
end

0 comments on commit 2f64aa2

Please sign in to comment.