forked from hasimo/jpmobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
81 lines (72 loc) · 2.35 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
80
81
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rake/rdoctask'
require 'fileutils'
require 'pathname'
require 'git'
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 = "dara@shidara.net"
gem.homepage = "http://jpmobile-rails.org"
gem.authors = ["Yoji Shidara", "Shin-ichiro OGAWA"]
gem.files.exclude 'test'
gem.files.exclude 'spec'
gem.add_development_dependency('jeweler', '>=1.5.1')
gem.add_development_dependency('rspec', '>=2.3.0')
gem.add_development_dependency('rspec-rails', '>=2.3.0')
gem.add_development_dependency('webrat', '>=0.7.2')
gem.add_development_dependency('geokit', '>=1.5.0')
gem.add_development_dependency('sqlite3-ruby', '>=1.3.2')
gem.add_development_dependency('hpricot', '>=0.8.3')
gem.add_development_dependency('git', '>=1.2.5')
gem.add_development_dependency('rails', '>=3.0.3')
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
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', 'spec:unit', 'spec:rack', 'test:rails']
load 'lib/tasks/jpmobile_tasks.rake'