Set up your local development environment for contributing to Uniword.

1. Prerequisites

  • Ruby 3.0 or higher

  • Bundler

2. Setup Steps

  1. Fork the repository on GitHub

  2. Clone your fork locally:

git clone https://github.com/YOUR-USERNAME/uniword.git
cd uniword
  1. Install dependencies:

bundle install
  1. Run tests to ensure everything is working:

bundle exec rspec
  1. Create a feature branch:

git checkout -b feature/my-new-feature

3. Local Dependencies

Uniword uses local paths for bleeding-edge development of related gems:

# Gemfile
gem 'lutaml-model', path: '/Users/mulgogi/src/lutaml/lutaml-model'
gem 'plurimath', path: '/Users/mulgogi/src/plurimath/plurimath'
gem 'canon', path: '/Users/mulgogi/src/lutaml/canon'

If you are working on the upstream gems, clone them to the paths specified. For normal development, the published gem versions are used.

4. Running Tests

Run the complete test suite:

bundle exec rspec

Run a single test file:

bundle exec rspec spec/uniword/document_spec.rb

Run a specific test by line number:

bundle exec rspec spec/uniword/document_spec.rb:42

5. Interactive Console

Start an interactive console with Uniword loaded:

bundle exec rake console

6. Generate Documentation

Generate YARD documentation:

bundle exec yard doc

7. Linting

Run RuboCop for code style enforcement:

# Check for issues
bundle exec rubocop

# Auto-fix issues
bundle exec rubocop -A --auto-gen-config