Skip to content

Commit 3870f54

Browse files
authored
Merge pull request #3034 from michelleN/updatetemplates
rm Fermyon from template output and examples
2 parents c2ef228 + a7b1a38 commit 3870f54

File tree

11 files changed

+28
-26
lines changed

11 files changed

+28
-26
lines changed

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ That's it! Now that the application is running, use your browser or cURL in anot
7373
# Send a request to the application.
7474
$ curl -i 127.0.0.1:3000
7575
HTTP/1.1 200 OK
76-
foo: bar
77-
content-length: 14
78-
date: Thu, 13 Apr 2023 17:47:24 GMT
76+
content-type: text/plain
77+
transfer-encoding: chunked
78+
date: Sun, 02 Mar 2025 20:09:11 GMT
7979

80-
Hello, Fermyon
80+
Hello World!
8181
```
82+
8283
You can make the app do more by editting the `src/lib.rs` file in the `hello-rust` directory using your favorite editor or IDE. To learn more about writing Spin applications see [Writing Applications](https://developer.fermyon.com/spin/writing-apps) in the Spin documentation. To learn how to publish and distribute your application see the [Publishing and Distribution](https://developer.fermyon.com/spin/distributing-apps) guide in the Spin documentation.
8384

8485
For more information on the cli commands and subcommands see the [CLI Reference](https://developer.fermyon.com/common/cli-reference).

examples/http-cpp/lib.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extern "C" void spin_http_handle_http_request(spin_http_request_t *request,
1717
header->f0 = header_name;
1818
header->f1 = header_value;
1919

20-
auto body_string = "Hello, Fermyon!\n";
20+
auto body_string = "Hello World!\n";
2121
auto body_length = strlen(body_string);
2222
auto body = static_cast<uint8_t *>(malloc(body_length));
2323
memcpy(body, body_string, body_length);

examples/spin-timer/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To test:
2222
```toml
2323
name= "trigger-timer"
2424
description= "Run Spin components at timed intervals"
25-
homepage= "https://github.com/fermyon/spin/tree/main/examples/spin-timer"
25+
homepage= "https://github.com/spinframework/spin/tree/main/examples/spin-timer"
2626
version= "0.1.0"
2727
spin_compatibility= ">=2.0"
2828
license= "Apache-2.0"

examples/spin-timer/trigger-timer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "trigger-timer",
33
"description": "Run Spin components at timed intervals",
4-
"homepage": "https://github.com/fermyon/spin/tree/main/examples/spin-timer",
4+
"homepage": "https://github.com/spinframework/spin/tree/main/examples/spin-timer",
55
"version": "0.1.0",
66
"spinCompatibility": ">=2.2",
77
"license": "Apache-2.0",

examples/spin-wagi-http/http-rust/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ fn goodbye_world(req: http::Request<()>) -> Result<http::Response<&'static str>>
88
Ok(http::Response::builder()
99
.status(200)
1010
.header("foo", "bar")
11-
.body("Goodbye, Fermyon!\n")?)
11+
.body("Goodbye, World!\n")?)
1212
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
#include<iostream>
1+
#include <iostream>
22

3-
int main() {
4-
std::cout << "Content-Type: application/text\n\nHello, Fermyon!\n" << std::endl;
3+
int main()
4+
{
5+
std::cout << "Content-Type: application/text\n\nHello World!\n"
6+
<< std::endl;
57
return 0;
6-
78
}

templates/http-go/content/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ import (
1010
func init() {
1111
spinhttp.Handle(func(w http.ResponseWriter, r *http.Request) {
1212
w.Header().Set("Content-Type", "text/plain")
13-
fmt.Fprintln(w, "Hello Fermyon!")
13+
fmt.Fprintln(w, "Hello World!")
1414
})
1515
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo "Hello Fermyon Spin"; ?>
1+
<?php echo "Hello World!"; ?>

templates/http-rust/content/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ fn handle_{{project-name | snake_case}}(req: Request) -> anyhow::Result<impl Int
88
Ok(Response::builder()
99
.status(200)
1010
.header("content-type", "text/plain")
11-
.body("Hello, Fermyon")
11+
.body("Hello World!")
1212
.build())
1313
}

tests/integration.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ mod integration_tests {
185185
assert_spin_request(
186186
spin,
187187
Request::new(Method::Get, "/hello"),
188-
Response::new_with_body(200, "Hello, Fermyon!\n"),
188+
Response::new_with_body(200, "Hello World!\n"),
189189
)?;
190190

191191
assert_eventually!(
@@ -321,8 +321,8 @@ mod integration_tests {
321321
)
322322
};
323323

324-
test("golang", "Hello Fermyon!\n")?;
325-
test("rust", "Hello, Fermyon")?;
324+
test("golang", "Hello World!\n")?;
325+
test("rust", "Hello World!")?;
326326
test("javascript", "Hello from JS-SDK")?;
327327
test("typescript", "Hello from TS-SDK")?;
328328
Ok(())
@@ -370,12 +370,12 @@ mod integration_tests {
370370
assert_spin_request(
371371
spin,
372372
Request::new(Method::Get, "/outbound-allowed"),
373-
Response::new_with_body(200, "Hello, Fermyon!\n"),
373+
Response::new_with_body(200, "Hello World!\n"),
374374
)?;
375375
assert_spin_request(
376376
spin,
377377
Request::new(Method::Get, "/outbound-allowed-alt"),
378-
Response::new_with_body(200, "Hello, Fermyon!\n"),
378+
Response::new_with_body(200, "Hello World!\n"),
379379
)?;
380380

381381
assert_spin_request(
@@ -403,7 +403,7 @@ mod integration_tests {
403403
&[],
404404
|_| Ok(()),
405405
HashMap::default(),
406-
"Hello, Fermyon",
406+
"Hello World!",
407407
)
408408
}
409409

@@ -582,7 +582,7 @@ mod integration_tests {
582582
&[],
583583
prebuild,
584584
HashMap::default(),
585-
"Hello Fermyon!\n",
585+
"Hello World!\n",
586586
)
587587
}
588588

@@ -666,7 +666,7 @@ mod integration_tests {
666666
|_| Ok(()),
667667
HashMap::default(),
668668
"/index.php",
669-
"Hello Fermyon Spin",
669+
"Hello World!",
670670
)
671671
}
672672

@@ -749,7 +749,7 @@ mod integration_tests {
749749
assert_spin_request(
750750
env.runtime_mut(),
751751
Request::new(Method::Get, "/"),
752-
Response::new_with_body(200, "Hello, Fermyon"),
752+
Response::new_with_body(200, "Hello World!"),
753753
)?;
754754
Ok(())
755755
}
@@ -1456,7 +1456,7 @@ route = "/..."
14561456
&[("Host", "google.com")],
14571457
Some(""),
14581458
),
1459-
Response::new_with_body(200, "Hello, Fermyon!\n"),
1459+
Response::new_with_body(200, "Hello World!\n"),
14601460
)?;
14611461
Ok(())
14621462
},

tests/test-components/components/hello-world/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ fn hello_world(req: http::Request<()>) -> anyhow::Result<http::Response<&'static
77
Ok(http::Response::builder()
88
.status(200)
99
.header("Content-Type", "text/plain")
10-
.body("Hello, Fermyon!\n")?)
10+
.body("Hello World!\n")?)
1111
}

0 commit comments

Comments
 (0)