Sha256: 8af8ce422de13a78587d1f3fecf8c6ad8d367e81aad543cb68c6691d4d73e44b

Contents?: true

Size: 1.09 KB

Versions: 10

Compression:

Stored size: 1.09 KB

Contents

require 'bundler'
require 'hanna/rdoctask'
require 'rspec/core/rake_task'

Bundler::GemHelper.install_tasks

Rake::RDocTask.new do |rdoc|
  rdoc.main = 'README.rdoc'
  rdoc.rdoc_files.include('README.rdoc', 'CHANGELOG.rdoc', 'lib/**/*.rb')
  rdoc.rdoc_dir = 'doc'
  rdoc.title = 'RCAP Ruby API'
end

RSpec::Core::RakeTask.new do |spec|
  spec.rspec_opts = ['--options spec/spec.opts']
end

desc 'Generate a new tag file'
task :tags do |t|
  Kernel.system('ctags --recurse lib/*')
end

desc 'Clean up whitespace across the entire application (strip trailing whitespace and convert tab => 2 spaces).'
task :whitespace do
  require 'rbconfig'
  if Config::CONFIG['host_os'] =~ /linux/
    sh %{find . -name '*.*rb' -exec sed -i 's/\t/  /g' {} \\; -exec sed -i 's/ *$//g' {} \\; }
  elsif Config::CONFIG['host_os'] =~ /darwin/
    sh %{find . -name '*.*rb' -exec sed -i '' 's/\t/  /g' {} \\; -exec sed -i '' 's/ *$//g' {} \\; }
  else
    puts "This doesn't work on systems other than OSX or Linux. Please use a custom whitespace tool for your platform '#{Config::CONFIG["host_os"]}'."
  end
end

task :default => :spec

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rcap-1.2.0 Rakefile
rcap-1.1.1 Rakefile
rcap-1.1.0 Rakefile
rcap-1.0.1 Rakefile
rcap-1.0.0 Rakefile
rcap-1.0.0.rc.5 Rakefile
rcap-1.0.0.rc.4 Rakefile
rcap-1.0.0.rc.3 Rakefile
rcap-1.0.0.rc.2 Rakefile
rcap-1.0.0.rc.1 Rakefile