Module: OrganizationLicenseAudit
- Defined in:
- lib/organization_license_audit.rb,
lib/organization_license_audit/version.rb
Constant Summary collapse
- BUNDLE_PATH =
"vendor/bundle"
- RESULT_LINE =
/(^[a-z_\d\.-]+), ([^,]+), (.+)/i
- APPROVAL_HEADING =
"Dependencies that need approval"
- PACKAGE_FILES =
{ :bundler => "Gemfile", :npm => "package.json", :bower => "bower.json" }
- VERSION =
"1.1.3"
Class Method Summary collapse
Class Method Details
.run(options) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/organization_license_audit.rb', line 18 def run() bad = find_bad() if bad.any? $stderr.puts "Failed:" errors = bad.map { |repo, output| [repo, extract_error(output)] } errors.each do |repo, unapproved| puts "#{describe_error(unapproved)} -- #{repo}" end if [:csv] puts puts "CSV:" puts csv(errors, [:csv]) end 1 else 0 end end |