This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
119 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
licenses(["notice"]) | ||
|
||
exports_files(["LICENSE.md"]) | ||
|
||
cc_library( | ||
name = "served", | ||
copts = [ | ||
"-Iexternal/com_googlesource_code_re2", | ||
], | ||
srcs = glob( | ||
[ | ||
"src/served/*.cpp", | ||
"src/served/mux/*.cpp", | ||
"src/served/net/*.cpp", | ||
], | ||
exclude = [ | ||
"src/served/*.test.cpp", | ||
"src/served/mux/*.test.cpp", | ||
"src/served/net/*.test.cpp", | ||
], | ||
), | ||
hdrs = glob( | ||
[ | ||
"src/served/*.hpp", | ||
"src/served/mux/*.hpp", | ||
"src/served/net/*.hpp", | ||
], | ||
exclude = [ | ||
"src/served/version.hpp" | ||
], | ||
) + [":servedversion"], | ||
strip_include_prefix = "src/", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@boost//:system", | ||
"@boost//:asio", | ||
"@com_googlesource_code_re2//:re2", | ||
], | ||
) | ||
|
||
cc_test( | ||
name = "served-test", | ||
copts = [ | ||
"-Iexternal/com_googlesource_code_re2", | ||
"-Isrc", | ||
], | ||
srcs = glob( | ||
[ | ||
"src/served/*.test.cpp", | ||
"src/served/mux/*.test.cpp", | ||
"src/served/net/*.test.cpp", | ||
"src/test/catch.cpp", | ||
"src/test/catch.hpp", | ||
], | ||
), | ||
tags = [ "large" ], | ||
timeout = "short", | ||
deps = [ "//:served" ], | ||
) | ||
|
||
genrule( | ||
name = "servedversion", | ||
srcs = [], | ||
outs = ["src/served/version.hpp"], | ||
cmd = """ | ||
echo '#ifndef SERVED_VERSION_HPP_INCLUDED' > $@ | ||
echo '#define SERVED_VERSION_HPP_INCLUDED' >> $@ | ||
echo '#define APPLICATION_NAME \"Served HTTP REST Library\"' >> $@ | ||
echo '#define APPLICATION_CODENAME \"served\"' >> $@ | ||
echo '#define APPLICATION_COPYRIGHT_YEARS \"2014\"' >> $@ | ||
echo '#define APPLICATION_VERSION_STRING \"1.4.3-DS1\"' >> $@ | ||
echo '#define APPLICATION_VENDOR_ID \"com.datasift\"' >> $@ | ||
echo '#define APPLICATION_VENDOR_NAME \"DataSift\"' >> $@ | ||
echo '#define APPLICATION_VENDOR_URL \"datasift.com\"' >> $@ | ||
echo '#define APPLICATION_ID = \"com.datasift.served\"' >> $@ | ||
echo '#endif' >> $@ | ||
""", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
workspace(name = "com_github_datasift_served") | ||
|
||
git_repository( | ||
name = "com_github_nelhage_boost", | ||
remote = "https://github.com/nelhage/rules_boost.git", | ||
commit = "ead0110ff90d5d90d2eb67e7e78f34f42d8486a1", | ||
) | ||
|
||
load("@com_github_nelhage_boost//:boost/boost.bzl", "boost_deps") | ||
boost_deps() | ||
|
||
git_repository( | ||
name = "com_googlesource_code_re2", | ||
remote = "https://github.com/google/re2.git", | ||
commit = "22fc950c75d238f8b2dcbc43d8a60573cad2b8d7", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,4 @@ | |
* SOFTWARE. | ||
*/ | ||
|
||
#define CATCH_CONFIG_MAIN | ||
#include <test/catch.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,4 @@ | |
* SOFTWARE. | ||
*/ | ||
|
||
#define CATCH_CONFIG_MAIN | ||
#include <test/catch.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,4 @@ | |
* SOFTWARE. | ||
*/ | ||
|
||
#define CATCH_CONFIG_MAIN | ||
#include <test/catch.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ | |
* SOFTWARE. | ||
*/ | ||
|
||
#define CATCH_CONFIG_MAIN | ||
#include <test/catch.hpp> | ||
|
||
#include <served/request.hpp> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ | |
* SOFTWARE. | ||
*/ | ||
|
||
#define CATCH_CONFIG_MAIN | ||
#include <test/catch.hpp> | ||
|
||
#include <served/status.hpp> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ | |
* SOFTWARE. | ||
*/ | ||
|
||
#define CATCH_CONFIG_MAIN | ||
#include <test/catch.hpp> | ||
|
||
#include <served/response.hpp> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ | |
* SOFTWARE. | ||
*/ | ||
|
||
#define CATCH_CONFIG_MAIN | ||
#include <test/catch.hpp> | ||
|
||
#include <served/status.hpp> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,6 @@ | |
* SOFTWARE. | ||
*/ | ||
|
||
#define CATCH_CONFIG_MAIN | ||
#include <test/catch.hpp> | ||
|
||
#include <served/uri.hpp> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#define CATCH_CONFIG_MAIN | ||
#include <test/catch.hpp> |