Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mmozuras committed Oct 7, 2014
1 parent d1620a6 commit 32f7971
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Inline docs](http://inch-ci.org/github/mmozuras/pronto.png)](http://inch-ci.org/github/mmozuras/pronto)

Pronto runs analysis quickly by checking only the relevant changes. Created to
be used on pull requests, but suited for other scenarios as well. Perfect if you
be used on pull requests, but also suited for other scenarios. Perfect if you
want to find out quickly if branch introduces changes that conform to your
[styleguide](https://github.com/mmozuras/pronto-rubocop), [are DRY](https://github.com/mmozuras/pronto-flay), [don't introduce security holes](https://github.com/mmozuras/pronto-brakeman) and [more](#runners).

Expand All @@ -20,49 +20,55 @@ Pronto runs the checks on a diff between the current HEAD and the provided commi
### GitHub Integration

You can run Pronto as a step of your CI builds and get the results as comments
on GitHub commits using `GithubFormatter`.
on GitHub commits using `GithubFormatter` or `GithubPullRequestFormatter`.

Add Pronto runners you want to use to your Gemfile:
```ruby
gem 'pronto-rubocop'
gem 'pronto-rubocop'
```
or gemspec file:
```ruby
s.add_development_dependency 'pronto-rubocop'
s.add_development_dependency 'pronto-rubocop'
```
Set the GITHUB_ACCESS_TOKEN environment variable to [OAuth token](https://help.github.com/articles/creating-an-access-token-for-command-line-use)
that has access to the repository. Then set up a rake task:
```ruby
Pronto.gem_names.each { |gem_name| require "pronto/#{gem_name}" }
Set the GITHUB_ACCESS_TOKEN environment variable to [OAuth token](https://help.github.com/articles/creating-an-access-token-for-command-line-use)
that has access to the repository.

formatter = Pronto::Formatter::GithubFormatter.new
Pronto.run('origin/master', '.', formatter)
Then just run it:
```bash
GITHUB_ACCESS_TOKEN=token pronto run -f github -c origin/master
```
or run it via command line:
or, if you want comments to appear on pull request diff, instead of commit:
```bash
GITHUB_ACCESS_TOKEN=token PULL_REQUEST_ID=id pronto run -f github_pr -c origin/master
```
GITHUB_ACCESS_TOKEN=<token> bundle exec pronto run -f github -c origin/master

As an alternative, you can also set up a rake task:
```ruby
Pronto.gem_names.each { |gem_name| require "pronto/#{gem_name}" }

formatter = Pronto::Formatter::GithubFormatter.new # or GithubPullRequestFormatter
Pronto.run('origin/master', '.', formatter)
```

### Local Changes

You can run Pronto locally. First, install Pronto and the runners you want to use:
```bash
gem install pronto
gem install pronto-rubocop
gem install pronto
gem install pronto-rubocop
```
Then navigate to the repository you want to run Pronto on, and:
```bash
git checkout feature/branch
pronto run # Pronto runs against master by default
git checkout feature/branch
pronto run # Pronto runs against master by default
```

Run `pronto` in your terminal without any arguments to see what more Pronto is
capable off.
Just run `pronto` without any arguments to see what Pronto is capable off.

## Runners

Pronto can run various tools and libraries, as long as there's a runner for it.
Currently available runners:
Currently available:

* [pronto-rubocop](https://github.com/mmozuras/pronto-rubocop)
* [pronto-flay](https://github.com/mmozuras/pronto-flay)
Expand Down

0 comments on commit 32f7971

Please sign in to comment.