Class: Rubysmith::Configuration::Model

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubysmith/configuration/model.rb

Overview

Defines the common configuration content for use throughout the gem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeModel

Returns a new instance of Model.



83
84
85
86
# File 'lib/rubysmith/configuration/model.rb', line 83

def initialize(**)
  super
  freeze
end

Instance Attribute Details

#author_emailObject

Returns the value of attribute author_email

Returns:

  • (Object)

    the current value of author_email



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def author_email
  @author_email
end

#author_family_nameObject

Returns the value of attribute author_family_name

Returns:

  • (Object)

    the current value of author_family_name



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def author_family_name
  @author_family_name
end

#author_given_nameObject

Returns the value of attribute author_given_name

Returns:

  • (Object)

    the current value of author_given_name



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def author_given_name
  @author_given_name
end

#author_urlObject

Returns the value of attribute author_url

Returns:

  • (Object)

    the current value of author_url



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def author_url
  @author_url
end

#build_amazing_printObject

Returns the value of attribute build_amazing_print

Returns:

  • (Object)

    the current value of build_amazing_print



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_amazing_print
  @build_amazing_print
end

#build_caliberObject

Returns the value of attribute build_caliber

Returns:

  • (Object)

    the current value of build_caliber



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_caliber
  @build_caliber
end

#build_circle_ciObject

Returns the value of attribute build_circle_ci

Returns:

  • (Object)

    the current value of build_circle_ci



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_circle_ci
  @build_circle_ci
end

#build_citationObject

Returns the value of attribute build_citation

Returns:

  • (Object)

    the current value of build_citation



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_citation
  @build_citation
end

#build_cliObject

Returns the value of attribute build_cli

Returns:

  • (Object)

    the current value of build_cli



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_cli
  @build_cli
end

#build_communityObject

Returns the value of attribute build_community

Returns:

  • (Object)

    the current value of build_community



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_community
  @build_community
end

#build_conductObject

Returns the value of attribute build_conduct

Returns:

  • (Object)

    the current value of build_conduct



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_conduct
  @build_conduct
end

#build_consoleObject

Returns the value of attribute build_console

Returns:

  • (Object)

    the current value of build_console



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_console
  @build_console
end

#build_contributionsObject

Returns the value of attribute build_contributions

Returns:

  • (Object)

    the current value of build_contributions



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_contributions
  @build_contributions
end

#build_debugObject

Returns the value of attribute build_debug

Returns:

  • (Object)

    the current value of build_debug



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_debug
  @build_debug
end

#build_fundingObject

Returns the value of attribute build_funding

Returns:

  • (Object)

    the current value of build_funding



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_funding
  @build_funding
end

#build_gitObject

Returns the value of attribute build_git

Returns:

  • (Object)

    the current value of build_git



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_git
  @build_git
end

#build_git_hubObject

Returns the value of attribute build_git_hub

Returns:

  • (Object)

    the current value of build_git_hub



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_git_hub
  @build_git_hub
end

#build_git_hub_ciObject

Returns the value of attribute build_git_hub_ci

Returns:

  • (Object)

    the current value of build_git_hub_ci



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_git_hub_ci
  @build_git_hub_ci
end

#build_git_lintObject

Returns the value of attribute build_git_lint

Returns:

  • (Object)

    the current value of build_git_lint



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_git_lint
  @build_git_lint
end

#build_guardObject

Returns the value of attribute build_guard

Returns:

  • (Object)

    the current value of build_guard



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_guard
  @build_guard
end

#build_licenseObject

Returns the value of attribute build_license

Returns:

  • (Object)

    the current value of build_license



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_license
  @build_license
end

#build_maximumObject

Returns the value of attribute build_maximum

Returns:

  • (Object)

    the current value of build_maximum



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_maximum
  @build_maximum
end

#build_minimumObject

Returns the value of attribute build_minimum

Returns:

  • (Object)

    the current value of build_minimum



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_minimum
  @build_minimum
end

#build_rakeObject

Returns the value of attribute build_rake

Returns:

  • (Object)

    the current value of build_rake



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_rake
  @build_rake
end

#build_readmeObject

Returns the value of attribute build_readme

Returns:

  • (Object)

    the current value of build_readme



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_readme
  @build_readme
end

#build_reekObject

Returns the value of attribute build_reek

Returns:

  • (Object)

    the current value of build_reek



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_reek
  @build_reek
end

#build_refinementsObject

Returns the value of attribute build_refinements

Returns:

  • (Object)

    the current value of build_refinements



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_refinements
  @build_refinements
end

#build_rspecObject

Returns the value of attribute build_rspec

Returns:

  • (Object)

    the current value of build_rspec



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_rspec
  @build_rspec
end

#build_securityObject

Returns the value of attribute build_security

Returns:

  • (Object)

    the current value of build_security



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_security
  @build_security
end

#build_setupObject

Returns the value of attribute build_setup

Returns:

  • (Object)

    the current value of build_setup



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_setup
  @build_setup
end

#build_simple_covObject

