forked from campaignmonitor/createsend-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
41 lines (34 loc) · 962 Bytes
/
Rakefile
File metadata and controls
41 lines (34 loc) · 962 Bytes
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
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require "bundler/version"
require "rake/testtask"
require "./lib/createsend"
begin
if RUBY_VERSION != "1.8.7" # cane not supported on < 1.8.7
require 'cane/rake_task'
desc "Run cane (checks quality metrics)"
Cane::RakeTask.new(:quality) do |cane|
cane.abc_glob = '{lib,test}/**/*.rb'
cane.abc_max = 10
puts "running cane."
end
task :default => :quality
end
rescue LoadError
warn "cane not available, quality task not provided."
end
desc "Run tests"
Rake::TestTask.new(:test) do |test|
test.ruby_opts = ["-rubygems"] if defined? Gem
test.libs << "lib" << "test"
test.pattern = "test/**/*_test.rb"
puts "running tests."
end
desc "Build the gem"
task :build do
system "gem build createsend.gemspec"
end
desc "Build and release the gem"
task :release => :build do
system "gem push createsend-#{CreateSend::VERSION}.gem"
end
task :default => :test