Skip to content

Commit

Permalink
Replace buf and connect with connectrpc.com (#62)
Browse files Browse the repository at this point in the history
Searched for `connect.build` and `buf.build` to replace appropriate
usages to `connectrpc.com`
  • Loading branch information
buildbreaker authored Aug 8, 2023
1 parent fab9e07 commit 1eb0968
Show file tree
Hide file tree
Showing 15 changed files with 92 additions and 92 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ It only takes ~10 minutes to complete a working chat app that uses Connect-Kotli

Comprehensive documentation for everything, including
[interceptors][interceptors], [streaming][streaming], and [error handling][error-handling]
is available on the [connect.build website][getting-started].
is available on the [connectrpc.com website][getting-started].

## Generation Options
## Generation Options

| **Option** | **Type** | **Default** | **Repeatable** | **Details** |
|----------------------------|:--------:|:-----------:|:--------------:|-------------------------------------------------|
Expand All @@ -113,10 +113,10 @@ is available on the [connect.build website][getting-started].

## Example Apps

Example apps are available in [`/examples`](./examples). First, run `make generate` to generate
Example apps are available in [`/examples`](./examples). First, run `make generate` to generate
code for the Protobuf plugins.

For the [Android example](./examples/android), you can run `make installandroid` to build and install
For the [Android example](./examples/android), you can run `make installandroid` to build and install
a fully functional Android application using Connect-Kotlin.

Additionally, there are pure Kotlin examples that demonstrate a simple main executable using Connect-Kotlin:
Expand Down Expand Up @@ -163,17 +163,17 @@ Offered under the [Apache 2 license][license].
[buf-studio]: https://buf.build/studio
[connect-crosstest]: https://github.com/bufbuild/connect-crosstest
[connect-go]: https://github.com/bufbuild/connect-go
[connect-protocol]: https://connect.build/docs/protocol
[connect-protocol]: https://connectrpc.com/docs/protocol
[connect-swift]: https://github.com/bufbuild/connect-swift
[connect-web]: https://www.npmjs.com/package/@bufbuild/connect-web
[error-handling]: https://connect.build/docs/kotlin/errors
[getting-started]: https://connect.build/docs/kotlin/getting-started
[error-handling]: https://connectrpc.com/docs/kotlin/errors
[getting-started]: https://connectrpc.com/docs/kotlin/getting-started
[grpc-protocol]: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md
[grpc-web-protocol]: https://github.com/grpc/grpc-web
[interceptors]: https://connect.build/docs/kotlin/interceptors
[interceptors]: https://connectrpc.com/docs/kotlin/interceptors
[license]: https://github.com/bufbuild/connect-go/blob/main/LICENSE
[protobuf]: https://developers.google.com/protocol-buffers
[protocol]: https://connect.build/docs/protocol
[protocol]: https://connectrpc.com/docs/protocol
[server reflection]: https://github.com/bufbuild/connect-grpcreflect-go
[slack]: https://buf.build/links/slack
[streaming]: https://connect.build/docs/kotlin/using-clients#using-generated-clients
[streaming]: https://connectrpc.com/docs/kotlin/using-clients#using-generated-clients
6 changes: 3 additions & 3 deletions examples/android/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Eliza chat app example

This example app uses the `Connect` library and provides an interface for
[chatting with Eliza](https://buf.build/bufbuild/eliza) via an Android application.
[chatting with Eliza](https://connectrpc.com/bufbuild/eliza) via an Android application.

The app has support for chatting using a variety of protocols supported by
the Connect-Kotlin library:

- [Connect](https://connect.build) + unary
- [Connect](https://connect.build) + streaming
- [Connect](https://connectrpc.com) + unary
- [Connect](https://connectrpc.com) + streaming
- [gRPC](https://grpc.io) + unary
- [gRPC](https://grpc.io) + streaming
- [gRPC-Web](https://grpc.io) + unary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ElizaChatActivity : AppCompatActivity() {
.writeTimeout(10, TimeUnit.MINUTES)
.callTimeout(10, TimeUnit.MINUTES)
.build()
val host = "https://demo.connect.build"
val host = "https://demo.connectrpc.com"
val protocol = intent.getStringExtra(PROTOCOL_KEY)
// Get the user selected protocol.
val selectedNetworkProtocolOption = when (protocol) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Main {
@JvmStatic
fun main(args: Array<String>) {
runBlocking {
val host = "https://demo.connect.build"
val host = "https://demo.connectrpc.com"
val client = ProtocolClient(
httpClient = ConnectOkHttpClient(
OkHttpClient()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Main {
@JvmStatic
fun main(args: Array<String>) {
runBlocking {
val host = "https://demo.connect.build"
val host = "https://demo.connectrpc.com"
val client = ProtocolClient(
httpClient = ConnectOkHttpClient(
OkHttpClient()
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/kotlin/build/buf/connect/Code.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ enum class Code(val codeName: String, val value: Int) {
UNAUTHENTICATED("unauthenticated", 16);

companion object {
// https://connect.build/docs/protocol#http-to-error-code
// https://connectrpc.com/docs/protocol#http-to-error-code
fun fromHTTPStatus(status: Int): Code {
return when (status) {
200 -> OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import java.net.URI
* Set of configuration used to set up clients.
*/
class ProtocolClientConfig @JvmOverloads constructor(
// The host (e.g., https://buf.build).
// The host (e.g., https://connectrpc.com).
val host: String,
// The client to use for performing requests.
// The serialization strategy for decoding messages.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import java.net.URL

/**
* The Connect protocol.
* https://connect.build/docs
* https://connectrpc.com/docs
*/
internal class ConnectInterceptor(
private val clientConfig: ProtocolClientConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class InterceptorChainTest {

@Test
fun fifo_request_unary() {
val response = unaryChain.requestFunction(HTTPRequest(URL("https://buf.build"), "", emptyMap(), null, methodSpec))
val response = unaryChain.requestFunction(HTTPRequest(URL("https://connectrpc.com"), "", emptyMap(), null, methodSpec))
assertThat(response.headers.get("id")).containsExactly("1", "2", "3", "4")
}

Expand All @@ -76,7 +76,7 @@ class InterceptorChainTest {

@Test
fun fifo_request_stream() {
val request = streamingChain.requestFunction(HTTPRequest(URL("https://buf.build"), "", emptyMap(), null, methodSpec))
val request = streamingChain.requestFunction(HTTPRequest(URL("https://connectrpc.com"), "", emptyMap(), null, methodSpec))
assertThat(request.headers.get("id")).containsExactly("1", "2", "3", "4")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ class ProtocolClientConfigTest {
@Test
fun hostUri() {
val config = ProtocolClientConfig(
host = "https://connect.build",
host = "https://connectrpc.com",
serializationStrategy = mock { }
)
assertThat(config.baseUri.host).isEqualTo("connect.build")
assertThat(config.baseUri.host).isEqualTo("connectrpc.com")
assertThat(config.baseUri.toURL()).isNotNull()
}

@Test(expected = MalformedURLException::class)
fun unsupportedSchemeErrorsWhenTranslatingToURL() {
val config = ProtocolClientConfig(
host = "xhtp://connect.build",
host = "xhtp://connectrpc.com",
serializationStrategy = mock { }
)
config.baseUri.toURL()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BiDirectionalStreamTest {
val client = ProtocolClient(
httpClient = mock { },
config = ProtocolClientConfig(
host = "https://buf.build/",
host = "https://connectrpc.com/",
serializationStrategy = serializationStrategy
)
)
Expand Down Expand Up @@ -72,7 +72,7 @@ class BiDirectionalStreamTest {
val client = ProtocolClient(
httpClient = mock { },
config = ProtocolClientConfig(
host = "https://buf.build/",
host = "https://connectrpc.com/",
serializationStrategy = serializationStrategy
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ProtocolClientTest {
val client = ProtocolClient(
httpClient = httpClient,
config = ProtocolClientConfig(
host = "https://buf.build/",
host = "https://connectrpc.com/",
serializationStrategy = serializationStrategy
)
)
Expand All @@ -70,7 +70,7 @@ class ProtocolClientTest {
val client = ProtocolClient(
httpClient = httpClient,
config = ProtocolClientConfig(
host = "https://buf.build",
host = "https://connectrpc.com",
serializationStrategy = serializationStrategy
)
)
Expand All @@ -94,7 +94,7 @@ class ProtocolClientTest {
val client = ProtocolClient(
httpClient = httpClient,
config = ProtocolClientConfig(
host = "https://buf.build/",
host = "https://connectrpc.com/",
serializationStrategy = serializationStrategy
)
)
Expand All @@ -119,7 +119,7 @@ class ProtocolClientTest {
val client = ProtocolClient(
httpClient = httpClient,
config = ProtocolClientConfig(
host = "https://buf.build",
host = "https://connectrpc.com",
serializationStrategy = serializationStrategy
)
)
Expand All @@ -143,7 +143,7 @@ class ProtocolClientTest {
val client = ProtocolClient(
httpClient = httpClient,
config = ProtocolClientConfig(
host = "https://buf.build",
host = "https://connectrpc.com",
serializationStrategy = serializationStrategy
)
)
Expand All @@ -160,7 +160,7 @@ class ProtocolClientTest {
// Use HTTP client to determine and verify the final URL.
val captor = argumentCaptor<HTTPRequest>()
verify(httpClient).unary(captor.capture(), any())
assertThat(captor.firstValue.url.toString()).isEqualTo("https://buf.build/build.buf.connect.SomeService/Service")
assertThat(captor.firstValue.url.toString()).isEqualTo("https://connectrpc.com/build.buf.connect.SomeService/Service")
}

@Test
Expand All @@ -171,7 +171,7 @@ class ProtocolClientTest {
val client = ProtocolClient(
httpClient = httpClient,
config = ProtocolClientConfig(
host = "https://buf.build/",
host = "https://connectrpc.com/",
serializationStrategy = serializationStrategy
)
)
Expand All @@ -188,6 +188,6 @@ class ProtocolClientTest {
// Use HTTP client to determine and verify the final URL.
val captor = argumentCaptor<HTTPRequest>()
verify(httpClient).unary(captor.capture(), any())
assertThat(captor.firstValue.url.toString()).isEqualTo("https://buf.build/build.buf.connect.SomeService/Service")
assertThat(captor.firstValue.url.toString()).isEqualTo("https://connectrpc.com/build.buf.connect.SomeService/Service")
}
}
Loading

0 comments on commit 1eb0968

Please sign in to comment.