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

Commit 1f35410

Browse files
authored
Merge pull request #593 from rspec/update-ci-build-scripts-2024-02-23-for-main
Updates from rspec-dev (2024-02-23)
2 parents c7f0e5f + 303c1b2 commit 1f35410

File tree

15 files changed

+39
-49
lines changed

15 files changed

+39
-49
lines changed

.github/dependabot.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 2023-12-25T16:07:50+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-02-23T14:21:37+00: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: 2

.github/workflows/ci.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 2023-12-25T16:07:50+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-02-23T14:21:37+00: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
name: RSpec CI

.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 2023-12-25T16:07:50+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-02-23T14:21:37+00: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

Gemfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ branch = File.read(File.expand_path("../maintenance-branch", __FILE__)).chomp
99
if File.exist?(library_path) && !ENV['USE_GIT_REPOS']
1010
gem lib, :path => library_path
1111
else
12-
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => branch
12+
if lib == 'rspec'
13+
gem 'rspec', :git => "https://github.com/rspec/rspec-metagem.git", :branch => branch
14+
else
15+
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => branch
16+
end
1317
end
1418
end
1519

@@ -27,6 +31,11 @@ else
2731
gem 'diff-lcs', '~> 1.4', '>= 1.4.3'
2832
end
2933

34+
if RUBY_VERSION >= '3.3.0'
35+
# This is being extracted in Ruby 3.4 and issues a warning on 3.3
36+
gem 'bigdecimal', :require => false
37+
end
38+
3039
if RUBY_VERSION < '2.3.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/)
3140
gem "childprocess", "< 1.0.0"
3241
elsif RUBY_VERSION < '2.0.0'

lib/rspec/support/caller_filter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class CallerFilter
2727
# when `CallerFilter.first_non_rspec_line` is called from the top level of a required
2828
# file, but it depends on if rubygems is loaded or not. We don't want to have to deal
2929
# with this complexity in our `RSpec.deprecate` calls, so we ignore it here.
30-
IGNORE_REGEX = Regexp.union(LIB_REGEX, "rubygems/core_ext/kernel_require.rb", "<internal:")
30+
IGNORE_REGEX = Regexp.union(LIB_REGEX, "rubygems/core_ext/kernel_require.rb", "<internal:", %r{/lib/ruby/[^/]+/bundled_gems\.rb})
3131

3232
if RSpec::Support::RubyFeatures.caller_locations_supported?
3333
# This supports args because it's more efficient when the caller specifies

script/ci_functions.sh

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2023-12-25T16:07:50+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-02-23T14:21:37+00: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:
@@ -30,41 +30,17 @@ nano_cmd="$(type -p gdate date | head -1)"
3030
nano_format="+%s%N"
3131
[ "$(uname -s)" != "Darwin" ] || nano_format="${nano_format/%N/000000000}"
3232

33-
travis_time_start() {
34-
travis_timer_id=$(printf %08x $(( RANDOM * RANDOM )))
35-
travis_start_time=$($nano_cmd -u "$nano_format")
36-
printf "travis_time:start:%s\r\e[0m" $travis_timer_id
37-
}
38-
39-
travis_time_finish() {
40-
local travis_end_time=$($nano_cmd -u "$nano_format")
41-
local duration=$(($travis_end_time-$travis_start_time))
42-
printf "travis_time:end:%s:start=%s,finish=%s,duration=%s\r\e[0m" \
43-
$travis_timer_id $travis_start_time $travis_end_time $duration
44-
}
45-
4633
fold() {
4734
local name="$1"
4835
local status=0
4936
shift 1
50-
if [ -n "$TRAVIS" ]; then
51-
printf "travis_fold:start:%s\r\e[0m" "$name"
52-
travis_time_start
53-
else
54-
echo "============= Starting $name ==============="
55-
fi
37+
echo "============= Starting $name ==============="
5638

5739
"$@"
5840
status=$?
5941

60-
[ -z "$TRAVIS" ] || travis_time_finish
61-
6242
if [ "$status" -eq 0 ]; then
63-
if [ -n "$TRAVIS" ]; then
64-
printf "travis_fold:end:%s\r\e[0m" "$name"
65-
else
66-
echo "============= Ending $name ==============="
67-
fi
43+
echo "============= Ending $name ==============="
6844
else
6945
STATUS="$status"
7046
fi

script/clone_all_rspec_repos

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2023-12-25T16:07:50+00:00 from the rspec-dev repo.
2+
# This file was generated on 2024-02-23T14:21:37+00: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
@@ -8,7 +8,7 @@ source script/functions.sh
88
if is_mri; then
99
pushd ..
1010

11-
clone_repo "rspec"
11+
clone_repo "rspec-metagem" "rspec"
1212
clone_repo "rspec-core"
1313
clone_repo "rspec-expectations"
1414
clone_repo "rspec-mocks"

script/cucumber.sh

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 2023-12-25T16:07:50+00:00 from the rspec-dev repo.
2+
# This file was generated on 2024-02-23T14:21:37+00: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: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# This file was generated on 2023-12-25T16:07:50+00:00 from the rspec-dev repo.
1+
# This file was generated on 2024-02-23T14:21:37+00: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 )"
55
source $SCRIPT_DIR/ci_functions.sh
66
source $SCRIPT_DIR/predicate_functions.sh
77

88
# If JRUBY_OPTS isn't set, use these.
9-
# see https://docs.travis-ci.com/user/ci-environment/
109
export JRUBY_OPTS=${JRUBY_OPTS:-"--server -Xcompile.invokedynamic=false"}
1110
SPECS_HAVE_RUN_FILE=specs.out
1211
MAINTENANCE_BRANCH=`cat maintenance-branch`
@@ -20,12 +19,18 @@ fi
2019
function clone_repo {
2120
if [ ! -d $1 ]; then # don't clone if the dir is already there
2221
if [ -z "$2" ]; then
22+
DIR_TARGET="$1"
23+
else
24+
DIR_TARGET="$2"
25+
fi
26+
27+
if [ -z "$3" ]; then
2328
BRANCH_TO_CLONE="${MAINTENANCE_BRANCH?}";
2429
else
25-
BRANCH_TO_CLONE="$2";
30+
BRANCH_TO_CLONE="$3";
2631
fi;
2732

28-
ci_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch ${BRANCH_TO_CLONE?}"
33+
ci_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch ${BRANCH_TO_CLONE?} ${DIR_TARGET?}"
2934
fi;
3035
}
3136

script/legacy_setup.sh

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 2023-12-25T16:07:50+00:00 from the rspec-dev repo.
2+
# This file was generated on 2024-02-23T14:21:37+00: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

0 commit comments

Comments
 (0)