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

Commit 9fb9de1

Browse files
authored
Merge pull request #291 from rspec/update-travis-build-scripts-2016-07-14-for-master
Updates from rspec-dev (2016-07-14)
2 parents 287a19e + 695cd3a commit 9fb9de1

14 files changed

+43
-13
lines changed

.rubocop_rspec_base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2016-06-14T22:22:15-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# This file contains defaults for RSpec projects. Individual projects

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2016-06-14T22:22:15-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
language: ruby
@@ -22,6 +22,7 @@ rvm:
2222
- 2.1
2323
- 2.2.5
2424
- 2.3.1
25+
- 2.4.0-preview1
2526
- ruby-head
2627
- ree
2728
- rbx
@@ -35,11 +36,14 @@ matrix:
3536
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
3637
- rvm: jruby
3738
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
39+
- rvm: jruby-9.1.2.0
40+
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
3841
allow_failures:
3942
- rvm: jruby-head
4043
env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
4144
- rvm: ruby-head
4245
- rvm: rbx
46+
- rvm: 2.4.0-preview1
4347
fast_finish: true
4448
branches:
4549
only:

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ end
1616
### dep for ci/coverage
1717
gem 'simplecov', '~> 0.8'
1818

19+
if RUBY_VERSION < '2.0.0' || RUBY_ENGINE == 'java'
20+
gem 'json', '< 2.0.0'
21+
end
22+
1923
gem 'rubocop', "~> 0.23.0", :platform => [:ruby_19, :ruby_20, :ruby_21]
2024

2125
eval File.read('Gemfile-custom') if File.exist?('Gemfile-custom')

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2016-06-14T22:22:15-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
version: "{build}"

lib/rspec/support/ruby_features.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ def jruby?
2828
RUBY_PLATFORM == 'java'
2929
end
3030

31+
def jruby_9000?
32+
jruby? && JRUBY_VERSION >= '9.0.0.0'
33+
end
34+
3135
def rbx?
3236
defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
3337
end

lib/rspec/support/spec/shell_out.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ def strip_known_warnings(input)
6060
# Ignore bundler + rubygems warning.
6161
l =~ %r{site_ruby/\d\.\d\.\d/rubygems} ||
6262
# This is required for windows for some reason
63-
l =~ %r{lib/bundler/rubygems}
63+
l =~ %r{lib/bundler/rubygems} ||
64+
# This is a JRuby file that generates warnings on 9.0.3.0
65+
l =~ %r{lib/ruby/stdlib/jar}
6466
end.join("\n")
6567
end
6668

script/clone_all_rspec_repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2016-06-14T22:22:15-07:00 from the rspec-dev repo.
2+
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2016-06-14T22:22:15-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

script/predicate_functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2016-06-14T22:22:15-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
function is_mri {

script/run_build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2016-06-14T22:22:15-07:00 from the rspec-dev repo.
2+
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/travis_functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2016-06-14T22:22:15-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-07-14T09:50:14+10:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# Taken from:

spec/rspec/support/encoded_string_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module RSpec::Support
6363
end
6464

6565
# See JRuby issue https://github.com/jruby/jruby/issues/2580
66-
it 'replaces invalid byte sequences with the REPLACE string', :pending => RSpec::Support::Ruby.jruby? do
66+
it 'replaces invalid byte sequences with the REPLACE string', :pending => RSpec::Support::Ruby.jruby? && !RSpec::Support::Ruby.jruby_9000? do
6767
resulting_string = build_encoded_string(string, target_encoding).to_s
6868
replacement = EncodedString::REPLACE * 3
6969
expected_string = "I have a bad byt#{replacement}".force_encoding(target_encoding)

spec/rspec/support/method_signature_verifier_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def arity_kw(x, y:1, z:2); end
288288
expect(valid?(nil, :a => 1)).to eq(false)
289289
end
290290

291-
it 'mentions the invalid keyword args in the error', :pending => RUBY_ENGINE == 'jruby' do
291+
it 'mentions the invalid keyword args in the error', :pending => RSpec::Support::Ruby.jruby? && !RSpec::Support::Ruby.jruby_9000? do
292292
expect(error_for(nil, :a => 0, :b => 1)).to \
293293
eq("Invalid keyword arguments provided: a, b")
294294
end
@@ -308,7 +308,7 @@ def arity_kw(x, y:1, z:2); end
308308
expect(args).to eq([nil, { :y => 1 }])
309309
end
310310

311-
it 'mentions the arity and optional kw args in the description', :pending => RUBY_ENGINE == 'jruby' do
311+
it 'mentions the arity and optional kw args in the description', :pending => RSpec::Support::Ruby.jruby? && !RSpec::Support::Ruby.jruby_9000? do
312312
expect(signature_description).to eq("arity of 1 and optional keyword args (:y, :z)")
313313
end
314314

spec/rspec/support/ruby_features_spec.rb

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ module Support
4848
expect(Ruby).to_not be_rbx
4949
end
5050

51+
specify "jruby_9000? reflects the state of RUBY_PLATFORM and JRUBY_VERSION" do
52+
stub_const("RUBY_PLATFORM", "java")
53+
stub_const("JRUBY_VERSION", "")
54+
expect(Ruby).to_not be_jruby_9000
55+
stub_const("JRUBY_VERSION", "9.0.3.0")
56+
expect(Ruby).to be_jruby_9000
57+
stub_const("RUBY_PLATFORM", "")
58+
expect(Ruby).to_not be_jruby_9000
59+
end
60+
5161
specify "rbx? reflects the state of RUBY_ENGINE" do
5262
hide_const("RUBY_ENGINE")
5363
expect(Ruby).to be_mri
@@ -131,11 +141,17 @@ module Support
131141
end
132142
end
133143

134-
context '9.x.x.x', :if => JRUBY_VERSION.start_with?('9.') do
144+
context '9.0.x.x', :if => JRUBY_VERSION.start_with?('9.0') do
135145
it 'reports wrong line number' do
136146
expect(line_number).to eq(2)
137147
end
138148
end
149+
150+
context '9.1.x.x', :if => JRUBY_VERSION.start_with?('9.1') do
151+
it 'is supported' do
152+
expect(line_number).to eq(1)
153+
end
154+
end
139155
end
140156
end
141157
end

0 commit comments

Comments
 (0)