forked from jpmobile/jpmobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
39 lines (34 loc) · 935 Bytes
/
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
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'fileutils'
require 'pathname'
require 'git'
desc 'Default: run unit tests.'
task :default => :test
desc 'Update misc tables'
task :update do
Dir.glob('tools/update_*.rb').each do |path|
ruby path
end
end
namespace :test do
desc 'Preparation of external modules'
task :prepare do
external_repos = [
'jpmobile-ipaddresses',
'jpmobile-terminfo',
]
github_prefix = 'https://github.com/jpmobile'
vendor_path = Pathname.new(Dir.pwd).join('vendor')
FileUtils.mkdir_p(vendor_path)
FileUtils.cd(vendor_path) do
external_repos.each do |repos|
unless File.directory?("#{repos}/.git")
Git.clone("#{github_prefix}/#{repos}.git", repos, { :path => vendor_path })
end
end
end
end
end
task :test => ['test:prepare', 'spec:unit', 'spec:rack', 'test:rails']
load 'lib/tasks/jpmobile_tasks.rake'