Sha256: a05e9618252b764e158036674dea451c1b428fb307a69ff4d0266b021912a84e

Contents?: true

Size: 1.71 KB

Versions: 1

Compression:

Stored size: 1.71 KB

Contents

# encoding: utf-8

# bundler/setup is managing $LOAD_PATH, any gem needed by this Rakefile must 
# be listed as a development dependency in the gemspec

require 'rubygems'
require 'bundler/setup' 

# TODO: remove this once issue corrected
# Bundler broken up to 1.0.7 on Windows
module Bundler
  class GemHelper
    def self.install_tasks(opts = nil)
      dir = caller.find{|c| /Rakefile:/}[/^(.*?)\/Rakefile:/, 1]
      self.new(dir, opts && opts[:name]).install
    end
  end
end
Bundler::GemHelper.install_tasks

def gemspec
  @gemspec ||= begin
    file = File.expand_path('../win32-autogui.gemspec', __FILE__)
    eval(File.read(file), binding, file)
  end
end

require 'spec'
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
  spec.libs << 'lib' << 'spec'
  spec.spec_files = FileList['spec/**/*_spec.rb']
end

require 'cucumber'
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |task|
  task.cucumber_opts = ["features"]
end

desc "Run specs and features"
task :test => [:spec, :features]

task :default => :test

namespace :doc do
  project_root = File.expand_path(File.dirname(__FILE__))
  doc_destination = File.join(project_root, 'rdoc')

  require 'yard'
  require 'yard/rake/yardoc_task'

  YARD::Rake::YardocTask.new(:generate) do |yt|
    yt.options = ['--output-dir', doc_destination
                 ] +
                 gemspec.rdoc_options - ['--line-numbers', '--inline-source']
  end

  desc "Remove generated documenation"
  task :clean do
    rm_r doc_destination if File.exists?(doc_destination)
  end
  
  desc "List undocumented objects"
  task :undocumented do
    system('yard stats --list-undoc')
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
win32-autogui-0.4.0 Rakefile