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

Instance Attribute Details

#author_emailObject

Returns the value of attribute author_email

Returns:

  • (Object)

    the current value of author_email



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

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



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

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



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def author_given_name
  @author_given_name
end

#author_handleObject

Returns the value of attribute author_handle

Returns:

  • (Object)

    the current value of author_handle



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def author_handle
  @author_handle
end

#author_uriObject

Returns the value of attribute author_uri

Returns:

  • (Object)

    the current value of author_uri



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def author_uri
  @author_uri
end

#build_amazing_printObject

Returns the value of attribute build_amazing_print

Returns:

  • (Object)

    the current value of build_amazing_print



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_amazing_print
  @build_amazing_print
end

#build_bootsnapObject

Returns the value of attribute build_bootsnap

Returns:

  • (Object)

    the current value of build_bootsnap



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_bootsnap
  @build_bootsnap
end

#build_caliberObject

Returns the value of attribute build_caliber

Returns:

  • (Object)

    the current value of build_caliber



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

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



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

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



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_citation
  @build_citation
end

#build_cliObject

Returns the value of attribute build_cli

Returns:

  • (Object)

    the current value of build_cli



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_cli
  @build_cli
end

#build_communityObject

Returns the value of attribute build_community

Returns:

  • (Object)

    the current value of build_community



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_community
  @build_community
end

#build_conductObject

Returns the value of attribute build_conduct

Returns:

  • (Object)

    the current value of build_conduct



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_conduct
  @build_conduct
end

#build_consoleObject

Returns the value of attribute build_console

Returns:

  • (Object)

    the current value of build_console



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_console
  @build_console
end

#build_contributionsObject

Returns the value of attribute build_contributions

Returns:

  • (Object)

    the current value of build_contributions



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_contributions
  @build_contributions
end

#build_dcooObject

Returns the value of attribute build_dcoo

Returns:

  • (Object)

    the current value of build_dcoo



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_dcoo
  @build_dcoo
end

#build_debugObject

Returns the value of attribute build_debug

Returns:

  • (Object)

    the current value of build_debug



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_debug
  @build_debug
end

#build_dockerObject

Returns the value of attribute build_docker

Returns:

  • (Object)

    the current value of build_docker



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_docker
  @build_docker
end

#build_fundingObject

Returns the value of attribute build_funding

Returns:

  • (Object)

    the current value of build_funding



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_funding
  @build_funding
end

#build_gitObject

Returns the value of attribute build_git

Returns:

  • (Object)

    the current value of build_git



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

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



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

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



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

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



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_git_lint
  @build_git_lint
end

#build_irb_kitObject

Returns the value of attribute build_irb_kit

Returns:

  • (Object)

    the current value of build_irb_kit



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_irb_kit
  @build_irb_kit
end

#build_licenseObject

Returns the value of attribute build_license

Returns:

  • (Object)

    the current value of build_license



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_license
  @build_license
end

#build_maximumObject

Returns the value of attribute build_maximum

Returns:

  • (Object)

    the current value of build_maximum



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_maximum
  @build_maximum
end

#build_minimumObject

Returns the value of attribute build_minimum

Returns:

  • (Object)

    the current value of build_minimum



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_minimum
  @build_minimum
end

#build_monadsObject

Returns the value of attribute build_monads

Returns:

  • (Object)

    the current value of build_monads



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_monads
  @build_monads
end

#build_rakeObject

Returns the value of attribute build_rake

Returns:

  • (Object)

    the current value of build_rake



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_rake
  @build_rake
end

#build_readmeObject

Returns the value of attribute build_readme

Returns:

  • (Object)

    the current value of build_readme



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_readme
  @build_readme
end

#build_reekObject

Returns the value of attribute build_reek

Returns:

  • (Object)

    the current value of build_reek



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_reek
  @build_reek
end

#build_refinementsObject

Returns the value of attribute build_refinements

Returns:

  • (Object)

    the current value of build_refinements



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_refinements
  @build_refinements
