Sha256: 48ab56370b13d0408a071ef6d856b8a2f22b3a885925dbec6c2d7438763419d4

Contents?: true

Size: 1.36 KB

Versions: 6

Compression:

Stored size: 1.36 KB

Contents

# Contributing

## Installation

Rather than installing `cpl` as a Ruby gem, install this repo locally and alias the `cpl` command globally for easier
access, e.g.:

```sh
git clone https://github.com/shakacode/heroku-to-control-plane

# Create an alias in some local shell startup script, e.g., `.profile`, `.bashrc`, etc.
alias cpl="~/projects/heroku-to-control-plane/bin/cpl"
```

Or set the path of the Ruby gem in your Gemfile.

```ruby
gem 'cpl', path: '~/projects/heroku-to-control-plane'
```

## Linting/Testing

Before committing or pushing code, be sure to:

- Run `bundle exec rake update_command_docs` to sync any doc changes made in the source code to the docs
- Run `bundle exec rubocop -a` to fix any linting errors
- Run `bundle exec rspec` to run the test suite

You can also install [overcommit](https://github.com/sds/overcommit) and let it automatically check for you:

```sh
gem install overcommit

overcommit --install
```

## Debugging

1. Add a breakpoint (`debugger`) to any line of code you want to debug.
2. Modify the `lib/command/test.rb` file to trigger the code you want to test. To simulate a command, you can use
   `Cpl::Cli.start` (e.g., `Cpl::Cli.start(["deploy-image", "-a", "my-app-name"])` would be the same as running
   `cpl deploy-image -a my-app-name`).
3. Run the `test` command in your test app with a `.controlplane` directory.

```sh
cpl test
```

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cpl-1.1.2 CONTRIBUTING.md
cpl-1.1.2.rc.0 CONTRIBUTING.md
cpl-1.1.1 CONTRIBUTING.md
cpl-1.1.0 CONTRIBUTING.md
cpl-1.0.4 CONTRIBUTING.md
cpl-1.0.3 CONTRIBUTING.md