Sha256: d816b4fcb025fc06f3d08747591cf5a8debece2522c3c643ac1dd9eb26b7968f

Contents?: true

Size: 1.09 KB

Versions: 2

Compression:

Stored size: 1.09 KB

Contents

#!/usr/bin/env rake
require "bundler/gem_tasks"
require 'rspec/core/rake_task'

desc "Run specs"
RSpec::Core::RakeTask.new do |t|
  # t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
  # Put spec opts in a file named .rspec in root
end

desc "run travis"
task :travis do
  ["rake spec","ruby test/test_helper.rb"].each do |cmd|
    puts "Starting to run #{cmd}..."
    system("export DISPLAY=:99.0 && bundle exec #{cmd}")
    raise "#{cmd} failed!" unless $?.exitstatus == 0
  end
end

task :default => :travis

desc 'docs'
task :docs do
  begin
    require 'rocco'
    require 'rocco/tasks'
    require 'fileutils'
    require 'maruku'
    Rocco::make 'docs/'
    FileUtils.cp_r "docs/lib/", "/Users/hank/rails/dailycred/public/docs/ruby/", :verbose => true
    md = ""
    File.open("README.md", "r") do |infile|
      while (line = infile.gets)
        md += line
      end
    end
    doc = Maruku.new(md)
    File.open("/Users/hank/rails/dailycred/app/views/tags/ruby.html", 'w') {|f| f.write doc.to_html}
  rescue LoadError
    warn "#$! -- rocco tasks not loaded."
    task :rocco
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dailycred-0.1.461 Rakefile
dailycred-0.1.46 Rakefile