Skip to content

Commit

Permalink
Merge branch 'master' into v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
The-EDev committed Mar 30, 2022
2 parents e7007b1 + 1e73642 commit 4d2f26e
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 161 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = Crow
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.3
PROJECT_NUMBER = 1.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BSD 3-Clause License

Copyright (c) 2014-2017, ipkn
2020-2021, CrowCpp
2020-2022, CrowCpp
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -29,4 +29,4 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The Crow logo and other graphic material (excluding third party logos) used are under exclusive Copyright (c) 2021, Farook Al-Sammarraie (The-EDev), All rights reserved.
The Crow logo and other graphic material (excluding third party logos) used are under exclusive Copyright (c) 2021-2022, Farook Al-Sammarraie (The-EDev), All rights reserved.
146 changes: 0 additions & 146 deletions docs/getting_started/setup/legacy.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/guides/base64.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
Using `#!cpp crow::utility::base64encode(mystring, mystring.size())` will return a Base64 encoded string. For URL safe Base64 `#!cpp crow::utility::base64encode_urlsafe(mystring, mystring.size())` can be used. The key used in the encoding process can be changed, it is a string containing all 64 characters to be used.

## Decoding
**Introduced in: `master`**<br><br>
**Introduced in: `v1.0`**<br><br>

Using `#!cpp crow::utility::base64decode(mystring, mystring.size())` with `mystring` being a Base64 encoded string will return a plain-text string. The function works with both normal and URL safe Base64. However it cannot decode a Base64 string encoded with a custom key.
4 changes: 1 addition & 3 deletions docs/guides/blueprints.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
!!! Warning

This feature is currently only available on the "master" branch.
**Introduced in: `v1.0`**<br><br>

Crow supports flask style blueprints.<br>
A blueprint is a limited app. It cannot handle networking. But it can handle routes.<br>
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ A `wvalue` can be treated as an object or even a list (setting a value by using

!!! warning

JSON does not allow floating point values like `NaN` or `INF`, Crow will output `null` instead of `NaN` or `INF` when converting `wvalue` to a string. (`{"Key": NaN}` becomes `{"Key": null}`) (master and later)
JSON does not allow floating point values like `NaN` or `INF`, Crow will output `null` instead of `NaN` or `INF` when converting `wvalue` to a string. (`{"Key": NaN}` becomes `{"Key": null}`)

<br><br>

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Writing a log is as simple as `#!cpp CROW_LOG_<LOG LEVEL> << "Hello";` (replace&
Log times are reported in GMT timezone by default. This is because HTTP requires all reported times for requests and responses to be in GMT. This can be changed by using the macro `CROW_USE_LOCALTIMEZONE` which will set **only the log timezone** to the server's local timezone.

## Creating A custom logger
**Introduced in: `master`**<br><br>
**Introduced in: `v1.0`**<br><br>

Assuming you have an existing logger or Crow's default format just doesn't work for you. Crow allows you to use a custom logger for any log made using the `CROW_LOG_<LOG LEVEL>` macro.<br>
All you need is a class extending `#!cpp crow::ILogHandler` containing the method `#!cpp void log(std::string, crow::LogLevel)`.<br>
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/multipart.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A message can be created either by defining the headers, boundary, and individua

Once a multipart message has been made, the individual parts can be accessed throughout `msg.parts`, `parts` is an `std::vector`.<br><br>

**Introduced in: `master`**<br><br>
**Introduced in: `v1.0`**<br><br>

Part headers are organized in a similar way to request and response headers, and can be retrieved via `crow::multipart::get_header_object("header-key")`. This function returns a `crow::multipart::header` object.<br><br>

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class a : public crow::returnable
<br><br>

## Response codes
**Introduced in: `master`**<br><br>
**Introduced in: `v1.0`**<br><br>

Instead of assigning a response code, you can use the `crow::status` enum, for example you can replace `crow::response(200)` with `crow::response(crow::status::OK)`

Expand Down
5 changes: 4 additions & 1 deletion include/crow/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/operators.hpp>
#include <vector>
#include <math.h>
#include <cmath>

#include "crow/utility.h"
#include "crow/settings.h"
#include "crow/returnable.h"
#include "crow/logging.h"

using std::isinf;
using std::isnan;


namespace crow
{
Expand Down
4 changes: 2 additions & 2 deletions include/crow/routing.h
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ namespace crow
if (pos == req_url.size())
{
found_BP = std::move(*blueprints);
return {node->rule_index, *blueprints, *params};
return std::tuple<uint16_t, std::vector<uint16_t>, routing_params>{node->rule_index, *blueprints, *params};
}

bool found_fragment = false;
Expand Down Expand Up @@ -902,7 +902,7 @@ namespace crow
if (!found_fragment)
found_BP = std::move(*blueprints);

return {found, found_BP, match_params}; //Called after all the recursions have been done
return std::tuple<uint16_t, std::vector<uint16_t>, routing_params>{found, found_BP, match_params}; //Called after all the recursions have been done
}

//This functions assumes any blueprint info passed is valid
Expand Down
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ nav:
- Linux: getting_started/setup/linux.md
- MacOS: getting_started/setup/macos.md
- Windows: getting_started/setup/windows.md
- Legacy: getting_started/setup/legacy.md
- Your First Application: getting_started/your_first_application.md
- Guides:
- Different parts of Crow:
Expand Down

0 comments on commit 4d2f26e

Please sign in to comment.