2010-08-17 01:21:17 +00:00
|
|
|
lib_dir = File.expand_path('../lib', __FILE__)
|
|
|
|
$LOAD_PATH.unshift(lib_dir)
|
|
|
|
$LOAD_PATH.uniq!
|
2010-07-28 19:30:56 +00:00
|
|
|
|
|
|
|
require 'rubygems'
|
|
|
|
require 'rake'
|
|
|
|
require 'rake/testtask'
|
|
|
|
require 'rake/rdoctask'
|
|
|
|
require 'rake/packagetask'
|
|
|
|
require 'rake/gempackagetask'
|
|
|
|
|
2011-08-02 18:39:46 +00:00
|
|
|
gem 'rspec', '~> 1.2.9'
|
2010-07-28 19:30:56 +00:00
|
|
|
begin
|
|
|
|
require 'spec/rake/spectask'
|
|
|
|
rescue LoadError
|
2010-08-19 23:21:18 +00:00
|
|
|
STDERR.puts "Please install rspec:"
|
|
|
|
STDERR.puts "sudo gem install rspec"
|
2010-07-28 19:30:56 +00:00
|
|
|
exit(1)
|
|
|
|
end
|
|
|
|
|
|
|
|
require File.join(File.dirname(__FILE__), 'lib/google/api_client', 'version')
|
|
|
|
|
|
|
|
PKG_DISPLAY_NAME = 'Google API Client'
|
2010-08-17 01:21:17 +00:00
|
|
|
PKG_NAME = PKG_DISPLAY_NAME.downcase.gsub(/\s/, '-')
|
2010-07-28 19:30:56 +00:00
|
|
|
PKG_VERSION = Google::APIClient::VERSION::STRING
|
|
|
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
2010-08-17 01:21:17 +00:00
|
|
|
PKG_HOMEPAGE = 'http://code.google.com/p/google-api-ruby-client/'
|
2010-07-28 19:30:56 +00:00
|
|
|
|
|
|
|
RELEASE_NAME = "REL #{PKG_VERSION}"
|
|
|
|
|
2011-08-02 18:39:46 +00:00
|
|
|
PKG_AUTHOR = "Bob Aman"
|
|
|
|
PKG_AUTHOR_EMAIL = "bobaman@google.com"
|
2010-08-17 01:21:17 +00:00
|
|
|
PKG_SUMMARY = 'Package Summary'
|
2010-07-28 19:30:56 +00:00
|
|
|
PKG_DESCRIPTION = <<-TEXT
|
|
|
|
The Google API Ruby Client makes it trivial to discover and access supported
|
|
|
|
APIs.
|
|
|
|
TEXT
|
|
|
|
|
|
|
|
PKG_FILES = FileList[
|
2010-08-17 01:21:17 +00:00
|
|
|
'lib/**/*', 'spec/**/*', 'vendor/**/*',
|
|
|
|
'tasks/**/*', 'website/**/*',
|
|
|
|
'[A-Z]*', 'Rakefile'
|
2010-07-28 19:30:56 +00:00
|
|
|
].exclude(/database\.yml/).exclude(/[_\.]git$/)
|
|
|
|
|
2010-08-17 01:21:17 +00:00
|
|
|
RCOV_ENABLED = (RUBY_PLATFORM != 'java' && RUBY_VERSION =~ /^1\.8/)
|
2010-07-28 19:30:56 +00:00
|
|
|
if RCOV_ENABLED
|
2010-08-17 01:21:17 +00:00
|
|
|
task :default => 'spec:verify'
|
2010-07-28 19:30:56 +00:00
|
|
|
else
|
2010-08-17 01:21:17 +00:00
|
|
|
task :default => 'spec'
|
2010-07-28 19:30:56 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
WINDOWS = (RUBY_PLATFORM =~ /mswin|win32|mingw|bccwin|cygwin/) rescue false
|
|
|
|
SUDO = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS'])
|
|
|
|
|
|
|
|
Dir['tasks/**/*.rake'].each { |rake| load rake }
|