Thank you for your interest in contributing to the Conductor Ruby SDK! This document provides guidelines and instructions for contributing.
Please be respectful and constructive in all interactions. We welcome contributors of all experience levels.
- Ruby 2.6+ (Ruby 3.2+ recommended)
- Bundler
- Git
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/ruby-sdk.git cd ruby-sdk -
Install dependencies:
bundle install
-
Run tests to verify setup:
bundle exec rspec spec/conductor/
feature/description- New featuresfix/description- Bug fixesdocs/description- Documentation updatesrefactor/description- Code refactoring
-
Create a new branch:
git checkout -b feature/my-new-feature
-
Make your changes
-
Run tests:
bundle exec rspec spec/conductor/ -
Run linting:
bundle exec rubocop -
Commit your changes:
git commit -m "Add feature: description of changes" -
Push to your fork:
git push origin feature/my-new-feature
-
Create a Pull Request
# All unit tests
bundle exec rspec spec/conductor/
# Specific test file
bundle exec rspec spec/conductor/client/workflow_client_spec.rb
# With documentation format
bundle exec rspec spec/conductor/ --format documentation
# Integration tests (requires Conductor server)
CONDUCTOR_SERVER_URL=http://localhost:8080/api bundle exec rspec spec/integration/- Place unit tests in
spec/conductor/ - Place integration tests in
spec/integration/ - Use descriptive test names
- Follow existing test patterns
Example test structure:
RSpec.describe Conductor::Client::WorkflowClient do
describe '#start' do
context 'when workflow exists' do
it 'returns a workflow ID' do
# test implementation
end
end
context 'when workflow does not exist' do
it 'raises an ApiError' do
# test implementation
end
end
end
endWe use RuboCop for code style enforcement. Key guidelines:
- Use 2 spaces for indentation
- Use snake_case for methods and variables
- Use CamelCase for classes and modules
- Add documentation comments for public methods
- Keep methods small and focused
Run RuboCop to check your code:
bundle exec rubocop
# Auto-fix safe issues
bundle exec rubocop -a- Update README.md for user-facing changes
- Add YARD documentation for new public methods
- Update CHANGELOG.md for notable changes
- Include examples for new features
# Starts a workflow execution
#
# @param name [String] The workflow name
# @param input [Hash] The workflow input (default: {})
# @param version [Integer, nil] The workflow version (optional)
# @return [String] The workflow ID
# @raise [ApiError] If the workflow doesn't exist
#
# @example Start a simple workflow
# workflow_id = client.start('my_workflow', input: { key: 'value' })
#
def start(name, input: {}, version: nil)
# implementation
end- Tests pass locally
- RuboCop passes (or issues are intentional)
- Documentation is updated
- CHANGELOG.md is updated (if applicable)
- Commits are clean and well-described
Include:
- Summary of changes
- Motivation/context
- How to test
- Screenshots (if UI-related)
- Automated CI checks run
- Maintainers review code
- Address feedback
- Merge when approved
Releases are managed by maintainers:
- Update version in
lib/conductor/version.rb - Update CHANGELOG.md
- Create GitHub release with tag
- CI automatically publishes to RubyGems
lib/
├── conductor.rb # Main entry point
├── conductor/
│ ├── version.rb # Version constant
│ ├── configuration.rb # Configuration class
│ ├── exceptions.rb # Exception classes
│ ├── client/ # High-level clients
│ ├── http/
│ │ ├── api/ # Resource API classes
│ │ ├── models/ # Model classes
│ │ ├── api_client.rb # HTTP client wrapper
│ │ └── rest_client.rb # Faraday client
│ ├── orkes/ # Orkes-specific code
│ ├── worker/ # Worker framework
│ └── workflow/ # Workflow DSL
- Open an issue for bugs or feature requests
- Join Conductor Slack
- Check existing issues and PRs
By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.