Sha256: dddae9b0013c3ff82e50f937e5272adf00c8341ab7076e41b2c8642c9045aff3

Contents?: true

Size: 939 Bytes

Versions: 3

Compression:

Stored size: 939 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'rake/dsl_definition'
require 'rake'
require 'rspec/core/rake_task'

def ruby_files_for_shell
  files = Dir.glob 'lib/**/*.rb'
  files.join(' ')
end

desc 'Test coco'
task :default => :spec

desc 'Test coco'
RSpec::Core::RakeTask.new(:spec) do |t|
  t.rspec_opts = ['--color --format documentation']
end

desc 'Check for code smells'
task :reek do
  puts 'Checking for code smells...'
  args = ruby_files_for_shell
  sh "reek --quiet #{args} | ./reek.sed"
end

desc 'Check for duplicate code'
task :flay do
  puts 'Check for duplicate code...'
  args = ruby_files_for_shell
  exec "flay #{args}"
end

desc 'Build the gem & install it'
task :install do
  sh "gem build coco.gemspec"
  f = FileList['coco*gem'].to_a
  sh "gem install #{f.first} --no-rdoc --no-ri"
end

desc 'Generate yard documentation for developpers'
task :doc do 
  exec 'yardoc --title "Coco Documentation" - NEWS COPYING VERSION'
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
coco-0.9 Rakefile
coco-0.8 Rakefile
coco-0.7.1 Rakefile