From a7f5638349dd14476c8b913921099eb1380a0476 Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Sun, 6 Aug 2023 18:27:37 -0700 Subject: [PATCH] internal: Rename master branch to main (#3116) --- .github/workflows/codecov.yml | 8 +++---- .github/workflows/doc.yml | 2 +- .github/workflows/package-test.yml | 2 +- .github/workflows/sbt-integration.yml | 2 +- .github/workflows/snapshot.yml | 2 +- .github/workflows/test.yml | 2 +- README.md | 18 ++++++++-------- airframe-log/README.md | 8 +++---- airspec/README.md | 4 ++-- docs/airframe-control.md | 4 ++-- docs/airframe-di-legacy.md | 6 +++--- docs/airframe-di.md | 4 ++-- docs/airframe-http.md | 2 +- docs/airframe-log.md | 6 +++--- docs/airframe-parquet.md | 2 +- docs/airframe-rpc.md | 12 +++++------ docs/airframe-rx.md | 2 +- docs/airframe-ulid.md | 4 ++-- docs/airspec.md | 6 +++--- docs/comparison.md | 4 ++-- docs/index.md | 2 +- docs/release-notes.md | 18 ++++++++-------- sbt-airframe/README.md | 2 +- scripts/publish.sh | 30 --------------------------- scripts/publishMicrosite.sh | 12 ----------- scripts/release.rb | 2 +- 26 files changed, 62 insertions(+), 104 deletions(-) delete mode 100755 scripts/publish.sh delete mode 100755 scripts/publishMicrosite.sh diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 24af86d5ad..3f9bac412b 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -6,19 +6,19 @@ on: - '**.scala' - '**.java' - '**.sbt' - - '**/codecov.yml' + - '**/codecov.yml' - '.scalafmt.conf' - - 'project/build.properties' + - 'project/build.properties' push: branches: - - master + - main paths: - '**.scala' - '**.java' - '**.sbt' - '**/codecov.yml' - '.scalafmt.conf' - - 'project/build.properties' + - 'project/build.properties' jobs: coverage: diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index b1a48316e4..9678f2236e 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -3,7 +3,7 @@ name: Doc on: push: branches: - - master + - main paths: - 'docs/**' - 'website/**' diff --git a/.github/workflows/package-test.yml b/.github/workflows/package-test.yml index 2496f9ea00..454f79a156 100644 --- a/.github/workflows/package-test.yml +++ b/.github/workflows/package-test.yml @@ -3,7 +3,7 @@ name: CI Packaging on: push: branches: - - master + - main paths: - '**.scala' - '**.java' diff --git a/.github/workflows/sbt-integration.yml b/.github/workflows/sbt-integration.yml index a2bd792d05..49bf94cc09 100644 --- a/.github/workflows/sbt-integration.yml +++ b/.github/workflows/sbt-integration.yml @@ -11,7 +11,7 @@ on: - 'project/build.properties' push: branches: - - master + - main paths: - '**.scala' - '**.java' diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 9a3bed9c64..125005ef0e 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -3,7 +3,7 @@ name: Snapshot Release on: push: branches: - - master + - main paths: - '**.scala' - '**.java' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 69314d38a4..a319b84c07 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ on: - 'project/build.properties' push: branches: - - master + - main paths: - '**.scala' - '**.java' diff --git a/README.md b/README.md index 3e9a7d92c4..0d762428db 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Gitter Chat][gitter-badge]][gitter-link] [![CI Status][gha-badge]][gha-link] [![codecov](https://codecov.io/gh/wvlet/airframe/branch/master/graph/badge.svg)](https://codecov.io/gh/wvlet/airframe) [![scala-index][sindex-badge]][sindex-link] [![maven central][central-badge]][central-link] [![Scala.js](https://www.scala-js.org/assets/badges/scalajs-1.0.0.svg)](https://www.scala-js.org) +[![Gitter Chat][gitter-badge]][gitter-link] [![CI Status][gha-badge]][gha-link] [![codecov](https://codecov.io/gh/wvlet/airframe/branch/main/graph/badge.svg)](https://codecov.io/gh/wvlet/airframe) [![scala-index][sindex-badge]][sindex-link] [![maven central][central-badge]][central-link] [![Scala.js](https://www.scala-js.org/assets/badges/scalajs-1.0.0.svg)](https://www.scala-js.org) [circleci-badge]: https://circleci.com/gh/wvlet/airframe.svg?style=svg [circleci-link]: https://circleci.com/gh/wvlet/airframe @@ -6,15 +6,15 @@ [gha-link]: https://github.com/wvlet/airframe/actions?workflow=CI [gitter-badge]: https://badges.gitter.im/Join%20Chat.svg [gitter-link]: https://gitter.im/wvlet/airframe?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge -[coverall-badge]: https://coveralls.io/repos/github/wvlet/airframe/badge.svg?branch=master -[coverall-link]: https://coveralls.io/github/wvlet/airframe?branch=master +[coverall-badge]: https://coveralls.io/repos/github/wvlet/airframe/badge.svg?branch=main +[coverall-link]: https://coveralls.io/github/wvlet/airframe?branch=main [sindex-badge]: https://index.scala-lang.org/wvlet/airframe/airframe/latest.svg?color=orange [sindex-link]: https://index.scala-lang.org/wvlet/airframe [central-badge]: https://img.shields.io/maven-central/v/org.wvlet.airframe/airframe_2.12.svg?label=maven%20central [central-link]: https://search.maven.org/search?q=g:%22org.wvlet.airframe%22%20AND%20a:%22airframe_2.12%22 -

logo

+

logo

Airframe https://wvlet.org/airframe is a collection of [lightweight building blocks](https://wvlet.org/airframe/docs/) for Scala. @@ -30,10 +30,10 @@ Airframe https://wvlet.org/airframe is a collection of [lightweight building blo - [AirSpec: A Functional Testing Library](https://wvlet.org/airframe/docs/airspec.html) - [Airframe RPC: A Framework for Using Scala Both for Frontend and Backend Programming](https://wvlet.org/airframe/docs/airframe-rpc.html) -

rpc

+

rpc

- [Airframe Modules](https://wvlet.org/airframe/docs/index.html) -

logo

+

logo

## For Developers @@ -59,12 +59,12 @@ Here is the list of milestones for Dotty support: [#1077](https://github.com/wvl ### Releasing -For every PR, [release-drafter](https://github.com/release-drafter/release-drafter) will automatically label PRs using the rules defined in [.github/release-drafter.yml](https://github.com/wvlet/airframe/blob/master/.github/release-drafter.yml). +For every PR, [release-drafter](https://github.com/release-drafter/release-drafter) will automatically label PRs using the rules defined in [.github/release-drafter.yml](https://github.com/wvlet/airframe/blob/main/.github/release-drafter.yml). To publish a new version, first, create a new release tag as follows: ```sh -$ git switch master +$ git switch main $ git pull $ ruby ./scripts/release.rb ``` @@ -80,4 +80,4 @@ When changing some interfaces, binary compatibility should be checked so as not ## LICENSE -[Apache v2](https://github.com/wvlet/airframe/blob/master/LICENSE) +[Apache v2](https://github.com/wvlet/airframe/blob/main/LICENSE) diff --git a/airframe-log/README.md b/airframe-log/README.md index af8226d334..ac8ba4fc20 100644 --- a/airframe-log/README.md +++ b/airframe-log/README.md @@ -41,7 +41,7 @@ libraryDependencies += "org.wvlet.airframe" %%% "airframe-log" % "(version)" - Scala 2.12, 2.13, Scala.js support ## Resources -- GitHub: [airframe-log](https://github.com/wvlet/airframe/tree/master/airframe-log) +- GitHub: [airframe-log](https://github.com/wvlet/airframe/tree/main/airframe-log) - Blog post: [Airframe Log: A Modern Logging Library for Scala](https://medium.com/@taroleo/airframe-log-a-modern-logging-library-for-scala-56fbc2f950bc) @@ -123,7 +123,7 @@ call `Logger.scheduleLogLevelScan` before running test cases. This is useful for To scan log level properties periodically with [ScalaTest](http://www.scalatest.org/), define the base trait as follows: -**[Spec.scala](https://github.com/wvlet/log/blob/master/src/test/scala/wvlet/log/Spec.scala)** +**[Spec.scala](https://github.com/wvlet/airframe/blob/airframe-log/main/src/test/scala/wvlet/log/Spec.scala)** ```scala import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, WordSpec, _} import wvlet.log.LogFormatter.SourceCodeLogFormatter @@ -161,7 +161,7 @@ You can show the source code location where the log message is generated: ```scala import wvlet.log._ -object MyApp with LogSupport { +object MyApp extends LogSupport { Logger.setDefaultFormatter(LogFormatter.SourceCodeLogFormatter) info("log with source code") } @@ -194,7 +194,7 @@ object CustomLogFormatter extends LogFormatter { Logger.setDefaultFormatter(CustomLogFormatter) ``` -See also the examples in [LogFormat.scala](https://github.com/wvlet/airframe/blob/master/airframe-log/shared/src/main/scala/wvlet/log/LogFormat.scala): +See also the examples in [LogFormat.scala](https://github.com/wvlet/airframe/blob/main/airframe-log/shared/src/main/scala/wvlet/log/LogFormat.scala): ### Using airframe-log in Scala.js diff --git a/airspec/README.md b/airspec/README.md index 388e505ab7..72fc865751 100644 --- a/airspec/README.md +++ b/airspec/README.md @@ -1,11 +1,11 @@ AirSpec ====== -[AirSpec](https://github.com/wvlet/airframe/tree/master/airspec) is a new functional testing framework for Scala and Scala.js. +[AirSpec](https://github.com/wvlet/airframe/tree/main/airspec) is a new functional testing framework for Scala and Scala.js. AirSpec uses pure Scala functions for writing test cases. This style requires no extra learning cost if you already know Scala. For advanced users, dependency injection to test cases and property-based testing are supported optionally. -- [GitHub: AirSpec](https://github.com/wvlet/airframe/tree/master/airspec) +- [GitHub: AirSpec](https://github.com/wvlet/airframe/tree/main/airspec) - [Documentation](https://wvlet.org/airframe/docs/airspec) diff --git a/docs/airframe-control.md b/docs/airframe-control.md index f5294c6a32..eb4634458e 100644 --- a/docs/airframe-control.md +++ b/docs/airframe-control.md @@ -6,7 +6,7 @@ title: airframe-control: Retry/Rate Control airframe-control is a colleciton of libraries to manage control flows, that are especially useul for making remote API calls. For example, airframe-control has exponential back-off retry, jittering, circuit breaker, parallel task execution support, etc. -- [Source Code at GitHub](https://github.com/wvlet/airframe/tree/master/airframe-control) +- [Source Code at GitHub](https://github.com/wvlet/airframe/tree/main/airframe-control) # Usage @@ -210,7 +210,7 @@ val result = source.parallel.withParallelism(4).map { i => } ``` -You can monitor metrics of parallel execution via JMX using [airframe-jmx](https://github.com/wvlet/airframe/tree/master/airframe-jmx). +You can monitor metrics of parallel execution via JMX using [airframe-jmx](https://github.com/wvlet/airframe/tree/main/airframe-jmx). ```scala JMXAgent.defaultAgent.register[Parallel.ParallelExecutionStats](Parallel.jmxStats) diff --git a/docs/airframe-di-legacy.md b/docs/airframe-di-legacy.md index 18803a5b09..9fc4410f4d 100644 --- a/docs/airframe-di-legacy.md +++ b/docs/airframe-di-legacy.md @@ -656,7 +656,7 @@ While debugging the code in your test cases, you can also use `log-test.properti ``` wvlet.airframe=debug ``` -See [airframe-log configuration](https://github.com/wvlet/airframe/blob/master/log/README.md#configuring-log-levels) for the details of log level configurations. +See [airframe-log configuration](https://github.com/wvlet/airframe/blob/main/log/README.md#configuring-log-levels) for the details of log level configurations. Then you will see the log messages that show the object bindings and injection activities: @@ -1029,7 +1029,7 @@ val app: App = }.apply(session) ``` -To generate the above code, Airframe is using [Scala Macros](http://docs.scala-lang.org/overviews/macros/overview.html). You can find the actual macro definitions in [AirframeMacros.scala](https://github.com/wvlet/airframe/blob/master/airframe-macros/shared/src/main/scala/wvlet/airframe/AirframeMacros.scala) +To generate the above code, Airframe is using [Scala Macros](http://docs.scala-lang.org/overviews/macros/overview.html). You can find the actual macro definitions in [AirframeMacros.scala](https://github.com/wvlet/airframe/blob/main/airframe-macros/shared/src/main/scala/wvlet/airframe/AirframeMacros.scala) When `bind[X]` is called, the active session must be found. So if you try to instantiate A without using `session.build[A]`, `MISSING_SESSION` runtime-error will be thrown: @@ -1122,7 +1122,7 @@ session.get(Surface.of[X]) ### Surface -Airframe uses `Surface.of[X]` as identifiers of object types. [Surface](https://github.com/wvlet/airframe/tree/master/surface) is an object type inspection library. +Airframe uses `Surface.of[X]` as identifiers of object types. [Surface](https://github.com/wvlet/airframe/tree/main/surface) is an object type inspection library. Here are some examples of Surface: ```scala diff --git a/docs/airframe-di.md b/docs/airframe-di.md index e37a49b428..8eab92e769 100644 --- a/docs/airframe-di.md +++ b/docs/airframe-di.md @@ -538,7 +538,7 @@ While debugging the code in your test cases, you can also use `log-test.properti ``` wvlet.airframe.di=debug ``` -See [airframe-log configuration](https://github.com/wvlet/airframe/blob/master/log/README.md#configuring-log-levels) for the details of log level configurations. +See [airframe-log configuration](https://github.com/wvlet/airframe/blob/main/log/README.md#configuring-log-levels) for the details of log level configurations. Then you will see the log messages that show the object bindings and injection activities: @@ -756,7 +756,7 @@ session.get(Surface.of[X]) ### Surface -Airframe uses `Surface.of[X]` as identifiers of object types. [Surface](https://github.com/wvlet/airframe/tree/master/surface) is an object type inspection library. +Airframe uses `Surface.of[X]` as identifiers of object types. [Surface](https://github.com/wvlet/airframe/tree/main/surface) is an object type inspection library. Here are some examples of Surface: ```scala diff --git a/docs/airframe-http.md b/docs/airframe-http.md index 16cb810844..d999effeaa 100644 --- a/docs/airframe-http.md +++ b/docs/airframe-http.md @@ -169,7 +169,7 @@ server.start { server => } ``` -See also the examples in [here](https://github.com/wvlet/airframe/blob/master/airframe-http-finagle/src/test/scala/wvlet/airframe/http/finagle/FinagleServerFactoryTest.scala) +See also the examples in [here](https://github.com/wvlet/airframe/blob/main/airframe-http-finagle/src/test/scala/wvlet/airframe/http/finagle/FinagleServerFactoryTest.scala) ## Integration with Airframe DI diff --git a/docs/airframe-log.md b/docs/airframe-log.md index c54c665c4d..07a724628d 100644 --- a/docs/airframe-log.md +++ b/docs/airframe-log.md @@ -11,7 +11,7 @@ airframe-log also supports [Scala.js](https://www.scala-js.org/) to see the logs ![image](https://wvlet.org/airframe/img/airframe-log/scalajs-formatters.png) -- GitHub: [airframe-log](https://github.com/wvlet/airframe/tree/master/airframe-log) +- GitHub: [airframe-log](https://github.com/wvlet/airframe/tree/main/airframe-log) - Blog post: [Airframe Log: A Modern Logging Library for Scala](https://medium.com/@taroleo/airframe-log-a-modern-logging-library-for-scala-56fbc2f950bc) @@ -134,7 +134,7 @@ call `Logger.scheduleLogLevelScan` before running test cases. This is useful for To scan log level properties periodically with [ScalaTest](http://www.scalatest.org/), define the base trait as follows: -**[Spec.scala](https://github.com/wvlet/log/blob/master/src/test/scala/wvlet/log/Spec.scala)** +**[Spec.scala](https://github.com/wvlet/log/blob/main/src/test/scala/wvlet/log/Spec.scala)** ```scala import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, WordSpec, _} import wvlet.log.LogFormatter.SourceCodeLogFormatter @@ -206,7 +206,7 @@ object CustomLogFormatter extends LogFormatter { Logger.setDefaultFormatter(CustomLogFormatter) ``` -See also the examples in [LogFormat.scala](https://github.com/wvlet/airframe/blob/master/airframe-log/shared/src/main/scala/wvlet/log/LogFormat.scala): +See also the examples in [LogFormat.scala](https://github.com/wvlet/airframe/blob/main/airframe-log/shared/src/main/scala/wvlet/log/LogFormat.scala): ### Using airframe-log in Scala.js diff --git a/docs/airframe-parquet.md b/docs/airframe-parquet.md index 4866154651..0e649bdce7 100644 --- a/docs/airframe-parquet.md +++ b/docs/airframe-parquet.md @@ -160,7 +160,7 @@ reader.close() ## Applying Row Group Filter with Parquet FilterApi Parquet can skip reading records by using row group filters. -You can use [FilterAPI of parquet-mr](https://github.com/justcodeforfun/parquet-mr/blob/master/parquet-column/src/main/java/org/apache/parquet/filter2/predicate/FilterApi.java) to build such a filter: +You can use [FilterAPI of parquet-mr](https://github.com/justcodeforfun/parquet-mr/blob/main/parquet-column/src/main/java/org/apache/parquet/filter2/predicate/FilterApi.java) to build such a filter: ```scala import org.apache.parquet.filter2.compat.FilterCompat diff --git a/docs/airframe-rpc.md b/docs/airframe-rpc.md index 05cd74f989..47b2e55fce 100644 --- a/docs/airframe-rpc.md +++ b/docs/airframe-rpc.md @@ -306,7 +306,7 @@ Supported client types are: - __async__: (legacy client. Use rpc instead) Create an async HTTP client (ServiceClient) for Scala (JVM) using Future abstraction (`F`). The `F` can be `scala.concurrent.Future` or twitter-util's Future. -Internally, sbt-airframe generates these clients using [HTTP code generators](https://github.com/wvlet/airframe/blob/master/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/client/ScalaHttpClientGenerator.scala). This code reads a Router definition of RPC interfaces, and generate client code for calling RPC endpoints. Currently, we only supports generating HTTP clients for Scala. In near future, we would +Internally, sbt-airframe generates these clients using [HTTP code generators](https://github.com/wvlet/airframe/blob/main/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/client/ScalaHttpClientGenerator.scala). This code reads a Router definition of RPC interfaces, and generate client code for calling RPC endpoints. Currently, we only supports generating HTTP clients for Scala. In near future, we would like to add Open API spec generator so that many programming languages can be used with Airframe RPC. @@ -522,7 +522,7 @@ trait MyAPI { ### Reporting Errors with RPCStatus -Airframe RPC provides predefined [RPCStatus](https://github.com/wvlet/airframe/blob/master/airframe-http/src/main/scala/wvlet/airframe/http/RPCStatus.scala) code for reporting application errors at ease. In your RPC implementation, use one of the RPCStatus codes and create an exception with `.newException(...)` method to report an error: +Airframe RPC provides predefined [RPCStatus](https://github.com/wvlet/airframe/blob/main/airframe-http/src/main/scala/wvlet/airframe/http/RPCStatus.scala) code for reporting application errors at ease. In your RPC implementation, use one of the RPCStatus codes and create an exception with `.newException(...)` method to report an error: ```scala @@ -594,7 +594,7 @@ val rpcClient = ServiceRPC.newSyncClient(httpClient) ### Reading RPCException at the client -To read the RPCStatus and error details at the RPC client side, catch [RPCException](https://github.com/wvlet/airframe/blob/master/airframe-http/src/main/scala/wvlet/airframe/http/RPCException.scala): +To read the RPCStatus and error details at the RPC client side, catch [RPCException](https://github.com/wvlet/airframe/blob/main/airframe-http/src/main/scala/wvlet/airframe/http/RPCException.scala): ```scala try { @@ -621,7 +621,7 @@ RPC calls per second. Airframe gRPC requires no Protobuf definitions. You can us interface and case classes to define gRPC services. Example gRPC projects can be found -from [here](https://github.com/wvlet/airframe/tree/master/examples/rpc-examples). +from [here](https://github.com/wvlet/airframe/tree/main/examples/rpc-examples). __build.sbt__ @@ -825,7 +825,7 @@ request message body of an RPC request is a MessagePack Map representation of a key-value pairs of `(method argument name)` -> `(method argument value)`. When gRPC backend is used, the client must use HTTP/2 and the message body must be encoded -as [Length-Prefixed-Message](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests) +as [Length-Prefixed-Message](https://github.com/grpc/grpc/blob/main/doc/PROTOCOL-HTTP2.md#requests) defined in gRPC protocol. ### RPC Protocol @@ -886,7 +886,7 @@ case class HelloResponse(message: String) ### RPC Protocol (HTTP/2 for gRPC) For gRPC backend, see -also [gRPC over HTTP2](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md) protocol for +also [gRPC over HTTP2](https://github.com/grpc/grpc/blob/main/doc/PROTOCOL-HTTP2.md) protocol for the other HTTP headers. ```aidl diff --git a/docs/airframe-rx.md b/docs/airframe-rx.md index 075b8a5851..1dadd99b22 100644 --- a/docs/airframe-rx.md +++ b/docs/airframe-rx.md @@ -5,7 +5,7 @@ title: airframe-rx: ReactiveX interface airframe-rx is a lightweight [ReactiveX](http://reactivex.io/) implementation for Scala and Scala.js, which can be used for: - Streaming support of [Airframe gRPC](airframe-rpc.md) -- [Interactive rendering of DOM objects](https://github.com/wvlet/airframe/blob/master/airframe-http-rx/.js/src/main/scala/wvlet/airframe/http/rx/html/DOMRenderer.scala) (airframe-http-rx) +- [Interactive rendering of DOM objects](https://github.com/wvlet/airframe/blob/main/airframe-http-rx/.js/src/main/scala/wvlet/airframe/http/rx/html/DOMRenderer.scala) (airframe-http-rx) - etc. diff --git a/docs/airframe-ulid.md b/docs/airframe-ulid.md index d182bb4d8d..f2da47010b 100644 --- a/docs/airframe-ulid.md +++ b/docs/airframe-ulid.md @@ -16,7 +16,7 @@ Uses Crockford's base32 for better efficiency and readability (5 bits per charac - No special characters (URL safe) - Monotonic sort order (correctly detects and handles the same millisecond) -[Source code of airframe-ulid at GitHub](https://github.com/wvlet/airframe/tree/master/airframe-ulid) +[Source code of airframe-ulid at GitHub](https://github.com/wvlet/airframe/tree/main/airframe-ulid) ## ULID Format @@ -141,7 +141,7 @@ Comparison targets: - [scala-ulid (by Chatwork)](https://github.com/chatwork/scala-ulid) - Java's UUID.randomUUID() -[Benchmark code](https://github.com/wvlet/airframe/blob/master/airframe-benchmark/src/main/scala/wvlet/airframe/benchmark/ulid/ULIDBenchmark.scala) using JMH. +[Benchmark code](https://github.com/wvlet/airframe/blob/main/airframe-benchmark/src/main/scala/wvlet/airframe/benchmark/ulid/ULIDBenchmark.scala) using JMH. ### Scala.js-specific Note diff --git a/docs/airspec.md b/docs/airspec.md index 62aa0b5ddd..2b553389ca 100644 --- a/docs/airspec.md +++ b/docs/airspec.md @@ -4,9 +4,9 @@ layout: docs title: AirSpec: Testing Framework --- -[AirSpec](https://github.com/wvlet/airframe/tree/master/airspec) is a new functional testing framework for Scala and Scala.js. +[AirSpec](https://github.com/wvlet/airframe/tree/main/airspec) is a new functional testing framework for Scala and Scala.js. -- [GitHub: AirSpec](https://github.com/wvlet/airframe/tree/master/airspec) +- [GitHub: AirSpec](https://github.com/wvlet/airframe/tree/main/airspec) - [Background and Motivation](#background--motivation) AirSpec uses just `test("...") { ... }` syntax for writing test cases. This style requires no extra learning cost if you already know Scala. For advanced users, dependency injection to test cases and property-based testing are supported optionally. @@ -520,7 +520,7 @@ AirSpecContext also contains the name of test classes and method names, which wo ## Property Based Testing with ScalaCheck -Optionally AirSpec can integrate with [ScalaCheck](https://github.com/typelevel/scalacheck/blob/master/doc/UserGuide.md). +Optionally AirSpec can integrate with [ScalaCheck](https://github.com/typelevel/scalacheck/blob/main/doc/UserGuide.md). Add `wvlet.airspec.spi.PropertyCheck` trait to your spec, and use `forAll` methods. ```scala diff --git a/docs/comparison.md b/docs/comparison.md index 78d785971f..77e48e7e13 100644 --- a/docs/comparison.md +++ b/docs/comparison.md @@ -8,7 +8,7 @@ There are two types of dependency injection approaches; **runtime** and **compil ## Run-time Dependency Injection -- [Google Guice](https://github.com/google/guice) is a popular run-time dependency injection libraries in Java, which is also used in [Presto](https://github.com/prestodb/presto) to construct a distributed SQL engine consisting of hundreds of classes. Guice itself does not manage the lifecycle of objects and binding configurations, so Presto team at Facebook has developed [airlift-bootstrap](https://github.com/airlift/airlift/tree/master/bootstrap/src/main/java/io/airlift/bootstrap) and [airlift- configuration](https://github.com/airlift/airlift/tree/master/configuration/src/main/java/io/airlift/configuration) libraries to extend Guice's functionality. +- [Google Guice](https://github.com/google/guice) is a popular run-time dependency injection libraries in Java, which is also used in [Presto](https://github.com/prestodb/presto) to construct a distributed SQL engine consisting of hundreds of classes. Guice itself does not manage the lifecycle of objects and binding configurations, so Presto team at Facebook has developed [airlift-bootstrap](https://github.com/airlift/airlift/tree/main/bootstrap/src/main/java/io/airlift/bootstrap) and [airlift- configuration](https://github.com/airlift/airlift/tree/main/configuration/src/main/java/io/airlift/configuration) libraries to extend Guice's functionality. - One of the disadvantages of Guice is it requires constructor annotation like `@Inject`. This is less convenient if you are using third-party libraries, which cannot add such annotations. So you often need to write many provider binding modules to use third-party classes. - Airframe has provider bindings in `bind { d1: D1 => new X(d1) }` syntax so that you can directly call the constructor of third-party classes. No need to implement object binding modules. - [Guice Bootstrap](https://github.com/embulk/guice-bootstrap) is an extension of Guice to support life-cycle management using `@PostConstruct` and `@PreDestroy` annotations. @@ -60,7 +60,7 @@ The chart below shows major features supported in selected DI frameworks. For co | Dynamic-type binding | ✓ | ✓ | | ✓ (using [implicit parameters](https://gist.github.com/gvolpe/1454db0ed9476ed0189dcc016fd758aa#the-fp-way-2)) | | [Constructor injection](airframe-di.md#bind) | ✓ | ✓ (Require `@Inject` annotation) | ✓ | ✓ (manual argument passing) | | [In-trait injection](airframe-di.md#bind) (mix-in support) | ✓ | (Java has no trait) | ✓ | ✓ (manual override) | -| [Life-cycle management](airframe-di.md#life-cycle) (On start/inject/shutdown hooks) | ✓ | (Need an extension like [airlift](https://github.com/airlift/airlift/tree/master/bootstrap/src/main/java/io/airlift/bootstrap)) | limited (inject interceptor using reflection)| (Need to use IO Monad library like [Cats Effect](https://typelevel.org/cats-effect/)) | +| [Life-cycle management](airframe-di.md#life-cycle) (On start/inject/shutdown hooks) | ✓ | (Need an extension like [airlift](https://github.com/airlift/airlift/tree/main/bootstrap/src/main/java/io/airlift/bootstrap)) | limited (inject interceptor using reflection)| (Need to use IO Monad library like [Cats Effect](https://typelevel.org/cats-effect/)) | | [Lazy/eager initialization switch](airframe-di.md#life-cycle) | ✓ | ✓ (with [Stage](https://github.com/google/guice/wiki/Bootstrap)) | (lazy only) | (lazy only) | | [Multi-bindings](airframe-di.md#multi-binding) |✓ (Just Scala) | ✓ |✓ (Just Scala) |✓ (Just Scala) | [Tagged type/alias bindings](airframe-di.md#advanced-binding-types) |✓ | limited (Need to define new annotations) |✓|✓ (manual binding) | diff --git a/docs/index.md b/docs/index.md index 774da62caf..747cb157a9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -75,7 +75,7 @@ libraryDependencies ++= Seq( ) ``` -If you need an early access to the latest features, [snapshot versions](https://oss.sonatype.org/content/repositories/snapshots/org/wvlet/airframe/) are also available for each master branch commit. To use snapshot versions, add Sonatype snapshot repository to your resolver setting: +If you need an early access to the latest features, [snapshot versions](https://oss.sonatype.org/content/repositories/snapshots/org/wvlet/airframe/) are also available for each main branch commit. To use snapshot versions, add Sonatype snapshot repository to your resolver setting: ```scala resolvers += Resolver.sonatypeRepo("snapshots") diff --git a/docs/release-notes.md b/docs/release-notes.md index 769600db4c..35a3849abd 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -2109,7 +2109,7 @@ internal changes: ## 19.8.1 - **AirSpec**: Added a new function-based testing library for Scala and Scala.js [#580](https://github.com/wvlet/airframe/pull/580) - - source code: https://github.com/wvlet/airframe/tree/master/airspec + - source code: https://github.com/wvlet/airframe/tree/main/airspec - airframe-scalatest: Rename airframe-spec to airframe-scalatest [[51f8922](https://github.com/wvlet/airframe/commit/51f8922)] - airframe-surfaace: Support symbolic method names in Scala.js [[57d67fe](https://github.com/wvlet/airframe/commit/57d67fe)] - airframe-surface: Sort methodSurface based on the source code order [[bdf1a86](https://github.com/wvlet/airframe/commit/bdf1a86)] @@ -2196,7 +2196,7 @@ internal changes: - The first release of the new Reiwa era! - From this version, we will no longer support Scala 2.11. This is because Spark 2.4.2 now uses Scala 2.12 by default, and Spark has been the only reason for us to keep maintaining Airframe releases for Scala 2.11. ([#496](https://github.com/wvlet/airframe/issues/496)) [[4e37be8](https://github.com/wvlet/airframe/commit/4e37be8)] -- Add more [Airframe DI code examples](https://github.com/wvlet/airframe/tree/master/examples/src/main/scala/wvlet/airframe/examples/di) ([#495](https://github.com/wvlet/airframe/issues/495)) [[8d3b311](https://github.com/wvlet/airframe/commit/8d3b311)] +- Add more [Airframe DI code examples](https://github.com/wvlet/airframe/tree/main/examples/src/main/scala/wvlet/airframe/examples/di) ([#495](https://github.com/wvlet/airframe/issues/495)) [[8d3b311](https://github.com/wvlet/airframe/commit/8d3b311)] ## 19.4.2 - airframe-http: Add HttpClient ([#482](https://github.com/wvlet/airframe/issues/482)) [[4bb9463](https://github.com/wvlet/airframe/commit/4bb9463)] @@ -2336,7 +2336,7 @@ internal changes: - Airframe now has its brand logo!

-logo +logo

- airframe-launcher: Fix sub method command help message [[3b22d74](https://github.com/wvlet/airframe/commit/3b22d74)] @@ -2536,7 +2536,7 @@ internal changes: ## 0.34 - No major change in terms of features, API. - Airframe now uses [sbt-dnyver](https://github.com/dwijnand/sbt-dynver) for auto versioning. - - For each commit in the master branch, you can find a snapshot version from https://oss.sonatype.org/content/repositories/snapshots/org/wvlet/airframe/ + - For each commit in the main branch, you can find a snapshot version from https://oss.sonatype.org/content/repositories/snapshots/org/wvlet/airframe/ - For example, [airframe-log_2.12/0.33.1+12-682c4e07-SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/wvlet/airframe/airframe-log_2.12/0.33.1+12-682c4e07-SNAPSHOT/), means that this version is based on the version `0.33.1` and `12` commits away from the previous version tag, and using git revision `682c4e07`. - The release versions will be like `0.34` as usual and available from Maven central. @@ -2564,7 +2564,7 @@ internal changes: - Dropped support of Scala.js + Scala 2.11 combination. Scala.js libraries will support only Scala 2.12 (or higher) in upcoming releases ## 0.26 - - Add an initial version of [airframe-tablet](https://github.com/wvlet/airframe/tree/master/tablet), a [MessagePack](https://msgpack.org) based data transcoder + - Add an initial version of [airframe-tablet](https://github.com/wvlet/airframe/tree/main/tablet), a [MessagePack](https://msgpack.org) based data transcoder ## 0.25 - **airframe-log** Upgrade the internal log rotation library to logback-core 1.2.3 @@ -2582,14 +2582,14 @@ internal changes: - Apply scalafmt code style ## 0.21 - - Add [airframe-launcher](https://github.com/wvlet/airframe/tree/master/airframe-opts) command line parser. + - Add [airframe-launcher](https://github.com/wvlet/airframe/tree/main/airframe-opts) command line parser. ## 0.20 - - Migrated [airframe-log](https://github.com/wvlet/airframe/tree/master/airframe-log) from [wvlet-log](https://github.com/wvlet/log) because + - Migrated [airframe-log](https://github.com/wvlet/airframe/tree/main/airframe-log) from [wvlet-log](https://github.com/wvlet/log) because these are often commonly used. ## 0.19 - - Add [airframe-jmx](https://github.com/wvlet/airframe/tree/master/airframe-jmx) to expose object parameters through JMX + - Add [airframe-jmx](https://github.com/wvlet/airframe/tree/main/airframe-jmx) to expose object parameters through JMX ## 0.18 - Add beforeShutdown, onInject lifecycle hooks @@ -2616,7 +2616,7 @@ these are often commonly used. - Merged wvlet-config as airframe-config. This module is useful for creating configuration objects from YAML file. ## 0.14 - - [Surface](https://github.com/wvlet/airframe/tree/master/surface) is now a part of Airframe + - [Surface](https://github.com/wvlet/airframe/tree/main/surface) is now a part of Airframe - Added RuntimeSurface for the convenience of creating Surface from runtime-type information (reflect.universe.Type) - Added ObjectBuilder to build objects from Surface information diff --git a/sbt-airframe/README.md b/sbt-airframe/README.md index 6a7503778c..993e790117 100644 --- a/sbt-airframe/README.md +++ b/sbt-airframe/README.md @@ -40,7 +40,7 @@ Supported client types are: - __grpc__: Create gRPC client factory (ServiceGrpc: SyncClient, AsyncClient) To support other types of clients, see the examples -of [HTTP code generators](https://github.com/wvlet/airframe/blob/master/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/client/ScalaHttpClientGenerator.scala) +of [HTTP code generators](https://github.com/wvlet/airframe/blob/main/airframe-http-codegen/src/main/scala/wvlet/airframe/http/codegen/client/ScalaHttpClientGenerator.scala) . This code reads a Router definition of RPC interfaces, and generate client code for calling RPC endpoints. Currently, we only supports generating HTTP clients for Scala. In near future, we would like to add Open API spec generator so that many programming languages can be used with Airframe diff --git a/scripts/publish.sh b/scripts/publish.sh deleted file mode 100755 index f5bfcac934..0000000000 --- a/scripts/publish.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -set -e - -if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" -o "$TRAVIS_BRANCH" == "$TRAVIS_TAG" ]; then - PUBLIC_IP=$(curl https://api.ipify.org) - echo "Public IP Address of this machine: ${PUBLIC_IP}" - openssl aes-256-cbc -K $encrypted_fa45534951b5_key -iv $encrypted_fa45534951b5_iv -in travis/secrets.tar.enc -out travis/secrets.tar -d - tar xvf travis/secrets.tar - if [ -z "$TRAVIS_TAG" ]; then - # Publish a snapshot - ./sbt "publishSnapshots" - else - # Used for sbt-pgp - gpg --import ./travis/local.pubring.asc - gpg --import ./travis/local.secring.asc - case "$PROJECT" in - publish) - # Publish a release version - ./sbt "; + projectJVM2_13/publishSigned; + projectJVM2_12/publishSigned; sonatypeBundleRelease" - ;; - publish-js) - # Publish a release version - SCALAJS_VERSION=0.6.31 ./sbt "projectJS/publishSigned" - SCALAJS_VERSION=1.0.0-RC2 ./sbt "; projectJS/publishSigned; sonatypeBundleRelease" - ;; - esac - fi -else - echo "This not a master branch commit. Skipping the release step" -fi diff --git a/scripts/publishMicrosite.sh b/scripts/publishMicrosite.sh deleted file mode 100755 index 95e46fe296..0000000000 --- a/scripts/publishMicrosite.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -e - -git config --global user.email "leo@xerial.org" -git config --global user.name "Taro L. Saito" -git config --global push.default simple - -git reset --hard HEAD -git clean -f -git checkout master -git pull origin master -sbt docs/publishMicrosite diff --git a/scripts/release.rb b/scripts/release.rb index aa626d2c57..ad2c41f2fa 100755 --- a/scripts/release.rb +++ b/scripts/release.rb @@ -1,7 +1,7 @@ #!/usr/bin/env ruby current_branch = `git rev-parse --abbrev-ref HEAD`.strip -abort("release.rb must run on master or main branch. The current branch is #{current_branch}") unless ["master", "main"].include?(current_branch) +abort("release.rb must run on main branch. The current branch is #{current_branch}") unless ["main"].include?(current_branch) last_tag = `git describe --tags --abbrev=0`.chomp last_version = last_tag.sub("v", "")