end

#build_rspecObject

Returns the value of attribute build_rspec

Returns:

  • (Object)

    the current value of build_rspec



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_rspec
  @build_rspec
end

#build_rtcObject

Returns the value of attribute build_rtc

Returns:

  • (Object)

    the current value of build_rtc



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_rtc
  @build_rtc
end

#build_securityObject

Returns the value of attribute build_security

Returns:

  • (Object)

    the current value of build_security



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_security
  @build_security
end

#build_setupObject

Returns the value of attribute build_setup

Returns:

  • (Object)

    the current value of build_setup



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

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



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

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



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_versions
  @build_versions
end

#build_zeitwerkObject

Returns the value of attribute build_zeitwerk

Returns:

  • (Object)

    the current value of build_zeitwerk



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def build_zeitwerk
  @build_zeitwerk
end

#citation_affiliationObject

Returns the value of attribute citation_affiliation

Returns:

  • (Object)

    the current value of citation_affiliation



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def citation_affiliation
  @citation_affiliation
end

#citation_messageObject

Returns the value of attribute citation_message

Returns:

  • (Object)

    the current value of citation_message



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def citation_message
  @citation_message
end

#citation_orcidObject

Returns the value of attribute citation_orcid

Returns:

  • (Object)

    the current value of citation_orcid



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def citation_orcid
  @citation_orcid
end

#documentation_formatObject

Returns the value of attribute documentation_format

Returns:

  • (Object)

    the current value of documentation_format



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def documentation_format
  @documentation_format
end

#gems_uriObject

Returns the value of attribute gems_uri

Returns:

  • (Object)

    the current value of gems_uri



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def gems_uri
  @gems_uri
end

#license_labelObject

Returns the value of attribute license_label

Returns:

  • (Object)

    the current value of license_label



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def license_label
  @license_label
end

#license_nameObject

Returns the value of attribute license_name

Returns:

  • (Object)

    the current value of license_name



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def license_name
  @license_name
end

#license_versionObject

Returns the value of attribute license_version

Returns:

  • (Object)

    the current value of license_version



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def license_version
  @license_version
end

#loaded_atObject

Returns the value of attribute loaded_at

Returns:

  • (Object)

    the current value of loaded_at



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def loaded_at
  @loaded_at
end

#organization_labelObject

Returns the value of attribute organization_label

Returns:

  • (Object)

    the current value of organization_label



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def organization_label
  @organization_label
end

#organization_uriObject

Returns the value of attribute organization_uri

Returns:

  • (Object)

    the current value of organization_uri



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def organization_uri
  @organization_uri
end

#project_nameObject

Returns the value of attribute project_name

Returns:

  • (Object)

    the current value of project_name



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_name
  @project_name
end

#project_uri_communityObject

Returns the value of attribute project_uri_community

Returns:

  • (Object)

    the current value of project_uri_community



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_community
  @project_uri_community
end

#project_uri_conductObject

Returns the value of attribute project_uri_conduct

Returns:

  • (Object)

    the current value of project_uri_conduct



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_conduct
  @project_uri_conduct
end

#project_uri_contributionsObject

Returns the value of attribute project_uri_contributions

Returns:

  • (Object)

    the current value of project_uri_contributions



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_contributions
  @project_uri_contributions
end

#project_uri_dcooObject

Returns the value of attribute project_uri_dcoo

Returns:

  • (Object)

    the current value of project_uri_dcoo



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_dcoo
  @project_uri_dcoo
end

#project_uri_downloadObject

Returns the value of attribute project_uri_download

Returns:

  • (Object)

    the current value of project_uri_download



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_download
  @project_uri_download
end

#project_uri_fundingObject

Returns the value of attribute project_uri_funding

Returns:

  • (Object)

    the current value of project_uri_funding



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_funding
  @project_uri_funding
end

#project_uri_homeObject

Returns the value of attribute project_uri_home

