Sha256: fab36cf6f67790094e0f457e67358005d24dce639a7721494b5ef531405adc66

Contents?: true

Size: 630 Bytes

Versions: 167

Compression:

Stored size: 630 Bytes

Contents

namespace :metrics do
  task :lines do
    lines, codelines, total_lines, total_codelines = 0, 0, 0, 0
    for file_name in FileList['lib/**/*.rb', 'bin/generate-api']
      f = File.open(file_name)
      while line = f.gets
        lines += 1
        next if line =~ /^\s*$/
        next if line =~ /^\s*#/
        codelines += 1
      end
      puts "L: #{sprintf('%4d', lines)}, " +
               "LOC #{sprintf('%4d', codelines)} | #{file_name}"
      total_lines     += lines
      total_codelines += codelines

      lines, codelines = 0, 0
    end

    puts "Total: Lines #{total_lines}, LOC #{total_codelines}"
  end
end

Version data entries

167 entries across 167 versions & 2 rubygems

Version Path
google-api-client-0.52.0 rakelib/metrics.rake
google-api-client-0.51.0 rakelib/metrics.rake
google-api-client-0.50.0 rakelib/metrics.rake
google-api-client-0.49.0 rakelib/metrics.rake
google-api-client-0.48.0 rakelib/metrics.rake
google-api-client-0.47.0 rakelib/metrics.rake
google-api-client-0.46.2 rakelib/metrics.rake
google-api-client-0.46.1 rakelib/metrics.rake
google-api-client-0.46.0 rakelib/metrics.rake
google-api-client-0.45.1 rakelib/metrics.rake
google-api-client-0.45.0 rakelib/metrics.rake
google-api-client-0.44.2 rakelib/metrics.rake
google-api-client-0.44.1 rakelib/metrics.rake
google-api-client-0.44.0 rakelib/metrics.rake
google-api-client-0.43.0 rakelib/metrics.rake
google-api-client-0.42.2 rakelib/metrics.rake
google-api-client-0.42.1 rakelib/metrics.rake
google-api-client-0.42.0 rakelib/metrics.rake
google-api-client-0.41.2 rakelib/metrics.rake
google-api-client-0.41.1 rakelib/metrics.rake