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

Commit 427e765

Browse files
committed
Merge pull request #2147 from rspec/update-travis-build-scripts-2016-01-01-for-master
Updates from rspec-dev (2016-01-01)
2 parents fcf21e6 + 9909d34 commit 427e765

13 files changed

+27
-19
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 2015-10-13T18:52:08-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-01T10:42:16+09: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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2015-10-13T18:52:08-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-01T10:42:16+09: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
@@ -19,6 +19,7 @@ rvm:
1919
- 2.0.0
2020
- 2.1
2121
- 2.2
22+
- 2.3.0
2223
- ruby-head
2324
- ree
2425
- rbx

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 2015-10-13T18:52:08-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-01T10:42:16+09: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/core/metadata.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ def self.relative_path(line)
4747
return nil if line == '-e:1'.freeze
4848
line
4949
rescue SecurityError
50+
# :nocov:
5051
nil
52+
# :nocov:
5153
end
5254

5355
# @private

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 2015-10-13T18:52:08-07:00 from the rspec-dev repo.
2+
# This file was generated on 2016-01-01T10:42:16+09: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 2015-10-13T18:52:08-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-01T10:42:16+09: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 2015-10-13T18:52:08-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-01T10:42:16+09: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 2015-10-13T18:52:08-07:00 from the rspec-dev repo.
2+
# This file was generated on 2016-01-01T10:42:16+09: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 2015-10-13T18:52:08-07:00 from the rspec-dev repo.
1+
# This file was generated on 2016-01-01T10:42:16+09: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/core/formatters/exception_presenter_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,9 @@ def read_failed_lines
464464
let(:exception) { instance_double(Exception, :backtrace => [ "#{__FILE__}:#{__LINE__}"]) }
465465

466466
it "is handled gracefully" do
467-
with_safe_set_to_level_that_triggers_security_errors do
468-
expect { read_failed_lines }.not_to raise_error
469-
end
467+
expect {
468+
with_safe_set_to_level_that_triggers_security_errors { read_failed_lines }
469+
}.not_to raise_error
470470
end
471471
end
472472

spec/rspec/core/formatters/html_snippet_extractor_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ module Formatters
1313
end
1414

1515
it "falls back on a default message when it gets a security error" do
16-
message = nil
17-
with_safe_set_to_level_that_triggers_security_errors do
18-
message = RSpec::Core::Formatters::HtmlSnippetExtractor.new.lines_around("blech", 8)
16+
message = with_safe_set_to_level_that_triggers_security_errors do
17+
RSpec::Core::Formatters::HtmlSnippetExtractor.new.lines_around("blech".taint, 8)
1918
end
2019
expect(message).to eq("# Couldn't get snippet for blech")
2120
end

spec/rspec/core/metadata_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ module Core
1717
it "gracefully returns nil if run in a secure thread" do
1818
# Ensure our call to `File.expand_path` is not cached as that is the insecure operation.
1919
Metadata.instance_eval { @relative_path_regex = nil }
20-
with_safe_set_to_level_that_triggers_security_errors do
21-
value = Metadata.relative_path(".")
22-
# on some rubies, File.expand_path is not a security error, so accept "." as well
23-
expect([nil, "."]).to include(value)
20+
21+
value = with_safe_set_to_level_that_triggers_security_errors do
22+
Metadata.relative_path(".")
2423
end
24+
25+
# on some rubies, File.expand_path is not a security error, so accept "." as well
26+
expect([nil, "."]).to include(value)
2527
end
2628

2729
it 'should not transform directories beginning with the same prefix' do

spec/support/helper_methods.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,19 @@ def ignoring_warnings
1414
end
1515

1616
def with_safe_set_to_level_that_triggers_security_errors
17+
result = nil
18+
1719
Thread.new do
1820
ignoring_warnings { $SAFE = SAFE_LEVEL_THAT_TRIGGERS_SECURITY_ERRORS }
19-
yield
21+
result = yield
2022
end.join
2123

2224
# $SAFE is not supported on Rubinius
2325
unless defined?(Rubinius)
2426
expect($SAFE).to eql 0 # $SAFE should not have changed in this thread.
2527
end
28+
29+
result
2630
end
2731

2832
end

0 commit comments

Comments
 (0)