Sha256: 05620fec36aa02b1a93c1a1abf7bb4152e2d9232abc3182544f2944d426d382d

Contents?: true

Size: 1.76 KB

Versions: 1

Compression:

Stored size: 1.76 KB

Contents

# Copyright (C) 2011 RightScale, Inc, All Rights Reserved Worldwide.
#
# THIS PROGRAM IS CONFIDENTIAL AND PROPRIETARY TO RIGHTSCALE
# AND CONSTITUTES A VALUABLE TRADE SECRET. Any unauthorized use,
# reproduction, modification, or disclosure of this program is
# strictly prohibited. Any use of this program by an authorized
# licensee is strictly subject to the terms and conditions,
# including confidentiality obligations, set forth in the applicable
# License Agreement between RightScale.com, Inc. and
# the licensee

require 'rubygems'

require 'fileutils'
require 'rake'
require 'rspec/core/rake_task'
require 'rake/gempackagetask'
require 'rake/clean'

begin
  require 'rdoc/task'
rescue LoadError => e
  warn "Older RDoc detected; falling back to legacy RDoc+Rake bindings"
  require 'rake/rdoctask'
end

# == Unit Tests == #

desc "Run unit tests"
RSpec::Core::RakeTask.new do |t|
  t.rspec_opts = ["--color --format=nested"]
end

namespace :spec do
  desc "Run unit tests with RCov"
  RSpec::Core::RakeTask.new(:rcov) do |t|
    t.rcov = true
    t.rcov_opts = %q[--exclude "spec"]
  end

  desc "Print Specdoc for unit tests"
  RSpec::Core::RakeTask.new(:doc) do |t|
    t.rspec_opts = ["--format", "documentation"]
  end
end

# == Gem == #

gemtask = Rake::GemPackageTask.new(Gem::Specification.load('rconf.gemspec')) do |package|
  package.package_dir = ENV['PACKAGE_DIR'] || 'pkg'
  package.need_zip = true
  package.need_tar = true
end

directory gemtask.package_dir

CLEAN.include(gemtask.package_dir)

# == Documentation == #

desc "Generate API documentation to doc/rdocs/index.html"
Rake::RDocTask.new do |rd|
  rd.rdoc_dir = 'doc/rdocs'
  rd.main = 'README.rdoc'
  rd.rdoc_files.include 'README.rdoc', "lib/**/*.rb"
end

task :default => 'spec'
task :build   => [ 'spec', 'gem' ]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rconf-1.0.7 Rakefile