-
Notifications
You must be signed in to change notification settings - Fork 23
/
Rakefile
74 lines (62 loc) · 1.88 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
72
73
74
require "rake"
require "spec/rake/spectask"
task :default => :spec
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ['--options', 'spec/spec.opts']
end
namespace "spec" do
desc "Run the CIM spec"
Spec::Rake::SpecTask.new('cim') do |t|
t.spec_files = FileList['spec/cim_spec.rb']
t.spec_opts = ['--options', 'spec/spec.opts']
end
desc "Run the ARB spec"
Spec::Rake::SpecTask.new('arb') do |t|
t.spec_files = FileList['spec/arb_spec.rb']
t.spec_opts = ['--options', 'spec/spec.opts']
end
desc "Run the AIM spec"
Spec::Rake::SpecTask.new('aim') do |t|
t.spec_files = FileList['spec/aim_spec.rb']
t.spec_opts = ['--options', 'spec/spec.opts']
end
desc "Run the SIM spec"
Spec::Rake::SpecTask.new('sim') do |t|
t.spec_files = FileList['spec/sim_spec.rb']
t.spec_opts = ['--options', 'spec/spec.opts']
end
desc "Run the Reporting spec"
Spec::Rake::SpecTask.new('reporting') do |t|
t.spec_files = FileList['spec/reporting_spec.rb']
t.spec_opts = ['--options', 'spec/spec.opts']
end
end
desc "Builds the gem"
task :gem do
%x"gem build authorize-net.gemspec"
end
desc "Builds the documentation"
task :doc do
%x"rdoc -U -S --main=README.rdoc -A documented_accessor=RW README.rdoc lib/"
end
namespace "doc" do
desc "Builds the documentation with graphical class hierarchy"
task :graph do
%x"rdoc -U -d -S --main=README.rdoc -A documented_accessor=RW README.rdoc lib/"
end
end
desc "Builds the documentation (alias of :doc)"
task :rdoc do
Rake::Task[:doc].execute
end
desc "Bundles the sample app."
task :samples do
%x". sample_app_version && zip -r anet_ruby_samples-$VERSION.zip sample_app -x '*/.*' -x '*/Icon' -x '*/__MACOSX'"
end
desc "Bundles the sample app and gem."
task :bundle do
Rake::Task[:samples].execute
Rake::Task[:gem].execute
end