<commit_before>Togglr
======

GEM for feature toggling

## Setup

Add
```
gem 'togglr', git: '<EMAIL>:hooroo/togglr.git'
```
to your Gemfile

## Config

```
require 'togglr'
require 'togglr/toggles'

Togglr.configure do |config|
  config.toggles_file = File.expand_path(File.join(Rails.root, 'config', 'togglr.yml'))
  config.repositories = []
end

Togglr::Toggles.register_toggles
```

By default the config file is supposed to be in config directory, named togglr.yml

You can add these basic config files with `rails generate togglr:install`

Make sure each toggle has a unique name. Duplicate toggles are disallowed.

Use the repositories configuration to decide which repositories you want. List as array of comma separated class name strings.

### Toggles File Format
```yaml
---
:category_name:
  :toggle_1:
    :value: true / false
    :other_property: true / false
  :toggle_2:
    :value true / false

  ...<commit_msg>add comment to README<commit_after>Togglr
======

GEM for feature toggling

## Setup

Add
```
gem 'togglr', git: '<EMAIL>:hooroo/togglr.git'
```
to your Gemfile

## Config

```
require 'togglr'
require 'togglr/toggles'

Togglr.configure do |config|
  config.toggles_file = File.expand_path(File.join(Rails.root, 'config', 'togglr.yml'))
  config.repositories = []
end

Togglr::Toggles.register_toggles
```

By default the config file is supposed to be in config directory, named togglr.yml

You can add these basic config files with `rails generate togglr:install`

Make sure each toggle has a UNIQUE name. Duplicate toggles are disallowed. The last toggle with the same name wins - irrespective of its category.

Use the repositories configuration to decide which repositories you want. List as array of comma separated class name strings.

### Toggles File Format
```yaml
---
:category_name:
  :toggle_1:
    :value: true / false
    :other_property: true / false
  :toggle_2:
    :value true / false

  ...
{'fraction_non_alphanumeric': 0.10629514963880289, 'fraction_numerical': 0.0020639834881320948, 'mean_word_length': 4.226415094339623, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '4950872', 'n_tokens_mistral': 669, 'n_tokens_neox': 642, 'n_words': 217}