lib/deliver/app_screenshot.rb in deliver-0.7.12 vs lib/deliver/app_screenshot.rb in deliver-0.7.13
- old
+ new
@@ -14,10 +14,12 @@
IOS_47 = "iOS-4.7-in"
# iPhone 6 Plus
IOS_55 = "iOS-5.5-in"
# iPad
IOS_IPAD = "iOS-iPad"
+ # Mac
+ MAC = "Mac"
end
# @return [Deliver::ScreenSize] the screen size (device type)
# specified at {Deliver::ScreenSize}
attr_accessor :screen_size
@@ -96,10 +98,16 @@
[2048, 1536],
[768, 1004],
[768, 1024],
[1536, 2008],
[1536, 2048]
+ ],
+ ScreenSize::MAC => [
+ [1280, 800],
+ [1440, 900],
+ [2880, 1800],
+ [2560, 1600]
]
}
devices.each do |device_type, array|
array.each do |resolution|
@@ -108,11 +116,10 @@
return device_type
end
end
end
- error = "Unsupported screen size #{size} for path '#{path}'"
- raise error
+ raise "Unsupported screen size #{size} for path '#{path}'".red
end
end
ScreenSize = AppScreenshot::ScreenSize
end
\ No newline at end of file