Skip to content

slagyr/mmcopyrights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Add copyrights to your source files.

Copyright © 2012 Micah Martin. MM Copyrights and all included source files are distributed under terms of the MIT License.

gem sources -a gems.github.com sudo gem install slagyr-mmcopyrights

require ‘mmcopyrights’ MM::Copyrights.process(“lib”, “rb”, “#-”, “©2009 Micah Martin\nAll rights reserved”)

MM::Copyrights.process(SOURCE_DIRECTORY, FILE_EXTENSION, COMMENT_PREFIX, COPYRIGHT_TEXT)

  • SOURCE_DIRECTORY - A directory where you keep source files

  • FILE_EXTENSION - To identify which files to process. A values of “rb” will process all files ending in “.rb”.

  • COMMENT_PREFIX - Be sure to use a unique comment prefix like “#-” for Ruby and “//-” for C, Java, C#, etc. This is used to identify existing copyright headers to remove or update them.

  • COPYRIGHT_TEXT - The content of your copyright message (without comment prefix)

Running MM::Copyrights.process will add the COPYRIGHT_TEXT to all of the matching files in the SOURCE_DIRECTORY. Processing the files multiple times is harmless.

You can change the COPYRIGHT_TEXT and process files again. The old copyright headers will be replaces with the new content.

About

Adds copyright headers to all the source files in a directory

Resources

Stars

8 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors