Sha256: 66fff50c002580396d893f323eb367c76abd35b6f89ee662aeb1e44504c6ed19

Contents?: true

Size: 816 Bytes

Versions: 9

Compression:

Stored size: 816 Bytes

Contents

#!/usr/bin/env ruby

require 'dotenv/load'
require 'thor'
require 'json'

require_relative '../lib/licensee'

class LicenseeCLI < Thor
  package_name 'Licensee'
  class_option :remote, type: :boolean, desc: 'Assume PATH is a GitHub owner/repo path'
  default_task :detect

  private

  def path
    @path ||= if !options[:remote] || args.first =~ %r{^https://}
      args.first || Dir.pwd
    else
      "https://github.com/#{args.first}"
    end
  end

  def project
    @project ||= Licensee.project(path,
                                  detect_packages: options[:packages], detect_readme: options[:readme])
  end

  def remote?
    path =~ %r{^https://}
  end
end

commands_dir = File.expand_path '../lib/licensee/commands/', __dir__
Dir["#{commands_dir}/*.rb"].each { |c| require(c) }

LicenseeCLI.start(ARGV)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
licensee-9.11.0 bin/licensee
licensee-9.10.1 bin/licensee
licensee-9.10.0 bin/licensee
licensee-9.9.4 bin/licensee
licensee-9.9.3 bin/licensee
licensee-9.9.2 bin/licensee
licensee-9.9.1 bin/licensee
licensee-9.9.0 bin/licensee
licensee-9.9.0.beta.3 bin/licensee