Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 3ef7dcb

Browse files
committed
Remove JRuby hacks, add 9.1 to CI matrix
1 parent c65fd20 commit 3ef7dcb

File tree

8 files changed

+10
-66
lines changed

8 files changed

+10
-66
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ jobs:
2727
- 2.4
2828
- 2.3
2929
- ruby-head
30+
- jruby-9.1
3031
- jruby-9.2
3132
- jruby-head
3233
fail-fast: false
33-
continue-on-error: ${{ matrix.ruby == 'jruby-9.2' || endsWith(matrix.ruby, 'head') }}
34+
continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
3435
steps:
3536
- uses: actions/checkout@v2
3637
- uses: ruby/setup-ruby@v1

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

cucumber.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
<%
2-
exclusions = []
3-
exclusions << ' --tags ~@no-jruby' if RUBY_PLATFORM == 'java'
4-
%>
5-
default: --require features --strict --format progress --tags ~@wip<%= exclusions.join %> features
1+
default: --require features --strict --format progress --tags ~@wip features
62
wip: --require features --tags @wip:30 --wip features

lib/rspec/core/bisect/shell_command.rb

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ def command_for(locations, server)
1919
parts = []
2020

2121
parts << RUBY << load_path
22-
parts << open3_safe_escape(RSpec::Core.path_to_executable)
22+
parts << escape(RSpec::Core.path_to_executable)
2323

2424
parts << "--format" << "bisect-drb"
2525
parts << "--drb-port" << server.drb_port
2626

2727
parts.concat(reusable_cli_options)
28-
parts.concat(locations.map { |l| open3_safe_escape(l) })
28+
parts.concat(locations.map { |l| escape(l) })
2929

3030
parts.join(" ")
3131
end
@@ -64,15 +64,6 @@ def spec_opts_without_bisect
6464
private
6565

6666
include RSpec::Core::ShellEscape
67-
# On JRuby, Open3.popen3 does not handle shellescaped args properly:
68-
# https://github.com/jruby/jruby/issues/2767
69-
if RSpec::Support::Ruby.jruby?
70-
# :nocov:
71-
alias open3_safe_escape quote
72-
# :nocov:
73-
else
74-
alias open3_safe_escape escape
75-
end
7667

7768
def environment_repro_parts
7869
bisect_environment_hash.map do |k, v|
@@ -109,7 +100,7 @@ def parsed_original_cli_options
109100
end
110101

111102
def load_path
112-
@load_path ||= "-I#{$LOAD_PATH.map { |p| open3_safe_escape(p) }.join(':')}"
103+
@load_path ||= "-I#{$LOAD_PATH.map { |p| escape(p) }.join(':')}"
113104
end
114105

115106
# Path to the currently running Ruby executable, borrowed from Rake:

script/custom_build_functions.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@ function run_cukes {
22
if [ -d features ]; then
33
echo "${PWD}/bin/cucumber"
44

5-
if is_mri_192; then
6-
# For some reason we get SystemStackError on 1.9.2 when using
7-
# the bin/cucumber approach below. That approach is faster
8-
# (as it avoids the bundler tax), so we use it on rubies where we can.
9-
bundle exec cucumber --strict
10-
elif is_jruby; then
5+
if is_jruby; then
116
echo "WARNING: Cucumber is skipped on JRuby on rspec-core due to" \
127
"excessive build times (>45 minutes) causing timeouts on Travis"
138
return 0

script/functions.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,7 @@ function run_cukes {
5353

5454
echo "${PWD}/bin/cucumber"
5555

56-
if is_mri_192; then
57-
# For some reason we get SystemStackError on 1.9.2 when using
58-
# the bin/cucumber approach below. That approach is faster
59-
# (as it avoids the bundler tax), so we use it on rubies where we can.
60-
bundle exec cucumber --strict
61-
elif is_jruby; then
56+
if is_jruby; then
6257
# For some reason JRuby doesn't like our improved bundler setup
6358
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \
6459
PATH="${PWD}/bin:$PATH" \

spec/rspec/core/formatters/html_formatter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def extract_backtrace_from(doc)
5757
end
5858

5959
describe 'produced HTML', :slow do
60-
it "is identical to the one we designed manually", :pending => (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby') do
60+
it "is identical to the one we designed manually", :pending => RSpec::Support::Ruby.jruby? do
6161
expect(actual_html).to eq(expected_html)
6262
end
6363
end

spec/rspec/core/formatters/snippet_extractor_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def obj.foo(arg)
279279
end
280280
end
281281

282-
context 'when Ripper cannot parse the source (which can happen on JRuby -- see jruby/jruby#2427)', :isolated_directory do
282+
context 'when Ripper cannot parse the source', :isolated_directory do
283283
let(:file_path) { 'invalid_source.rb' }
284284

285285
let(:line_number) { 1 }

0 commit comments

Comments
 (0)