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.
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 |
# File 'lib/semverve/configuration.rb', line 530 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.
431 432 433 |
# File 'lib/semverve/configuration.rb', line 431 def bundle_lock @bundle_lock end |
#command_runner ⇒ #call (readonly)
Callable used to run shell commands such as bundle lock.
437 438 439 |
# File 'lib/semverve/configuration.rb', line 437 def command_runner @command_runner end |
#format ⇒ Symbol (readonly)
Resolved version-file format.
443 444 445 |
# File 'lib/semverve/configuration.rb', line 443 def format @format end |
#gem_name ⇒ String? (readonly)
Resolved gem name.
449 450 451 |
# File 'lib/semverve/configuration.rb', line 449 def gem_name @gem_name end |
#module_name ⇒ String (readonly)
Resolved Ruby module name.
455 456 457 |
# File 'lib/semverve/configuration.rb', line 455 def module_name @module_name end |
#release_checks ⇒ Array<Symbol> (readonly)
Resolved release-readiness surfaces run by the release check task.
461 462 463 |
# File 'lib/semverve/configuration.rb', line 461 def release_checks @release_checks end |
#root ⇒ String (readonly)
Absolute project root.
467 468 469 |
# File 'lib/semverve/configuration.rb', line 467 def root @root end |
#rubygems_host ⇒ String (readonly)
Resolved RubyGems-compatible host used for published-version checks.
473 474 475 |
# File 'lib/semverve/configuration.rb', line 473 def rubygems_host @rubygems_host end |
#version_checks ⇒ Array<Symbol> (readonly)
Resolved version-maintenance surfaces run by umbrella tasks.
485 486 487 |
# File 'lib/semverve/configuration.rb', line 485 def version_checks @version_checks end |
#version_code_reference_files ⇒ Rake::FileList (readonly)
Resolved code files to scan for safe version literals.
491 492 493 |
# File 'lib/semverve/configuration.rb', line 491 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.
497 498 499 |
# File 'lib/semverve/configuration.rb', line 497 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.
503 504 505 |
# File 'lib/semverve/configuration.rb', line 503 def version_doc_reference_files @version_doc_reference_files end |
#version_file ⇒ String (readonly)
Resolved version-file path relative to the project root.
479 480 481 |
# File 'lib/semverve/configuration.rb', line 479 def version_file @version_file end |
#version_match_mode ⇒ Symbol (readonly)
Resolved version matching mode for reference and code-literal checks.
509 510 511 |
# File 'lib/semverve/configuration.rb', line 509 def version_match_mode @version_match_mode end |
Instance Method Details
#absolute_version_file ⇒ String
Absolute path to the resolved version file.
566 567 568 |
# File 'lib/semverve/configuration.rb', line 566 def absolute_version_file File.(version_file, root) end |