From f60ad7184b298699f9f1d7e68a69b40cd520928f Mon Sep 17 00:00:00 2001 From: dreamhead Date: Sat, 2 Sep 2023 09:24:00 +0800 Subject: [PATCH] released 1.5.0 --- README.md | 6 +++--- moco-doc/ReleaseNotes.md | 2 +- moco-doc/apis.md | 8 ++++---- moco-doc/cmd.md | 2 +- moco-doc/usage.md | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c800f52b8..2766dcdf3 100644 --- a/README.md +++ b/README.md @@ -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) @@ -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 [ @@ -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: diff --git a/moco-doc/ReleaseNotes.md b/moco-doc/ReleaseNotes.md index d26d7dcdf..c0ace898a 100644 --- a/moco-doc/ReleaseNotes.md +++ b/moco-doc/ReleaseNotes.md @@ -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 diff --git a/moco-doc/apis.md b/moco-doc/apis.md index c11575ea6..36a5280a9 100644 --- a/moco-doc/apis.md +++ b/moco-doc/apis.md @@ -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). @@ -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. @@ -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}")); diff --git a/moco-doc/cmd.md b/moco-doc/cmd.md index eaac0d716..5767dea5b 100644 --- a/moco-doc/cmd.md +++ b/moco-doc/cmd.md @@ -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. diff --git a/moco-doc/usage.md b/moco-doc/usage.md index 155123cd7..1c17f1619 100644 --- a/moco-doc/usage.md +++ b/moco-doc/usage.md @@ -31,7 +31,7 @@ Moco has been published on Maven repository, so you can refer to it directly in com.github.dreamhead moco-core - 1.4.0 + 1.5.0 ``` @@ -44,7 +44,7 @@ repositories { dependencies { testImplementation( - "com.github.dreamhead:moco-core:1.4.0", + "com.github.dreamhead:moco-core:1.5.0", ) } ```