Sha256: 91978a3ea30867db748376c5fb5b8fe145e5e8a731afccefdfa26a7bbbeb36c6

Contents?: true

Size: 825 Bytes

Versions: 1

Compression:

Stored size: 825 Bytes

Contents

require 'coconductor/version'
require 'licensee'

module Coconductor
  autoload :CodeOfConduct, 'coconductor/code_of_conduct'
  autoload :Matchers,      'coconductor/matchers'
  autoload :Projects,      'coconductor/projects'
  autoload :ProjectFiles,  'coconductor/project_files'

  CONFIDENCE_THRESHOLD = 90

  class << self
    attr_writer :confidence_threshold

    def codes_of_conduct
      CodeOfConduct.all
    end

    def code_of_conduct(path)
      Coconductor.project(path).code_of_conduct
    end

    def project(path, **args)
      Coconductor::Projects::GitProject.new(path, args)
    rescue Coconductor::Projects::GitProject::InvalidRepository
      Coconductor::Projects::FSProject.new(path, args)
    end

    def confidence_threshold
      @confidence_threshold ||= CONFIDENCE_THRESHOLD
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
coconductor-0.2.0 lib/coconductor.rb