Skip to content

Commit

Permalink
finicky example
Browse files Browse the repository at this point in the history
  • Loading branch information
alandefreitas committed Oct 17, 2022
1 parent 1b190a2 commit 29c30e9
Show file tree
Hide file tree
Showing 8 changed files with 476 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ endif()
if (BOOST_URL_FIND_PACKAGE_BOOST)
find_package(Boost 1.78.0 REQUIRED COMPONENTS container)
elseif (BOOST_URL_IS_ROOT)
set(BOOST_URL_UNIT_TEST_LIBRARIES container filesystem unordered)
set(BOOST_URL_UNIT_TEST_LIBRARIES container filesystem unordered json regex)
set(BOOST_INCLUDE_LIBRARIES url json ${BOOST_URL_UNIT_TEST_LIBRARIES})
set(BOOST_EXCLUDE_LIBRARIES url)
set(CMAKE_FOLDER Dependencies)
Expand Down
2 changes: 2 additions & 0 deletions doc/qbk/0.main.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@

[/-----------------------------------------------------------------------------]

[import ../../example/qrcode/qrcode.cpp]
[import ../../example/finicky/finicky.cpp]
[import ../../example/mailto/mailto.cpp]
[import ../../example/magnet/magnet.cpp]
[import ../../example/route/route.cpp]
Expand Down
4 changes: 4 additions & 0 deletions doc/qbk/6.0.examples.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
[example_qrcode]
[endsect]

[section Finicky]
[example_finicky]
[endsect]

[section mailto URLs]
[example_mailto]
[endsect]
Expand Down
1 change: 1 addition & 0 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#

add_subdirectory(qrcode)
add_subdirectory(finicky)
add_subdirectory(mailto)
add_subdirectory(magnet)
add_subdirectory(route)
19 changes: 19 additions & 0 deletions example/finicky/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Copyright (c) 2022 Alan de Freitas ([email protected])
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# Official repository: https://github.com/boostorg/url
#

source_group("" FILES
finicky.cpp
)

add_executable(finicky
finicky.cpp
)

set_property(TARGET finicky PROPERTY FOLDER "Examples")
target_link_libraries(finicky PRIVATE Boost::url Boost::json Boost::regex)
17 changes: 17 additions & 0 deletions example/finicky/Jamfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright (c) 2022 Alan de Freitas ([email protected])
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
# Official repository: https://github.com/boostorg/url
#

project : requirements ;

project
: requirements
<library>/boost/url//boost_url
;

exe qrcode : qrcode.cpp ;
38 changes: 38 additions & 0 deletions example/finicky/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"defaultBrowser": "Google Chrome",
"rewrite": [
{
"match": {
"protocol": "http"
},
"url": {
"protocol": "https"
}
},
{
"match": "**/*example.org/*",
"url": "http://example.com"
}
],
"handlers": [
{
"match": [
"**/*apple.com/*",
"**/*example.org/*",
"**/*example.com**"
],
"browser": "Safari"
},
{
"match": "/workplace/",
"browser": "Firefox"
},
{
"match": [
"**/*google.com/*",
"**/*.google.com/*"
],
"browser": "Google Chrome"
}
]
}
Loading

0 comments on commit 29c30e9

Please sign in to comment.