-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
71 lines (51 loc) · 1.42 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
=begin
This file is part of the Arachni-RPC Pure project and may be subject to
redistribution and commercial restrictions. Please see the Arachni-RPC Pure
web site for more information on licensing and terms of use.
=end
require 'rubygems'
require 'rspec'
require 'rspec/core/rake_task'
require File.expand_path( File.dirname( __FILE__ ) ) + '/lib/arachni/rpc/pure/version'
RSpec::Core::RakeTask.new do |t|
t.rspec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
end
desc "Generate docs"
task :docs do
outdir = "../arachni-rpc-pages"
sh "mkdir #{outdir}" if !File.directory?( outdir )
sh "yardoc --verbose --title \
\"Arachni-RPC\" \
lib/* -o #{outdir} \
- CHANGELOG.md LICENSE.md"
sh "rm -rf .yard*"
end
#
# Cleans reports and logs
#
desc "Cleaning..."
task :clean do
sh "rm *.gem || true"
end
#
# Building
#
desc "Build the arachni-rpc-pure gem."
task :build => [ :clean ] do
sh "gem build arachni-rpc-pure.gemspec"
end
#
# Installing
#
desc "Build and install the arachni-rpc-pure gem."
task :install => [ :build ] do
sh "gem install arachni-rpc-pure-#{Arachni::RPC::Pure::VERSION}.gem"
end
#
# Publishing
#
desc "Push a new version to Gemcutter"
task :publish => [ :build ] do
sh "git tag -a v#{Arachni::RPC::Pure::VERSION} -m 'Version #{Arachni::RPC::Pure::VERSION}'"
sh "gem push arachni-rpc-pure-#{Arachni::RPC::Pure::VERSION}.gem"
end