Returns the value of attribute build_simple_cov

Returns:

  • (Object)

    the current value of build_simple_cov



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_simple_cov
  @build_simple_cov
end

#build_versionsObject

Returns the value of attribute build_versions

Returns:

  • (Object)

    the current value of build_versions



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_versions
  @build_versions
end

#build_yardObject

Returns the value of attribute build_yard

Returns:

  • (Object)

    the current value of build_yard



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_yard
  @build_yard
end

#build_zeitwerkObject

Returns the value of attribute build_zeitwerk

Returns:

  • (Object)

    the current value of build_zeitwerk



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def build_zeitwerk
  @build_zeitwerk
end

#citation_affiliationObject

Returns the value of attribute citation_affiliation

Returns:

  • (Object)

    the current value of citation_affiliation



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def citation_affiliation
  @citation_affiliation
end

#citation_messageObject

Returns the value of attribute citation_message

Returns:

  • (Object)

    the current value of citation_message



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def citation_message
  @citation_message
end

#citation_orcidObject

Returns the value of attribute citation_orcid

Returns:

  • (Object)

    the current value of citation_orcid



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def citation_orcid
  @citation_orcid
end

#documentation_formatObject

Returns the value of attribute documentation_format

Returns:

  • (Object)

    the current value of documentation_format



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def documentation_format
  @documentation_format
end

#extensions_milestoner_documentation_formatObject

Returns the value of attribute extensions_milestoner_documentation_format

Returns:

  • (Object)

    the current value of extensions_milestoner_documentation_format



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def extensions_milestoner_documentation_format
  @extensions_milestoner_documentation_format
end

#extensions_milestoner_prefixesObject

Returns the value of attribute extensions_milestoner_prefixes

Returns:

  • (Object)

    the current value of extensions_milestoner_prefixes



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def extensions_milestoner_prefixes
  @extensions_milestoner_prefixes
end

#extensions_pragmater_commentsObject

Returns the value of attribute extensions_pragmater_comments

Returns:

  • (Object)

    the current value of extensions_pragmater_comments



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def extensions_pragmater_comments
  @extensions_pragmater_comments
end

#extensions_pragmater_patternsObject

Returns the value of attribute extensions_pragmater_patterns

Returns:

  • (Object)

    the current value of extensions_pragmater_patterns



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def extensions_pragmater_patterns
  @extensions_pragmater_patterns
end

#extensions_tocer_labelObject

Returns the value of attribute extensions_tocer_label

Returns:

  • (Object)

    the current value of extensions_tocer_label



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def extensions_tocer_label
  @extensions_tocer_label
end

#extensions_tocer_patternsObject

Returns the value of attribute extensions_tocer_patterns

Returns:

  • (Object)

    the current value of extensions_tocer_patterns



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def extensions_tocer_patterns
  @extensions_tocer_patterns
end

#git_hub_userObject

Returns the value of attribute git_hub_user

Returns:

  • (Object)

    the current value of git_hub_user



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def git_hub_user
  @git_hub_user
end

#license_labelObject

Returns the value of attribute license_label

Returns:

  • (Object)

    the current value of license_label



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def license_label
  @license_label
end

#license_nameObject

Returns the value of attribute license_name

Returns:

  • (Object)

    the current value of license_name



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def license_name
  @license_name
end

#license_versionObject

Returns the value of attribute license_version

Returns:

  • (Object)

    the current value of license_version



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def license_version
  @license_version
end

#nowObject

Returns the value of attribute now

Returns:

  • (Object)

    the current value of now



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def now
  @now
end

#project_nameObject

Returns the value of attribute project_name

Returns:

  • (Object)

    the current value of project_name



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_name
  @project_name
end

#project_url_communityObject

Returns the value of attribute project_url_community

Returns:

  • (Object)

    the current value of project_url_community



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_community
  @project_url_community
end

#project_url_conductObject

Returns the value of attribute project_url_conduct

Returns:

  • (Object)

    the current value of project_url_conduct



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_conduct
  @project_url_conduct
end

#project_url_contributionsObject

Returns the value of attribute project_url_contributions

Returns:

  • (Object)

    the current value of project_url_contributions



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_contributions
  @project_url_contributions
end

#project_url_downloadObject

Returns the value of attribute project_url_download

Returns:

  • (Object)

    the current value of project_url_download



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_download
  @project_url_download
end

#project_url_fundingObject

Returns the value of attribute project_url_funding

Returns:

  • (Object)

    the current value of project_url_funding



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_funding
  @project_url_funding
end

#project_url_homeObject

Returns the value of attribute project_url_home

Returns:

  • (Object)

    the current value of project_url_home



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_home
  @project_url_home
end

#project_url_issuesObject

Returns the value of attribute project_url_issues

Returns:

  • (Object)

    the current value of project_url_issues



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_issues
  @project_url_issues
end

#project_url_licenseObject

Returns the value of attribute project_url_license

Returns:

  • (Object)

    the current value of project_url_license



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_license
  @project_url_license
end

