Skip to content

Commit

Permalink
Drop support older ruby versions
Browse files Browse the repository at this point in the history
  • Loading branch information
alpaca-tc committed Dec 26, 2024
1 parent 3972048 commit 0b476dc
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 66 deletions.
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
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

0 comments on commit 0b476dc

Please sign in to comment.