Skip to content

Commit

Permalink
released 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamhead committed Sep 2, 2023
1 parent 61b3119 commit f60ad71
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Moco is an easy setup stub framework.

## Latest Release
* __1.4.0__
* __1.5.0__

More details in [Release Notes](moco-doc/ReleaseNotes.md)

Expand All @@ -25,7 +25,7 @@ Integration, especially based on HTTP protocol, e.g. web service, REST etc, is w
In the old days, we just deployed another WAR to an application server, e.g. Jetty or Tomcat etc. As we all know, it's so boring to develop a WAR and deploy it to any application server, even if we use an embeded server. And the WAR needs to be reassembled even if we just want to change a little bit.

## Quick Start
* Download [Standalone Moco Runner](https://repo1.maven.org/maven2/com/github/dreamhead/moco-runner/1.4.0/moco-runner-1.4.0-standalone.jar)
* Download [Standalone Moco Runner](https://repo1.maven.org/maven2/com/github/dreamhead/moco-runner/1.5.0/moco-runner-1.5.0-standalone.jar)
* Write your own configuration file to describe your Moco server configuration as follow:
```json
[
Expand Down Expand Up @@ -83,7 +83,7 @@ git clone git@github.com:dreamhead/moco.git
Check out what you can help [here](moco-doc/plan.md) if you do not have any existing idea.

## Copyright and license
Copyright 2012-2022 ZHENG Ye
Copyright 2012-2023 ZHENG Ye

Licensed under MIT License (the "License"); You may obtain a copy of the License in the LICENSE file, or at:

Expand Down
2 changes: 1 addition & 1 deletion moco-doc/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Release 1.5.0
# Release 1.5.0(31-Aug-2023)
## APIs
* `req.client.port` is supported in template
* `sameSite` cookie attribute is supported
Expand Down
8 changes: 4 additions & 4 deletions moco-doc/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -1712,7 +1712,7 @@ server.response(cookie("loggedIn", "true", maxAge(1, TimeUnit.HOURS)), status(30

##### Same Site

**@Since will be at next release**
**@Since 1.5.0**

The SameSite attribute can be set to control whether or not a cookie is sent with cross-site requests, providing some protection against cross-site request forgery attacks (CSRF).

Expand Down Expand Up @@ -1746,7 +1746,7 @@ server.response(cookie("loggedIn", "true", sameSite("Lax")), status(302))
```

### CORS
**@Sinace will be at next release**
**@Sinace 1.5.0**

Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the resource originated. You can add your own `cors` to your response.

Expand Down Expand Up @@ -2653,9 +2653,9 @@ server.request(by(uri("/template"))).response(template("${req.client.address}"))
```
##### Port
**@Since will be at next release**
**@Since 1.5.0**
`req.client.port` can be used in template to return client IP address.
`req.client.port` can be used in template to return client port.
```java
server.request(by(uri("/template"))).response(template("${req.client.port}"));
Expand Down
2 changes: 1 addition & 1 deletion moco-doc/cmd.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Standalone Command Line

Moco can be used as standalone to run with configuration and you can download standalone directly:
[Standalone Moco Runner](https://repo1.maven.org/maven2/com/github/dreamhead/moco-runner/1.4.0/moco-runner-1.4.0-standalone.jar)
[Standalone Moco Runner](https://repo1.maven.org/maven2/com/github/dreamhead/moco-runner/1.5.0/moco-runner-1.5.0-standalone.jar)

First of all, a JSON configuration file needs to be provided to start Moco.

Expand Down
4 changes: 2 additions & 2 deletions moco-doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Moco has been published on Maven repository, so you can refer to it directly in
<dependency>
<groupId>com.github.dreamhead</groupId>
<artifactId>moco-core</artifactId>
<version>1.4.0</version>
<version>1.5.0</version>
</dependency>
```

Expand All @@ -44,7 +44,7 @@ repositories {
dependencies {
testImplementation(
"com.github.dreamhead:moco-core:1.4.0",
"com.github.dreamhead:moco-core:1.5.0",
)
}
```
Expand Down

0 comments on commit f60ad71

Please sign in to comment.