have copyrights in some special files

pull/400/head
Philipp Tessenow 11 years ago
parent 8ccc350119
commit e5f516c587
  1. 11
      .gitignore
  2. 11
      .rspec
  3. 11
      .travis.yml
  4. 11
      Gemfile
  5. 11
      Guardfile
  6. 12
      Rakefile
  7. 11
      config.ru
  8. 17
      lib/tasks/copyright.rake

11
.gitignore vendored

@ -1,3 +1,14 @@
#-- 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.
#++
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor

@ -1 +1,12 @@
#-- 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.
#++
--color

@ -1,3 +1,14 @@
#-- 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.
#++
language: ruby
rvm:
- 1.9.3

@ -1,3 +1,14 @@
#-- 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.
#++
source 'https://rubygems.org'
gem "rails", "~> 3.2.14"

@ -1,3 +1,14 @@
#-- 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.
#++
# :spork guard must come first
# guard :spork, :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
# watch('config/application.rb')

@ -1,4 +1,14 @@
#!/usr/bin/env rake
#-- 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.
#++
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

@ -1,3 +1,14 @@
#-- 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.
#++
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)

@ -62,10 +62,11 @@ namespace :copyright do
def rewrite_copyright(ending, exclude, format, path, options = {})
regexp = options[:regex] || copyright_regexp(format)
copyright = options[:copyright] || short_copyright(format)
path = '.' if path.nil?
file_list = options[:file_list] || Dir[File.absolute_path(path) + "/**/*.#{ending}"]
raise "Path not found" unless Dir.exists?(path)
Dir[File.absolute_path(path) + "/**/*.#{ending}"].each do |file_name|
file_list.each do |file_name|
# Skip 3rd party code
next if exclude.any? {|e| file_name.include?(e) }
@ -86,6 +87,15 @@ namespace :copyright do
end
end
desc "Update special files, which do not have an ending"
task :update_special_files, :arg1 do |task, args|
# ruby-like files
file_list = %w{Gemfile Guardfile Rakefile config.ru .travis.yml .rspec .gitignore}.map do |f|
File.absolute_path f
end
rewrite_copyright("rb", [], :rb, args[:arg1], :file_list => file_list)
end
desc "Update the copyright on .rb source files"
task :update_rb, :arg1 do |task, args|
excluded = (["diff",
@ -190,7 +200,8 @@ namespace :copyright do
:update_rake,
:update_feature,
:update_rdoc,
:update_md].each do |t|
:update_md,
:update_special_files].each do |t|
Rake::Task['copyright:' + t.to_s].invoke(args[:arg1])
end
end

Loading…
Cancel
Save