#project_url_securityObject

Returns the value of attribute project_url_security

Returns:

  • (Object)

    the current value of project_url_security



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_security
  @project_url_security
end

#project_url_sourceObject

Returns the value of attribute project_url_source

Returns:

  • (Object)

    the current value of project_url_source



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_source
  @project_url_source
end

#project_url_versionsObject

Returns the value of attribute project_url_versions

Returns:

  • (Object)

    the current value of project_url_versions



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_url_versions
  @project_url_versions
end

#project_versionObject

Returns the value of attribute project_version

Returns:

  • (Object)

    the current value of project_version



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def project_version
  @project_version
end

#target_rootObject

Returns the value of attribute target_root

Returns:

  • (Object)

    the current value of target_root



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def target_root
  @target_root
end

#template_pathObject

Returns the value of attribute template_path

Returns:

  • (Object)

    the current value of template_path



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def template_path
  @template_path
end

#template_rootsObject

Returns the value of attribute template_roots

Returns:

  • (Object)

    the current value of template_roots



12
13
14
# File 'lib/rubysmith/configuration/model.rb', line 12

def template_roots
  @template_roots
end

Instance Method Details

#ascii_doc?Boolean

Returns:

  • (Boolean)


130
# File 'lib/rubysmith/configuration/model.rb', line 130

def ascii_doc? = documentation_format == "adoc"

#author_nameObject



92
# File 'lib/rubysmith/configuration/model.rb', line 92

def author_name = [author_given_name, author_family_name].compress.join(" ")

#computed_project_url_communityObject



108
# File 'lib/rubysmith/configuration/model.rb', line 108

def computed_project_url_community = format_url(__method__)

#computed_project_url_conductObject



110
# File 'lib/rubysmith/configuration/model.rb', line 110

def computed_project_url_conduct = format_url(__method__)

#computed_project_url_contributionsObject



112
# File 'lib/rubysmith/configuration/model.rb', line 112

def computed_project_url_contributions = format_url(__method__)

#computed_project_url_downloadObject



114
# File 'lib/rubysmith/configuration/model.rb', line 114

def computed_project_url_download = format_url(__method__)

#computed_project_url_fundingObject



116
# File 'lib/rubysmith/configuration/model.rb', line 116

def computed_project_url_funding = format_url(__method__)

#computed_project_url_homeObject



118
# File 'lib/rubysmith/configuration/model.rb', line 118

def computed_project_url_home = format_url(__method__)

#computed_project_url_issuesObject



120
# File 'lib/rubysmith/configuration/model.rb', line 120

def computed_project_url_issues = format_url(__method__)

#computed_project_url_licenseObject



122
# File 'lib/rubysmith/configuration/model.rb', line 122

def computed_project_url_license = format_url(__method__)

#computed_project_url_securityObject



124
# File 'lib/rubysmith/configuration/model.rb', line 124

def computed_project_url_security = format_url(__method__)

#computed_project_url_sourceObject



126
# File 'lib/rubysmith/configuration/model.rb', line 126

def computed_project_url_source = format_url(__method__)

#computed_project_url_versionsObject



128
# File 'lib/rubysmith/configuration/model.rb', line 128

def computed_project_url_versions = format_url(__method__)

#license_label_versionObject



94
# File 'lib/rubysmith/configuration/model.rb', line 94

def license_label_version = [license_label, license_version].compress.join("-")

#markdown?Boolean

Returns:

  • (Boolean)


132
# File 'lib/rubysmith/configuration/model.rb', line 132

def markdown? = documentation_format == "md"

#maximizeObject



88
# File 'lib/rubysmith/configuration/model.rb', line 88

def maximize = update_build_options true

#minimizeObject



90
# File 'lib/rubysmith/configuration/model.rb', line 90

def minimize = update_build_options false

#pathwayObject



134
135
136
# File 'lib/rubysmith/configuration/model.rb', line 134

def pathway
  Pathway[start_root: template_root, start_path: template_path, end_root: target_root]
end

#project_classObject



96
# File 'lib/rubysmith/configuration/model.rb', line 96

def project_class = project_namespaced_class.split("::").last

#project_labelObject



100
# File 'lib/rubysmith/configuration/model.rb', line 100

def project_label = project_name.titleize

#project_levelsObject



102
# File 'lib/rubysmith/configuration/model.rb', line 102

def project_levels = project_namespaced_class.split("::").size - 1

#project_namespaced_classObject



98
# File 'lib/rubysmith/configuration/model.rb', line 98

def project_namespaced_class = project_name.camelcase

#project_pathObject



104
# File 'lib/rubysmith/configuration/model.rb', line 104

def project_path = project_name.snakecase

#project_rootObject



106
# File 'lib/rubysmith/configuration/model.rb', line 106

def project_root = target_root.join(project_name)

#template_rootObject



138
139
140
141
# File 'lib/rubysmith/configuration/model.rb', line 138

def template_root
  Array(template_roots).map(&:expand_path)
                       .find { |path| path.join(String(template_path)).exist? }
end