[jboss-svn-commits] JBL Code SVN: r10553 - labs/jbossrules/trunk/documentation/copyright.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Mar 27 02:32:42 EDT 2007


Author: michael.neale at jboss.com
Date: 2007-03-27 02:32:41 -0400 (Tue, 27 Mar 2007)
New Revision: 10553

Removed:
   labs/jbossrules/trunk/documentation/copyright/copy_wrong.rb
   labs/jbossrules/trunk/documentation/copyright/copyright.txt
Log:
not needed in doco directory

Deleted: labs/jbossrules/trunk/documentation/copyright/copy_wrong.rb
===================================================================
--- labs/jbossrules/trunk/documentation/copyright/copy_wrong.rb	2007-03-27 06:32:01 UTC (rev 10552)
+++ labs/jbossrules/trunk/documentation/copyright/copy_wrong.rb	2007-03-27 06:32:41 UTC (rev 10553)
@@ -1,65 +0,0 @@
-#This utility aims to replace the copyright notices in source files with a given one.
-#it will add one if it doesn't already exist.
-
-#directory recursive walker...
-def do_dir(start, copyright) 
-    Dir.foreach(start) { |d| 
-      if d != "." && d != ".." then
-        sub = start + "/" + d        
-        if not File.directory? sub and sub.include? ".java" then
-          do_java(sub, copyright)
-        else 
-          if File.directory? sub and not sub.include? ".svn" 
-	  then do_dir(sub, copyright) end
-        end        
-      end
-    }
-end
-
-
-#replace the guts of a file
-def do_java(f, copyright)
-
-  contents = IO.read(f)
-  exp = Regexp.escape("/*") + ".*Copyright.*?" + Regexp.escape("*/") 
-  existing = Regexp.new(exp, Regexp::MULTILINE)
-  if not contents.include? copyright then
-    if existing.match(contents) != nil 
-      then 
-        #clear out the old one
-        puts "replacing in : " + f
-        contents = contents.sub(existing, "")      
-      else 
-        puts "adding to : " + f
-    end
-    
-    write_to f, put_in(contents, copyright)
-    
-  else 
-    puts "ignoring as it is OK : " + f
-  end    
-  
-end
-
-def put_in(contents, copyright) 
-  new_contents = ""
-  line_num = 0
-  contents.split(/\n/).each { |line| 
-    if line_num == 0 then
-      new_contents = line + "\n" + copyright 
-    else 
-      new_contents = new_contents + "\n" + line
-    end
-    line_num = line_num + 1
-  }
-  return new_contents
-end
-
-def write_to(target, guts) 
-      target = File.new(target, "w")
-      target.write guts
-      target.close
-end
-
-do_dir("c:/temp/tryagain", IO.read ("c:/temp/copyright.txt")) 
-

Deleted: labs/jbossrules/trunk/documentation/copyright/copyright.txt
===================================================================
--- labs/jbossrules/trunk/documentation/copyright/copyright.txt	2007-03-27 06:32:01 UTC (rev 10552)
+++ labs/jbossrules/trunk/documentation/copyright/copyright.txt	2007-03-27 06:32:41 UTC (rev 10553)
@@ -1,16 +0,0 @@
-/*
- * Copyright 2005 JBoss Inc
- * 
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-




More information about the jboss-svn-commits mailing list