spaceship/lib/spaceship/du/du_client.rb in fastlane-2.74.1 vs spaceship/lib/spaceship/du/du_client.rb in fastlane-2.75.0.beta.20180109010003

- old
+ new

@@ -46,11 +46,11 @@ end def get_picture_type(upload_file) resolution = Utilities.resolution(upload_file.file_path) result = device_resolution_map.find do |key, resolutions| - resolutions.include? resolution + resolutions.include?(resolution) end raise "Unknown device for screen resolution #{resolution}" if result.nil? picture_type_map[result[0]] end @@ -71,11 +71,11 @@ app_type = app_version.app_type referrer = app_version.application.url end r = request(:post) do |req| - req.url "#{self.class.hostname}#{path}" + req.url("#{self.class.hostname}#{path}") req.body = upload_file.bytes req.headers['Accept'] = 'application/json, text/plain, */*' req.headers['Content-Type'] = upload_file.content_type req.headers['X-Apple-Upload-Referrer'] = referrer if referrer req.headers['Referrer'] = referrer if referrer @@ -102,10 +102,11 @@ # rubocop:enable Layout/ExtraSpacing { watch: "MZPFT.SortedN27ScreenShot", ipad: "MZPFT.SortedTabletScreenShot", ipadPro: "MZPFT.SortedJ99ScreenShot", + ipad105: "MZPFT.SortedJ207ScreenShot", iphone6: "MZPFT.SortedN61ScreenShot", iphone6Plus: "MZPFT.SortedN56ScreenShot", iphone58: "MZPFT.SortedD22ScreenShot", iphone4: "MZPFT.SortedN41ScreenShot", iphone35: "MZPFT.SortedScreenShot", @@ -117,10 +118,11 @@ def messages_picture_type_map # rubocop:enable Layout/ExtraSpacing { ipad: "MZPFT.SortedTabletMessagesScreenShot", ipadPro: "MZPFT.SortedJ99MessagesScreenShot", + ipad105: "MZPFT.SortedJ207MessagesScreenShot", iphone6: "MZPFT.SortedN61MessagesScreenShot", iphone6Plus: "MZPFT.SortedN56MessagesScreenShot", iphone58: "MZPFT.SortedD22MessagesScreenShot", iphone4: "MZPFT.SortedN41MessagesScreenShot" } @@ -130,10 +132,11 @@ # rubocop:enable Layout/ExtraSpacing { watch: [[312, 390]], ipad: [[1024, 748], [1024, 768], [2048, 1496], [2048, 1536], [768, 1004], [768, 1024], [1536, 2008], [1536, 2048]], ipadPro: [[2048, 2732], [2732, 2048]], + ipad105: [[1668, 2224], [2224, 1668]], iphone6: [[750, 1334], [1334, 750]], iphone6Plus: [[1242, 2208], [2208, 1242]], iphone4: [[640, 1096], [640, 1136], [1136, 600], [1136, 640]], iphone35: [[640, 960], [640, 920], [960, 600], [960, 640]], appleTV: [[1920, 1080]], @@ -142,10 +145,10 @@ end def screenshot_picture_type(device, is_messages) map = is_messages ? messages_picture_type_map : picture_type_map device = device.to_sym - raise "Unknown picture type for device: #{device}" unless map.key? device + raise "Unknown picture type for device: #{device}" unless map.key?(device) map[device] end def parse_upload_response(response) content = response.body