Skip to content

Commit 4cbd941

Browse files
authored
Merge pull request #223 from AO2324-00/develop
テスト仕様書の場所の修正とバージョンの変更
2 parents e8900c9 + 05686d2 commit 4cbd941

File tree

7 files changed

+53
-28
lines changed

7 files changed

+53
-28
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ See [deno.land](https://deno.land/#installation) for more installation options.
3939
### Start the server
4040
You can start the server with the command "deno run -A . /server.ts".
4141
```typescript
42-
import { System, Config } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
42+
import { System, Config } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
4343

4444
System.listen(8080, (conf: Config) => {
4545
console.log(`The server running on http://${conf.hostname}:${conf.port}`);
@@ -49,7 +49,7 @@ System.listen(8080, (conf: Config) => {
4949
### Configuring Routing
5050
You can host a static server by simply specifying the file path!
5151
```typescript
52-
import { System, Config } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
52+
import { System, Config } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
5353

5454
System.createRoute("./index.html").URL("/", "/Top");
5555

@@ -63,7 +63,7 @@ System.listen(8080, (conf: Config) => {
6363
### Configuring Controller
6464
If you want to set up dynamic processing, connect the method to the route you created and specify the handler function.
6565
```typescript
66-
import { System, Config, SystemRequest, SystemResponse } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
66+
import { System, Config, SystemRequest, SystemResponse } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
6767

6868
System.createRoute("ContactForm").URL("/Contact")
6969
.GET(async (req: SystemRequest, res: SystemResponse) => {
@@ -90,7 +90,7 @@ System.listen(8080, (conf: Config) => {
9090
### How to set up the redirection process
9191
The Puddle Framework provides two ways to redirect clients.
9292
```typescript
93-
import { System, Config, SystemRequest, SystemResponse, redirect } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
93+
import { System, Config, SystemRequest, SystemResponse, redirect } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
9494

9595
System.createRoute("example1").URL("/Redirect1")
9696
.GET(redirect("https://www.example.com"));
@@ -110,7 +110,7 @@ System.listen(8080, (conf: Config) => {
110110
### Start the Websocket server
111111
Websockets server routing can be done in the same way as web server routing!
112112
```typescript
113-
import { System, Config, SystemRequest, WebSocketClient } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
113+
import { System, Config, SystemRequest, WebSocketClient } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
114114

115115
System.createRoute("./webSocket.html").URL("/", "/top");
116116
System.createRoute("/ws").WebSocket();
@@ -123,7 +123,7 @@ System.listen(8080, (conf: Config)=>{
123123
### How to set up Websockets events
124124
To handle each Websocket event, set up a handler function by connecting a method to the created Websocket route.
125125
```typescript
126-
import { System, Config, SystemRequest, WebSocketClient } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
126+
import { System, Config, SystemRequest, WebSocketClient } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
127127

128128
System.createRoute("./webSocket.html").URL("/", "/top");
129129

@@ -170,7 +170,7 @@ System.AUTH.GOOGLE(client_id, client_secret, redirect_url).URL("/Login")
170170
## Easily manipulate JSON files
171171
It provides functions to easily manipulate data in JSON files!
172172
```typescript
173-
import { PuddleJSON } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
173+
import { PuddleJSON } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
174174

175175
const USERS = PuddleJSON.USE("./users.json", {
176176
id: ["UNIQUE", "NOT NULL", "AUTO INCREMENT"],

_FileOperations/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Reading and writing text files
22
Methods for reading and writing text files.
33
```typescript
4-
import { System, FileManager } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts"
4+
import { System, FileManager } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts"
55

66
await System.fm.read("./filePath");
77
await System.fm.write("./filePath", "text");
@@ -13,7 +13,7 @@ await FileManager.write("./filePath", "text");
1313
## Manipulate JSON files
1414
It provides functions to easily manipulate data in JSON files.
1515
```typescript
16-
import { System, PuddleJSON } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
16+
import { System, PuddleJSON } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
1717

1818
// Specify the JSON file to be manipulated and its schema.
1919
const USERS = PuddleJSON.USE("./users.json", {

_RouterAndController/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ In the Puddle framework, a Route is created for each request, and the URL array
55
### Basic Specifications
66
`System.createRoute(routeName: string): Route`
77
```typescript
8-
import { System, Route } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
8+
import { System, Route } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
99

1010
// The most basic method.
1111
System.createRoute("example1");
@@ -53,7 +53,7 @@ System.Route("./works.html").URL(["/Works", "/works"]);
5353
## Set up processing for each request method
5454
By connecting the request method to the Route object you have created, you can set up the process.
5555
```typescript
56-
import { System, redirect, SystemRequest, SystemResponse } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
56+
import { System, redirect, SystemRequest, SystemResponse } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
5757

5858
System.createRoute("login")
5959
.POST((req: SystemRequest, res: SystemResponse) => {
@@ -86,7 +86,7 @@ System.Route("/ws").isWebSocket; // true
8686
## Configuring Web Socket Events
8787
Configure the processing for each event of the web socket.
8888
```typescript
89-
import { System, SystemRequest, WebSocketClient } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
89+
import { System, SystemRequest, WebSocketClient } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
9090
System.createRoute("/ws").WebSocket()
9191
.onopen((ws: WebSocketClient) => {
9292
console.log("Opening new connection.");

_WebSocket/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Configuring Web Socket Events
44
Configure the processing for each event of the web socket.
55
```typescript
6-
import { System, SystemRequest, WebSocketClient } from "https://github.com/PuddleServer/Puddle/raw/v1.1.0-beta/mod.ts";
6+
import { System, SystemRequest, WebSocketClient } from "https://github.com/PuddleServer/Puddle/raw/v1.1.1-beta/mod.ts";
77
System.createRoute("/ws").WebSocket()
88
.onopen((ws: WebSocketClient) => {
99
console.log("Opening new connection.");
File renamed without changes.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# class SelectedRows
2+
3+
## Unit Test
4+
5+
### constructor
6+
> #### **Case 1**
7+
> **Arguments**
8+
> | name | Type |
9+
> | :- | :- |
10+
> | selectedRows | ROW[] |
11+
> | filePath | string |
12+
> | schema | SCHEMA |
13+
>
14+
> **Return**
15+
> Type
16+
> * string*
17+
>
18+
> **Test**
19+
> Preparation
20+
> ```typescript
21+
> const selectedRows = [
22+
> {"name":"Jonh", "age": 20},
23+
> {"name":"Alex", "age": 18}
24+
> ];
25+
> const filePath = "../testdata/assets/users.json"
26+
> ```
27+
>
28+
> Implementation
29+
> `PuddleJSON.stringify(data) === answer`
30+
> ```typescript
31+
> true
32+
> ```
33+
<br>

test/run_Test/test.ts

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
import { serve } from "https://deno.land/[email protected]/http/server.ts";
2-
//const stream = await Deno.readFile("./assets/PuddleLogo.png")
3-
console.log(import.meta.url)
4-
const resp = await fetch("file:///D:/workspace/Puddle-1/Puddle-1/test/run_Test/assets/PuddleLogo.png");
5-
console.log("========")
6-
console.log("=>",resp.body)
7-
serve(async(_req) => {
8-
const resp = await fetch("file:///D:/workspace/Puddle-1/Puddle-1/test/run_Test/assets/PuddleLogo.png");
9-
console.log("========")
10-
console.log("=>",resp.body)
11-
return new Response(resp.body, {
12-
headers: { "content-type": "image/png; charset=utf-8" },
13-
});
14-
});
15-
console.log("http://localhost:8000/");
1+
import {System} from "../../mod.ts";
2+
3+
System.listen(8080);
4+
5+
System.createRoute("/").GET(async(req,res)=>{
6+
await res.setFile("./assets/PuddleLogo.png");
7+
});

0 commit comments

Comments
 (0)