Sha256: ad916056160327c9fd8bd8121f11f527aa591e426f4763a2fb4a158a2ade262a

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

desc 'Run specs'
task :spec do
  sh 'rspec -c'
end

desc 'Run specs verbosely'
task 'spec:verbose' do
  sh 'rspec -cfd'
end

desc 'Run specs verbosely, view w/ less'
task 'spec:less' do
  sh 'rspec -cfd --tty | less -R'
end

desc 'Run specs w/ coverage'
task :coverage do
  ENV['COVERAGE'] = 'yes'; Rake::Task['spec'].execute
end

desc 'Check for warnings'
task :warn do
  reqs = %w{ config }.map { |x| "-r localconfig/#{x}" } * ' '
  sh "ruby -w -I lib #{reqs} -e ''"
end

desc 'Check for warnings in specs'
task 'warn:spec' do
  reqs = Dir['spec/**/*.rb'].sort.map { |x| "-r ./#{x}" } * ' '
  sh "ruby -w -I lib -r rspec #{reqs} -e ''"
end

desc 'Check for warnings in specs (but not void context)'
task 'warn:spec:novoid' do
  sh 'rake warn:spec 2>&1 | grep -v "void context"'
end

desc 'Generate docs'
task :docs do
  sh 'yardoc | cat'
end

desc 'List undocumented objects'
task 'docs:undoc' do
  sh 'yard stats --list-undoc'
end

desc 'Cleanup'
task :clean do
  sh 'rm -rf .yardoc/ coverage/ doc/ *.gem'
end

desc 'Build SNAPSHOT gem'
task :snapshot do
  v = Time.new.strftime '%Y%m%d%H%M%S'
  f = 'lib/localconfig/version.rb'
  sh "sed -ri~ 's!(SNAPSHOT)!\\1.#{v}!' #{f}"
  sh 'gem build localconfig.gemspec'
end

desc 'Undo SNAPSHOT gem'
task 'snapshot:undo' do
  sh 'git checkout -- lib/localconfig/version.rb'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
localconfig-0.3.3 Rakefile