forked from recurly/recurly-client-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
65 lines (48 loc) · 1.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
require 'rubygems'
require 'rake'
require "bundler"
Bundler.setup
task :build do
system "gem build recurly.gemspec"
end
task :install => :build do
system "gem install recurly-#{Recurly::VERSION}.gem"
end
task :release => :build do
puts "Tagging #{Recurly::VERSION}..."
system "git tag -a #{Recurly::VERSION} -m 'Tagging #{Recurly::VERSION}'"
puts "Pushing to Github..."
system "git push --tags"
puts "Pushing to rubygems.org..."
system "gem push recurly-#{Recurly::VERSION}.gem"
end
require 'rspec'
require "rspec/core/rake_task"
Rspec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
end
Rspec::Core::RakeTask.new(:rcov) do |spec|
# spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end
task :default => :spec
$LOAD_PATH.unshift "spec"
require 'fileutils'
# add recurly
$LOAD_PATH.unshift "lib"
require 'recurly'
Recurly.settings_path = "#{File.dirname(__FILE__)}/spec/config/recurly.yml"
load 'recurly/rails3/recurly.rake'
task :environment do
end
namespace :recurly do
task :clear => :clear_test_data do
# now lets move spec/vcr
vcr_folder = "#{File.dirname(__FILE__)}/spec/vcr"
FileUtils.mkdir_p(vcr_folder)
FileUtils.rm_rf vcr_folder
puts "VCR Requests cleared from: #{vcr_folder}"
puts "\n\n"
end
end