Sha256: c8f7e474147fbb770f2b59aa89467f6de158640a8918d929cb722ab6c80b7389
Contents?: true
Size: 940 Bytes
Versions: 17
Compression:
Stored size: 940 Bytes
Contents
# frozen_string_literal: true module LicenseFinder module CLI class Whitelist < Base extend Subcommand include MakesDecisions desc 'list', 'List all the whitelisted licenses' def list say 'Whitelisted Licenses:', :blue say_each(decisions.whitelisted, &:name) end auditable desc 'add LICENSE...', 'Add one or more licenses to the whitelist' def add(*licenses) assert_some licenses modifying { licenses.each { |l| decisions.whitelist(l, txn) } } say "Added #{licenses.join(', ')} to the license whitelist" end auditable desc 'remove LICENSE...', 'Remove one or more licenses from the whitelist' def remove(*licenses) assert_some licenses modifying { licenses.each { |l| decisions.unwhitelist(l, txn) } } say "Removed #{licenses.join(', ')} from the license whitelist" end end end end
Version data entries
17 entries across 17 versions & 1 rubygems