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

Drop older ruby versions #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
76 changes: 15 additions & 61 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
version: 2.1

executors:
ruby_2_5:
docker:
- image: ruby:2.5

ruby_2_6:
docker:
- image: ruby:2.6

ruby_2_7:
docker:
- image: ruby:2.7

ruby_3_0:
docker:
- image: ruby:3.0

ruby_3_1:
docker:
- image: ruby:3.1
Expand All @@ -29,61 +13,31 @@ executors:
docker:
- image: ruby:3.3

commands:
jobs:
run_test:
parameters:
executor:
type: string
executor: << parameters.executor >>
resource_class: small
steps:
- checkout
- run: command -v bundle &> /dev/null || gem install bundler
- run: bundle install
- run: bundle exec rspec
- run: bundle exec rubocop

jobs:
ruby_2_5:
executor: ruby_2_5
steps:
- run: gem install bundler -v 2.3.26
- run_test

ruby_2_6:
executor: ruby_2_6
steps:
- run_test

ruby_2_7:
executor: ruby_2_7
steps:
- run_test

ruby_3_0:
executor: ruby_3_0
steps:
- run_test

ruby_3_1:
executor: ruby_3_1
steps:
- run_test

ruby_3_2:
executor: ruby_3_2
steps:
- run_test

ruby_3_3:
executor: ruby_3_3
steps:
- run_test

workflows:
version: 2

test:
jobs:
- ruby_2_5
- ruby_2_6
- ruby_2_7
- ruby_3_0
- ruby_3_1
- ruby_3_2
- ruby_3_3
- run_test:
name: Ruby 3.1
executor: ruby_3_1
- run_test:
name: Ruby 3.2
executor: ruby_3_2
- run_test:
name: Ruby 3.3
executor: ruby_3_3
Comment on lines +35 to +43
Copy link

@mkmn mkmn Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, matrix jobs are better.

2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AllCops:
- 'gemfiles/**/*'
- 'spec/samples/**/*'
- Gemfile
TargetRubyVersion: 2.5
TargetRubyVersion: 3.1
DisplayCopNames: true
NewCops: disable

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [Unreleased]

- Drop support older ruby versions #10

## [2.0.2]

- Support heredoc #4
Expand Down
4 changes: 2 additions & 2 deletions lib/textlint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
require 'textlint/server'

module Textlint
BREAK_RE = /\r?\n/.freeze
LAST_LINE_RE = /(?!\r?\n).*\z/.freeze
BREAK_RE = /\r?\n/
LAST_LINE_RE = /(?!\r?\n).*\z/

class Error < StandardError; end
class SyntaxError < Error; end
Expand Down
2 changes: 1 addition & 1 deletion lib/textlint/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module Textlint
class Parser
class RubyToTextlintAST < ::Ripper::Filter
EVENT_RE = /\Aon_(?<name>\w*)_(?:beg|end)\z/.freeze
EVENT_RE = /\Aon_(?<name>\w*)_(?:beg|end)\z/
TSTRING_BEG_EVENTS = %w[tstring qwords heredoc].freeze

# @param src [String]
Expand Down
2 changes: 1 addition & 1 deletion textlint.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = ''
spec.homepage = 'https://github.com/kufu/textlint-ruby'
spec.license = 'MIT'
spec.required_ruby_version = '>= 2.5.0'
spec.required_ruby_version = '>= 3.1.0'

spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['source_code_uri'] = 'https://github.com/kufu/textlint-ruby'
Expand Down