Skip to content

Commit

Permalink
Fix a few typos in docs and docstrings (#638)
Browse files Browse the repository at this point in the history
* Fix typo in Security.md

* Fix typo in tutorial

Remove unnecessary close parenthesis ")".

* Fix typos in Configuration.jl docstring

* Fix typo in Exceptions.jl docstring

* Update Generator.jl

* Fix typo in Requests.jl docstring

* Fix typo in Router.jl docstring

* Fix typo in Util.jl docstrings
  • Loading branch information
pitmonticone authored Apr 20, 2023
1 parent 43619eb commit 1276a49
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Security.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ involving the following steps:
* Confirm the problem and determine the affected versions.
* Audit code to find any potential similar problems.
* Prepare fixes for all releases still under maintenance. These fixes will be
released as fast as possible and will be available with latest tagged Genie version and annouced on [Genie's twitter](https://twitter.com/GenieMVC) and [Genie's Discord #announcement channel](https://discord.com/invite/9zyZbD6J7H).
released as fast as possible and will be available with latest tagged Genie version and announced on [Genie's twitter](https://twitter.com/GenieMVC) and [Genie's Discord #announcement channel](https://discord.com/invite/9zyZbD6J7H).

## Comments on this Policy

If you have suggestions on how this process could be improved please submit a
pull request.
pull request.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This tutorial shows how to host a Julia/Genie app on with Nginx.
## Prerequisites

To expose the app over the internet, one needs access to a server. This can be a local machine or a cloud instance such
as AWS EC2 or a Google Cloud Compute Engine for example).
as AWS EC2 or a Google Cloud Compute Engine for example.

If using a local server, a static IP is needed to ensure continuous access to the app. Internet service provider generally
charge a fee for such extra service.
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ App configuration - sets up the app's defaults. Individual options are overwritt
- `path_env::String`: the path to the environment files (default "<path_config>/env/")
- `path_app::String`: the path to the app files (default "app/")
- `html_parser_close_tag::String`: default " /". Can be changed to an empty string "" so the single tags would not be closed.
- `webchannels_keepalive_frequency::Int`: default `30000`. Frequency in miliseconds to send keepalive messages to webchannel/websocket to keep the connection alive. Set to `0` to disable keepalive messages.
- `webchannels_keepalive_frequency::Int`: default `30000`. Frequency in milliseconds to send keepalive messages to webchannel/websocket to keep the connection alive. Set to `0` to disable keepalive messages.
"""
Base.@kwdef mutable struct Settings
server_port::Int = 8000 # default port for binding the web server
Expand Down
4 changes: 2 additions & 2 deletions src/Exceptions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ end
"""
InternalServerException(message::String)
External `InternalServerException` constructor accepting a custome message.
External `InternalServerException` constructor accepting a custom message.
"""
InternalServerException(message::String) = InternalServerException(message, "", 500)

Expand Down Expand Up @@ -170,4 +170,4 @@ Custom printing for `FileExistsException`
"""
Base.show(io::IO, ex::FileExistsException) = print(io, "FileExistsException: $(ex.path)")

end
end
4 changes: 2 additions & 2 deletions src/Generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ end
"""
write_resource_file(resource_path::String, file_name::String, resource_name::String) :: Bool
Generates all resouce files and persists them to disk.
Generates all resource files and persists them to disk.
"""
function write_resource_file(resource_path::String, file_name::String, resource_name::String, resource_type::Symbol; pluralize::Bool = true) :: Bool
resource_name = (pluralize ? (Inflector.to_plural(resource_name)) : resource_name) |> Inflector.from_underscores
Expand Down Expand Up @@ -413,7 +413,7 @@ function write_app_custom_files(path::String, app_path::String) :: Nothing
# This file is autogenerated to run all tests in the context of your Genie app.
# It is not necessary to edit this file.
# To create tests, simply add `.jl` test files in the `test/` folder.
# All `.jl` files in the `test/` folder will be automaticlaly executed by running `\$ julia --project runtests.jl`
# All `.jl` files in the `test/` folder will be automatically executed by running `\$ julia --project runtests.jl`
# If you want to selectively run tests, use `\$ julia --project runtests.jl test_file_1 test_file_2`
ENV["GENIE_ENV"] = "test"
Expand Down
4 changes: 2 additions & 2 deletions src/Requests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ end
"""
getpayload() :: Dict{Symbol,Any}
A dict representing the GET/query variables payload of the request (the part correspoding to `?foo=bar&baz=moo`)
A dict representing the GET/query variables payload of the request (the part corresponding to `?foo=bar&baz=moo`)
"""
function getpayload() :: Dict{Symbol,Any}
haskey(Router.params(), Genie.Router.PARAMS_GET_KEY) ? Router.params(Genie.Router.PARAMS_GET_KEY) : Dict{Symbol,Any}()
Expand Down Expand Up @@ -307,4 +307,4 @@ function currenturl(req::HTTP.Request = getrequest()) :: String
req.target
end

end
end
4 changes: 2 additions & 2 deletions src/Router.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Parses requests and extracts parameters, setting up the call variables and invoking
the appropiate route handler function.
the appropriate route handler function.
"""
module Router

Expand Down Expand Up @@ -341,7 +341,7 @@ end


"""
Gets the `Route` correspoding to `routename`
Gets the `Route` corresponding to `routename`
"""
function get_route(route_name::Symbol; default::Union{Route,Nothing} = Route()) :: Route
isroute(route_name) ?
Expand Down
2 changes: 1 addition & 1 deletion src/Util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const walkdir = walk_dir
"""
filterwhitespace(s::String, allowed::Vector{Char} = Char[]) :: String
Removes whitespaces from `s`, whith the exception of the characters in `allowed`.
Removes whitespaces from `s`, with the exception of the characters in `allowed`.
"""
function filterwhitespace(s::S, allowed::Vector{Char} = Char[])::String where {S<:AbstractString}
filter(x -> (x in allowed) || ! isspace(x), string(s))
Expand Down

0 comments on commit 1276a49

Please sign in to comment.