Class: Semverve::ResolvedConfiguration
- Inherits:
-
Object
- Object
- Semverve::ResolvedConfiguration
- Defined in:
- lib/semverve/configuration.rb
Overview
Immutable configuration with all project defaults resolved.
Instance Attribute Summary collapse
-
#bundle_lock ⇒ Boolean
readonly
Whether increments should run
bundle lockafter writing a version. -
#command_runner ⇒ #call
readonly
Callable used to run shell commands such as
bundle lock. -
#format ⇒ Symbol
readonly
Resolved version-file format.
-
#gem_name ⇒ String
readonly
Resolved gem name.
-
#module_name ⇒ String
readonly
Resolved Ruby module name.
-
#release_checks ⇒ Array<Symbol>
readonly
Resolved release-readiness surfaces run by the release check task.
-
#root ⇒ String
readonly
Absolute project root.
-
#rubygems_host ⇒ String
readonly
Resolved RubyGems-compatible host used for published-version checks.
-
#version_checks ⇒ Array<Symbol>
readonly
Resolved version-maintenance surfaces run by umbrella tasks.
-
#version_code_reference_files ⇒ Rake::FileList
readonly
Resolved code files to scan for safe version literals.
-
#version_code_reference_pattern ⇒ Regexp
readonly
Resolved code pattern used to scan safe version literals.
-
#version_doc_reference_files ⇒ Rake::FileList
readonly
Resolved documentation files to scan for version references.
-
#version_file ⇒ String
readonly
Resolved version-file path relative to the project root.
-
#version_match_mode ⇒ Symbol
readonly
Resolved version matching mode for reference and code-literal checks.
Instance Method Summary collapse
-
#absolute_version_file ⇒ String
Absolute path to the resolved version file.
-
#initialize(bundle_lock:, command_runner:, format:, gem_name:, module_name:, release_checks:, root:, rubygems_host:, version_file:, version_checks:, version_code_reference_files:, version_code_reference_pattern:, version_doc_reference_files:, version_match_mode:) ⇒ Semverve::ResolvedConfiguration
constructor
Initializes a resolved configuration.
Constructor Details
#initialize(bundle_lock:, command_runner:, format:, gem_name:, module_name:, release_checks:, root:, rubygems_host:, version_file:, version_checks:, version_code_reference_files:, version_code_reference_pattern:, version_doc_reference_files:, version_match_mode:) ⇒ Semverve::ResolvedConfiguration
Initializes a resolved configuration.
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 |
# File 'lib/semverve/configuration.rb', line 505 def initialize( bundle_lock:, command_runner:, format:, gem_name:, module_name:, release_checks:, root:, rubygems_host:, version_file:, version_checks:, version_code_reference_files:, version_code_reference_pattern:, version_doc_reference_files:, version_match_mode: ) @bundle_lock = bundle_lock @command_runner = command_runner @format = format @gem_name = gem_name @module_name = module_name @release_checks = release_checks @root = root @rubygems_host = rubygems_host @version_file = version_file @version_checks = version_checks @version_code_reference_files = version_code_reference_files @version_code_reference_pattern = version_code_reference_pattern @version_doc_reference_files = version_doc_reference_files @version_match_mode = version_match_mode end |
Instance Attribute Details
#bundle_lock ⇒ Boolean (readonly)
Whether increments should run bundle lock after writing a version.
406 407 408 |
# File 'lib/semverve/configuration.rb', line 406 def bundle_lock @bundle_lock end |
#command_runner ⇒ #call (readonly)
Callable used to run shell commands such as bundle lock.
412 413 414 |
# File 'lib/semverve/configuration.rb', line 412 def command_runner @command_runner end |
#format ⇒ Symbol (readonly)
Resolved version-file format.
418 419 420 |
# File 'lib/semverve/configuration.rb', line 418 def format @format end |
#gem_name ⇒ String (readonly)
Resolved gem name.
424 425 426 |
# File 'lib/semverve/configuration.rb', line 424 def gem_name @gem_name end |
#module_name ⇒ String (readonly)
Resolved Ruby module name.
430 431 432 |
# File 'lib/semverve/configuration.rb', line 430 def module_name @module_name end |
#release_checks ⇒ Array<Symbol> (readonly)
Resolved release-readiness surfaces run by the release check task.
436 437 438 |
# File 'lib/semverve/configuration.rb', line 436 def release_checks @release_checks end |
#root ⇒ String (readonly)
Absolute project root.
442 443 444 |
# File 'lib/semverve/configuration.rb', line 442 def root @root end |
#rubygems_host ⇒ String (readonly)
Resolved RubyGems-compatible host used for published-version checks.
448 449 450 |
# File 'lib/semverve/configuration.rb', line 448 def rubygems_host @rubygems_host end |
#version_checks ⇒ Array<Symbol> (readonly)
Resolved version-maintenance surfaces run by umbrella tasks.
460 461 462 |
# File 'lib/semverve/configuration.rb', line 460 def version_checks @version_checks end |
#version_code_reference_files ⇒ Rake::FileList (readonly)
Resolved code files to scan for safe version literals.
466 467 468 |
# File 'lib/semverve/configuration.rb', line 466 def version_code_reference_files @version_code_reference_files end |
#version_code_reference_pattern ⇒ Regexp (readonly)
Resolved code pattern used to scan safe version literals.
472 473 474 |
# File 'lib/semverve/configuration.rb', line 472 def version_code_reference_pattern @version_code_reference_pattern end |
#version_doc_reference_files ⇒ Rake::FileList (readonly)
Resolved documentation files to scan for version references.
478 479 480 |
# File 'lib/semverve/configuration.rb', line 478 def version_doc_reference_files @version_doc_reference_files end |
#version_file ⇒ String (readonly)
Resolved version-file path relative to the project root.
454 455 456 |
# File 'lib/semverve/configuration.rb', line 454 def version_file @version_file end |
#version_match_mode ⇒ Symbol (readonly)
Resolved version matching mode for reference and code-literal checks.
484 485 486 |
# File 'lib/semverve/configuration.rb', line 484 def version_match_mode @version_match_mode end |
Instance Method Details
#absolute_version_file ⇒ String
Absolute path to the resolved version file.
541 542 543 |
# File 'lib/semverve/configuration.rb', line 541 def absolute_version_file File.(version_file, root) end |