Sha256: f23f34e3d5b9fea197bc4c4d93a26683087c9b93b3a80675fe2ca1740ad18fb8

Contents?: true

Size: 1.7 KB

Versions: 2

Compression:

Stored size: 1.7 KB

Contents

require 'rake'
require 'spec/rake/spectask'


desc 'Default: run specs.'
task :default => :spec

desc 'Run the specs'
Spec::Rake::SpecTask.new(:spec) do |t|
  t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
  t.spec_files = FileList['spec/**/*_spec.rb']
end

Spec::Rake::SpecTask.new(:rcov) do |spec|
  spec.libs << 'lib' << 'spec'
  spec.pattern = 'spec/**/*_spec.rb'
  spec.rcov = true
end

begin
  require 'metric_fu'
  MetricFu::Configuration.run do |config|
    config.metrics  = [:saikuro, :flog, :flay, :reek, :roodi, :rcov]
    config.graphs   = [:flog, :flay, :reek, :roodi, :rcov]
    config.rcov     = { :environment => 'test',
                        :test_files => ['spec/**/*_spec.rb'],
                        :rcov_opts => ["--sort coverage",
                                       "--text-coverage",
                                       "--profile",
                                       "--exclude /gems/,/Library/"]}
    config.graph_engine = :bluff
  end
rescue LoadError
  puts "Install metric_fu to run code metrics"
end


begin
  require 'jeweler'
  Jeweler::Tasks.new do |gem|
    gem.name = "truncate_html"
    gem.summary = %Q{Uses an API similar to Rails' truncate helper to truncate HTML and close any lingering open tags.}
    gem.description = %Q{Truncates html so you don't have to}
    gem.email = "harold.gimenez@gmail.com"
    gem.homepage = "http://github.com/hgimenez/truncate_html"
    gem.authors = ["Harold A. Gimenez"]
    # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
  end
  Jeweler::GemcutterTasks.new

rescue LoadError
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
truncate_html-0.3.2 Rakefile
truncate_html-0.3.1 Rakefile