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

Commit cdbf3cb

Browse files
committed
Merge pull request #2950 from rspec/update-ffi-ruby-23-windows
Fix builds by pinning gem versions (and wip try to update cucumber)
1 parent 32d5821 commit cdbf3cb

File tree

8 files changed

+30
-11
lines changed

8 files changed

+30
-11
lines changed

Gemfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ group :documentation do
2020
gem 'github-markup', :platform => :mri
2121
end
2222

23-
gem 'ffi', '~> 1.15.0'
23+
if RUBY_VERSION < '2.4.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/)
24+
gem 'ffi', '< 1.15'
25+
else
26+
gem 'ffi', '~> 1.15.0'
27+
end
2428

2529
gem "jruby-openssl", platforms: :jruby
2630

cucumber.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
default: --require features --strict --format progress --tags 'not @wip' features
1+
<%
2+
3+
NOT_WIP_TAG = '"not @wip"'
4+
NOT_JRUBY_TAG = '"not @no-jruby"'
5+
6+
exclusions = []
7+
exclusions << " --tags #{NOT_JRUBY_TAG}" if RUBY_PLATFORM == 'java'
8+
%>
9+
default: --require features --strict --format progress --tags <%= NOT_WIP_TAG %><%= exclusions.join %> features
210
wip: --require features --tags @wip:30 --wip features

features/command_line/init.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Feature: `--init` option
2525
Scenario: Accept and use the recommended settings in `spec_helper` (which are initially commented out)
2626
Given I have a brand new project with no files
2727
And I have run `rspec --init`
28-
When I accept the recommended settings by removing `=begin` and `=end` from `spec/spec_helper.rb`
28+
When I accept the recommended settings by removing `=begin` and `=end` from `spec_helper.rb`
2929
And I create "spec/addition_spec.rb" with the following content:
3030
"""ruby
3131
RSpec.describe "Addition" do

features/metadata/described_class.feature

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ Feature: described class
66
Scenario: Access the described class from the example
77
Given a file named "spec/example_spec.rb" with:
88
"""ruby
9-
RSpec.describe Fixnum do
9+
RSpec.describe Symbol do
10+
it "is available as described_class" do
11+
expect(described_class).to eq(Symbol)
12+
end
13+
1014
describe 'inner' do
1115
describe String do
1216
it "is available as described_class" do

features/step_definitions/additional_cli_steps.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
set_environment_variable('RUBYOPT', ENV['RUBYOPT'] + " -I#{gem_dir}/lib")
115115
end
116116

117-
When /I accept the recommended settings by removing `=begin` and `=end` from `spec\/spec_helper.rb`/ do
117+
When('I accept the recommended settings by removing `=begin` and `=end` from `spec_helper.rb`') do
118118
cd('.') do
119119
spec_helper = File.read("spec/spec_helper.rb")
120120
expect(spec_helper).to include("=begin", "=end")

features/support/require_expect_syntax_in_aruba_specs.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
if defined?(Cucumber)
22
require 'shellwords'
3-
Before('not @with-clean-spec-opts') do
3+
exclude_allow_should_syntax = 'not @allow-should-syntax'
4+
exclude_with_clean_spec_ops = 'not @with-clean-spec-opts'
5+
Before(exclude_allow_should_syntax, exclude_with_clean_spec_ops) do
46
set_environment_variable('SPEC_OPTS', "-r#{Shellwords.escape(__FILE__)}")
57
end
68
else

features/support/ruby_27_support.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
Before "@ruby-2-7" do |scenario|
2-
unless RUBY_VERSION.to_f == 2.7
3-
warn "Skipping scenario #{scenario.name} on Ruby v#{RUBY_VERSION}"
4-
skip_this_scenario
1+
Around "@ruby-2-7" do |scenario, block|
2+
if RUBY_VERSION.to_f == 2.7
3+
block.call
4+
else
5+
skip_this_scenario "Skipping scenario #{scenario.name} on Ruby v#{RUBY_VERSION}"
56
end
67
end

rspec-core.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Gem::Specification.new do |s|
4444
s.add_runtime_dependency "rspec-support", "~> #{RSpec::Core::Version::STRING.split('.')[0..1].concat(['3']).join('.')}"
4545
end
4646

47-
s.add_development_dependency 'cucumber', '>= 3.2', '!= 4.0.0', '< 8.0.0'
47+
s.add_development_dependency 'cucumber', '>= 3.2'
4848
s.add_development_dependency "minitest", "~> 5.3"
4949
s.add_development_dependency "aruba", "~> 0.14.9"
5050

0 commit comments

Comments
 (0)