forked from unboxed/icuke
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
58 lines (50 loc) · 1.63 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
require 'rubygems'
require 'rake'
require './lib/icuke/sdk'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "iCuke"
gem.summary = %Q{Cucumber support for iPhone applications}
gem.description = %Q{Cucumber support for iPhone applications}
gem.email = "[email protected]"
gem.homepage = "http://github.com/unboxed/iCuke"
gem.authors = ["Rob Holland"]
gem.add_dependency "cucumber", ">= 0"
gem.add_dependency "httparty", ">= 0"
gem.add_dependency "nokogiri", ">= 0"
gem.add_dependency "background_process"
gem.extensions = ['ext/Rakefile']
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
file 'app/build/Debug-iphonesimulator/Universal.app/Universal' do
require 'lib/icuke/sdk'
ICuke::SDK.use_latest
sh "cd app && xcodebuild -target Universal -configuration Debug -sdk #{ICuke::SDK.fullname}"
end
task :app => 'app/build/Debug-iphonesimulator/Universal.app/Universal'
task :lib do
sh 'cd ext && rake'
end
begin
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features)
task :features => :check_dependencies
task :features => [:lib, :app]
rescue LoadError
task :features do
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
end
end
task :default => :features
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "iCuke #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end