Sha256: dfef47765d38acc2420cbf0931209c2f8614f3a6948832aa03cbddce46d2e967

Contents?: true

Size: 1.85 KB

Versions: 4

Compression:

Stored size: 1.85 KB

Contents

#!/usr/bin/env ruby 

require 'rubygems'
require 'fileutils'
require 'spec/rake/spectask'

# integration tests for cli utils
begin 
  require 'cucumber/rake/task'

  Cucumber::Rake::Task.new do |task|
    task.cucumber_opts = "--require features/"
  end
rescue LoadError
end

Spec::Rake::SpecTask.new do |t|
  t.spec_opts = ["--options", "spec/spec.opts"]
end


desc "freeze deps"
task :deps do 

  deps = {'beanstalk-client' => ">= 1.0.2",
          'log4r' => ">= 1.0.5",
          'xmpp4r-simple' => ">= 0.8.8",
          'mailfactory' => ">= 1.4.0"}

  puts "\ninstalling dependencies. this will take a few minutes."

  deps.each_pair do |dep, version|
    puts "\ninstalling #{dep} (#{version})"
    system("gem install #{dep} --version '#{version}' -i gems --no-rdoc --no-ri")
  end

end

desc "generate list of files for gemspec"
task "gengemfiles" do 
  executables = `git ls-files bin/*`.split.map {|bin| bin.gsub(/^bin\//, '')}             
  files = `git ls-files`.split.delete_if {|file| file =~ /^(spec\/|\.gitignore)/}
  puts
  puts "Copy and paste into flapjack.gemspec:"
  puts
  puts "    s.executables = #{executables.inspect}"
  puts "    s.files = #{files.inspect}"
  puts
  puts
end

desc "build gem"
task :build do 
  system("gem build flapjack.gemspec")
  
  FileUtils.mkdir_p('pkg')
  puts
  puts "Flapjack gems:"
  Dir.glob("flapjack-*.gem").each do |gem|
    dest = File.join('pkg', gem)
    FileUtils.mv gem, dest
    puts "  " + dest
  end
end


if require 'yard'
  
  YARD::Rake::YardocTask.new do |t|
    t.files   = ['lib/**/*.rb']
    t.options = ['--output-dir=doc/', '--readme=README.md']
  end
  
end

desc "display FIXMEs in the codebase"
task :fixmes do 
  output = `grep -nR FIXME lib/* spec/* bin/`
  output.split("\n").each do |line|
    parts = line.split(':')
    puts "#{parts[0].strip} +#{parts[1].strip}"
    puts "  - #{parts[3].strip}"
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
auxesis-flapjack-0.4.10 Rakefile
flapjack-0.4.12 Rakefile
flapjack-0.4.11 Rakefile
flapjack-0.4.10 Rakefile