forked from dbussink/jsonrpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
49 lines (39 loc) · 1.4 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
lib_dir = File.expand_path(File.join(File.dirname(__FILE__), "lib"))
$:.unshift(lib_dir)
$:.uniq!
require 'rubygems'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
require 'spec/rake/spectask'
require File.join(File.dirname(__FILE__), 'lib/jsonrpc', 'version')
PKG_DISPLAY_NAME = 'JsonRPC'
PKG_NAME = PKG_DISPLAY_NAME.downcase
PKG_VERSION = JsonRPC::VERSION::STRING
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
RELEASE_NAME = "REL #{PKG_VERSION}"
RUBY_FORGE_PROJECT = PKG_NAME
RUBY_FORGE_USER = "dbussink"
RUBY_FORGE_PATH = "/var/www/gforge-projects/#{RUBY_FORGE_PROJECT}"
RUBY_FORGE_URL = "http://#{RUBY_FORGE_PROJECT}.rubyforge.org/"
PKG_SUMMARY = "JSON RPC implementation"
PKG_DESCRIPTION = <<-TEXT
Very simple JSON RPC client implementation
TEXT
PKG_FILES = FileList[
"lib/**/*", "spec/**/*", "vendor/**/*",
"tasks/**/*", "website/**/*",
"[A-Z]*", "Rakefile"
].exclude(/database\.yml/).exclude(/[_\.]git$/)
RCOV_ENABLED = (RUBY_PLATFORM != "java" && RUBY_VERSION =~ /^1\.8/)
if RCOV_ENABLED
task :default => "spec:verify"
else
task :default => "spec"
end
WINDOWS = (RUBY_PLATFORM =~ /mswin|win32|mingw|bccwin|cygwin/) rescue false
SUDO = WINDOWS ? '' : ('sudo' unless ENV['SUDOLESS'])
Dir['tasks/**/*.rake'].each { |rake| load rake }