Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Salceanu committed Apr 2, 2020
1 parent 7968069 commit d465d89
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
12 changes: 11 additions & 1 deletion src/Generator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,17 @@ function newapp(path::String = "."; autostart::Bool = true, fullstack::Bool = fa

write_app_custom_files(path, app_path)

Sys.iswindows() ? setup_windows_bin_files(app_path) : setup_nix_bin_files(app_path)
try
setup_windows_bin_files(app_path)
catch ex
@error ex
end

try
setup_nix_bin_files(app_path)
catch ex
@error ex
end

@info "Done! New app created at $(abspath(path))"

Expand Down
14 changes: 9 additions & 5 deletions src/genie_module.jl
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,18 @@ function secret_token(; context::Union{Module,Nothing} = nothing) :: String
if isdefined(context, :SECRET_TOKEN) && ! isempty(context.SECRET_TOKEN)
context.SECRET_TOKEN
else
@warn "SECRET_TOKEN not configured - please make sure that you have a valid secrets.jl file.
@warn "
SECRET_TOKEN not configured - please make sure that you have a valid secrets.jl file.
You can generate a new secrets.jl file with a random SECRET_TOKEN using Genie.Generator.write_secrets_file()
or use the included /app/config/secrets.jl.example file as a model."
or use the included /app/config/secrets.jl.example file as a model.
st = Generator.secret_token()
Core.eval(@__MODULE__, Meta.parse("""const SECRET_TOKEN = "$st" """))
SECRET_TOKEN is used for hashing and encrypting/decrypting sensitive data in Genie.
I'm now setting up a random SECRET_TOKEN which will be used for this session only.
Data that is encoded with this SECRET_TOKEN will potentially be lost
upon restarting the application (like for example the HTTP sessions data).
"

st
SECRET_TOKEN = Generator.secret_token()
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/renderers/Html.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function normal_element(_::Nothing, __::Any) :: HTMLString
""
end
function normal_element(children::Vector{T} where T, elem::Any, args::Vector{T} where T) :: HTMLString
normal_element(join([f() for f in children]), elem, args)
normal_element(join([(isa(f, Function) ? f() : string(f)) for f in children]), elem, args)
end


Expand Down

2 comments on commit d465d89

@essenciary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/12057

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.29.0 -m "<description of version>" d465d8925f932fb17300f6b4354cc67b0472ff64
git push origin v0.29.0

Please sign in to comment.