Sha256: 0ece940e68ef10b32266f3951601a7a015948ac09be6f063f98dcfad2440b807

Contents?: true

Size: 547 Bytes

Versions: 4

Compression:

Stored size: 547 Bytes

Contents

#!/usr/bin/env ruby
require_relative "../lib/licensee"

path = ARGV[0] || Dir.pwd

project = Licensee::GitProject.new(path, detect_packages: true)
file = project.matched_file

if project.license_file
  puts "License file: #{project.license_file.filename}"
  puts "Attribution: #{project.license_file.attribution}" if project.license_file.attribution
end

if file
  puts "License: #{file.license ? file.license.meta['title'] : 'no license'}"
  puts "Confidence: #{file.confidence}%"
  puts "Method: #{file.matcher.class}"
else
  puts "Unknown"
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
licensee-6.1.1 bin/licensee
licensee-6.1.0 bin/licensee
licensee-6.0.0 bin/licensee
licensee-6.0.0b1 bin/licensee