Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "operator"
version = "0.6.5"
version = "0.6.6"
authors = ["Matt Kantor <[email protected]>"]
description = "A web server for static and dynamic content"
repository = "https://github.com/mkantor/operator"
Expand Down
8 changes: 4 additions & 4 deletions tests/snapshots/integration_tests__executables.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ cat.txt.sh: ""
count-cli-args.txt.sh: "0\n"
error.txt.sh: "Unable to emit rendered content.\n\nCaused by:\n Process exited with code 1: boom!\n \n"
get-pwd.txt.hbs: "this is pwd from subdirectory:\n$PROJECT_DIRECTORY/samples/executables/subdirectory\n"
get-render-data-with-custom-context.json.hbs: "{\"/\":{\"NO-SNAPSHOT-random\":\"/NO-SNAPSHOT-random\",\"NO-SNAPSHOT-system-info\":\"/NO-SNAPSHOT-system-info\",\"cat\":\"/cat\",\"count-cli-args\":\"/count-cli-args\",\"error\":\"/error\",\"get-pwd\":\"/get-pwd\",\"get-render-data\":\"/get-render-data\",\"get-render-data-with-custom-context\":\"/get-render-data-with-custom-context\",\"get-render-data-with-hash-params\":\"/get-render-data-with-hash-params\",\"ls\":\"/ls\",\"output-and-error\":\"/output-and-error\",\"pwd\":\"/pwd\",\"render-data\":\"/render-data\",\"slow\":\"/slow\",\"slow-error\":\"/slow-error\",\"slow-template\":\"/slow-template\",\"subdirectory/\":{\"pwd\":\"/subdirectory/pwd\"}},\"error-code\":null,\"pwd\":\"/subdirectory/pwd\",\"request\":{\"query-parameters\":{},\"request-headers\":{},\"route\":\"/get-render-data-with-custom-context\"},\"server-info\":{\"operator-path\":\"$PROJECT_DIRECTORY/target/$PROFILE/operator\",\"socket-address\":\"$SOCKET_ADDRESS\",\"version\":\"0.6.5\"},\"target-media-type\":\"application/json\"}\n"
get-render-data-with-hash-params.json.hbs: "{\"/\":{\"NO-SNAPSHOT-random\":\"/NO-SNAPSHOT-random\",\"NO-SNAPSHOT-system-info\":\"/NO-SNAPSHOT-system-info\",\"cat\":\"/cat\",\"count-cli-args\":\"/count-cli-args\",\"error\":\"/error\",\"get-pwd\":\"/get-pwd\",\"get-render-data\":\"/get-render-data\",\"get-render-data-with-custom-context\":\"/get-render-data-with-custom-context\",\"get-render-data-with-hash-params\":\"/get-render-data-with-hash-params\",\"ls\":\"/ls\",\"output-and-error\":\"/output-and-error\",\"pwd\":\"/pwd\",\"render-data\":\"/render-data\",\"slow\":\"/slow\",\"slow-error\":\"/slow-error\",\"slow-template\":\"/slow-template\",\"subdirectory/\":{\"pwd\":\"/subdirectory/pwd\"}},\"custom-param-1\":\"wowie\",\"custom-param-2\":42,\"error-code\":\"overridden\",\"request\":{\"query-parameters\":{},\"request-headers\":{},\"route\":\"/get-render-data-with-hash-params\"},\"server-info\":{\"operator-path\":\"$PROJECT_DIRECTORY/target/$PROFILE/operator\",\"socket-address\":\"$SOCKET_ADDRESS\",\"version\":\"0.6.5\"},\"target-media-type\":\"application/json\"}\n"
get-render-data.json.hbs: "{\"/\":{\"NO-SNAPSHOT-random\":\"/NO-SNAPSHOT-random\",\"NO-SNAPSHOT-system-info\":\"/NO-SNAPSHOT-system-info\",\"cat\":\"/cat\",\"count-cli-args\":\"/count-cli-args\",\"error\":\"/error\",\"get-pwd\":\"/get-pwd\",\"get-render-data\":\"/get-render-data\",\"get-render-data-with-custom-context\":\"/get-render-data-with-custom-context\",\"get-render-data-with-hash-params\":\"/get-render-data-with-hash-params\",\"ls\":\"/ls\",\"output-and-error\":\"/output-and-error\",\"pwd\":\"/pwd\",\"render-data\":\"/render-data\",\"slow\":\"/slow\",\"slow-error\":\"/slow-error\",\"slow-template\":\"/slow-template\",\"subdirectory/\":{\"pwd\":\"/subdirectory/pwd\"}},\"error-code\":null,\"request\":{\"query-parameters\":{},\"request-headers\":{},\"route\":\"/get-render-data\"},\"server-info\":{\"operator-path\":\"$PROJECT_DIRECTORY/target/$PROFILE/operator\",\"socket-address\":\"$SOCKET_ADDRESS\",\"version\":\"0.6.5\"},\"target-media-type\":\"application/json\"}\n"
get-render-data-with-custom-context.json.hbs: "{\"/\":{\"NO-SNAPSHOT-random\":\"/NO-SNAPSHOT-random\",\"NO-SNAPSHOT-system-info\":\"/NO-SNAPSHOT-system-info\",\"cat\":\"/cat\",\"count-cli-args\":\"/count-cli-args\",\"error\":\"/error\",\"get-pwd\":\"/get-pwd\",\"get-render-data\":\"/get-render-data\",\"get-render-data-with-custom-context\":\"/get-render-data-with-custom-context\",\"get-render-data-with-hash-params\":\"/get-render-data-with-hash-params\",\"ls\":\"/ls\",\"output-and-error\":\"/output-and-error\",\"pwd\":\"/pwd\",\"render-data\":\"/render-data\",\"slow\":\"/slow\",\"slow-error\":\"/slow-error\",\"slow-template\":\"/slow-template\",\"subdirectory/\":{\"pwd\":\"/subdirectory/pwd\"}},\"error-code\":null,\"pwd\":\"/subdirectory/pwd\",\"request\":{\"query-parameters\":{},\"request-headers\":{},\"route\":\"/get-render-data-with-custom-context\"},\"server-info\":{\"operator-path\":\"$PROJECT_DIRECTORY/target/$PROFILE/operator\",\"socket-address\":\"$SOCKET_ADDRESS\",\"version\":\"0.6.6\"},\"target-media-type\":\"application/json\"}\n"
get-render-data-with-hash-params.json.hbs: "{\"/\":{\"NO-SNAPSHOT-random\":\"/NO-SNAPSHOT-random\",\"NO-SNAPSHOT-system-info\":\"/NO-SNAPSHOT-system-info\",\"cat\":\"/cat\",\"count-cli-args\":\"/count-cli-args\",\"error\":\"/error\",\"get-pwd\":\"/get-pwd\",\"get-render-data\":\"/get-render-data\",\"get-render-data-with-custom-context\":\"/get-render-data-with-custom-context\",\"get-render-data-with-hash-params\":\"/get-render-data-with-hash-params\",\"ls\":\"/ls\",\"output-and-error\":\"/output-and-error\",\"pwd\":\"/pwd\",\"render-data\":\"/render-data\",\"slow\":\"/slow\",\"slow-error\":\"/slow-error\",\"slow-template\":\"/slow-template\",\"subdirectory/\":{\"pwd\":\"/subdirectory/pwd\"}},\"custom-param-1\":\"wowie\",\"custom-param-2\":42,\"error-code\":\"overridden\",\"request\":{\"query-parameters\":{},\"request-headers\":{},\"route\":\"/get-render-data-with-hash-params\"},\"server-info\":{\"operator-path\":\"$PROJECT_DIRECTORY/target/$PROFILE/operator\",\"socket-address\":\"$SOCKET_ADDRESS\",\"version\":\"0.6.6\"},\"target-media-type\":\"application/json\"}\n"
get-render-data.json.hbs: "{\"/\":{\"NO-SNAPSHOT-random\":\"/NO-SNAPSHOT-random\",\"NO-SNAPSHOT-system-info\":\"/NO-SNAPSHOT-system-info\",\"cat\":\"/cat\",\"count-cli-args\":\"/count-cli-args\",\"error\":\"/error\",\"get-pwd\":\"/get-pwd\",\"get-render-data\":\"/get-render-data\",\"get-render-data-with-custom-context\":\"/get-render-data-with-custom-context\",\"get-render-data-with-hash-params\":\"/get-render-data-with-hash-params\",\"ls\":\"/ls\",\"output-and-error\":\"/output-and-error\",\"pwd\":\"/pwd\",\"render-data\":\"/render-data\",\"slow\":\"/slow\",\"slow-error\":\"/slow-error\",\"slow-template\":\"/slow-template\",\"subdirectory/\":{\"pwd\":\"/subdirectory/pwd\"}},\"error-code\":null,\"request\":{\"query-parameters\":{},\"request-headers\":{},\"route\":\"/get-render-data\"},\"server-info\":{\"operator-path\":\"$PROJECT_DIRECTORY/target/$PROFILE/operator\",\"socket-address\":\"$SOCKET_ADDRESS\",\"version\":\"0.6.6\"},\"target-media-type\":\"application/json\"}\n"
ls.txt.sh: "cat.txt.sh\ncount-cli-args.txt.sh\nerror.txt.sh\nget-pwd.txt.hbs\nget-render-data-with-custom-context.json.hbs\nget-render-data-with-hash-params.json.hbs\nget-render-data.json.hbs\nls.txt.sh\nNO-SNAPSHOT-random.bin.sh\nNO-SNAPSHOT-system-info.html.sh\noutput-and-error.txt.sh\npwd.txt.sh\nrender-data.json.sh\nslow-error.txt.sh\nslow-template.txt.hbs\nslow.txt.sh\nsubdirectory\n"
output-and-error.txt.sh: "Unable to emit rendered content.\n\nCaused by:\n Process exited with code 1\n"
pwd.txt.sh: "$PROJECT_DIRECTORY/samples/executables\n"
render-data.json.sh: "{\"/\":{\"NO-SNAPSHOT-random\":\"/NO-SNAPSHOT-random\",\"NO-SNAPSHOT-system-info\":\"/NO-SNAPSHOT-system-info\",\"cat\":\"/cat\",\"count-cli-args\":\"/count-cli-args\",\"error\":\"/error\",\"get-pwd\":\"/get-pwd\",\"get-render-data\":\"/get-render-data\",\"get-render-data-with-custom-context\":\"/get-render-data-with-custom-context\",\"get-render-data-with-hash-params\":\"/get-render-data-with-hash-params\",\"ls\":\"/ls\",\"output-and-error\":\"/output-and-error\",\"pwd\":\"/pwd\",\"render-data\":\"/render-data\",\"slow\":\"/slow\",\"slow-error\":\"/slow-error\",\"slow-template\":\"/slow-template\",\"subdirectory/\":{\"pwd\":\"/subdirectory/pwd\"}},\"server-info\":{\"version\":\"0.6.5\",\"operator-path\":\"$PROJECT_DIRECTORY/target/$PROFILE/operator\",\"socket-address\":\"$SOCKET_ADDRESS\"},\"target-media-type\":\"application/json\",\"request\":{\"route\":\"/render-data\",\"query-parameters\":{},\"request-headers\":{}},\"error-code\":null}\n"
render-data.json.sh: "{\"/\":{\"NO-SNAPSHOT-random\":\"/NO-SNAPSHOT-random\",\"NO-SNAPSHOT-system-info\":\"/NO-SNAPSHOT-system-info\",\"cat\":\"/cat\",\"count-cli-args\":\"/count-cli-args\",\"error\":\"/error\",\"get-pwd\":\"/get-pwd\",\"get-render-data\":\"/get-render-data\",\"get-render-data-with-custom-context\":\"/get-render-data-with-custom-context\",\"get-render-data-with-hash-params\":\"/get-render-data-with-hash-params\",\"ls\":\"/ls\",\"output-and-error\":\"/output-and-error\",\"pwd\":\"/pwd\",\"render-data\":\"/render-data\",\"slow\":\"/slow\",\"slow-error\":\"/slow-error\",\"slow-template\":\"/slow-template\",\"subdirectory/\":{\"pwd\":\"/subdirectory/pwd\"}},\"server-info\":{\"version\":\"0.6.6\",\"operator-path\":\"$PROJECT_DIRECTORY/target/$PROFILE/operator\",\"socket-address\":\"$SOCKET_ADDRESS\"},\"target-media-type\":\"application/json\",\"request\":{\"route\":\"/render-data\",\"query-parameters\":{},\"request-headers\":{}},\"error-code\":null}\n"
slow-error.txt.sh: "Unable to emit rendered content.\n\nCaused by:\n Process exited with code 1: Boom!\n \n"
slow-template.txt.hbs: "🔴 Ready…\n🟡 Set…\n🟢 Go!\n🏁 Finished!\n"
slow.txt.sh: "🔴 Ready…\n🟡 Set…\n🟢 Go!\n"
Expand Down
2 changes: 1 addition & 1 deletion tests/snapshots/integration_tests__render-context.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ query-string.txt.hbs: ""
request-route-wrapper.txt.hbs: "route from this file: /request-route-wrapper\nroute from file included via partial: /request-route-wrapper\nroute from file included via get helper: /request-route-wrapper"
request-route.txt.hbs: /request-route
routes.txt.hbs: "a: /a\nquery-string: /query-string\nrequest-route: /request-route\nrequest-route-wrapper: /request-route-wrapper\nroutes: /routes\nserver-info: /server-info\nwith-empty-context: /with-empty-context\n"
server-info.txt.hbs: "operator-path: $PROJECT_DIRECTORY/target/$PROFILE/operator\nsocket-address: $SOCKET_ADDRESS\nversion: 0.6.5\n"
server-info.txt.hbs: "operator-path: $PROJECT_DIRECTORY/target/$PROFILE/operator\nsocket-address: $SOCKET_ADDRESS\nversion: 0.6.6\n"
with-empty-context.html.hbs: "this with normal context: [object]\nthis with funky context: true\ncalling get for static content with funky context: a\n\n"
Loading