forked from ccontrast/Impressi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
56 lines (38 loc) · 1.15 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
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require 'rake'
require 'bundler'
require 'rake/testtask'
require 'rake/packagetask'
require 'rubygems/package_task'
require 'rspec/core/rake_task'
require File.expand_path('../config/application', __FILE__)
Impressi::Application.load_tasks
Bundler::GemHelper.install_tasks
Bundler.setup
RSpec::Core::RakeTask.new
task :all_tests do
["rake spec"].each do |cmd|
puts "Starting to run #{cmd}..."
#system("export DISPLAY=:99.0 && bundle exec #{cmd}")
system("bundle exec #{cmd}")
raise "#{cmd} failed!" unless $?.exitstatus == 0
end
end
task :default => [:all_tests]
spec = eval(File.read('impressi.gemspec'))
Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end
desc "Release to gemcutter"
task :release => :package do
require 'rake/gemcutter'
Rake::Gemcutter::Tasks.new(spec).define
Rake::Task['gem:push'].invoke
end
desc "Generates a dummy app for testing"
task :test_app do
ENV['LIB_NAME'] = 'impressi'
Rake::Task['common:test_app'].invoke
end