Sha256: ac30df0511d09b166c87a843e3c1f4f1e256fa93f250c1f93325ff348f5459a2
Contents?: true
Size: 663 Bytes
Versions: 19
Compression:
Stored size: 663 Bytes
Contents
require "bundler/gem_tasks" require 'rake/extensiontask' require 'rspec/core/rake_task' Rake::ExtensionTask.new('nokogiri_ext_xmlsec') RSpec::Core::RakeTask.new :rspec desc 'clean out build files' task :clean do rm_rf File.expand_path('../tmp', __FILE__) end task :default => [:clean, :compile, :rspec] desc 'code statistics, cause im a stats junky' task :stats do def count(glob) Dir[glob].inject(0) do |count, fi| next unless File.file?(fi) count + File.read(fi).lines.length end end rb_lines = count 'lib/**/*.rb' c_lines = count 'ext/**/*.{c,h}' puts "Lines of Ruby: #{rb_lines}" puts "Lines of C: #{c_lines}" end
Version data entries
19 entries across 19 versions & 6 rubygems