Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
image: mysql
strategy:
matrix:
ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3', '3.4' ]
ruby: [ '3.3', '3.4', '4.0' ]
task: [ 'spec' ]
include:
- ruby: 2.7 # keep in sync with lowest version
- ruby: 3.3 # keep in sync with lowest version
task: rubocop
name: ${{ matrix.ruby }} rake ${{ matrix.task }}
steps:
Expand Down
11 changes: 10 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins:

AllCops:
NewCops: enable
TargetRubyVersion: 2.7
TargetRubyVersion: 3.3

Style/StringLiterals:
Enabled: false
Expand Down Expand Up @@ -92,3 +92,12 @@ Lint/EmptyBlock:

Naming/MethodParameterName:
Exclude: [spec/**/*.rb]

RSpec/Output:
Exclude: [spec/cases/*.rb]

Style/OneClassPerFile:
Exclude: [spec/cases/*.rb]

Naming/BlockForwarding:
EnforcedStyle: explicit
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gemspec
gem 'bump'
gem 'rake'
gem 'rspec'
gem 'activerecord', "~> 6.0"
gem 'activerecord'
gem 'ruby-progressbar'
gem 'rspec-rerun'
gem 'rspec-legacy_formatters'
Expand All @@ -19,4 +19,4 @@ gem 'base64'
gem 'bigdecimal'

gem 'mysql2', group: :mysql
gem 'sqlite3', '~> 1.4'
gem 'sqlite3'
114 changes: 64 additions & 50 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,99 +6,113 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activemodel (6.1.5)
activesupport (= 6.1.5)
activerecord (6.1.5)
activemodel (= 6.1.5)
activesupport (= 6.1.5)
activesupport (6.1.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
activemodel (8.1.3)
activesupport (= 8.1.3)
activerecord (8.1.3)
activemodel (= 8.1.3)
activesupport (= 8.1.3)
timeout (>= 0.4.0)
activesupport (8.1.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
json
logger (>= 1.4.2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.3)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.9)
bigdecimal (3.1.9-java)
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (4.1.0)
bigdecimal (4.1.0-java)
bump (0.10.0)
concurrent-ruby (1.1.9)
diff-lcs (1.5.0)
i18n (1.10.0)
concurrent-ruby (1.3.6)
connection_pool (3.0.2)
diff-lcs (1.6.2)
drb (2.2.3)
i18n (1.14.8)
concurrent-ruby (~> 1.0)
json (2.10.2)
json (2.10.2-java)
language_server-protocol (3.17.0.4)
json (2.19.3)
json (2.19.3-java)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
logger (1.7.0)
mini_portile2 (2.8.7)
minitest (5.15.0)
mini_portile2 (2.8.9)
minitest (6.0.3)
drb (~> 2.0)
prism (~> 1.5)
mutex_m (0.3.0)
mysql2 (0.5.7)
bigdecimal
parser (3.3.8.0)
parser (3.3.11.1)
ast (~> 2.4.1)
racc
prism (1.4.0)
prism (1.9.0)
racc (1.8.1)
racc (1.8.1-java)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.10.0)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
rake (13.3.1)
regexp_parser (2.11.3)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (~> 3.13.0)
rspec-legacy_formatters (1.0.2)
rspec (~> 3.0)
rspec-mocks (3.11.0)
rspec-mocks (3.13.8)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (~> 3.13.0)
rspec-rerun (1.1.0)
rspec (~> 3.0)
rspec-support (3.11.0)
rubocop (1.75.2)
rspec-support (3.13.7)
rubocop (1.86.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.44.0, < 2.0)
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.44.1)
rubocop-ast (1.49.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
prism (~> 1.7)
rubocop-rake (0.7.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
rubocop-rspec (3.5.0)
rubocop-rspec (3.9.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop (~> 1.81)
ruby-progressbar (1.13.0)
sqlite3 (1.7.3)
securerandom (0.4.1)
sqlite3 (2.9.2)
mini_portile2 (~> 2.8.0)
tzinfo (2.0.4)
timeout (0.6.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
zeitwerk (2.5.4)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
uri (1.1.1)

PLATFORMS
java
ruby

DEPENDENCIES
activerecord (~> 6.0)
activerecord
base64
benchmark
bigdecimal
Expand All @@ -115,7 +129,7 @@ DEPENDENCIES
rubocop-rake
rubocop-rspec
ruby-progressbar
sqlite3 (~> 1.4)
sqlite3

BUNDLED WITH
2.3.12
4 changes: 2 additions & 2 deletions lib/parallel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def map(source, options = {}, &block)

if options[:in_processes] && options[:in_threads]
raise ArgumentError, "Please specify only one of `in_processes` or `in_threads`."
elsif RUBY_PLATFORM =~ (/java/) && !options[:in_processes]
elsif RUBY_PLATFORM =~ /java/ && !options[:in_processes]
method = :in_threads
size = options[method] || processor_count
elsif options[:in_threads]
Expand Down Expand Up @@ -621,7 +621,7 @@ def process_incoming_jobs(read, write, job_factory, options, &block)
# https://github.com/rspec/rspec-support/blob/673133cdd13b17077b3d88ece8d7380821f8d7dc/lib/rspec/support.rb#L132-L140
rescue NoMemoryError, SignalException, Interrupt, SystemExit # rubocop:disable Lint/ShadowedException
raise $!
rescue Exception # # rubocop:disable Lint/RescueException
rescue Exception # rubocop:disable Lint/RescueException
ExceptionWrapper.new($!)
end

Expand Down
2 changes: 1 addition & 1 deletion parallel.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Gem::Specification.new name, Parallel::VERSION do |s|
}
s.files = `git ls-files lib MIT-LICENSE.txt`.split("\n")
s.license = "MIT"
s.required_ruby_version = '>= 2.7'
s.required_ruby_version = '>= 3.3'
end
2 changes: 1 addition & 1 deletion spec/parallel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
describe Parallel do
worker_types = ["threads"]
worker_types << "processes" if Process.respond_to?(:fork)
worker_types << "ractors" if defined?(Ractor)
worker_types << "ractors" if defined?(Ractor) && RUBY_VERSION < "4.0.0" # TODO: need new code for ruby 4 ractors

def time_taken
t = Time.now.to_f
Expand Down
Loading