Changeset 1153
- Timestamp:
- 04/13/05 05:06:40 (3 years ago)
- Files:
-
- trunk/actionpack/Rakefile (modified) (1 diff)
- trunk/activerecord/Rakefile (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/Rakefile
r1102 r1153 79 79 p.need_tar = true 80 80 p.need_zip = true 81 end 82 83 task :lines do 84 lines, codelines, total_lines, total_codelines = 0, 0, 0, 0 85 86 for file_name in FileList["lib/**/*.rb"] 87 next if file_name =~ /vendor/ 88 f = File.open(file_name) 89 90 while line = f.gets 91 lines += 1 92 next if line =~ /^\s*$/ 93 next if line =~ /^\s*#/ 94 codelines += 1 95 end 96 puts "L: #{sprintf("%4d", lines)}, LOC #{sprintf("%4d", codelines)} | #{file_name}" 97 98 total_lines += lines 99 total_codelines += codelines 100 101 lines, codelines = 0, 0 102 end 103 104 puts "Total: Lines #{total_lines}, LOC #{total_codelines}" 81 105 end 82 106 trunk/activerecord/Rakefile
r1077 r1153 100 100 p.need_tar = true 101 101 p.need_zip = true 102 end 103 104 task :lines do 105 lines, codelines, total_lines, total_codelines = 0, 0, 0, 0 106 107 for file_name in FileList["lib/active_record/**/*.rb"] 108 next if file_name =~ /vendor/ 109 f = File.open(file_name) 110 111 while line = f.gets 112 lines += 1 113 next if line =~ /^\s*$/ 114 next if line =~ /^\s*#/ 115 codelines += 1 116 end 117 puts "L: #{sprintf("%4d", lines)}, LOC #{sprintf("%4d", codelines)} | #{file_name}" 118 119 total_lines += lines 120 total_codelines += codelines 121 122 lines, codelines = 0, 0 123 end 124 125 puts "Total: Lines #{total_lines}, LOC #{total_codelines}" 102 126 end 103 127