Skip to content
This repository has been archived by the owner on Jun 25, 2023. It is now read-only.

Latest commit

 

History

History
159 lines (128 loc) · 4.46 KB

Development.adoc

File metadata and controls

159 lines (128 loc) · 4.46 KB

Development

The following should get you started on setting up your development environment. As a prerequisite you will need a Ruby environment (Ruby version >= 2.2, 2.5 recommended). We recommend to use RVM to create an isolated development environment. On Windows the RubyInstaller for Windows is probably the easiest way to get started. In this case you will need the DevKit as well.


Table of Contents

Once you have a working Ruby environment it is time to fork the repository. Refer to the Contributing guide for more information.

The following sections list the most important commands you will need for development.

Setup

  • Install Bundler:

    $ gem install bundler
  • Install dependencies:

    $ bundle install
  • Get a list of all available build tasks:

    $ bundle exec rake -T
  • Build the Landrush gem:

    $ bundle exec rake build
  • Clean all generated files:

    $ bundle exec rake clean clobber

Tests

  • Run the test suite:

    $ bundle exec rake test
Tip
The unit tests utilize minitest as test harness. Tests are mainly written in Spec style. To make testing simpler, each test will be configured against a newly created temporary working directly which will be deleted on teardown. Refer to test_helper.rb to see how this setup and teardown works.
  • Run a single test file:

    $ bundle exec rake test TEST=<path to test file>
  • Run cucumber/aruba acceptance tests:

    $ bundle exec rake features
Note
The acceptance tests currently work only for OS X, out of the box. On Linux, one has to manually configure the host visibility for the TLD landrush-acceptance-test. See Linux in the Visibility on the Host section of the Usage guide. On Windows, the acceptance tests won’t work due to a bug in Aruba.
  • Run a single cucumber/aruba acceptance tests:

    $ bundle exec rake features FEATURE=features/<feature-filename>.feature

Documentation

The documentation of this plugin is written in Asciidoc. If you need some syntax help, refer to the AsciiDoc Syntax Quick Reference.

To build the documentation you can execute:

$ bundle exec rake html

which will build the HTML documentation into the folder build/html.

The source code also contains a Guardfile for the Guard library. You can execute:

$ bundle exec guard

and your HTML documentation will be automatically updated on each change to an Asciidoc source file.

Releasing

Note

In order to publish to RubyGems you need to have an account and you need to have an API key configured on your machine. If you have an account you can setup the API key using:

curl -u <user> https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
  • Make sure the HEAD of development builds and passes all tests: bundle exec rake clean rubocop test features install.

  • Review milestone for the current release

    • Make sure all issues are resolved

    • Move unresolved issues into an upcoming release

    • Close milestone

  • Update the CHANGELOG (you can use _scripts/changelog.sh to generate the content)

  • Update version.rb with the correct release version. Consider Semantic Versioning guidelines when deciding on the release version

  • Commit CHANGELOG and version.rb using commit message of the form: cut v<version>

  • Push commit to upstream

  • Release the gem: bundle exec rake release

  • Update version.rb with the next anticipated release version, eg 1.4.0.dev

  • Commit with message: setting dev version <version>.dev

  • Push upstream

Misc

  • Run the vagrant binary with the Landrush plugin loaded from your local source code:

    bundle exec vagrant landrush <command>