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 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 = /^#{pattern}$/i
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[:invalid]).sort
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[:valid].length} files have correct headers"
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[:invalid].length} files have invalid headers"
92
- $stderr.puts files[:invalid].join("\n") if options[:verbose]
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
@@ -1,3 +1,3 @@
1
1
  module LicenseHeader
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: license_header
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: