Created
November 3, 2012 05:25
-
-
Save mixflame/4006155 to your computer and use it in GitHub Desktop.
Rakefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task :boot do | |
puts "booting" | |
`emulator -avd Android_4.1 -partition-size 200 -no-audio -no-boot-anim` | |
end | |
task :off do | |
puts "shutdown" | |
`adb emu kill` | |
end | |
task :send do | |
puts 'sending scripts' | |
`rake update_scripts:restart` | |
end | |
task :subl do | |
`sublime_text .` | |
end | |
task :log do | |
exec('adb logcat') | |
end | |
task :manager do | |
`android` | |
end | |
task :send_text do | |
# black magic | |
text = ARGV.last | |
require 'socket' | |
ts = TCPSocket.open('localhost', 5554) | |
unless ts.closed? | |
ts.puts("sms send 4204206969 #{text}") | |
end | |
# supplementary magic | |
task text.to_sym do ; end | |
end | |
task :build do | |
# `rake install:clean start` | |
Rake::Task['install'].invoke('clean start') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment