Sha256: 9cb4c2926f6c2f501a1f163b6efc6fb5959d347170555866096596c6c859e59b

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

require 'rubygems'
require 'rake/gempackagetask'

spec = Gem::Specification.new do |s|
  s.platform = Gem::Platform::RUBY
  s.summary = "Sexy Semantics for Any Ruby Model"
  s.name = 'supermodel'
  s.author = 'Arun Thampi'
  s.email = "arun.thampi@gmail.com"
  s.homepage = "http://www.github.com/arunthampi/supermodel"
  s.version = '0.1.0'
  s.files = FileList[ '[A-Z]*', 'lib/**/*.rb', 'spec/**/*.rb' ],
  s.has_rdoc = true
  s.require_path = "lib"
  s.extra_rdoc_files = ["README"]
  s.add_dependency 'json', '>=1.1.2'
end

Rake::GemPackageTask.new(spec) do |pkg|
  pkg.need_zip = true
  pkg.need_tar = true
end

task :lines do
  lines, codelines, total_lines, total_codelines = 0, 0, 0, 0

  for file_name in FileList["lib/supermodel/**/*.rb"]
    next if file_name =~ /vendor/
    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

task :default => [:package]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arunthampi-supermodel-0.1.0 Rakefile