Sha256: 62ad2687a08b6c3fcacf1b4a82666c1083aa86cbaf450e2aa2497c274ef26f4a

Contents?: true

Size: 1.45 KB

Versions: 3

Compression:

Stored size: 1.45 KB

Contents

require 'bundler'
require 'rake/clean'

require 'rake/testtask'

require 'cucumber'
require 'cucumber/rake/task'
gem 'rdoc' # we need the installed RDoc gem, not the system one
require 'rdoc/task'

include Rake::DSL

Bundler::GemHelper.install_tasks


Rake::TestTask.new do |t|
  t.pattern = 'test/test_*.rb'
end


CUKE_RESULTS = 'results.html'
CLEAN << CUKE_RESULTS
Cucumber::Rake::Task.new(:features) do |t|
  optstr = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
  optstr << " -t @#{ENV["tag"]}" unless ENV["tag"].nil?
  t.cucumber_opts = optstr
  t.fork = false
end

Rake::RDocTask.new do |rd|
  
  rd.main = "README.rdoc"
  
  rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
end

task :default => [:test,:features]



desc "Migrate an existing local .lolcommits directory to Dropbox"
task :dropboxify do
  $home = ENV['HOME']
  dropbox_loldir = "#{$home}/Dropbox/lolcommits"
  loldir = "#{$home}/.lolcommits"
  backup_loldir = "#{$home}/.lolcommits.old"
  
  #check whether we've done this already
  if File.symlink? loldir
    abort "already dropboxified!"
  end
  
  #create dropbox folder
  if not File.directory? dropbox_loldir
    FileUtils.mkdir_p dropbox_loldir
  end
  
  #backup existing loldir
  if File.directory? loldir
    FileUtils.mv( loldir, backup_loldir )
  end
  
  #symlink dropbox to local
  FileUtils.ln_s( dropbox_loldir, loldir )
  
  #copy over existing files
  FileUtils.cp_r( "#{backup_loldir}/.", loldir)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lolcommits-0.3.0 Rakefile
lolcommits-0.3.0.pre2 Rakefile
lolcommits-0.3.0.pre1 Rakefile