forked from activemerchant/active_merchant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
98 lines (82 loc) · 2.33 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
87
88
89
90
91
92
93
94
95
96
97
98
$:.unshift File.expand_path('../lib', __FILE__)
require 'active_merchant/version'
begin
require 'bundler'
Bundler.setup
rescue LoadError => e
puts "Error loading bundler (#{e.message}): \"gem install bundler\" for bundler support."
require 'rubygems'
end
require 'rake'
require 'rake/testtask'
require 'support/gateway_support'
require 'support/ssl_verify'
require 'support/outbound_hosts'
task :gem => :build
task :build do
raise "Please set a private key to sign the gem" unless ENV['GEM_PRIVATE_KEY']
system "gem build activemerchant.gemspec"
end
task :install => :build do
system "gem install activemerchant-#{ActiveMerchant::VERSION}.gem"
end
task :release => :build do
system "git tag -a v#{ActiveMerchant::VERSION} -m 'Tagging #{ActiveMerchant::VERSION}'"
system "git push --tags"
system "gem push activemerchant-#{ActiveMerchant::VERSION}.gem"
system "rm activemerchant-#{ActiveMerchant::VERSION}.gem"
end
desc "Run the unit test suite"
task :default => 'test:units'
task :test => 'test:units'
namespace :test do
Rake::TestTask.new(:units) do |t|
t.pattern = 'test/unit/**/*_test.rb'
t.ruby_opts << '-rubygems'
t.libs << 'test'
t.verbose = true
end
Rake::TestTask.new(:remote) do |t|
t.pattern = 'test/remote/**/*_test.rb'
t.ruby_opts << '-rubygems'
t.libs << 'test'
t.verbose = true
end
end
namespace :gateways do
desc 'Print the currently supported gateways'
task :print do
support = GatewaySupport.new
support.to_s
end
namespace :print do
desc 'Print the currently supported gateways in RDoc format'
task :rdoc do
support = GatewaySupport.new
support.to_rdoc
end
desc 'Print the currently supported gateways in Textile format'
task :textile do
support = GatewaySupport.new
support.to_textile
end
desc 'Print the currently supported gateways in Markdown format'
task :markdown do
support = GatewaySupport.new
support.to_markdown
end
desc 'Print the gateway functionality supported by each gateway'
task :features do
support = GatewaySupport.new
support.features
end
end
desc 'Print the list of destination hosts with port'
task :hosts do
OutboundHosts.list
end
desc 'Test that gateways allow SSL verify_peer'
task :ssl_verify do
SSLVerify.new.test_gateways
end
end