Use AutoHashEquals

This commit is contained in:
Chris de Graaf 2017-08-14 13:12:37 -05:00
parent 9d725f4316
commit b4731273a0
7 changed files with 9 additions and 20 deletions

View File

@ -1 +1,4 @@
julia 0.6
AutoHashEquals
Mustache
URIParser

View File

@ -1,6 +1,6 @@
module PkgTemplates
import Base.==
using AutoHashEquals
using Mustache
using URIParser

View File

@ -7,7 +7,7 @@ Add AppVeyor to a template's plugins to add AppVeyor CI support.
* `config_file::Union{AbstractString, Void}`: Path to a custom `.appveyor.yml`.
If `nothing` is supplied, then no file will be generated.
"""
struct AppVeyor <: Plugin
@auto_hash_equals struct AppVeyor <: Plugin
gitignore_files::Vector{AbstractString}
config_file::Union{AbstractString, Void}
@ -24,11 +24,6 @@ struct AppVeyor <: Plugin
end
end
function ==(a::AppVeyor, b::AppVeyor)
return a.gitignore_files == b.gitignore_files &&
a.config_file == b.config_file
end
"""
badges(plugin::AppVeyor, pkg_name::AbstractString, t::Template) -> Vector{String}

View File

@ -7,7 +7,7 @@ Add CodeCov to a template's plugins to enable CodeCov coverage reports.
* `config_file::AbstractString`: Path to a custom `.codecov.yml`.
If `nothing` is supplied, then no file will be generated.
"""
struct CodeCov <: Plugin
@auto_hash_equals struct CodeCov <: Plugin
gitignore_files::Vector{AbstractString}
config_file::AbstractString
@ -24,11 +24,6 @@ struct CodeCov <: Plugin
end
end
function ==(a::CodeCov, b::CodeCov)
return a.gitignore_files == b.gitignore_files &&
a.config_file == b.config_file
end
"""
badges(plugin::CodeCov, pkg_name::AbstractString, t::Template) -> Vector{String}

View File

@ -7,6 +7,7 @@ Add GitHubPages to a template's plugins to add Documenter.jl support via GitHub
* `documenter_assets::Vector{String}=String[]`: Array of paths to Documenter asset files.
"""
struct GitHubPages <: Documenter
@auto_hash_equals struct GitHubPages <: Documenter
gitignore_files::Vector{AbstractString}
documenter_assets::Vector{AbstractString}

View File

@ -7,7 +7,7 @@ Add TravisCI to a template's plugins to add Travis CI support.
* `config_file::AbstractString`: Path to a custom `.travis.yml`.
If `nothing` is supplied, then no file will be generated.
"""
struct TravisCI <: Plugin
@auto_hash_equals struct TravisCI <: Plugin
gitignore_files::Vector{AbstractString}
config_file::Union{AbstractString, Void}
@ -24,11 +24,6 @@ struct TravisCI <: Plugin
end
end
function ==(a::TravisCI, b::TravisCI)
return a.gitignore_files == b.gitignore_files &&
a.config_file == b.config_file
end
"""
badges(plugin::TravisCI, pkg_name::AbstractString, t::Template) -> Vector{String}

View File

@ -20,7 +20,7 @@ Records common information used to generate a package.
* `git_config::Dict{String, String}=Dict{String, String}()`: Git configuration options.
* `plugins::Vector{Plugin}`: A list of `Plugin`s that the package will include.
"""
struct Template
@auto_hash_equals struct Template
remote_prefix::AbstractString
license::Union{AbstractString, Void}
authors::Union{AbstractString, Array}