From 368b7a9432b8ccba72229eb6e5f7536ba35f1af6 Mon Sep 17 00:00:00 2001 From: Adrian Date: Tue, 4 Feb 2020 15:42:14 +0100 Subject: [PATCH] v0.25.4 --- Project.toml | 2 +- src/Configuration.jl | 2 +- src/Generator.jl | 4 ++-- src/genie_module.jl | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index a3d6d8334..f80b2ed09 100755 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Genie" uuid = "c43c736e-a2d1-11e8-161f-af95117fbd1e" authors = ["Adrian Salceanu "] -version = "0.25.3" +version = "0.25.4" [deps] ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" diff --git a/src/Configuration.jl b/src/Configuration.jl index 1b31a4d8c..96e6de226 100755 --- a/src/Configuration.jl +++ b/src/Configuration.jl @@ -3,7 +3,7 @@ Core genie configuration / settings functionality. """ module Configuration -const GENIE_VERSION = v"0.25.3" +const GENIE_VERSION = v"0.25.4" import Logging import Genie diff --git a/src/Generator.jl b/src/Generator.jl index 6f437fc62..38aa50c1c 100755 --- a/src/Generator.jl +++ b/src/Generator.jl @@ -15,11 +15,11 @@ const JULIA_PATH = joinpath(Sys.BINDIR, "julia") Generates a new Genie controller file and persists it to the resources folder. """ -function newcontroller(resource_name::String; path::String = ".", pluralize::Bool = true, mvc_support::Bool = true) :: Nothing +function newcontroller(resource_name::String; path::Union{String,Nothing} = nothing, pluralize::Bool = true) :: Nothing Genie.Inflector.is_singular(resource_name) && pluralize && (resource_name = Genie.Inflector.to_plural(resource_name)) resource_name = uppercasefirst(resource_name) - resource_path = mvc_support ? setup_resource_path(resource_name, path = path) : (ispath(path) ? path : mkpath(path)) + resource_path = path === nothing ? setup_resource_path(resource_name, path = ".") : (ispath(path) ? path : mkpath(path)) cfn = controller_file_name(resource_name) write_resource_file(resource_path, cfn, resource_name, :controller, pluralize = pluralize) && @info "New controller created at $(abspath(joinpath(resource_path, cfn)))" diff --git a/src/genie_module.jl b/src/genie_module.jl index 76ecea174..8394f9efe 100644 --- a/src/genie_module.jl +++ b/src/genie_module.jl @@ -13,8 +13,8 @@ import REPL, REPL.Terminals Creates a new `controller` file. If `pluralize` is `false`, the name of the controller is not automatically pluralized. """ -function newcontroller(controller_name::Union{String,Symbol}; path::String = ".", pluralize::Bool = true, mvc_support::Bool = false) :: Nothing - Generator.newcontroller(string(controller_name), path = path, pluralize = pluralize, mvc_support = mvc_support) +function newcontroller(controller_name::Union{String,Symbol}; path::Union{String,Nothing} = nothing, pluralize::Bool = true) :: Nothing + Generator.newcontroller(string(controller_name), path = path, pluralize = pluralize) load_resources() nothing