Skip to content

Contributing to Settingslogic

Thank you for your interest in contributing to the MITRE fork of settingslogic! This fork provides Ruby 3.x and Rails 7.x+ compatibility for the classic settingslogic gem.

๐Ÿš€ Quick Start

# Fork and clone
git clone https://github.com/mitre/settingslogic.git
cd settingslogic

# Install dependencies
bundle install

# Run tests
bundle exec rspec

๐Ÿ› ๏ธ Development Setup

Prerequisites

  • Ruby 2.7+ (we test against 2.7, 3.0, 3.1, 3.2, 3.3, and 3.4)
  • Bundler

Running Tests

# Run all tests
bundle exec rspec

# Run tests with specific Ruby version
rbenv local 3.2.0  # or rvm use 3.2.0
bundle exec rspec

# Run linting
bundle exec rubocop

๐Ÿ“ Making Changes

  1. Fork the repository on GitHub
  2. Create a feature branch from main
    git checkout -b feature/my-new-feature
    
  3. Make your changes
  4. Add tests for any new functionality
  5. Ensure all tests pass
  6. Follow existing code style
  7. Commit your changes
    git commit -m "Add new feature"
    
  8. Push to your fork
    git push origin feature/my-new-feature
    
  9. Create a Pull Request on GitHub

๐Ÿงช Testing Requirements

All changes must: - Include tests for new functionality - Pass all existing tests - Work with Ruby 2.7 through 3.4 - Maintain backwards compatibility where possible

Testing YAML Aliases

Since the main purpose of this fork is Psych 4 compatibility, ensure YAML aliases work:

# test.yml
defaults: &defaults
  host: localhost
  port: 3000

development:
  <<: *defaults
  database: dev_db

๐ŸŽฏ Focus Areas

We're particularly interested in: - Ruby 3.x compatibility improvements - Rails 7.x and 8.x compatibility - Performance improvements - Security enhancements - Better error messages

๐Ÿ“‹ Code Style

  • Use frozen string literals
  • Follow Ruby community conventions
  • Run bundle exec rubocop before committing
  • Keep methods small and focused
  • Document complex logic

๐Ÿ› Reporting Issues

When reporting issues, please include: - Ruby version - Rails version (if applicable) - Minimal reproduction example - Full error message and stack trace

๐Ÿ“„ License

By contributing, you agree that your contributions will be licensed under the MIT License.

๐Ÿ“ง Contact

For questions about contributing, please open an issue on GitHub or contact the maintainers at lippold@gmail.com.

๐Ÿ™ Acknowledgments

Thanks to Ben Johnson for creating the original settingslogic gem, and to all the fork maintainers who have kept it alive for the Ruby community.