<commit_before># The sturdy deploy-mate, arrr!
<img src="http://hanseventures.s3.amazonaws.com/github/deploy-mate.jpg" width="300" />

> Trust me, bucko. I can do it.
<commit_msg>Make sense<commit_after># The sturdy d'ploy-mate, arrr!
<img src="http://hanseventures.s3.amazonaws.com/github/deploy-mate.jpg" width="300" />

> Trust me, bucko. I can do it.

This little gem can be added to your ruby-projects in order to **set up a working ruby-server** and deploy to it. 

## Installation
Add this to your project's `Gemfile`:

```
gem 'deploy_mate', git: 'https://58341dac36402a0305899f85ff7c32265ee89109@github.com/hanseventures/deploy-mate'
```
and run `bundle install`.

After installing the gem you need to generate the files needed to be able to deploy with **capistrano**.

Add this at **the end** of your project's `Rakefile`: 
```
load 'deploy_mate/tasks.rake'
```
then run 
```
rake deploy_mate:install
````

Follow the instructions.

This will create the following files for you:

```
Capfile
config/deploy.rb
config/deploy/<your-stage>.rb
```

## Setting up a server
1. Spawn yourself a basic **Ubuntu 14** at the provider of your choice. 
2. Create a working SSH-configuration for that server and try it our using `ssh <your-server-name>`
3. Run `cap <your-stage> machine:init` to install the needed packages. 
4. Run `cap <your-stage> machine:setup` the setup all needed configuration-files on the server
5. Run `cap <your-stage> deploy` and be done.

{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.030737704918032786, 'mean_word_length': 4.446096654275093, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '5719756', 'n_tokens_mistral': 527, 'n_tokens_neox': 472, 'n_words': 177}