Sha256: b43c68bf1970939772fb490ac97a961180759582d46b4703dbcd14c906b628ed
Contents?: true
Size: 693 Bytes
Versions: 2
Compression:
Stored size: 693 Bytes
Contents
module Nakal module Ios class Screen < Common::BaseScreen private CAPTURE_SCRIPT = 'osascript <<EOF tell application "iOS Simulator" activate delay 1 tell application "System Events" to keystroke "s" using {command down} end tell EOF' def capture `#{CAPTURE_SCRIPT}` sleep 0.5 latest_file = Dir.glob(File.expand_path('~/Desktop/iOS\\ Simulator\\ Screen\\ Shot*')).max_by { |f| File.mtime(f) } `mv #{Shellwords.shellescape(latest_file)} #{Nakal.image_location}` `mv #{Nakal.image_location}/iOS\\ Simulator\\ Screen\\ Shot* #{Nakal.image_location}/#{@name}.png` end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nakal-0.0.3 | lib/nakal/ios/screen.rb |
nakal-0.0.2 | lib/nakal/ios/screen.rb |