forked from AuthorizeNet/sdk-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
86 lines (72 loc) · 2.3 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
75
76
77
78
79
80
81
82
83
84
85
86
require "rake"
require "rspec/core/rake_task"
task :default => :spec
desc "Run all specs"
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end
namespace "spec" do
desc "Run the CIM spec"
RSpec::Core::RakeTask.new('cim') do |spec|
spec.pattern = FileList['spec/cim_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end
desc "Run the ARB spec"
RSpec::Core::RakeTask.new('arb') do |spec|
spec.pattern = FileList['spec/arb_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end
desc "Run the AIM spec"
RSpec::Core::RakeTask.new('aim') do |spec|
spec.pattern = FileList['spec/aim_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end
desc "Run the API spec"
RSpec::Core::RakeTask.new('api') do |spec|
spec.pattern = FileList['spec/api_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end
desc "Run the CI Unit Test spec"
RSpec::Core::RakeTask.new('ci') do |spec|
spec.pattern = FileList['spec/authorize_net_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end
desc "Run the SIM spec"
RSpec::Core::RakeTask.new('sim') do |spec|
spec.pattern = FileList['spec/sim_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end
desc "Run the Reporting spec"
RSpec::Core::RakeTask.new('reporting') do |spec|
spec.pattern = FileList['spec/reporting_spec.rb']
spec.rspec_opts = ['--options', 'spec/spec.opts']
end
end
desc "Builds the gem"
task :gem do
%x"gem build authorizenet.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