copyright-header 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/contrib/syntax.yml CHANGED
@@ -6,6 +6,14 @@ ruby:
6
6
  close: '#\n'
7
7
  prefix: '# '
8
8
 
9
+ python:
10
+ ext: ['.py']
11
+ after: ['^#!', '^#.*coding']
12
+ comment:
13
+ open: '\n'
14
+ close: '\n'
15
+ prefix: '# '
16
+
9
17
  html:
10
18
  ext: ['.html', '.htm', '.xhtml', '.xml']
11
19
  comment:
@@ -38,7 +46,7 @@ css:
38
46
 
39
47
 
40
48
  c:
41
- ext: ['.java', '.c', '.h']
49
+ ext: ['.c', '.h']
42
50
  comment:
43
51
  open: '/*'
44
52
  close: ' */\n\n'
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.version = CopyrightHeader::VERSION
9
9
  s.authors = ["Erik Osterman"]
10
10
  s.email = ["e@osterman.com"]
11
- s.license = ['GPL-3']
11
+ s.licenses = ["GPL-3"]
12
12
  s.homepage = "https://github.com/osterman/copyright-header"
13
13
  s.summary = %q{A utility to insert copyright headers into various types of source code files}
14
14
  s.description = %q{A utility which is able to recursively insert and remove copyright headers from source code files based on file extensions.}
@@ -53,7 +53,7 @@ module CopyrightHeader
53
53
  comment_open ||= ''
54
54
  comment_close ||= ''
55
55
  comment_prefix ||= ''
56
- license = comment_open + @lines.map { |line| comment_prefix + line }.join() + comment_close
56
+ license = comment_open + @lines.map { |line| (comment_prefix + line).gsub(/\s+\n$/, "\n") }.join() + comment_close
57
57
  license.gsub!(/\\n/, "\n")
58
58
  license
59
59
  end
@@ -164,7 +164,7 @@ module CopyrightHeader
164
164
  @license = nil
165
165
  def initialize(options = {})
166
166
  @options = options
167
- @exclude = [ /^LICENSE(|\.txt)$/i, /^holders(|\.txt)$/i, /^README/, /^\./]
167
+ @exclude = [ /^LICENSE(|\.txt)$/i, /^holders(|\.txt)$/i, /^README/, /^\./]
168
168
  @license = License.new(:license_file => @options[:license_file],
169
169
  :copyright_software => @options[:copyright_software],
170
170
  :copyright_software_description => @options[:copyright_software_description],
@@ -18,5 +18,5 @@
18
18
  # along with Copyright Header. If not, see <http://www.gnu.org/licenses/>.
19
19
  #
20
20
  module CopyrightHeader
21
- VERSION = "1.0.4"
21
+ VERSION = "1.0.5"
22
22
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copyright-header
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 29
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
8
  - 0
8
- - 4
9
- version: 1.0.4
9
+ - 5
10
+ version: 1.0.5
10
11
  platform: ruby
11
12
  authors:
12
13
  - Erik Osterman
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2012-10-05 00:00:00 -07:00
18
+ date: 2012-10-16 00:00:00 -07:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
@@ -52,30 +53,34 @@ files:
52
53
  has_rdoc: true
53
54
  homepage: https://github.com/osterman/copyright-header
54
55
  licenses:
55
- - - GPL-3
56
+ - GPL-3
56
57
  post_install_message:
57
58
  rdoc_options: []
58
59
 
59
60
  require_paths:
60
61
  - lib
61
62
  required_ruby_version: !ruby/object:Gem::Requirement
63
+ none: false
62
64
  requirements:
63
65
  - - ">="
64
66
  - !ruby/object:Gem::Version
67
+ hash: 3
65
68
  segments:
66
69
  - 0
67
70
  version: "0"
68
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
69
73
  requirements:
70
74
  - - ">="
71
75
  - !ruby/object:Gem::Version
76
+ hash: 3
72
77
  segments:
73
78
  - 0
74
79
  version: "0"
75
80
  requirements: []
76
81
 
77
82
  rubyforge_project: copyright-header
78
- rubygems_version: 1.3.6
83
+ rubygems_version: 1.3.7
79
84
  signing_key:
80
85
  specification_version: 3
81
86
  summary: A utility to insert copyright headers into various types of source code files