Sha256: 0633a5f42a6675a8a6a8f6022bf9caa5d3770e3ac287aa8017b40b562a7b6785

Contents?: true

Size: 840 Bytes

Versions: 3

Compression:

Stored size: 840 Bytes

Contents

namespace :license do
  desc 'write out example config file'
  task :init do
    FileUtils.cp(File.join(File.dirname(__FILE__), '..', '..', 'files', 'license_finder.yml'), './config/license_finder.yml')
  end

  desc 'generate a list of dependency licenses'
  task :generate_dependencies do
    LicenseFinder::Finder.new.write_files
  end

  desc 'action items'
  task :action_items => :generate_dependencies do
    puts "Dependencies that need approval:"
    puts LicenseFinder::Finder.new.action_items
  end

  desc 'All gems approved for use'
  task 'action_items:ok' => :generate_dependencies do
    found = LicenseFinder::Finder.new.action_items
    if found.size > 0
      puts "Dependencies that need approval:"
      puts found
    else
      puts "All gems are approved for use"
    end
    exit 1 unless found.size == 0
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
license_finder-0.4.5 lib/tasks/license_finder.rake
license_finder-0.4.1 lib/tasks/license_finder.rake
license_finder-0.4.0 lib/tasks/license_finder.rake