diff --git a/Manifest.toml b/Manifest.toml index 21f4d42..28ace5e 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -1,8 +1,3 @@ -[[AutoHashEquals]] -git-tree-sha1 = "45bb6705d93be619b81451bb2006b7ee5d4e4453" -uuid = "15f4f7f2-30c1-5605-9d31-71845cf9641f" -version = "0.2.0" - [[Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" diff --git a/Project.toml b/Project.toml index a02b10f..419914a 100644 --- a/Project.toml +++ b/Project.toml @@ -4,7 +4,6 @@ authors = ["Chris de Graaf "] version = "0.4.1" [deps] -AutoHashEquals = "15f4f7f2-30c1-5605-9d31-71845cf9641f" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" diff --git a/REQUIRE b/REQUIRE index e172632..c08c8c1 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,4 +1,3 @@ julia 0.7 -AutoHashEquals Mustache URIParser diff --git a/src/PkgTemplates.jl b/src/PkgTemplates.jl index aeaefef..d49547e 100644 --- a/src/PkgTemplates.jl +++ b/src/PkgTemplates.jl @@ -1,6 +1,5 @@ module PkgTemplates -using AutoHashEquals using Dates using InteractiveUtils using LibGit2 diff --git a/src/plugin.jl b/src/plugin.jl index 775a247..46b02ed 100644 --- a/src/plugin.jl +++ b/src/plugin.jl @@ -21,7 +21,7 @@ Generic plugins are plugins that add any number of patterns to the generated pac # Example ```julia -@auto_hash_equals struct MyPlugin <: GenericPlugin +struct MyPlugin <: GenericPlugin gitignore::Vector{AbstractString} src::Union{AbstractString, Nothing} dest::AbstractString @@ -96,7 +96,7 @@ signature. # Example ```julia -@auto_hash_equals struct MyPlugin <: CustomPlugin +struct MyPlugin <: CustomPlugin gitignore::Vector{AbstractString} lucky::Bool @@ -152,10 +152,10 @@ A `Badge` contains the data necessary to generate a Markdown badge. * `image::AbstractString`: URL to the image to display. * `link::AbstractString`: URL to go to upon clicking the badge. """ -@auto_hash_equals struct Badge - hover::AbstractString - image::AbstractString - link::AbstractString +struct Badge + hover::String + image::String + link::String end """ diff --git a/src/plugins/appveyor.jl b/src/plugins/appveyor.jl index 857d188..7b42767 100644 --- a/src/plugins/appveyor.jl +++ b/src/plugins/appveyor.jl @@ -8,10 +8,10 @@ generated repositories, and an appropriate badge to the README. * `config_file::Union{AbstractString, Nothing}=""`: Path to a custom `.appveyor.yml`. If `nothing` is supplied, no file will be generated. """ -@auto_hash_equals struct AppVeyor <: GenericPlugin - gitignore::Vector{AbstractString} - src::Union{AbstractString, Nothing} - dest::AbstractString +struct AppVeyor <: GenericPlugin + gitignore::Vector{String} + src::Union{String, Nothing} + dest::String badges::Vector{Badge} view::Dict{String, Any} diff --git a/src/plugins/codecov.jl b/src/plugins/codecov.jl index 1c14726..7865c3d 100644 --- a/src/plugins/codecov.jl +++ b/src/plugins/codecov.jl @@ -9,10 +9,10 @@ to generated repositories, and an appropriate badge to the README. Also updates * `config_file::Union{AbstractString, Nothing}=nothing`: Path to a custom `.codecov.yml`. If left unset, no file will be generated. """ -@auto_hash_equals struct Codecov <: GenericPlugin - gitignore::Vector{AbstractString} - src::Union{AbstractString, Nothing} - dest::AbstractString +struct Codecov <: GenericPlugin + gitignore::Vector{String} + src::Union{String, Nothing} + dest::String badges::Vector{Badge} view::Dict{String, Any} diff --git a/src/plugins/coveralls.jl b/src/plugins/coveralls.jl index bb6c3b7..8be6392 100644 --- a/src/plugins/coveralls.jl +++ b/src/plugins/coveralls.jl @@ -9,10 +9,10 @@ file to generated repositories, and an appropriate badge to the README. Also upd * `config_file::Union{AbstractString, Nothing}=nothing`: Path to a custom `.coveralls.yml`. If left unset, no file will be generated. """ -@auto_hash_equals struct Coveralls <: GenericPlugin - gitignore::Vector{AbstractString} - src::Union{AbstractString, Nothing} - dest::AbstractString +struct Coveralls <: GenericPlugin + gitignore::Vector{String} + src::Union{String, Nothing} + dest::String badges::Vector{Badge} view::Dict{String, Any} diff --git a/src/plugins/githubpages.jl b/src/plugins/githubpages.jl index 75501a1..92002e1 100644 --- a/src/plugins/githubpages.jl +++ b/src/plugins/githubpages.jl @@ -13,9 +13,9 @@ adds appropriate badges to the README, and updates the `.gitignore` accordingly. configuration (see [here](https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#SSH-Deploy-Keys-1)). """ -@auto_hash_equals struct GitHubPages <: Documenter - gitignore::Vector{AbstractString} - assets::Vector{AbstractString} +struct GitHubPages <: Documenter + gitignore::Vector{String} + assets::Vector{String} function GitHubPages(; assets::Vector{<:AbstractString}=String[]) for file in assets diff --git a/src/plugins/gitlabci.jl b/src/plugins/gitlabci.jl index ca0331a..7f78095 100644 --- a/src/plugins/gitlabci.jl +++ b/src/plugins/gitlabci.jl @@ -10,10 +10,10 @@ generated repositories, and appropriate badge(s) to the README. * `coverage::Bool=true`: Whether or not GitLab CI's built-in code coverage analysis should be enabled. """ -@auto_hash_equals struct GitLabCI <: GenericPlugin - gitignore::Vector{AbstractString} - src::Union{AbstractString, Nothing} - dest::AbstractString +struct GitLabCI <: GenericPlugin + gitignore::Vector{String} + src::Union{String, Nothing} + dest::String badges::Vector{Badge} view::Dict{String, Any} diff --git a/src/plugins/travisci.jl b/src/plugins/travisci.jl index 09ecb28..2d3eb72 100644 --- a/src/plugins/travisci.jl +++ b/src/plugins/travisci.jl @@ -8,10 +8,10 @@ generated repositories, and an appropriate badge to the README. * `config_file::Union{AbstractString, Nothing}=""`: Path to a custom `.travis.yml`. If `nothing` is supplied, no file will be generated. """ -@auto_hash_equals struct TravisCI <: GenericPlugin - gitignore::Vector{AbstractString} - src::Union{AbstractString, Nothing} - dest::AbstractString +struct TravisCI <: GenericPlugin + gitignore::Vector{String} + src::Union{String, Nothing} + dest::String badges::Vector{Badge} view::Dict{String, Any} diff --git a/src/template.jl b/src/template.jl index 17feab1..558d3ee 100644 --- a/src/template.jl +++ b/src/template.jl @@ -26,16 +26,16 @@ create a template, you can use [`interactive_template`](@ref) instead. * `manifest::Bool=false`: Whether or not to commit the `Manifest.toml`. * `plugins::Vector{<:Plugin}=Plugin[]`: A list of `Plugin`s that the package will include. """ -@auto_hash_equals struct Template - user::AbstractString - host::AbstractString - license::AbstractString - authors::AbstractString - dir::AbstractString +struct Template + user::String + host::String + license::String + authors::String + dir::String julia_version::VersionNumber ssh::Bool manifest::Bool - plugins::Dict{DataType, Plugin} + plugins::Dict{DataType, <:Plugin} function Template(; user::AbstractString="", diff --git a/test/tests.jl b/test/tests.jl index 3c1690c..fa66648 100644 --- a/test/tests.jl +++ b/test/tests.jl @@ -85,12 +85,9 @@ write(test_file, template_text) user=me, plugins = [GitHubPages(), TravisCI(), AppVeyor(), Codecov(), Coveralls()], ) - @test Set(keys(t.plugins)) == Set( + @test Set(keys(t.plugins)) == Set(map(typeof, values(t.plugins))) == Set( [GitHubPages, TravisCI, AppVeyor, Codecov, Coveralls] ) - @test Set(values(t.plugins)) == Set( - [GitHubPages(), TravisCI(), AppVeyor(), Codecov(), Coveralls()] - ) # Duplicate plugins should warn. @test_logs (:warn, r"duplicates") match_mode=:any t = Template(;