license_header 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/license_header +7 -7
- data/lib/license_header/version.rb +1 -1
- metadata +1 -1
data/bin/license_header
CHANGED
@@ -50,7 +50,7 @@ opts = OptionParser.new do |opts|
|
|
50
50
|
|
51
51
|
opts.on('-x MASK', '--exclude=MASK', "Exclude pattern") do |arg|
|
52
52
|
pattern = Regexp.escape(arg).gsub('\*','.*?')
|
53
|
-
re =
|
53
|
+
re = %r{^#{pattern}$}i
|
54
54
|
options[:exceptions] << re
|
55
55
|
end
|
56
56
|
|
@@ -80,16 +80,16 @@ end
|
|
80
80
|
|
81
81
|
auditor = LicenseHeader::Auditor.new(options)
|
82
82
|
files = auditor.audit(*targets)
|
83
|
-
invalid = (files[:missing]+files[:
|
83
|
+
invalid = (files[:missing]+files[:present]).sort
|
84
84
|
present = (files[:present]+files[:valid]).sort
|
85
85
|
case command
|
86
86
|
when :audit
|
87
|
-
$stderr.puts "#{files[:
|
88
|
-
$stderr.puts files[:valid].join("\n") if options[:verbose]
|
89
|
-
$stderr.puts "#{files[:missing].length} files have missing headers"
|
87
|
+
$stderr.puts "#{files[:missing].length} files are missing headers"
|
90
88
|
$stderr.puts files[:missing].join("\n") if options[:verbose]
|
91
|
-
$stderr.puts "#{files[:
|
92
|
-
$stderr.puts files[:
|
89
|
+
$stderr.puts "#{files[:valid].length} files have valid headers"
|
90
|
+
$stderr.puts files[:valid].join("\n") if options[:verbose]
|
91
|
+
$stderr.puts "#{files[:present].length} files have invalid headers"
|
92
|
+
$stderr.puts files[:present].join("\n") if options[:verbose]
|
93
93
|
when :update
|
94
94
|
if options[:header].nil?
|
95
95
|
put opts
|