Returns:

  • (Object)

    the current value of project_uri_home



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_home
  @project_uri_home
end

#project_uri_issuesObject

Returns the value of attribute project_uri_issues

Returns:

  • (Object)

    the current value of project_uri_issues



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_issues
  @project_uri_issues
end

#project_uri_licenseObject

Returns the value of attribute project_uri_license

Returns:

  • (Object)

    the current value of project_uri_license



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_license
  @project_uri_license
end

#project_uri_securityObject

Returns the value of attribute project_uri_security

Returns:

  • (Object)

    the current value of project_uri_security



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_security
  @project_uri_security
end

#project_uri_sourceObject

Returns the value of attribute project_uri_source

Returns:

  • (Object)

    the current value of project_uri_source



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_source
  @project_uri_source
end

#project_uri_versionsObject

Returns the value of attribute project_uri_versions

Returns:

  • (Object)

    the current value of project_uri_versions



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_uri_versions
  @project_uri_versions
end

#project_versionObject

Returns the value of attribute project_version

Returns:

  • (Object)

    the current value of project_version



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def project_version
  @project_version
end

#repository_handleObject

Returns the value of attribute repository_handle

Returns:

  • (Object)

    the current value of repository_handle



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def repository_handle
  @repository_handle
end

#repository_uriObject

Returns the value of attribute repository_uri

Returns:

  • (Object)

    the current value of repository_uri



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def repository_uri
  @repository_uri
end

#target_rootObject

Returns the value of attribute target_root

Returns:

  • (Object)

    the current value of target_root



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def target_root
  @target_root
end

#template_pathObject

Returns the value of attribute template_path

Returns:

  • (Object)

    the current value of template_path



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def template_path
  @template_path
end

#template_rootsObject

Returns the value of attribute template_roots

Returns:

  • (Object)

    the current value of template_roots



10
11
12
# File 'lib/rubysmith/configuration/model.rb', line 10

def template_roots
  @template_roots
end

Instance Method Details

#ascii_doc?Boolean

Returns:

  • (Boolean)


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

def ascii_doc? = documentation_format == "adoc"

#author_nameObject



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

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

#computed_project_uri_communityObject



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

def computed_project_uri_community = format_uri(__method__)

#computed_project_uri_conductObject



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

def computed_project_uri_conduct = format_uri(__method__)

#computed_project_uri_contributionsObject



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

def computed_project_uri_contributions = format_uri(__method__)

#computed_project_uri_dcooObject



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

def computed_project_uri_dcoo = format_uri(__method__)

#computed_project_uri_downloadObject



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

def computed_project_uri_download = format_uri(__method__)

#computed_project_uri_fundingObject



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

def computed_project_uri_funding = format_uri(__method__)

#computed_project_uri_homeObject



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

def computed_project_uri_home = format_uri(__method__)

#computed_project_uri_issuesObject



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

def computed_project_uri_issues = format_uri(__method__)

#computed_project_uri_licenseObject



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

def computed_project_uri_license = format_uri(__method__)

#computed_project_uri_securityObject



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

def computed_project_uri_security = format_uri(__method__)

#computed_project_uri_sourceObject



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

def computed_project_uri_source = format_uri(__method__)

#computed_project_uri_versionsObject



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

def computed_project_uri_versions = format_uri(__method__)

#license_label_versionObject



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

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

#markdown?Boolean

Returns:

  • (Boolean)


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

def markdown? = documentation_format == "md"

#maximizeObject



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

def maximize = update_build_options true

#minimizeObject



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

def minimize = update_build_options false

#pathwayObject



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

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

#project_classObject



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

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

#project_labelObject



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

def project_label = project_name.titleize

#project_levelsObject



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

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

#project_namespaced_classObject



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

def project_namespaced_class = project_name.camelcase

#project_pathObject



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

def project_path = project_name.snakecase

#project_rootObject



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

def project_root = target_root.join(project_name)

#template_rootObject



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

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