Sha256: c3efdb02c42aca318b927e3d5b9adf1833eeebf2694d902fc68561bdab77357a

Contents?: true

Size: 909 Bytes

Versions: 3

Compression:

Stored size: 909 Bytes

Contents

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

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.7 Rakefile
coco-0.6 Rakefile
coco-0.5.1 Rakefile