forked from jpmobile/jpmobile
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
79 lines (68 loc) · 2.14 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
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rake/rdoctask'
require 'fileutils'
require 'pathname'
include FileUtils
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "jpmobile"
gem.summary = "A Rails plugin for Japanese mobile-phones"
gem.description = "A Rails plugin for Japanese mobile-phones"
gem.email = "[email protected]"
gem.homepage = "http://github.com/jpmobile/jpmobile"
gem.authors = ["Yoji Shidara", "Shin-ichiro OGAWA"]
gem.test_files.exclude 'test/rails/rails_root'
gem.add_development_dependency('rspec', '2.0.0.beta.17')
gem.add_development_dependency('rspec-rails', '2.0.0.beta.17')
gem.add_development_dependency('jeweler', '>=1.4.0')
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
Jeweler::GemcutterTasks.new
desc 'Default: run unit tests.'
task :default => :test
desc 'Generate documentation for the jpmobile plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = 'Jpmobile'
rdoc.options << '--line-numbers' << '--inline-source' << '-c UTF-8'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('CHANGELOG')
rdoc.rdoc_files.include('lib/**/*.rb')
end
desc "Update misc tables"
task :update do
Dir.glob("tools/update_*.rb").each do |path|
ruby path
end
end
desc "Update docomo display"
task :docomo_display do
ruby "tools/disabled_update_display_info_docomo.rb"
end
namespace :test do
desc "Preparation of external modules"
task :prepare do
external_repos = [
"jpmobile-ipaddresses",
"jpmobile-terminfo"
]
github_prefix = "git://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', 'test:legacy', 'spec:unit', 'spec:rack', 'test:rails']
load 'lib/tasks/jpmobile_tasks.rake'