-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
59 lines (45 loc) · 1.18 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
require 'json'
task :default => :run
desc "install and run the application on the emulator or device"
task :run => ['install', 'launch', 'tail']
task :launch do
puts system("palm-launch -i #{app_id}")
end
task :tail do
system("palm-log -f #{app_id}")
end
desc 'package the application'
task :package do
puts system('palm-package -o /tmp . --exclude-from="config/excludes.txt"')
end
desc 'install the application on the emulator'
task :install => :package do
puts system("palm-install -r #{app_id}")
puts system("palm-install /tmp/#{app_id}_#{version}_all.ipk")
end
def app_info
@app_info ||= JSON.parse(File.open('appinfo.json').read)
end
def app_id
app_info['id']
end
def version
app_info['version']
end
namespace :jasmine do
require 'jasmine'
desc "Run continuous integration tests"
require "spec"
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:ci) do |t|
t.spec_opts = ["--color", "--format", "specdoc"]
t.verbose = true
t.spec_files = ['spec/support/jasmine_runner.rb']
end
task :server do
require 'spec/support/jasmine_config'
Jasmine::Config.new.start_server
end
end
desc "Run specs via server"
task :jasmine => ['jasmine:server']