copyright in html files

pull/400/head
Philipp Tessenow 11 years ago
parent 171eddd9d9
commit 343a179094
  1. 13
      lib/tasks/copyright.rake
  2. 12
      public/404.html
  3. 12
      public/422.html
  4. 12
      public/500.html

@ -23,7 +23,7 @@ namespace :copyright do
short_copyright_surrounding("<%#", "#%>")
when :rdoc
"----------\n#{short_copyright_line(' ')}\n----------\n".gsub(' -- copyright',"==== copyright\n")
when :md
when :md, :html
short_copyright_surrounding("<!--", "-->")
else
raise "Undefined format #{format}"
@ -54,7 +54,7 @@ namespace :copyright do
/^(?<shebang>#![^\n]+\n)?<%#--\s*copyright.*?\+\+#%>/m
when :rdoc
/(?<shebang>)?-{10}\n={4} copyright\n\n[\s\S]*?\+\+\n-{10}\n$/
when :md
when :md, :html
/^(?<shebang>#![^\n]+\n)?<!----\s*copyright.*?\+\+-->/m
when :sql
/^(?<shebang>#![^\n]+\n)?-- --\s*copyright.*?\+\+/m
@ -198,6 +198,13 @@ namespace :copyright do
rewrite_copyright("html.erb", [], :erb, args[:arg1])
end
desc "Update the copyright on .html source files"
task :update_html, :arg1 do |task, args|
excluded = ["app/assets/javascripts/tinymce/",
"lib/assets/javascripts/qunit/"]
rewrite_copyright("html", excluded, :html, args[:arg1])
end
desc "Update the copyright on .json.erb source files"
task :update_json_erb, :arg1 do |task, args|
rewrite_copyright("json.erb", [], :erb, args[:arg1])
@ -222,7 +229,7 @@ namespace :copyright do
task :update, :arg1 do |task, args|
%w{
css rb js js_erb css_erb html_erb json_erb text_erb atom_builder api_rsb rake
feature rdoc rjs md sql special_files
feature rdoc rjs md sql html special_files
}.each do |t|
Rake::Task['copyright:update_' + t.to_s].invoke(args[:arg1])
end

@ -1,3 +1,15 @@
<!---- copyright
OpenProject is a project management system.
Copyright (C) 2012-2013 the OpenProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
See doc/COPYRIGHT.rdoc for more details.
++-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

@ -1,3 +1,15 @@
<!---- copyright
OpenProject is a project management system.
Copyright (C) 2012-2013 the OpenProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
See doc/COPYRIGHT.rdoc for more details.
++-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

@ -1,3 +1,15 @@
<!---- copyright
OpenProject is a project management system.
Copyright (C) 2012-2013 the OpenProject Team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
See doc/COPYRIGHT.rdoc for more details.
++-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

Loading…
Cancel
Save