module Licensee

Filesystem-based project

Analyze a folder on the filesystem for license information

Git-based project

Analyze a given (bare) Git repository for license information

Constants

CONFIDENCE_THRESHOLD

Over which percent is a match considered a match by default

DOMAIN

Base domain from which to build license URLs

VERSION

Attributes

confidence_threshold[W]

Public Class Methods

confidence_threshold() click to toggle source
# File lib/licensee.rb, line 50
def confidence_threshold
  @confidence_threshold ||= CONFIDENCE_THRESHOLD
end
license(path) click to toggle source

Returns the license for a given path

# File lib/licensee.rb, line 40
def license(path)
  Licensee.project(path).license
end
licenses(options = {}) click to toggle source

Returns an array of Licensee::License instances

# File lib/licensee.rb, line 35
def licenses(options = {})
  Licensee::License.all(options)
end
project(path, **args) click to toggle source
# File lib/licensee.rb, line 44
def project(path, **args)
  Licensee::GitProject.new(path, args)
rescue Licensee::GitProject::InvalidRepository
  Licensee::FSProject.new(path, args)
end