<commit_before># Github Heroku Deployer

[![Build Status](https://travis-ci.org/G5/github_heroku_deployer.png?branch=master)](https://travis-ci.org/G5/github_heroku_deployer)
[![Code Climate](https://codeclimate.com/github/G5/github_heroku_deployer.png)](https://codeclimate.com/github/G5/github_heroku_deployer)

Ruby gem to deploy public and private Github repos to Heroku


## Current Version

0.3.1


## Requirements

* ["heroku_api", "~> 0.3.5"](http://rubygems.org/gems/heroku-api)
* ["platform-api", "~> 0.2"](http://rubygems.org/gems/platform-api)
* ["git", "~> 1.2.5"](http://rubygems.org/gems/git)
* ["git-ssh-wrapper", "~> 0.1.0"](http://rubygems.org/gems/git-ssh-wrapper)


## Installation

### Gemfile

Add this line to your application's Gemfile:

```ruby
gem 'github_heroku_deployer'
```

### Manual

Or install it yourself:

```bash
gem install github_heroku_deployer
```


## Usage

Set defaults in an initializer, defaults are shown:

```ruby
GithubHerokuDeployer.configure do |config|
  config.github_repo     = ENV["GITHUB_REPO"]
  config.heroku_api_key  = ENV["HEROKU_API_KEY"]
  config.heroku_app_name = ENV["HEROKU_APP_NAME"]
  config.heroku_repo     = ENV["HEROKU_REPO"]
  config.heroku_username = ENV["HEROKU_USERNAME"]
  config.id_rsa          = ENV["ID_RSA"]
  config.logger          = Logger.new(STDOUT)
end
```

Export you environment variables wherever you do that:

```bash
export GITHUB_REPO=<EMAIL>:your/repo.git
export HEROKU_API_KEY=heroku_api_key
export HEROKU_APP_NAME=heroku_app_name
export HEROKU_REPO=<EMAIL>:repo.git
export HEROKU_USERNAME=heroku_username
export ID_RSA=id_rsa
```

Deploy:

```ruby
  GithubHerokuDeployer.deploy
```

Override defaults:

```ruby
  GithubHerokuDeployer.deploy(github_repo: github_repo)
```

Manipulate Repo:

```ruby
  GithubHerokuDeployer.deploy(github_repo: github_repo) { |repo| repo.add "/path/to/file" }
```


## Authors

  * <NAME> / [@jlsuttles](https://github.com/jlsuttles)
  * <NAME> / [@bookis](https://github.com/bookis)
  * <NAME> / [@variousred](https://github.com/variousred)


## Contributing
<commit_msg>add create to the readme<commit_after># Github Heroku Deployer

[![Build Status](https://travis-ci.org/G5/github_heroku_deployer.png?branch=master)](https://travis-ci.org/G5/github_heroku_deployer)
[![Code Climate](https://codeclimate.com/github/G5/github_heroku_deployer.png)](https://codeclimate.com/github/G5/github_heroku_deployer)

Ruby gem to deploy public and private Github repos to Heroku


## Current Version

0.3.1


## Requirements

* ["heroku_api", "~> 0.3.5"](http://rubygems.org/gems/heroku-api)
* ["platform-api", "~> 0.2"](http://rubygems.org/gems/platform-api)
* ["git", "~> 1.2.5"](http://rubygems.org/gems/git)
* ["git-ssh-wrapper", "~> 0.1.0"](http://rubygems.org/gems/git-ssh-wrapper)


## Installation

### Gemfile

Add this line to your application's Gemfile:

```ruby
gem 'github_heroku_deployer'
```

### Manual

Or install it yourself:

```bash
gem install github_heroku_deployer
```


## Usage

Set defaults in an initializer, defaults are shown:

```ruby
GithubHerokuDeployer.configure do |config|
  config.github_repo     = ENV["GITHUB_REPO"]
  config.heroku_api_key  = ENV["HEROKU_API_KEY"]
  config.heroku_app_name = ENV["HEROKU_APP_NAME"]
  config.heroku_repo     = ENV["HEROKU_REPO"]
  config.heroku_username = ENV["HEROKU_USERNAME"]
  config.id_rsa          = ENV["ID_RSA"]
  config.logger          = Logger.new(STDOUT)
end
```

Export you environment variables wherever you do that:

```bash
export GITHUB_REPO=<EMAIL>:your/repo.git
export HEROKU_API_KEY=heroku_api_key
export HEROKU_APP_NAME=heroku_app_name
export HEROKU_REPO=<EMAIL>:repo.git
export HEROKU_USERNAME=heroku_username
export ID_RSA=id_rsa
```

Create Heroku App:

```ruby
  GithubHerokuDeployer.create
```

Deploy:

```ruby
  GithubHerokuDeployer.deploy
```

Override defaults:

```ruby
  GithubHerokuDeployer.deploy(github_repo: github_repo)
```

Manipulate Repo:

```ruby
  GithubHerokuDeployer.deploy(github_repo: github_repo) { |repo| repo.add "/path/to/file" }
```


## Authors

  * <NAME> / [@jlsuttles](https://github.com/jlsuttles)
  * <NAME> / [@bookis](https://github.com/bookis)
  * <NAME> / [@variousred](https://github.com/variousred)


## Contributing

{'fraction_non_alphanumeric': 0.15814171750351946, 'fraction_numerical': 0.008446738620366025, 'mean_word_length': 5.038243626062323, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5464273', 'n_tokens_mistral': 1771, 'n_tokens_neox': 1625, 'n_words': 259}