Skip to content

Add workflow configuration to release spec fixtures - #56

Merged
dblock merged 1 commit into
masterfrom
dblock/rspec-configure-workflow
Nov 11, 2026
Merged

dblock merged 1 commit into
masterfrom
dblock/rspec-configure-workflow

Conversation

@dblock

@dblock dblock commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Summary

Add optional RSpec fixture setup:

project.configure_workflow(
  require: 'tasks/release',
  builder: 'GrapeRelease.workflow'
)

The generated fixture Rakefile loads ruby-gem-release/rspec, requires the copied project builder, supplies the existing local Provider, Destination, and Hosting adapters, and calls install_tasks. Production configuration, run_task, and release! are unchanged. Manual project.write('Rakefile', ...) remains available for custom cases.

Builder strings must be a constant path and method. Source paths are encoded with String#dump; source and Rakefile paths reuse the existing checkout/Git-metadata checks. Invalid arguments and escaping symlinks are rejected before replacing files.

Update the lifecycle-hooks example and testing guide. The complete example still copies its real builder and README, verifies the release and development hooks, and now checks both local publication copies against the exact built archive.

Validation

  • bundle exec rake: 351 examples, no failures; 148 RuboCop files, no offenses.
  • bundle exec rake build.
  • Installed-archive smoke verifies that the new helper loads from the installed gem without loading RSpec, then runs the complete real-project example with local publication.
  • Focused cases cover literal quotes/interpolation in filenames, a builder with nested constants, adapter injection, invalid builder expressions, invalid paths, and escaping source/Rakefile links.
  • Before/after example profiling retains exactly 16 Git launches and 8 fresh Ruby/Rake launches; no new release execution path.

Created by an AI assistant on behalf of @dblock.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dblock
dblock merged commit 1fb3b1f into master Nov 11, 2026
7 checks passed
@dblock
dblock deleted the dblock/rspec-configure-workflow branch November 11, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant