<commit_before># Cloud Foundry Ruby Buildpack
[![CF Slack](https://s3.amazonaws.com/buildpacks-assets/buildpacks-slack.svg)](http://slack.cloudfoundry.org)

A Cloud Foundry [buildpack](http://docs.cloudfoundry.org/buildpacks/) for Ruby based apps.

This is based on the [Heroku buildpack] (https://github.com/heroku/heroku-buildpack-ruby).

Additional information can be found at [CloudFoundry.org](http://docs.cloudfoundry.org/buildpacks/).

## Usage

This buildpack will be used if your app has a `Gemfile` and `Gemfile.lock` in the root directory. It will then use Bundler to install your dependencies.

```bash
cf push my_app -b https://github.com/cloudfoundry/ruby-buildpack.git
```

## Disconnected environments
To use this buildpack on Cloud Foundry, where the Cloud Foundry instance limits some or all internet activity, please read the [Disconnected Environments documentation](https://github.com/cf-buildpacks/buildpack-packager/blob/master/doc/disconnected_environments.md).

### Vendoring app dependencies
As stated in the [Disconnected Environments documentation](https://github.com/cf-buildpacks/buildpack-packager/blob/master/doc/disconnected_environments.md), your application must 'vendor' its dependencies.

For the Ruby buildpack, use bundler:

```shell 
cd <your app dir>
bundle package --all
```

```cf push``` uploads your vendored dependencies. The buildpack will compile any dependencies requiring compilation while staging your application.


## HTTP Proxy Support

If you need to use a proxy to download dependencies during staging, you can set
the `http_proxy` and/or `https_proxy` environment variables. For more information, see
the [Proxy Usage Docs](http://docs.cloudfoundry.org/buildpacks/proxy-usage.html).

## Building

1. Make sure you have fetched submodules

  ```bash
  git submodule update --init
  ```

1. Get latest buildpack dependencies

  ```shell
  BUNDLE_GEMFILE=cf.Gemfile bundle
  ```
<commit_msg>Add `Using an Alternative Gem Server` section to README<commit_after># Cloud Foundry Ruby Buildpack
[![CF Slack](https://s3.amazonaws.com/buildpacks-assets/buildpacks-slack.svg)](http://slack.cloudfoundry.org)

A Cloud Foundry [buildpack](http://docs.cloudfoundry.org/buildpacks/) for Ruby based apps.

This is based on the [Heroku buildpack] (https://github.com/heroku/heroku-buildpack-ruby).

Additional information can be found at [CloudFoundry.org](http://docs.cloudfoundry.org/buildpacks/).

## Usage

This buildpack will be used if your app has a `Gemfile` and `Gemfile.lock` in the root directory. It will then use Bundler to install your dependencies.

```bash
cf push my_app -b https://github.com/cloudfoundry/ruby-buildpack.git
```

## Disconnected environments
To use this buildpack on Cloud Foundry, where the Cloud Foundry instance limits some or all internet activity, please read the [Disconnected Environments documentation](https://github.com/cf-buildpacks/buildpack-packager/blob/master/doc/disconnected_environments.md).

### Vendoring app dependencies
As stated in the [Disconnected Environments documentation](https://github.com/cf-buildpacks/buildpack-packager/blob/master/doc/disconnected_environments.md), your application must 'vendor' its dependencies.

For the Ruby buildpack, use bundler:

```shell 
cd <your app dir>
bundle package --all
```

```cf push``` uploads your vendored dependencies. The buildpack will compile any dependencies requiring compilation while staging your application.

### Using an Alternative Gem Server
To use an alternative gem server, please refer to the canonical documentation at [Rubygems](http://guides.rubygems.org/run-your-own-gem-server/#using-gems-from-your-server) and [Bundler](http://bundler.io/gemfile.html).

## HTTP Proxy Support

If you need to use a proxy to download dependencies during staging, you can set
the `http_proxy` and/or `https_proxy` environment variables. For more information, see
the [Proxy Usage Docs](http://docs.cloudfoundry.org/buildpacks/proxy-usage.html).

## Building

1. Make sure you have fetched submodules

  ```bash
  git submodule update --init
  ```

1. Get latest buildpack dependencies

  ```shell
  BUNDLE_GEMFILE=cf.Gemfile bundle
  ```

{'fraction_non_alphanumeric': 0.10434574976122254, 'fraction_numerical': 0.0014326647564469914, 'mean_word_length': 4.992846924177396, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6995994', 'n_tokens_mistral': 1242, 'n_tokens_neox': 1200, 'n_words': 409}