Skip to content

Updates from main #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def force_update(branch, custom_pr_comment, skip_confirmation=false, opts={})
end

def update_files_in_repos(purpose, suffix='', opts={})
suffix = [BASE_BRANCH, ENV['BRANCH_SUFFIX']].join('-')
suffix = [BASE_BRANCH, ENV['BRANCH_SUFFIX']].compact.join('-')
branch_name = "update-#{purpose.gsub ' ', '-'}-#{ENV.fetch('BRANCH_DATE',Date.today.iso8601)}-for-#{suffix}"

each_project_with_common_build(opts) do |proj|
Expand Down
4 changes: 3 additions & 1 deletion ci/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ jobs:
- 2.5
- 2.4
- 2.3
- ruby-head
env:
-
DIFF_LCS_VERSION: "> 1.4.3"
include:
- ruby: ruby-head
env:
RUBY_HEAD: true
- ruby: jruby-9.2.13.0
env:
JRUBY_OPTS: "--dev"
Expand Down
22 changes: 22 additions & 0 deletions ci/script/predicate_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ function is_mri {
fi;
}

function is_ruby_head {
# This checks for the presence of our CI's ruby-head env variable
if [ -z ${RUBY_HEAD+x} ]; then
return 1
else
return 0
fi;
}

function supports_cross_build_checks {
if is_mri; then
# We don't run cross build checks on ruby-head
if is_ruby_head; then
return 1
else
return 0
fi
else
return 1
fi
}

function is_jruby {
if ruby -e "exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')"; then
# RUBY_ENGINE only returns 'ruby' on MRI.
Expand Down
2 changes: 1 addition & 1 deletion ci/script/run_build
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if style_and_lint_enforced; then
fold "rubocop" check_style_and_lint
fi

if is_mri; then
if supports_cross_build_checks; then
fold "one-by-one specs" run_specs_one_by_one
run_all_spec_suites
else
Expand Down
2 changes: 1 addition & 1 deletion common_plaintext_files/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github: [JonRowe]
github: [JonRowe, benoittgt]
open_collective: rspec
14 changes: 7 additions & 7 deletions common_plaintext_files/BUILD_DETAIL.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ $ bundle exec yard doc --no-cache
$ bin/yard doc --no-cache
```

## Rubocop
## RuboCop

We use [Rubocop](https://github.com/bbatsov/rubocop) to enforce style conventions on the project so
that the code has stylistic consistency throughout. Run with:
We use [RuboCop](https://github.com/rubocop-hq/rubocop) to enforce style
conventions on the project so that the code has stylistic consistency
throughout. Run with:

```
$ bundle exec rubocop lib
Expand All @@ -105,9 +106,9 @@ $ bundle exec rubocop lib
$ bin/rubocop lib
```

Our Rubocop configuration is a work-in-progress, so if you get a failure
due to a Rubocop default, feel free to ask about changing the
configuration. Otherwise, you'll need to address the Rubocop failure,
Our RuboCop configuration is a work-in-progress, so if you get a failure
due to a RuboCop default, feel free to ask about changing the
configuration. Otherwise, you'll need to address the RuboCop failure,
or, as a measure of last resort, by wrapping the offending code in
comments like `# rubocop:disable SomeCheck` and `# rubocop:enable SomeCheck`.

Expand Down Expand Up @@ -141,4 +142,3 @@ build for another repo, so our CI build includes a spec that runs the
spec suite of each of the _other_ project repos. Note that we only run
the spec suite, not the full build, of the other projects, as the spec
suite runs very quickly compared to the full build.

8 changes: 4 additions & 4 deletions common_plaintext_files/CONTRIBUTING.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ In general the process is:
2. Pin the repositories to each other.
3. Check they pass (go green).
4. Await review if appropriate.
5. Remove the commit from one. We will merge ignoring the failure.
6. Remove the commit from the other, check it passes with the other commit now on main.
5. Remove the commit from step 2. We will merge ignoring the failure.
6. Remove the commit from the other, check it passes with the other commit now on `main`.
7. Merge the other.
8. Rebuild the other main to check it still passes.
8. We will trigger builds for the `main` branch of affected repositories to check if everything is in order.

Steps 5-8 should happen contiguously (e.g. one after another but within a short timespan)
Steps 5-8 should happen continuously (e.g. one after another but within a short timespan)
so that we don't leave a broken main around. It is important to triage that build process
and revert if necessary.
3 changes: 1 addition & 2 deletions common_plaintext_files/DEVELOPMENT.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Here's a short, non-exhaustive checklist of things we typically ask contributors
- [ ] New behavior is covered by tests and all tests are passing.
- [ ] No Ruby warnings are issued by your changes.
- [ ] Documentation reflects changes and renders as intended.
- [ ] Rubocop passes (e.g. `bundle exec rubocop lib`).
- [ ] RuboCop passes (e.g. `bundle exec rubocop lib`).
- [ ] Commits are squashed into a reasonable number of logical changesets that tell an easy-to-follow story.
- [ ] No changelog entry is necessary (we'll add it as part of the merge process!)

Expand All @@ -124,4 +124,3 @@ $ bin/yard server --reload
```

Then navigate to `localhost:8808` to view the rendered docs.