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
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
image: mysql
strategy:
matrix:
ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3' ]
ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3', '3.4' ]
task: [ 'spec' ]
include:
- ruby: 2.7 # keep in sync with lowest version
Expand Down
6 changes: 5 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require:
plugins:
- rubocop-rake
- rubocop-rspec

Expand Down Expand Up @@ -74,6 +74,10 @@ RSpec/VerifiedDoubles:
RSpec/ExampleLength:
Enabled: false

# does not understand .should
RSpec/NoExpectationExample:
Enabled: false

Style/CombinableLoops:
Enabled: false

Expand Down
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ gem 'rspec-legacy_formatters'
gem 'rubocop'
gem 'rubocop-rake'
gem 'rubocop-rspec'
gem 'benchmark'
gem 'logger'
gem 'mutex_m'
gem 'base64'
gem 'bigdecimal'

gem 'mysql2', group: :mysql
gem 'sqlite3', '~> 1.4'
61 changes: 39 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,34 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ast (2.4.2)
ast (2.4.3)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.9)
bigdecimal (3.1.9-java)
bump (0.10.0)
concurrent-ruby (1.1.9)
diff-lcs (1.5.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
json (2.7.1)
json (2.7.1-java)
language_server-protocol (3.17.0.3)
json (2.10.2)
json (2.10.2-java)
language_server-protocol (3.17.0.4)
lint_roller (1.1.0)
logger (1.7.0)
mini_portile2 (2.8.7)
minitest (5.15.0)
mutex_m (0.3.0)
mysql2 (0.5.6)
parser (3.3.0.5)
parser (3.3.8.0)
ast (~> 2.4.1)
racc
racc (1.7.3)
racc (1.7.3-java)
prism (1.4.0)
racc (1.8.1)
racc (1.8.1-java)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.9.0)
rexml (3.2.6)
regexp_parser (2.10.0)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
Expand All @@ -55,29 +62,34 @@ GEM
rspec-rerun (1.1.0)
rspec (~> 3.0)
rspec-support (3.11.0)
rubocop (1.62.1)
rubocop (1.75.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
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 (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.44.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.9.0)
rubocop (~> 1.19)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.44.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-rake (0.7.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
rubocop-rspec (3.5.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
ruby-progressbar (1.13.0)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
zeitwerk (2.5.4)

PLATFORMS
Expand All @@ -86,7 +98,12 @@ PLATFORMS

DEPENDENCIES
activerecord (~> 6.0)
base64
benchmark
bigdecimal
bump
logger
mutex_m
mysql2
parallel!
rake
Expand Down
2 changes: 1 addition & 1 deletion 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
1 change: 1 addition & 0 deletions spec/cases/each_with_ar_sqlite.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true
require './spec/cases/helper'
require "logger"
require "active_record"
require "sqlite3"
require "tempfile"
Expand Down
1 change: 1 addition & 0 deletions spec/parallel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ def normalize(result)
worker_types.each do |type|
it "does not leak memory in #{type}" do
pending if RUBY_ENGINE == 'jruby' # lots of objects ... GC does not seem to work ...
skip if RUBY_VERSION > "3.4.0" # randomly fails, so can't use pending
options = (RUBY_ENGINE == 'jruby' ? "-X+O" : "")
result = ruby("#{options} spec/cases/profile_memory.rb #{type} 2>&1").strip.split("\n").last
normalize(result).should == []
Expand Down