<commit_before># chef-repo-ci
### CI helper scripts for pipelining a chef-repo git workflow

## Background

I'm currently using gitlab to host a private chef-repo. Using the gitlabCI
I'm triggering verification and pre-check

I'd also like to be able to use a Berksfile to drive the creation of 
new CI jobs to publish each (internal) cookbook from source

## Using

Trigger this from your CI build on merges to master, or validation of changes in a branch. Feed
it the output of git diff --name-status SHA1 SHA2

While I've only implemented the push actions so far, I'll add the --verify flag (and actions)
later.

## Extending

Functionality is extended by including a class in the ChefObjects module. The class (per type
of object) includes a SELECTOR regex constant which is applied to each candidate file in turn
until a matching class is found.

Classes can implement any module which matches a git action (addition, deletion, etc). We'd want 
to support all of the possible git status flags, so write a method in each class that performs
the corresponding required action. Taken from the git-diff manpage:

       Possible status letters are:

       o   A: addition of a file

       o   C: copy of a file into a new one

       o   D: deletion of a file

       o   M: modification of the contents or mode of a file

       o   R: renaming of a file

## Patches welcome

Fork it, add some tests under spec/unit, submit a pull request.<commit_msg>updating README since we use Jenkinsfile now<commit_after># chef-repo-ci
### CI helper scripts for pipelining a chef-repo git workflow

## Background

I'm currently using gitlab to host a private chef-repo. Using the gitlabCI
I'm triggering verification and pre-check

## Using

Trigger this from your CI build on merges to master, or validation of changes in a branch. Feed
it the output of git diff --name-status SHA1 SHA2

While I've only implemented the push actions so far, I'll add the --verify flag (and actions)
later.

## Extending

Functionality is extended by including a class in the ChefObjects module. The class (per type
of object) includes a SELECTOR regex constant which is applied to each candidate file in turn
until a matching class is found.

Classes can implement any module which matches a git action (addition, deletion, etc). We'd want 
to support all of the possible git status flags, so write a method in each class that performs
the corresponding required action. Taken from the git-diff manpage:

       Possible status letters are:

       o   A: addition of a file

       o   C: copy of a file into a new one

       o   D: deletion of a file

       o   M: modification of the contents or mode of a file

       o   R: renaming of a file

## Patches welcome

Fork it, add some tests under spec/unit, submit a pull request.

{'fraction_non_alphanumeric': 0.04375667022411953, 'fraction_numerical': 0.001422981145499822, 'mean_word_length': 3.3868954758190326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6550922', 'n_tokens_mistral': 766, 'n_tokens_neox': 716, 'n_words': 450}