-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRakefile
85 lines (67 loc) · 2.07 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
# google4r-checkout Rakefile
require 'rake'
require 'rake/testtask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
desc 'Default: run all tests tests.'
task :default => :'test:all'
desc 'Runs all tests (alias of test:all)'
task :test => :'test:all'
#
# File sets
#
RUBY_FILES = FileList['lib/**/*.rb', 'lib/**/vendor/**']
RDOC_EXTRA = FileList['README','LICENSE', 'CHANGES']
EXTRA_FILES = FileList['var/cacert.pem']
#
# Documentation
#
desc 'Generate documentation for the google4r library.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'docs'
rdoc.title = 'google4r/checkout'
rdoc.main = 'README'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files = RUBY_FILES + RDOC_EXTRA
end
#
# Test, test, test! I love saying the word "test"!
#
namespace :test do
desc 'Run all tests on the Google4R::Checkout::* classes.'
task :all => [ :integration, :unit, :system ]
desc 'Run unit tests on the Google4R::Checkout::* classes.'
Rake::TestTask.new(:unit) do |t|
t.libs << 'lib'
t.pattern = 'test/unit/*_test.rb'
t.verbose = true
end
desc 'Run integration tests on the Google4R::Checkout::* classes.'
Rake::TestTask.new(:integration) do |t|
t.libs << 'lib'
t.pattern = 'test/integration/*_test.rb'
t.verbose = true
end
desc 'Run system tests on the Google4R::Checkout::* classes.'
Rake::TestTask.new(:system) do |t|
t.libs << 'lib'
t.pattern = 'test/system/*_test.rb'
t.verbose = true
end
end
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.platform = Gem::Platform::RUBY
gem.name = "google4r-checkout"
gem.summary = "Ruby library to access the Google Checkout service and implement notification handlers."
gem.description = gem.summary
gem.authors = ["Tony Chan", "Brandon Dimcheff"]
gem.test_files = FileList['test/**/*_test.rb']
gem.required_ruby_version = '>= 1.8.4'
gem.autorequire = ''
gem.add_dependency('money', '>= 1.7.1')
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end