Skip to content
A work-in-progress code of conduct detector based off Licensee
Ruby Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
bin
docs
lib
script
spec
vendor
.gitignore
.rspec
.rubocop.yml
.travis.yml
Gemfile
LICENSE.txt
README.md
Rakefile
coconductor.gemspec

README.md

Coconductor

Build Status Gem Version

A (work-in-progress) Code of Conduct detector based off Licensee.

Installation

gem install coconductor or add gem 'coconductor' to your project's Gemfile and bundle install

Usage

Ruby

path = 'path/to/some/project'
code_of_conduct = Coconductor.code_of_conduct(path)

code_of_conduct.key
=> "contributor-covenant/version/1/4"

code_of_conduct.family
=> "contributor-covenant"

code_of_conduct.version
=> 1.4

# lower-level access

project = Coconductor.project(path)

project.code_of_conduct.key
=> "contributor-covenant/version/1/4"

project.code_of_conduct_file.filename
=> "CODE_OF_CONDUCT.txt"

project.code_of_conduct_file.matcher
=> Coconductor::Matchers::Dice

project.code_of_conduct_file.confidence
=> 98.9648033126294

Command line

Coconductor commands:
  coconductor detect [PATH]   # Detect the code of conduct of the given project
  coconductor diff [PATH]     # Compare the given code of conduct text to a known code of conduct
  coconductor help [COMMAND]  # Describe available commands or one specific command
  coconductor version         # Return the Coconductor version

Options:
  [--remote], [--no-remote]  # Assume PATH is a GitHub owner/repo path

Example output

Code of conduct:  Contributor Covenant v1.4
Key:              contributor-covenant/version/1/4
Family:           contributor-covenant
Version:          1.4
Path:             docs/CODE_OF_CONDUCT.md
Confidence:       98.96%
Matcher:          Coconductor::Matchers::Dice
Content hash:     627827ddda36b5c42b3a00418d3d7d5b16e5088a

Codes of Conduct detected

  • Contributor Covenant (all official languages and versions)
  • Citizen Code of Conduct (all versions)
  • The No Code of Conduct (latest version)
  • Geek Feminism Code of Conduct (latest long and short form versions)

Matching strategy

You can’t perform that action at this time.