From 1ccc1d0c9f8962a7ba5cfd08003780eb01b62823 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Tue, 21 Sep 2021 23:11:16 +0200 Subject: [PATCH] switch default branch from master to main --- .github/CONTRIBUTING.md | 6 +- .github/ISSUE_TEMPLATE/good_first_issue.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/codecov.yml | 1 + .github/workflows/bbc-ubuntu.yml | 2 +- .github/workflows/bc-ubuntu.yml | 2 +- .github/workflows/build-ubuntu.yml | 2 +- .github/workflows/build-windows.yml | 4 +- .../workflows/generate-readme-examples.yml | 2 +- README.md | 200 +++++++++--------- apis/differences.md | 2 +- build.gradle | 28 +-- 12 files changed, 127 insertions(+), 126 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 47d20c68e..b36bac635 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -12,7 +12,7 @@ Following a few guidelines so that others can quickly benefit from your contribu ## Code of Conduct This project and everyone participating in it is governed by Atrium's -[Code of Conduct](https://github.com/robstoll/atrium/tree/master/.github/CODE_OF_CONDUCT.md). +[Code of Conduct](https://github.com/robstoll/atrium/tree/main/.github/CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behaviour to info@tutteli.ch ## How to Contribute @@ -111,7 +111,7 @@ Dealing with Git for the first time? Here are some recommendations for how to se `git remote add upstream https://github.com/robstoll/atrium.git`. You will use this to fetch changes made in this repository. - to ensure your branch is up-to-date, rebase your work on - upstream/master using `git rebase upstream/master` or `git pull -r upstream master`. + upstream/main using `git rebase upstream/main` or `git pull -r upstream main`. This will add all new changes in this repository into your branch and place your local unpushed changes at the top of the branch. @@ -145,7 +145,7 @@ However, here a few hints in order that your pull request is merged quickly. ## Pull Request Checklist Please make sure you can check every item on the following list before you create a pull request: -- [ ] your pull request is rebased on the [latest commit on master](https://github.com/robstoll/atrium/commits/master) +- [ ] your pull request is rebased on the [latest commit on main](https://github.com/robstoll/atrium/commits/main) - [ ] Your pull request addresses only “one thing”. It cannot be meaningfully split up into multiple pull requests. Once you have created and submitted your pull request, make sure: diff --git a/.github/ISSUE_TEMPLATE/good_first_issue.md b/.github/ISSUE_TEMPLATE/good_first_issue.md index f865a45be..138a1952b 100644 --- a/.github/ISSUE_TEMPLATE/good_first_issue.md +++ b/.github/ISSUE_TEMPLATE/good_first_issue.md @@ -48,6 +48,6 @@ A clear and concise description of any alternative solutions or features you've ## Your first contribution? - Write a comment `I'll work on this` if you would like to take this issue over. This way we get the chance to revise the description in case things have changed in the meantime, we might give you additional hints and we can assign the task to you, so that others do not start as well. -- See [Your first code contribution](https://github.com/robstoll/atrium/blob/master/.github/CONTRIBUTING.md#your-first-code-contribution) for guidelines. +- See [Your first code contribution](https://github.com/robstoll/atrium/blob/main/.github/CONTRIBUTING.md#your-first-code-contribution) for guidelines. - Do not hesitate to ask questions here or to contact us via [Atrium's slack channel](https://kotlinlang.slack.com/team/U3DE1TXKP) if you need help ([Invite yourself](https://slack.kotlinlang.org/) in case you do not have an account yet). diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 90050329f..b49d25219 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,4 @@ ______________________________________ -I confirm that I have read the [Contributor Agreements v1.0](https://github.com/robstoll/atrium/blob/master/.github/Contributor%20Agreements%20v1.0.txt), agree to be bound on them and confirm that my contribution is compliant. +I confirm that I have read the [Contributor Agreements v1.0](https://github.com/robstoll/atrium/blob/main/.github/Contributor%20Agreements%20v1.0.txt), agree to be bound on them and confirm that my contribution is compliant. diff --git a/.github/codecov.yml b/.github/codecov.yml index ed2c31f1a..381cdcd86 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -14,6 +14,7 @@ coverage: target: 85% codecov: + branch: main notify: after_n_builds: 5 comment: diff --git a/.github/workflows/bbc-ubuntu.yml b/.github/workflows/bbc-ubuntu.yml index ad6d42fd0..be05aadf7 100644 --- a/.github/workflows/bbc-ubuntu.yml +++ b/.github/workflows/bbc-ubuntu.yml @@ -22,7 +22,7 @@ jobs: - name: Upload windows build code coverage uses: codecov/codecov-action@v1 - if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master') }} + if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} with: token: ${{ secrets.CODECOV_TOKEN }} flags: bbc diff --git a/.github/workflows/bc-ubuntu.yml b/.github/workflows/bc-ubuntu.yml index 6dbee87b8..0e0b629f4 100644 --- a/.github/workflows/bc-ubuntu.yml +++ b/.github/workflows/bc-ubuntu.yml @@ -22,7 +22,7 @@ jobs: - name: Upload windows build code coverage uses: codecov/codecov-action@v1 - if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master') }} + if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} with: token: ${{ secrets.CODECOV_TOKEN }} flags: bc diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml index 6f9c192f7..c8ff7960d 100644 --- a/.github/workflows/build-ubuntu.yml +++ b/.github/workflows/build-ubuntu.yml @@ -27,7 +27,7 @@ jobs: - name: Upload build code coverage uses: codecov/codecov-action@v1 - if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master') }} + if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} env: JAVA_VERSION: ${{ matrix.java_version }} with: diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index a57dc2847..2823d5690 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -34,7 +34,7 @@ jobs: run: | md android-jar-cache cd android-jar-cache - curl -o android.jar -L "https://github.com/Sable/android-platforms/blob/master/android-${{ env.android-version }}/android.jar?raw=true" + curl -o android.jar -L "https://github.com/Sable/android-platforms/blob/main/android-${{ env.android-version }}/android.jar?raw=true" $file_sha256 = $(certutil -hashfile android.jar sha256)[1] -replace " ","" $expected_sha256 = "cdc1846376a14b0370cc63454a129606b4a52cc50ada75ef0d4cf956b1ad2daa" if ($file_sha256 -Ne $expected_sha256) { @@ -54,7 +54,7 @@ jobs: - name: Upload windows build code coverage uses: codecov/codecov-action@v1 - if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master') }} + if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/main') }} env: JAVA_VERSION: ${{ matrix.java_version }} with: diff --git a/.github/workflows/generate-readme-examples.yml b/.github/workflows/generate-readme-examples.yml index a206afa7a..eec3a5dbd 100644 --- a/.github/workflows/generate-readme-examples.yml +++ b/.github/workflows/generate-readme-examples.yml @@ -3,7 +3,7 @@ name: Generate README examples on: push: branches: - - master + - main jobs: build: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 7866ba5db..b9d93d520 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ - + [![Download](https://img.shields.io/badge/Download-0.17.0-RC1-%23007ec6)](https://search.maven.org/artifact/ch.tutteli.atrium/atrium-fluent-en_GB/0.17.0-RC1/jar) [![EUPL](https://img.shields.io/badge/%E2%9A%96-EUPL%201.2-%230b45a6)](https://joinup.ec.europa.eu/collection/eupl/eupl-text-11-12 "License") [![atrium @ kotlinlang.slack.com](https://img.shields.io/static/v1?label=kotlinlang&message=atrium&color=blue&logo=slack)](https://kotlinlang.slack.com/messages/atrium "See invitation link under section FAQ") -[![Build Status Ubuntu](https://github.com/robstoll/atrium/workflows/Ubuntu/badge.svg?event=push&branch=master)](https://github.com/robstoll/atrium/actions?query=workflow%3AUbuntu+branch%3Amaster) -[![Build Status Windows](https://github.com/robstoll/atrium/workflows/Windows/badge.svg?event=push&branch=master)](https://github.com/robstoll/atrium/actions?query=workflow%3AWindows+branch%3Amaster) -[![Coverage](https://codecov.io/gh/robstoll/atrium/branch/master/graph/badge.svg)](https://codecov.io/github/robstoll/atrium/branch/master) +[![Build Status Ubuntu](https://github.com/robstoll/atrium/workflows/Ubuntu/badge.svg?event=push&branch=main)](https://github.com/robstoll/atrium/actions?query=workflow%3AUbuntu+branch%3Amain) +[![Build Status Windows](https://github.com/robstoll/atrium/workflows/Windows/badge.svg?event=push&branch=main)](https://github.com/robstoll/atrium/actions?query=workflow%3AWindows+branch%3Amain) +[![Coverage](https://codecov.io/gh/robstoll/atrium/branch/main/graph/badge.svg)](https://codecov.io/github/robstoll/atrium/branch/main) [![Newcomers Welcome](https://img.shields.io/badge/%F0%9F%91%8B-Newcomers%20Welcome-blueviolet)](https://github.com/robstoll/atrium/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 "Ask in slack for help") @@ -102,8 +102,8 @@ dependencies { We have defined a dependency to the bundle `atrium-fluent-en_GB` in the above example which provides a pure fluent API (in en_GB) for the JVM platform. -Have a look at the [JVM sample projects](https://github.com/robstoll/atrium/tree/master/samples/jvm) for a quick setup, or -[Maven sample project](https://github.com/robstoll/atrium/tree/master/samples/maven) if you prefer Maven to Gradle. +Have a look at the [JVM sample projects](https://github.com/robstoll/atrium/tree/main/samples/jvm) for a quick setup, or +[Maven sample project](https://github.com/robstoll/atrium/tree/main/samples/maven) if you prefer Maven to Gradle. We currently provide the following extensions for the JVM platform: - kotlin_1_3: assertion functions for Kotlin 1.3 specific types (e.g. for [Result](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/index.html)). @@ -143,7 +143,7 @@ dependencies { *maven*: Because maven is a bit more verbose than gradle, the example is not listed here but a -[sample maven project](https://github.com/robstoll/atrium/tree/master/samples/maven) +[sample maven project](https://github.com/robstoll/atrium/tree/main/samples/maven) is provided which shows all necessary setup. That is all, you are all set. Jump to [Examples](#examples) which shows how to use Atrium. @@ -163,19 +163,19 @@ dependencies { We have defined a dependency to the bundle `atrium-fluent-en_GB-js` in the above example which provides a pure fluent API (in en_GB) for the JS platform. -Have a look at the [JS sample projects](https://github.com/robstoll/atrium/tree/master/samples/jvm) for a quick setup. +Have a look at the [JS sample projects](https://github.com/robstoll/atrium/tree/main/samples/jvm) for a quick setup. Otherwise, you need to setup an explicit dependency on `atrium-fluent-en_GB-js` in your test code in order that you can use Atrium. This is due to the loosely coupled design of Atrium and dead code elimination performed by the Kotlin compiler for JS. Atrium itself is using mocha as well -(see [build.gradle -> createJsTestTask](https://github.com/robstoll/atrium/tree/master/build.gradle#L290)) +(see [build.gradle -> createJsTestTask](https://github.com/robstoll/atrium/tree/main/build.gradle#L290)) and has tests written in JS modules -(see [AdjustStackTest](https://github.com/robstoll/atrium/tree/master/core/atrium-core-js/src/test/kotlin/ch/tutteli/atrium/reporting/erroradjusters/AdjustStackTest.kt)) -as well as tests written in common modules (e.g. [SmokeTest](https://github.com/robstoll/atrium/tree/master/bundles/fluent-en_GB/atrium-fluent-en_GB-common/src/test/kotlin/SmokeTest.kt)) +(see [AdjustStackTest](https://github.com/robstoll/atrium/tree/main/core/atrium-core-js/src/test/kotlin/ch/tutteli/atrium/reporting/erroradjusters/AdjustStackTest.kt)) +as well as tests written in common modules (e.g. [SmokeTest](https://github.com/robstoll/atrium/tree/main/bundles/fluent-en_GB/atrium-fluent-en_GB-common/src/test/kotlin/SmokeTest.kt)) which are executed on the JS platform as well (actually on all platforms -> JVM uses JUnit for this purpose, see -[build.gradle -> useJupiter](https://github.com/robstoll/atrium/tree/master/build.gradle#L342)). +[build.gradle -> useJupiter](https://github.com/robstoll/atrium/tree/main/build.gradle#L342)). We currently provide the following extensions for the JS platform: - kotlin_1_3: assertion functions for Kotlin 1.3 specific types (e.g. for [Result](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-result/index.html)). @@ -225,16 +225,16 @@ The setup for using Atrium in a common module of a multiplatform project is basi For instance `atrium-fluent-en_GB-common` instead of `atrium-fluent-en_GB`. Have a look at [JVM](#jvm), [JS](#js) or [Android](#android) to see how the setup of a specific platform has to be done. -You might want to have a look at the [Multiplatform sample project](https://github.com/robstoll/atrium/tree/master/samples/multiplatform) +You might want to have a look at the [Multiplatform sample project](https://github.com/robstoll/atrium/tree/main/samples/multiplatform) as well for a quick setup. # Examples We are using the API provided by the bundle module -[atrium-fluent-en_GB](https://github.com/robstoll/atrium/tree/master/bundles/fluent-en_GB/atrium-fluent-en_GB/build.gradle) +[atrium-fluent-en_GB](https://github.com/robstoll/atrium/tree/main/bundles/fluent-en_GB/atrium-fluent-en_GB/build.gradle) in the following examples. It provides a pure fluent API for the JVM platform. Have a look at -[apis/differences.md](https://github.com/robstoll/atrium/tree/master/apis/differences.md) +[apis/differences.md](https://github.com/robstoll/atrium/tree/main/apis/differences.md) to see how the infix API looks like, how they differ respectively. ## Your First Assertion @@ -249,7 +249,7 @@ import ch.tutteli.atrium.api.verbs.expect val x = 10 expect(x).toEqual(9) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/FirstExampleSpec.kt#L31)[Output](#ex-first) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FirstExampleSpec.kt#L31)[Output](#ex-first) ```text expected that subject: 10 (kotlin.Int <1234789>) @@ -263,7 +263,7 @@ where `◆ ...` represents a single assertion for the subject (`10` in the above In this sense the report can be read as `I expected that the subject of the assertion, which is 10, equals 9` -- and needless to say, this assertion is wrong and thus the thrown error. -We are using the bundle [atrium-fluent-en_GB](https://github.com/robstoll/atrium/tree/master/bundles/fluent-en_GB/atrium-fluent-en_GB/build.gradle) +We are using the bundle [atrium-fluent-en_GB](https://github.com/robstoll/atrium/tree/main/bundles/fluent-en_GB/atrium-fluent-en_GB/build.gradle) and the predefined expectation verb `expect` in the examples. Thus, the corresponding `import`s at the beginning of the file in the above example. We will omit the `import` statements in the remaining examples for brevity. @@ -280,7 +280,7 @@ The next section shows how you can define multiple assertions for the same subje // two single assertions, only first evaluated expect(4 + 6).toBeLessThan(5).toBeGreaterThan(10) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L24)[Output](#ex-single) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L24)[Output](#ex-single) ```text expected that subject: 10 (kotlin.Int <1234789>) @@ -317,7 +317,7 @@ expect(4 + 6) { toBeGreaterThan(10) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L40)[Output](#ex-group) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L40)[Output](#ex-group) ```text expected that subject: 10 (kotlin.Int <1234789>) @@ -353,7 +353,7 @@ expect { throw IllegalArgumentException("name is empty") }.toThrow() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L64)[Output](#ex-toThrow1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L64)[Output](#ex-toThrow1) ```text expected that subject: () -> kotlin.Nothing (readme.examples.MostExamplesSpec$1$7$1 <1234789>) @@ -389,7 +389,7 @@ expect { throw IllegalArgumentException() }.toThrow().message.toStartWith("firstName") ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L71)[Output](#ex-toThrow2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L71)[Output](#ex-toThrow2) ```text expected that subject: () -> kotlin.Nothing (readme.examples.MostExamplesSpec$1$8$1 <1234789>) @@ -410,7 +410,7 @@ expect { message { toStartWith("firstName") } } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L77)[Output](#ex-toThrow3) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L77)[Output](#ex-toThrow3) ```text expected that subject: () -> kotlin.Nothing (readme.examples.MostExamplesSpec$1$9$1 <1234789>) @@ -434,7 +434,7 @@ expect { throw IllegalArgumentException("name is empty", RuntimeException("a cause")) }.notToThrow() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L85)[Output](#ex-notToThrow) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L85)[Output](#ex-notToThrow) ```text expected that subject: () -> kotlin.Nothing (readme.examples.MostExamplesSpec$1$10$1 <1234789>) @@ -497,7 +497,7 @@ expect(myPerson) .its { fullName() } // not evaluated anymore, subject String afterwards .toStartWith("rob") // not evaluated anymore ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L41)[Output](#ex-its-single) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L41)[Output](#ex-its-single) ```text expected that subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorSpec$1$Person <1234789>) @@ -543,7 +543,7 @@ Feature assertions follow the common pattern of having two overloads: its { lastName }.toEqual("Dummy") } ``` - ↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L49)[Output](#ex-its-group) + ↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L49)[Output](#ex-its-group) ```text expected that subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorSpec$1$Person <1234789>) @@ -571,7 +571,7 @@ expect(myPerson) .feature { f(it::fullName) } // not evaluated anymore, subject String afterwards .toStartWith("rob") // not evaluated anymore ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L63)[Output](#ex-property-methods-single) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L63)[Output](#ex-property-methods-single) ```text expected that subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorSpec$1$Person <1234789>) @@ -612,7 +612,7 @@ expect(myPerson) { // forms an assertion group block feature { f(it::lastName) }.toEqual("Dummy") } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L71)[Output](#ex-property-methods-group) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L71)[Output](#ex-property-methods-group) ```text expected that subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorSpec$1$Person <1234789>) @@ -661,7 +661,7 @@ expect(myPerson) .toEqual("Robert aka. Stoll") // fails .toStartWith("llotS") // not evaluated anymore ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L85)[Output](#ex-methods-args) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L85)[Output](#ex-methods-args) ```text expected that subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.FeatureExtractorSpec$1$Person <1234789>) @@ -681,7 +681,7 @@ in case you miss a shortcut. 💬 Write own feature assertion functions with additional checks. Atrium provides a feature extractor which allows making feature assertions in a safe way in case the extraction is only valid for certain subjects. -It is inter alia used for [`List.get`](https://github.com/robstoll/atrium/tree/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultListAssertions.kt#L13) +It is inter alia used for [`List.get`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultListAssertions.kt#L13) @@ -703,7 +703,7 @@ expect(myFamily) .feature("first member's name") { members.first().name } // subject narrowed to String .toEqual("Peter") ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L102)[Output](#ex-arbitrary-features) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L102)[Output](#ex-arbitrary-features) ```text expected that subject: Family(members=[FamilyMember(name=Robert)]) (readme.examples.FeatureExtractorSpec$1$Family <1234789>) @@ -753,7 +753,7 @@ expect(listOf(1 to "a", 2 to "b")).get(10) { firstToBe(1) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L118)[Output](#ex-within-assertion-functions) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/FeatureExtractorSpec.kt#L118)[Output](#ex-within-assertion-functions) ```text expected that subject: [(1, a), (2, b)] (java.util.Arrays.ArrayList <1234789>) @@ -841,7 +841,7 @@ expect(x).toBeAnInstanceOf() .feature { f(it::number) } .toEqual(2) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L92)[Output](#ex-type-assertions-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L92)[Output](#ex-type-assertions-1) ```text expected that subject: SubType2(word=hello, flag=true) (readme.examples.SubType2 <1234789>) @@ -863,7 +863,7 @@ expect(x).toBeAnInstanceOf { feature { f(it::flag) }.toEqual(false) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L98)[Output](#ex-type-assertions-2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L98)[Output](#ex-type-assertions-2) ```text expected that subject: SubType2(word=hello, flag=true) (readme.examples.SubType2 <1234789>) @@ -892,7 +892,7 @@ Let us look at the case where the subject of the assertion has a [nullable type] val slogan1: String? = "postulating assertions made easy" expect(slogan1).toEqual(null) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L106)[Output](#ex-nullable-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L106)[Output](#ex-nullable-1) ```text expected that subject: "postulating assertions made easy" <1234789> @@ -906,7 +906,7 @@ expected that subject: "postulating assertions made easy" <1234789> val slogan2: String? = null expect(slogan2).toEqual("postulating assertions made easy") ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L110)[Output](#ex-nullable-2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L110)[Output](#ex-nullable-2) ```text expected that subject: null @@ -927,7 +927,7 @@ expect(slogan2) // subject has type String? .notToEqualNull() // subject is narrowed to String .toStartWith("atrium") ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L115)[Output](#ex-nullable-3) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L115)[Output](#ex-nullable-3) ```text expected that subject: null @@ -944,7 +944,7 @@ one without (example above) and one with `assertionCreator`-lambda (example belo ```kotlin expect(slogan2).notToEqualNull { toStartWith("atrium") } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L120)[Output](#ex-nullable-4) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L120)[Output](#ex-nullable-4) ```text expected that subject: null @@ -983,7 +983,7 @@ The following sub sections show both use cases by examples. ```kotlin expect(listOf(1, 2, 2, 4)).toContain(2, 3) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L124)[Output](#ex-collection-short-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L124)[Output](#ex-collection-short-1) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1021,7 +1021,7 @@ expect(listOf(1, 2, 2, 4)).toContain( { toBeGreaterThan(2).toBeLessThan(4) } ) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L128)[Output](#ex-collection-short-2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L128)[Output](#ex-collection-short-2) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1063,7 +1063,7 @@ expect(listOf(1, 2, 3, 4)).toHaveElementsAndAny { toBeLessThan(0) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L135)[Output](#ex-collection-any) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L135)[Output](#ex-collection-any) ```text expected that subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1081,7 +1081,7 @@ expect(listOf(1, 2, 3, 4)).toHaveElementsAndNone { toBeGreaterThan(2) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L140)[Output](#ex-collection-none) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L140)[Output](#ex-collection-none) ```text expected that subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1101,7 +1101,7 @@ expect(listOf(1, 2, 3, 4)).toHaveElementsAndAll { toBeGreaterThan(2) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L145)[Output](#ex-collection-all) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L145)[Output](#ex-collection-all) ```text expected that subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1131,7 +1131,7 @@ Following on the last section we will start with an `inOrder` example: ```kotlin expect(listOf(1, 2, 2, 4)).toContain.inOrder.only.entries({ toBeLessThan(3) }, { toBeLessThan(2) }) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L151)[Output](#ex-collection-builder-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L151)[Output](#ex-collection-builder-1) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1177,7 +1177,7 @@ expect(listOf(1, 2, 2, 4)).toContainExactly( report = { showOnlyFailingIfMoreElementsThan(3) } ) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L154)[Output](#ex-collection-reportOptions-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L154)[Output](#ex-collection-reportOptions-1) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1208,7 +1208,7 @@ and we happily answer your question there. ```kotlin expect(listOf(1, 2, 2, 4)).toContain.inOrder.only.values(1, 2, 2, 3, 4) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L162)[Output](#ex-collection-builder-2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L162)[Output](#ex-collection-builder-2) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1233,7 +1233,7 @@ expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789> ```kotlin expect(listOf(1, 2, 2, 4)).toContain.inAnyOrder.atLeast(1).butAtMost(2).entries({ toBeLessThan(3) }) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L165)[Output](#ex-collection-builder-3) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L165)[Output](#ex-collection-builder-3) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1250,7 +1250,7 @@ expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789> ```kotlin expect(listOf(1, 2, 2, 4)).toContain.inAnyOrder.only.values(1, 2, 3, 4) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L168)[Output](#ex-collection-builder-4) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L168)[Output](#ex-collection-builder-4) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1269,7 +1269,7 @@ expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789> ```kotlin expect(listOf(1, 2, 2, 4)).toContain.inAnyOrder.only.values(4, 3, 2, 2, 1) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L171)[Output](#ex-collection-builder-5) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L171)[Output](#ex-collection-builder-5) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1299,7 +1299,7 @@ and more [Sophisticated Assertion Builder](#sophisticated-assertion-builders-1) ```kotlin expect(mapOf("a" to 1, "b" to 2)).toContain("c" to 2, "a" to 1, "b" to 1) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L175)[Output](#ex-map-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L175)[Output](#ex-map-1) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1323,7 +1323,7 @@ expect(mapOf("a" to 1, "b" to 2)).toContain( KeyValue("b") { toBeLessThan(2) } ) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L178)[Output](#ex-map-2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L178)[Output](#ex-map-2) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1345,7 +1345,7 @@ Again both overloads are provided, one for key-value `Pair`s: ```kotlin expect(mapOf("a" to 1, "b" to 2)).toContainOnly("b" to 2) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L186)[Output](#ex-map-only-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L186)[Output](#ex-map-only-1) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1370,7 +1370,7 @@ expect(mapOf("a" to 1, "b" to 2)).toContainOnly( KeyValue("b") { toBeLessThan(2) } ) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L189)[Output](#ex-map-only-2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L189)[Output](#ex-map-only-2) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1398,7 +1398,7 @@ again provide two overloads, one expecting key-value `Pair`s: ```kotlin expect(mapOf("a" to 1, "b" to 2)).toContain.inOrder.only.entries("b" to 2, "a" to 1) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L197)[Output](#ex-map-builder-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L197)[Output](#ex-map-builder-1) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1425,7 +1425,7 @@ expect(mapOf("a" to 1, "b" to 2)).toContain.inOrder.only.entries( KeyValue("a") { toBeLessThan(2) }, KeyValue("b") { toBeLessThan(2) }) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L200)[Output](#ex-map-builder-2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L200)[Output](#ex-map-builder-2) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1462,7 +1462,7 @@ expect(mapOf("bernstein" to bernstein)) feature { f(it::firstName) }.toEqual("Albert") } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L210)[Output](#ex-map-3) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L210)[Output](#ex-map-3) ```text expected that subject: {bernstein=Person(firstName=Leonard, lastName=Bernstein, age=50)} (java.util.Collections.SingletonMap <1234789>) @@ -1482,7 +1482,7 @@ expect(mapOf("a" to 1, "b" to 2)) { values { toHaveElementsAndNone { toBeGreaterThan(1) } } } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L222)[Output](#ex-map-4) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L222)[Output](#ex-map-4) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1518,7 +1518,7 @@ expect(linkedMapOf("a" to 1, "b" to 2)).asEntries().toContain.inOrder.only.entri } ) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L228)[Output](#ex-map-5) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L228)[Output](#ex-map-5) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1551,7 +1551,7 @@ For example, `exists` will explain which entry was the first one missing: ```kotlin expect(Paths.get("/usr/bin/noprogram")).toExist() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L37)[Output](#ex-path-exists) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L37)[Output](#ex-path-exists) ```text expected that subject: /usr/bin/noprogram (sun.nio.fs.UnixPath <1234789>) @@ -1567,7 +1567,7 @@ Atrium will give details about why something cannot be accessed, for example whe ```kotlin expect(Paths.get("/root/.ssh/config")).toBeWritable() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L41)[Output](#ex-path-writable) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L41)[Output](#ex-path-writable) ```text expected that subject: /root/.ssh/config (sun.nio.fs.UnixPath <1234789>) @@ -1590,7 +1590,7 @@ val filePointer = Files.createSymbolicLink(directory.resolve("directory"), file) expect(filePointer.resolve("subfolder/file")).toBeARegularFile() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L46)[Output](#ex-path-symlink-and-parent-not-folder) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/PathSpec.kt#L46)[Output](#ex-path-symlink-and-parent-not-folder) ```text expected that subject: /tmp/atrium-path/directory/subfolder/file (sun.nio.fs.UnixPath <1234789>) @@ -1614,7 +1614,7 @@ expect("filename?") notToContain("?") } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L238)[Output](#ex-because-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L238)[Output](#ex-because-1) ```text expected that subject: "filename?" <1234789> @@ -1669,7 +1669,7 @@ expect("calling myFun with...") { } } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L35)[Output](#ex-data-driven-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L35)[Output](#ex-data-driven-1) ```text expected that subject: "calling myFun with..." <1234789> @@ -1704,7 +1704,7 @@ expect("calling myFun with ...") { } } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L49)[Output](#ex-data-driven-2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L49)[Output](#ex-data-driven-2) ```text expected that subject: "calling myFun with ..." <1234789> @@ -1745,7 +1745,7 @@ expect("calling myNullableFun with ...") { } } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L67)[Output](#ex-data-driven-3) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/DataDrivenSpec.kt#L67)[Output](#ex-data-driven-3) ```text expected that subject: "calling myNullableFun with ..." <1234789> @@ -1762,21 +1762,21 @@ expected that subject: "calling myNullableFun with ..." <1234789> Atrium supports further assertion builders (e.g, for `CharSequence`) as well as assertion functions which have not been shown in the examples. -Have a look at [apis/differences.md](https://github.com/robstoll/atrium/tree/master/apis/differences.md) for a few more examples. +Have a look at [apis/differences.md](https://github.com/robstoll/atrium/tree/main/apis/differences.md) for a few more examples. This site contains also a list of all APIs with links to their assertion function catalogs. You can also have a look at the -[specifications](https://github.com/robstoll/atrium/tree/master/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs) +[specifications](https://github.com/robstoll/atrium/tree/main/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs) for more examples. ## Sample Projects -Have a look into the [samples](https://github.com/robstoll/atrium/tree/master/samples) +Have a look into the [samples](https://github.com/robstoll/atrium/tree/main/samples) folder, it currently contains sample projects for -- [jvm gradle](https://github.com/robstoll/atrium/tree/master/samples/jvm/) - - [maven](https://github.com/robstoll/atrium/tree/master/samples/maven/) -- [js](https://github.com/robstoll/atrium/tree/master/samples/js/) -- [multiplatform project](https://github.com/robstoll/atrium/tree/master/samples/multiplatform/) +- [jvm gradle](https://github.com/robstoll/atrium/tree/main/samples/jvm/) + - [maven](https://github.com/robstoll/atrium/tree/main/samples/maven/) +- [js](https://github.com/robstoll/atrium/tree/main/samples/js/) +- [multiplatform project](https://github.com/robstoll/atrium/tree/main/samples/multiplatform/) Are you using a different runner? A PR would be appreciated 😊. @@ -1890,7 +1890,7 @@ expect { } }.toThrow { messageToContain("no no no") } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L251)[Output](#ex-add-info-3) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L251)[Output](#ex-add-info-3) ```text expected that subject: () -> kotlin.Nothing (readme.examples.MostExamplesSpec$1$40$1 <1234789>) @@ -1932,7 +1932,7 @@ then Atrium reminds us of the possible pitfall. For instance: ```kotlin expect(BigDecimal.TEN).toEqualIncludingScale(BigDecimal("10.0")) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L261)[Output](#ex-pitfall-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L261)[Output](#ex-pitfall-1) ```text expected that subject: 10 (java.math.BigDecimal <1234789>) @@ -1950,7 +1950,7 @@ For instance: ```kotlin expect(listOf(1)).get(0) {} ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L264)[Output](#ex-pitfall-2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/MostExamplesSpec.kt#L264)[Output](#ex-pitfall-2) ```text expected that subject: [1] (java.util.Collections.SingletonList <1234789>) @@ -2029,7 +2029,7 @@ and its usage: ```kotlin expect(12).toBeAMultipleOf(5) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L44)[Output](#ex-own-boolean-1) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L44)[Output](#ex-own-boolean-1) ```text expected that subject: 12 (kotlin.Int <1234789>) @@ -2081,7 +2081,7 @@ Its usage looks then as follows: ```kotlin expect(13).toBeEven() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L57)[Output](#ex-own-boolean-2) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L57)[Output](#ex-own-boolean-2) ```text expected that subject: 13 (kotlin.Int <1234789>) @@ -2182,7 +2182,7 @@ Its usage is then as follows: expect(Person("Susanne", "Whitley", 43, listOf())) .toHaveNumberOfChildren(2) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L74)[Output](#ex-own-compose-3) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L74)[Output](#ex-own-compose-3) ```text expected that subject: Person(firstName=Susanne, lastName=Whitley, age=43, children=[]) (readme.examples.Person <1234789>) @@ -2218,7 +2218,7 @@ I.e. it fails for a `Person` with 0 children, because such a person does not hav expect(Person("Susanne", "Whitley", 43, listOf())) .toHaveAdultChildren() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L91)[Output](#ex-own-compose-4) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L91)[Output](#ex-own-compose-4) ```text expected that subject: Person(firstName=Susanne, lastName=Whitley, age=43, children=[]) (readme.examples.Person <1234789>) @@ -2268,7 +2268,7 @@ expect(Person("Susanne", "Whitley", 43, listOf(Person("Petra", "Whitley", 12, li .children // using the val -> subsequent assertions are about children and fail fast .toHaveSize(2) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L101)[Output](#ex-own-compose-5) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationFunctionsSpec.kt#L101)[Output](#ex-own-compose-5) ```text expected that subject: Person(firstName=Susanne, lastName=Whitley, age=43, children=[Person(firstName=Petra, lastName=Whitley, age=12, children=[])]) (readme.examples.Person <1234789>) @@ -2340,23 +2340,23 @@ it suffices to create an extension function for `ArgumentMapperBuilder`. Yet, sometimes we would like to create functions which have a better error reporting than the one we get when we compose assertion functions. -[`_logic`](https://github.com/robstoll/atrium/tree/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/logic.kt#L21) +[`_logic`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/logic.kt#L21) is the entry point to `AssertionContainer` which is the equivalent of `Expect` but on a lower level. Following a quick overview what extension methods could be useful: - all assertion functions on the logic level (what you have seen in [Compose-assertion-functions](#compose-assertion-functions) was the API level) so that you can reuse and compose them in other ways. - `changeSubject` which allows to change the subject either: - - `unreported`; meaning it does not show up in reporting (e.g. `Expect>.asList()` uses it, see [arrayAssertions](https://github.com/robstoll/atrium/tree/master/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/arrayAssertions.kt#L19)) - - reported, using `reportBuilder`; meaning a subject transformation which is shown in reporting as it incorporates a transformation (e.g. `toBeA` uses it, see [AnyAssertions](https://github.com/robstoll/atrium/tree/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultAnyAssertions.kt#L52)) -- `collect` which allows to collect assertions - especially helpful in composing assertions (see [mapAssertions](https://github.com/robstoll/atrium/tree/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultMapAssertions.kt#L49)) -- `extractFeature` for feature assertions which are not always save to extract (see [`List.get`](https://github.com/robstoll/atrium/tree/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultListAssertions.kt#L13)) + - `unreported`; meaning it does not show up in reporting (e.g. `Expect>.asList()` uses it, see [arrayAssertions](https://github.com/robstoll/atrium/tree/main/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/arrayAssertions.kt#L19)) + - reported, using `reportBuilder`; meaning a subject transformation which is shown in reporting as it incorporates a transformation (e.g. `toBeA` uses it, see [AnyAssertions](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultAnyAssertions.kt#L52)) +- `collect` which allows to collect assertions - especially helpful in composing assertions (see [mapAssertions](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultMapAssertions.kt#L49)) +- `extractFeature` for feature assertions which are not always save to extract (see [`List.get`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultListAssertions.kt#L13)) Besides, the `assertionBuilder` allows to create different kinds of assertions (see [AssertionBuilder](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.assertions.builders/-assertion-builder/index.html) for more information) which can be used to create very specific assertion functions. -You can find an example in [floatingPointAssertions](https://github.com/robstoll/atrium/blob/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultFloatingPointAssertions.kt#L72) +You can find an example in [floatingPointAssertions](https://github.com/robstoll/atrium/blob/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/impl/DefaultFloatingPointAssertions.kt#L72) which makes use of explanatory assertions as well as providing a failure hint. Unfortunately we do not have the time to cover all cases, so let us know if you want to know more @@ -2378,7 +2378,7 @@ Atrium offers the expectation verb `expect` out of the box. You can also define your own expectation verb if `expect` does not suite you or in case you want to change some default implementation. In order to create an own expectation verb it is sufficient to: - 1. Copy the file content of [atriumVerbs.kt](https://github.com/robstoll/atrium/tree/master/misc/verbs-internal/atrium-verbs-internal-common/src/main/kotlin/ch.tutteli.atrium.api.verbs.internal/atriumVerbs.kt) + 1. Copy the file content of [atriumVerbs.kt](https://github.com/robstoll/atrium/tree/main/misc/verbs-internal/atrium-verbs-internal-common/src/main/kotlin/ch.tutteli.atrium.api.verbs.internal/atriumVerbs.kt) 2. Create your own atriumVerbs.kt and paste the previously copied content -- notice that you can also use a `String` for the expectation verb in case you do not care about [Internationalization](#internationalization-1) 3. Adjust package name and `import`s and rename `expect` as desired (you can also leave it that way of course). @@ -2416,7 +2416,7 @@ What are the drawbacks: ## Use own Components Replacing existing components with your own (or third-party) components can be done when specifying an own expectation verb -via `withOptions`. See for instance [atriumVerbs.kt](https://github.com/robstoll/atrium/tree/master/misc/verbs-internal/atrium-verbs-internal-common/src/main/kotlin/ch.tutteli.atrium.api.verbs.internal/atriumVerbs.kt#L31) +via `withOptions`. See for instance [atriumVerbs.kt](https://github.com/robstoll/atrium/tree/main/misc/verbs-internal/atrium-verbs-internal-common/src/main/kotlin/ch.tutteli.atrium.api.verbs.internal/atriumVerbs.kt#L31) which is used internally of Atrium in tests and uses a different `AtriumErrorAdjuster`. Another example, say you prefer multi-line reporting over single-line reporting, @@ -2449,7 +2449,7 @@ Following an example using the expectation verb ```kotlin expect(10).toEqual(9) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationVerbSpec.kt#L51)[Output](#ex-own-expectation-verb) +↑ [Example](https://github.com/robstoll/atrium/tree/main/misc/tools/readme-examples/src/main/kotlin/readme/examples/OwnExpectationVerbSpec.kt#L51)[Output](#ex-own-expectation-verb) ```text expected the subject: @@ -2469,7 +2469,7 @@ You prefer another reporting style but Atrium does not yet support it? Please let us know it by [writing a feature request](https://github.com/robstoll/atrium/issues/new?template=feature_request.md&title=[Feature]). There are more options to choose from. Take a look at the -[DefaultComponentFactoryContainer](https://github.com/robstoll/atrium/tree/master/core/atrium-core-common/src/main/kotlin/ch/tutteli/atrium/creating/impl/ComponentFactoryContainerImpl.kt#L121) +[DefaultComponentFactoryContainer](https://github.com/robstoll/atrium/tree/main/core/atrium-core-common/src/main/kotlin/ch/tutteli/atrium/creating/impl/ComponentFactoryContainerImpl.kt#L121) to see the default configuration. # Internationalization @@ -2505,10 +2505,10 @@ enum class DescriptionIntAssertion(override val value: String) : StringBasedTran Typically, you would put `DescriptionIntAssertion` into an own module (jar) so that it could be replaced (with zero performance cost) by another language representation. For instance, -[atrium-fluent-en_GB-common](https://github.com/robstoll/atrium/tree/master/bundles/fluent-en_GB/atrium-fluent-en_GB-common/build.gradle) +[atrium-fluent-en_GB-common](https://github.com/robstoll/atrium/tree/main/bundles/fluent-en_GB/atrium-fluent-en_GB-common/build.gradle) uses `atrium-translations-en_GB-common` whereas tests of -[atrium-infix_en_GB-common](https://github.com/robstoll/atrium/tree/master/bundles/infix-en_GB/atrium-infix-en_GB-common/build.gradle) +[atrium-infix_en_GB-common](https://github.com/robstoll/atrium/tree/main/bundles/infix-en_GB/atrium-infix-en_GB-common/build.gradle) uses `atrium-translations-de_CH-common`.
@@ -2627,11 +2627,11 @@ However, this is more intended for advanced user with special requirements. Atrium provides bundle modules which bundle API, logic, core, translation as well as predefined expectation verbs, so that you just have to have a dependency on one of those bundles (kind a bit like a BOM pom in the maven world): -- [atrium-fluent-en_GB](https://github.com/robstoll/atrium/tree/master/bundles/fluent-en_GB/atrium-fluent-en_GB-common/build.gradle) -- [atrium-infix-en_GB](https://github.com/robstoll/atrium/tree/master/bundles/infix-en_GB/atrium-infix-en_GB-common/build.gradle) +- [atrium-fluent-en_GB](https://github.com/robstoll/atrium/tree/main/bundles/fluent-en_GB/atrium-fluent-en_GB-common/build.gradle) +- [atrium-infix-en_GB](https://github.com/robstoll/atrium/tree/main/bundles/infix-en_GB/atrium-infix-en_GB-common/build.gradle) Have a look at -[apis/differences.md](https://github.com/robstoll/atrium/tree/master/apis/differences.md) +[apis/differences.md](https://github.com/robstoll/atrium/tree/main/apis/differences.md) for more information and to see how the API styles differ. @@ -2646,15 +2646,15 @@ Therefore, you want to turn the platform type into the nullable version. You need to use a cast to do this. But depending on your return type this might be cumbersome especially if you deal with type parameters. Thus, Atrium provides the following functions to ease dealing with Java Code at least for some standard cases: -- [`nullable`](https://github.com/robstoll/atrium/tree/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L19) +- [`nullable`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L19) turns a type into a nullable type. -- [`nullableContainer`](https://github.com/robstoll/atrium/tree/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L40) +- [`nullableContainer`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L40) turns an `Iterable` into an iterable with nullable element type, likewise it does the same for `Array`. -- [`nullableKeyMap`](https://github.com/robstoll/atrium/tree/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L66) +- [`nullableKeyMap`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L66) turns a `Map` into a map with a nullable key type. -- [`nullableValueMap`](https://github.com/robstoll/atrium/tree/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L79) +- [`nullableValueMap`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L79) turns a `Map` into a map with a nullable value type. -- [`nullableKeyValueMap`](https://github.com/robstoll/atrium/tree/master/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L92) +- [`nullableKeyValueMap`](https://github.com/robstoll/atrium/tree/main/logic/atrium-logic-common/src/main/kotlin/ch/tutteli/atrium/logic/utils/nullable.kt#L92) turns a `Map` into a map with a nullable key and nullable value type. @@ -2747,7 +2747,7 @@ You are more than welcome to contribute as well: if you would like to code (ping us on [Slack](https://kotlinlang.slack.com/messages/C887ZKGCQ) if there are not any). Please have a look at -[CONTRIBUTING.md](https://github.com/robstoll/atrium/tree/master/.github/CONTRIBUTING.md) +[CONTRIBUTING.md](https://github.com/robstoll/atrium/tree/main/.github/CONTRIBUTING.md) for further suggestions and guidelines. # Sponsors diff --git a/apis/differences.md b/apis/differences.md index 7dcfafb39..af14e579c 100644 --- a/apis/differences.md +++ b/apis/differences.md @@ -18,7 +18,7 @@ The links point to the KDoc of their included API where you find an overview of ---- Following an excerpt of a build.gradle file which uses twit APIs (see -[README#Installation](https://github.com/robstoll/atrium/tree/master/README.md#installation) +[README#Installation](https://github.com/robstoll/atrium/tree/main/README.md#installation) for the rest): ``` dependencies { diff --git a/build.gradle b/build.gradle index badff295b..e5f3f6bca 100644 --- a/build.gradle +++ b/build.gradle @@ -59,7 +59,7 @@ buildscript { ghPages_version = rootProject.version srcKotlin = 'src/main/kotlin' github_url = "https://github.com/robstoll/${rootProject.name}" - dokka_sourceMapping = "tree/master" + dokka_sourceMapping = "tree/main" toolProjects = toolProjectsFun @@ -422,7 +422,7 @@ nexusPublishing { Release & deploy a commit -------------------------------- -1. update master: +1. update main: Either use the following commands or the manual steps below @@ -430,15 +430,15 @@ export ATRIUM_PREVIOUS_VERSION=0.17.0-RC1 export ATRIUM_VERSION=0.17.0 find ./ -name "*.md" | xargs perl -0777 -i \ -pe "s@$ATRIUM_PREVIOUS_VERSION@$ATRIUM_VERSION@g;" \ - -pe "s@tree/master@tree/v$ATRIUM_VERSION@g;" \ + -pe "s@tree/main@tree/v$ATRIUM_VERSION@g;" \ -pe "s@latest#/doc@$ATRIUM_VERSION/doc@g;" perl -0777 -i \ -pe "s@$ATRIUM_PREVIOUS_VERSION@$ATRIUM_VERSION@g;" \ - -pe "s@dokka_sourceMapping = \"tree/master\"@dokka_sourceMapping = \"tree/v$ATRIUM_VERSION\"@;" \ + -pe "s@dokka_sourceMapping = \"tree/main\"@dokka_sourceMapping = \"tree/v$ATRIUM_VERSION\"@;" \ -pe "s/rootProject.version = '$ATRIUM_VERSION-SNAPSHOT'/rootProject.version = '$ATRIUM_VERSION'/;" \ ./build.gradle perl -0777 -i \ - -pe 's/(\n)\n([\S\s]*?)(\n\n)\n(\n# $3\n$4\n$5/;' \ + -pe 's/(\n)\n([\S\s]*?)(\n\n)\n(\n# $3\n$4\n$5/;' \ -pe 's/(---\n❗ You are taking[^-]*?---)//;' \ ./README.md git commit -a -m "v$ATRIUM_VERSION" @@ -450,10 +450,10 @@ alternatively the manual steps: a) change rootProject.version in build.gradle to X.Y.Z b) search for old version in README.md and replace with new - c) search for `tree/master` in all .md files and replace it with `tree/vX.Y.Z` - d) adjust dokka_sourceMapping from `tree/master` to tree/vX.Y.Z + c) search for `tree/main` in all .md files and replace it with `tree/vX.Y.Z` + d) adjust dokka_sourceMapping from `tree/main` to tree/vX.Y.Z e) search for `latest#/doc` in all .md files and replace with `X.Y.Z/doc` - f) use the release badges in README (comment out the ones for master and uncomment the ones for the release) + f) use the release badges in README (comment out the ones for main and uncomment the ones for the release) g) comment out the warning in README.md about taking a sneak peak h) commit & push (modified CONTRIBUTING.md, differences.md, build.gradle and README.md) @@ -502,25 +502,25 @@ alternatively the manual steps: Prepare next dev cycle ----------------------- - 1. update master: + 1. update main: Either use the following commands or the manual steps below export ATRIUM_VERSION=0.17.0-RC1 export ATRIUM_NEXT_VERSION=0.17.0 find ./ -name "*.md" | xargs perl -0777 -i \ - -pe "s@tree/v$ATRIUM_VERSION@tree/master@g;" \ + -pe "s@tree/v$ATRIUM_VERSION@tree/main@g;" \ -pe "s@$ATRIUM_VERSION/doc@latest#/doc@g;" \ -pe "s/add \\\`\@since $ATRIUM_VERSION\\\` \(adapt to current/add \\\`\@since $ATRIUM_NEXT_VERSION\\\` \(adapt to current/g;" perl -0777 -i \ - -pe "s@dokka_sourceMapping = \"tree/v$ATRIUM_VERSION\"@dokka_sourceMapping = \"tree/master\"@;" \ + -pe "s@dokka_sourceMapping = \"tree/v$ATRIUM_VERSION\"@dokka_sourceMapping = \"tree/main\"@;" \ -pe "s/rootProject.version = '$ATRIUM_VERSION'/rootProject.version = '$ATRIUM_NEXT_VERSION-SNAPSHOT'/;" \ -pe "s/ATRIUM_VERSION=$ATRIUM_VERSION/ATRIUM_VERSION=$ATRIUM_NEXT_VERSION/;" \ ./build.gradle perl -0777 -i \ - -pe 's/(\n)(\n)\n([\S\s]*?)\n(\n# \n$5/;' \ + -pe 's/(\n)(\n)\n([\S\s]*?)\n(\n# \n$5/;' \ -pe 's//$1/;' \ - -pe "s@(For instance, the \[README of v$ATRIUM_VERSION\].*tree/)master/@\$1v$ATRIUM_VERSION/@;" \ + -pe "s@(For instance, the \[README of v$ATRIUM_VERSION\].*tree/)main/@\$1v$ATRIUM_VERSION/@;" \ ./README.md git commit -a -m "prepare dev cycle of $ATRIUM_NEXT_VERSION" @@ -531,7 +531,7 @@ alternatively the manual steps: a) search for `tree/vX.Y.Z` in all .md and build.gradle files and replace it with `tree/v0.12.0` b) search for `X.Y.Z/doc` in all .md files and replace with `latest#/doc` - c) use the master badges in README (uncomment them in README and comment out release badges) + c) use the main badges in README (uncomment them in README and comment out release badges) d) uncomment the warning about taking a sneak peek in README and revert `tree/v0.12.0` still point to the tag e) change rootProject.version in build.gradle to X.Y.Z-SNAPSHOT f) commit & push changes