fastlane 2.121.0.beta.20190421200026 → 2.121.0.beta.20190422200029

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 304af3bafaa78738f623c78583d8fddaca8b0287
4
- data.tar.gz: 8a7ea52d61acd8553a7089711c1fc111a851c811
3
+ metadata.gz: 7cb5153f3bf96336e63de8f177850d144d1d13fb
4
+ data.tar.gz: 8e4a7d568545f84d7fa022ca6b87c445015c4122
5
5
  SHA512:
6
- metadata.gz: 5d3113a581e758393d06e539b833535d64cd02274bd859e08648ec0b879d49b77752b8199de338f413be6c8c52a691e14140500cd006cb5c646ecad989f692be
7
- data.tar.gz: f6650d27725b45fb9fdcf1c01a6480f50f9371fc309698d6874d1e51e855e8b368f1981b70064c733c117404917315582ca754b2807d1295ff4d21fbbb14ebc6
6
+ metadata.gz: 428aef676e4474c1f65a3b28794435b7d391ea0a12035fcb039833ab44dd80f9da332afc407168abfabee14e36db908b601b93d7b8cac276ccad6c8b7cc0ab65
7
+ data.tar.gz: 1253688c2cb9fc3f72e75c8560f2c80ec1c0cfceb525a12ae6c030723ad88dc68a5a5bccc29c697a4288baa1cf6be65add53d98f504ed3b519f490180113f23c
@@ -94,7 +94,7 @@ module Cert
94
94
 
95
95
  # As keychain is specific to macOS, this will likely fail on non macOS systems.
96
96
  # See also: https://github.com/fastlane/fastlane/pull/14462
97
- keychain = File.expand_path(Cert.config[:keychain_path])
97
+ keychain = File.expand_path(Cert.config[:keychain_path]) unless Cert.config[:keychain_path].nil?
98
98
  if FastlaneCore::CertChecker.installed?(path, in_keychain: keychain)
99
99
  # This certificate is installed on the local machine
100
100
  ENV["CER_CERTIFICATE_ID"] = certificate.id
@@ -1,5 +1,4 @@
1
1
  require 'spaceship/tunes/tunes'
2
- require 'spaceship/tunes/device_type'
3
2
 
4
3
  require_relative 'app_screenshot'
5
4
  require_relative 'module'
@@ -134,7 +133,7 @@ module Deliver
134
133
  # to have it in there for frameit support
135
134
  unaccepted_device_shown = false
136
135
  screenshots.select! do |screenshot|
137
- exists = Spaceship::Tunes::DeviceType.exists?(screenshot.device_type)
136
+ exists = !screenshot.device_type.nil?
138
137
  unless exists
139
138
  UI.important("Unaccepted device screenshots are detected! 🚫 Screenshot file will be skipped. 🏃") unless unaccepted_device_shown
140
139
  unaccepted_device_shown = true
@@ -5,38 +5,18 @@ module Fastlane
5
5
  command = []
6
6
 
7
7
  command << "bundle exec" if params[:use_bundle_exec] && shell_out_should_use_bundle_exec?
8
-
9
8
  command << "pod lib lint"
10
9
 
11
- if params[:verbose]
12
- command << "--verbose"
13
- end
14
-
15
10
  command << params[:podspec] if params[:podspec]
16
-
17
- if params[:sources]
18
- sources = params[:sources].join(",")
19
- command << "--sources='#{sources}'"
20
- end
21
-
22
- if params[:include_podspecs]
23
- command << "--include-podspecs='#{params[:include_podspecs]}'"
24
- end
25
-
26
- if params[:external_podspecs]
27
- command << "--external-podspecs='#{params[:external_podspecs]}'"
28
- end
29
-
30
- if params[:swift_version]
31
- swift_version = params[:swift_version]
32
- command << "--swift-version=#{swift_version}"
33
- end
34
-
35
- if params[:allow_warnings]
36
- command << "--allow-warnings"
37
- end
38
-
11
+ command << "--verbose" if params[:verbose]
12
+ command << "--allow-warnings" if params[:allow_warnings]
13
+ command << "--sources='#{params[:sources].join(',')}'" if params[:sources]
14
+ command << "--subspec='#{params[:subspec]}'" if params[:subspec]
15
+ command << "--include-podspecs='#{params[:include_podspecs]}'" if params[:include_podspecs]
16
+ command << "--external-podspecs='#{params[:external_podspecs]}'" if params[:external_podspecs]
17
+ command << "--swift-version=#{params[:swift_version]}" if params[:swift_version]
39
18
  command << "--use-libraries" if params[:use_libraries]
19
+ command << "--use-modular-headers" if params[:use_modular_headers]
40
20
  command << "--fail-fast" if params[:fail_fast]
41
21
  command << "--private" if params[:private]
42
22
  command << "--quick" if params[:quick]
@@ -62,57 +42,78 @@ module Fastlane
62
42
  [
63
43
  FastlaneCore::ConfigItem.new(key: :use_bundle_exec,
64
44
  description: "Use bundle exec when there is a Gemfile presented",
65
- is_string: false,
66
- default_value: true),
45
+ type: Boolean,
46
+ default_value: true,
47
+ env_name: "FL_POD_LIB_LINT_USE_BUNDLE"),
67
48
  FastlaneCore::ConfigItem.new(key: :podspec,
68
49
  description: "Path of spec to lint",
50
+ type: String,
69
51
  optional: true,
70
- is_string: true),
52
+ env_name: "FL_POD_LIB_LINT_PODSPEC"),
71
53
  FastlaneCore::ConfigItem.new(key: :verbose,
72
54
  description: "Allow output detail in console",
55
+ type: Boolean,
73
56
  optional: true,
74
- is_string: false),
57
+ env_name: "FL_POD_LIB_LINT_VERBOSE"),
75
58
  FastlaneCore::ConfigItem.new(key: :allow_warnings,
76
59
  description: "Allow warnings during pod lint",
60
+ type: Boolean,
77
61
  optional: true,
78
- is_string: false),
62
+ env_name: "FL_POD_LIB_LINT_ALLOW_WARNINGS"),
79
63
  FastlaneCore::ConfigItem.new(key: :sources,
80
64
  description: "The sources of repos you want the pod spec to lint with, separated by commas",
81
- optional: true,
82
- is_string: false,
83
65
  type: Array,
66
+ optional: true,
67
+ env_name: "FL_POD_LIB_LINT_SOURCES",
84
68
  verify_block: proc do |value|
85
69
  UI.user_error!("Sources must be an array.") unless value.kind_of?(Array)
86
70
  end),
71
+ FastlaneCore::ConfigItem.new(key: :subspec,
72
+ description: "A specific subspec to lint instead of the entire spec",
73
+ type: String,
74
+ optional: true,
75
+ env_name: "FL_POD_LIB_LINT_SUBSPEC"),
87
76
  FastlaneCore::ConfigItem.new(key: :include_podspecs,
88
77
  description: "A Glob of additional ancillary podspecs which are used for linting via :path (available since cocoapods >= 1.7)",
78
+ type: String,
89
79
  optional: true,
90
- is_string: true),
80
+ env_name: "FL_POD_LIB_LINT_INCLUDE_PODSPECS"),
91
81
  FastlaneCore::ConfigItem.new(key: :external_podspecs,
92
82
  description: "A Glob of additional ancillary podspecs which are used for linting via :podspec. If there"\
93
83
  " are --include-podspecs, then these are removed from them (available since cocoapods >= 1.7)",
84
+ type: String,
94
85
  optional: true,
95
- is_string: true),
86
+ env_name: "FL_POD_LIB_LINT_EXTERNAL_PODSPECS"),
96
87
  FastlaneCore::ConfigItem.new(key: :swift_version,
97
88
  description: "The SWIFT_VERSION that should be used to lint the spec. This takes precedence over a .swift-version file",
89
+ type: String,
98
90
  optional: true,
99
- is_string: true),
91
+ env_name: "FL_POD_LIB_LINT_SWIFT_VERSION"),
100
92
  FastlaneCore::ConfigItem.new(key: :use_libraries,
101
93
  description: "Lint uses static libraries to install the spec",
102
- is_string: false,
103
- default_value: false),
94
+ type: Boolean,
95
+ default_value: false,
96
+ env_name: "FL_POD_LIB_LINT_USE_LIBRARIES"),
97
+ FastlaneCore::ConfigItem.new(key: :use_modular_headers,
98
+ description: "Lint using modular libraries",
99
+ type: Boolean,
100
+ default_value: false,
101
+ env_name: "FL_POD_LIB_LINT_USE_MODULAR_HEADERS"),
104
102
  FastlaneCore::ConfigItem.new(key: :fail_fast,
105
103
  description: "Lint stops on the first failing platform or subspec",
106
- is_string: false,
107
- default_value: false),
104
+ type: Boolean,
105
+ default_value: false,
106
+ env_name: "FL_POD_LIB_LINT_FAIL_FAST"),
108
107
  FastlaneCore::ConfigItem.new(key: :private,
109
108
  description: "Lint skips checks that apply only to public specs",
110
- is_string: false,
111
- default_value: false),
109
+ type: Boolean,
110
+ default_value: false,
111
+ env_name: "FL_POD_LIB_LINT_PRIVATE"),
112
112
  FastlaneCore::ConfigItem.new(key: :quick,
113
113
  description: "Lint skips checks that would require to download and build the spec",
114
- is_string: false,
115
- default_value: false)
114
+ type: Boolean,
115
+ default_value: false,
116
+ env_name: "FL_POD_LIB_LINT_QUICK")
116
117
  ]
117
118
  end
118
119
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.121.0.beta.20190421200026'.freeze
2
+ VERSION = '2.121.0.beta.20190422200029'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
@@ -193,7 +193,8 @@ module Frameit
193
193
  def horizontal_frame_padding
194
194
  padding = fetch_config['padding']
195
195
  if padding.kind_of?(String) && padding.split('x').length == 2
196
- padding = padding.split('x')[0].to_i
196
+ padding = padding.split('x')[0]
197
+ padding = padding.to_i unless padding.end_with?('%')
197
198
  end
198
199
  return scale_padding(padding)
199
200
  end
@@ -202,7 +203,8 @@ module Frameit
202
203
  def vertical_frame_padding
203
204
  padding = fetch_config['padding']
204
205
  if padding.kind_of?(String) && padding.split('x').length == 2
205
- padding = padding.split('x')[1].to_i
206
+ padding = padding.split('x')[1]
207
+ padding = padding.to_i unless padding.end_with?('%')
206
208
  end
207
209
  return scale_padding(padding)
208
210
  end
@@ -0,0 +1,181 @@
1
+ [
2
+ {
3
+ "name": "ipad",
4
+ "friendly_name": "9.7-inch Display",
5
+ "friendly_category_name": "iPad",
6
+ "screenshot_resolutions": [
7
+ [1536, 2008],
8
+ [1536, 2048],
9
+ [2048, 1496],
10
+ [2048, 1536],
11
+ [768, 1004],
12
+ [768, 1024],
13
+ [1024, 748],
14
+ [1024, 768]
15
+ ],
16
+ "picture_type": "MZPFT.SortedTabletScreenShot",
17
+ "messages_picture_type": "MZPFT.SortedTabletMessagesScreenShot"
18
+ },
19
+ {
20
+ "name": "ipad105",
21
+ "friendly_name": "10.5-inch Display",
22
+ "friendly_category_name": "iPad",
23
+ "screenshot_resolutions": [
24
+ [1668, 2224],
25
+ [2224, 1668]
26
+ ],
27
+ "picture_type": "MZPFT.SortedJ207ScreenShot",
28
+ "messages_picture_type": "MZPFT.SortedJ207MessagesScreenShot"
29
+ },
30
+ {
31
+ "name": "ipadPro",
32
+ "friendly_name": "iPad Pro (2nd Generation) 12.9-inch Display",
33
+ "friendly_category_name": "iPad",
34
+ "screenshot_resolutions": [
35
+ [2048, 2732],
36
+ [2732, 2048]
37
+ ],
38
+ "picture_type": "MZPFT.SortedJ99ScreenShot",
39
+ "messages_picture_type": "MZPFT.SortedJ99MessagesScreenShot"
40
+ },
41
+ {
42
+ "name": "ipadPro11",
43
+ "friendly_name": "11-inch Display",
44
+ "friendly_category_name": "iPad",
45
+ "screenshot_resolutions": [
46
+ [1668, 2388],
47
+ [2388, 1668]
48
+ ],
49
+ "picture_type": "MZPFT.SortedJ317ScreenShot",
50
+ "messages_picture_type": "MZPFT.SortedJ317MessagesScreenShot"
51
+ },
52
+ {
53
+ "name": "ipadPro129",
54
+ "friendly_name": "iPad Pro (3rd Generation) 12.9-inch Display",
55
+ "friendly_category_name": "iPad",
56
+ "screenshot_resolutions": [
57
+ [2048, 2732],
58
+ [2732, 2048]
59
+ ],
60
+ "picture_type": "MZPFT.SortedJ320ScreenShot",
61
+ "messages_picture_type": "MZPFT.SortedJ320MessagesScreenShot"
62
+ },
63
+
64
+ {
65
+ "name": "iphone35",
66
+ "friendly_name": "3.5-inch Display",
67
+ "friendly_category_name": "iPhone",
68
+ "screenshot_resolutions": [
69
+ [640, 920],
70
+ [640, 960],
71
+ [960, 600],
72
+ [960, 640]
73
+ ],
74
+ "picture_type": "MZPFT.SortedScreenShot",
75
+ "messages_picture_type": null
76
+ },
77
+ {
78
+ "name": "iphone4",
79
+ "friendly_name": "4-inch Display",
80
+ "friendly_category_name": "iPhone",
81
+ "screenshot_resolutions": [
82
+ [640, 1096],
83
+ [640, 1136],
84
+ [1136, 600],
85
+ [1136, 640]
86
+ ],
87
+ "picture_type": "MZPFT.SortedN41ScreenShot",
88
+ "messages_picture_type": "MZPFT.SortedN41MessagesScreenShot"
89
+ },
90
+ {
91
+ "name": "iphone6",
92
+ "friendly_name": "4.7-inch Display",
93
+ "friendly_category_name": "iPhone",
94
+ "screenshot_resolutions": [
95
+ [750, 1334],
96
+ [1334, 750]
97
+ ],
98
+ "picture_type": "MZPFT.SortedN61ScreenShot",
99
+ "messages_picture_type": "MZPFT.SortedN61MessagesScreenShot"
100
+ },
101
+ {
102
+ "name": "iphone6Plus",
103
+ "friendly_name": "5.5-inch Display",
104
+ "friendly_category_name": "iPhone",
105
+ "screenshot_resolutions": [
106
+ [1242, 2208],
107
+ [2208, 1242]
108
+ ],
109
+ "picture_type": "MZPFT.SortedN56ScreenShot",
110
+ "messages_picture_type": "MZPFT.SortedN56MessagesScreenShot"
111
+ },
112
+ {
113
+ "name": "iphone58",
114
+ "friendly_name": "5.8-inch Display",
115
+ "friendly_category_name": "iPhone",
116
+ "screenshot_resolutions": [
117
+ [1125, 2436],
118
+ [2436, 1125]
119
+ ],
120
+ "picture_type": "MZPFT.SortedD22ScreenShot",
121
+ "messages_picture_type": "MZPFT.SortedD22MessagesScreenShot"
122
+ },
123
+ {
124
+ "name": "iphone65",
125
+ "friendly_name": "6.5-inch Display",
126
+ "friendly_category_name": "iPhone",
127
+ "screenshot_resolutions": [
128
+ [1242, 2688],
129
+ [2688, 1242]
130
+ ],
131
+ "picture_type": "MZPFT.SortedD33ScreenShot",
132
+ "messages_picture_type": "MZPFT.SortedD33MessagesScreenShot"
133
+ },
134
+
135
+ {
136
+ "name": "watch",
137
+ "friendly_name": "Series 3",
138
+ "friendly_category_name": "Apple Watch",
139
+ "screenshot_resolutions": [
140
+ [312, 390]
141
+ ],
142
+ "picture_type": "MZPFT.SortedN27ScreenShot",
143
+ "messages_picture_type": null
144
+ },
145
+ {
146
+ "name": "watchSeries4",
147
+ "friendly_name": "Series 4",
148
+ "friendly_category_name": "Apple Watch",
149
+ "screenshot_resolutions": [
150
+ [368, 448]
151
+ ],
152
+ "picture_type": "MZPFT.SortedN131ScreenShot",
153
+ "messages_picture_type": null
154
+ },
155
+
156
+ {
157
+ "name": "appleTV",
158
+ "friendly_name": "Apple TV",
159
+ "friendly_category_name": "Apple TV",
160
+ "screenshot_resolutions": [
161
+ [1920, 1080],
162
+ [3840, 2160]
163
+ ],
164
+ "picture_type": "MZPFT.SortedATVScreenShot",
165
+ "messages_picture_type": null
166
+ },
167
+
168
+ {
169
+ "name": "desktop",
170
+ "friendly_name": "Mac",
171
+ "friendly_category_name": "Desktop",
172
+ "screenshot_resolutions": [
173
+ [1280, 800],
174
+ [1440, 900],
175
+ [2560, 1600],
176
+ [2880, 1800]
177
+ ],
178
+ "picture_type": "MZPFT.SortedDesktopScreenShot",
179
+ "messages_picture_type": null
180
+ }
181
+ ]
@@ -1,4 +1,5 @@
1
1
  require_relative '../client'
2
+ require_relative '../tunes/display_family'
2
3
  require_relative 'utilities'
3
4
 
4
5
  module Spaceship
@@ -96,64 +97,16 @@ module Spaceship
96
97
  parse_upload_response(r)
97
98
  end
98
99
 
99
- # You can find this by uploading an image in App Store Connect
100
- # then look for the X-Apple-Upload-Validation-RuleSets value
101
100
  def picture_type_map
102
- # rubocop:enable Layout/ExtraSpacing
103
- {
104
- ipad: "MZPFT.SortedTabletScreenShot",
105
- ipad105: "MZPFT.SortedJ207ScreenShot",
106
- ipadPro: "MZPFT.SortedJ99ScreenShot",
107
- ipadPro11: "MZPFT.SortedJ317ScreenShot",
108
- ipadPro129: "MZPFT.SortedJ320ScreenShot",
109
- iphone35: "MZPFT.SortedScreenShot",
110
- iphone4: "MZPFT.SortedN41ScreenShot",
111
- iphone6: "MZPFT.SortedN61ScreenShot",
112
- iphone6Plus: "MZPFT.SortedN56ScreenShot",
113
- iphone58: "MZPFT.SortedD22ScreenShot",
114
- iphone65: "MZPFT.SortedD33ScreenShot",
115
- watch: "MZPFT.SortedN27ScreenShot",
116
- watchSeries4: "MZPFT.SortedN131ScreenShot",
117
- appleTV: "MZPFT.SortedATVScreenShot",
118
- desktop: "MZPFT.SortedDesktopScreenShot"
119
- }
101
+ Spaceship::Tunes::DisplayFamily.all.map { |v| [v.name.to_sym, v.picture_type] }.to_h
120
102
  end
121
103
 
122
104
  def messages_picture_type_map
123
- # rubocop:enable Layout/ExtraSpacing
124
- {
125
- ipad: "MZPFT.SortedTabletMessagesScreenShot",
126
- ipad105: "MZPFT.SortedJ207MessagesScreenShot",
127
- ipadPro: "MZPFT.SortedJ99MessagesScreenShot",
128
- ipadPro11: "MZPFT.SortedJ317MessagesScreenShot",
129
- ipadPro129: "MZPFT.SortedJ320MessagesScreenShot",
130
- iphone4: "MZPFT.SortedN41MessagesScreenShot",
131
- iphone6: "MZPFT.SortedN61MessagesScreenShot",
132
- iphone6Plus: "MZPFT.SortedN56MessagesScreenShot",
133
- iphone58: "MZPFT.SortedD22MessagesScreenShot",
134
- iphone65: "MZPFT.SortedD33MessagesScreenShot"
135
- }
105
+ Spaceship::Tunes::DisplayFamily.all.select(&:messages_supported?).map { |v| [v.name.to_sym, v.messages_picture_type] }.to_h
136
106
  end
137
107
 
138
108
  def device_resolution_map
139
- # rubocop:enable Layout/ExtraSpacing
140
- {
141
- watch: [[312, 390]],
142
- watchSeries4: [[368, 448]],
143
- ipad: [[1024, 748], [1024, 768], [2048, 1496], [2048, 1536], [768, 1004], [768, 1024], [1536, 2008], [1536, 2048]],
144
- ipad105: [[1668, 2224], [2224, 1668]],
145
- ipadPro: [[2048, 2732], [2732, 2048]],
146
- ipadPro11: [[1668, 2388], [2388, 1668]],
147
- ipadPro129: [[2048, 2732], [2732, 2048]],
148
- iphone35: [[640, 960], [640, 920], [960, 600], [960, 640]],
149
- iphone4: [[640, 1096], [640, 1136], [1136, 600], [1136, 640]],
150
- iphone6: [[750, 1334], [1334, 750]],
151
- iphone6Plus: [[1242, 2208], [2208, 1242]],
152
- iphone58: [[1125, 2436], [2436, 1125]],
153
- iphone65: [[1242, 2688], [2688, 1242]],
154
- appleTV: [[1920, 1080], [3840, 2160]],
155
- desktop: [[1280, 800], [1440, 900], [2560, 1600], [2880, 1800]]
156
- }
109
+ Spaceship::Tunes::DisplayFamily.all.map { |v| [v.name.to_sym, v.screenshot_resolutions] }.to_h
157
110
  end
158
111
 
159
112
  def screenshot_picture_type(device, is_messages)
@@ -2,7 +2,7 @@ require_relative 'tunes_client'
2
2
  require_relative 'app_trailer'
3
3
  require_relative 'app_screenshot'
4
4
  require_relative 'app_image'
5
- require_relative 'device_type'
5
+ require_relative 'display_family'
6
6
  require_relative 'app_version_generated_promocodes'
7
7
  require_relative 'language_item'
8
8
  require_relative 'transit_app_file'
@@ -692,7 +692,7 @@ module Spaceship
692
692
  end
693
693
 
694
694
  def container_data_for_language_and_device(data_field, language, device)
695
- raise "#{device} isn't a valid device name" unless DeviceType.exists?(device)
695
+ raise "#{device} isn't a valid device name" unless DisplayFamily.find(device)
696
696
 
697
697
  languages = raw_data_details.select { |d| d["language"] == language }
698
698
  # IDEA: better error for non existing language
@@ -1,39 +1,16 @@
1
+ require_relative "display_family"
2
+
1
3
  module Spaceship
2
4
  module Tunes
3
5
  # identifiers of devices that App Store Connect accepts screenshots for
4
6
  class DeviceType
5
- @types = [
6
- # iPhone
7
- 'iphone35',
8
- 'iphone4',
9
- 'iphone6', # 4.7-inch Display
10
- 'iphone6Plus', # 5.5-inch Display
11
- 'iphone58', # iPhone XS
12
- 'iphone65', # iPhone XS Max
13
-
14
- # iPad
15
- 'ipad', # 9.7-inch Display
16
- 'ipad105',
17
- 'ipadPro',
18
- 'ipadPro11',
19
- 'ipadPro129',
20
-
21
- # Apple Watch
22
- 'watch', # series 3
23
- 'watchSeries4',
24
-
25
- # Apple TV
26
- 'appleTV',
27
-
28
- # Mac
29
- 'desktop'
30
- ]
31
- class << self
32
- attr_accessor :types
7
+ def self.types
8
+ warn("Spaceship::Tunes::DeviceType has been deprecated, use Spaceship::Tunes::DisplayFamily instead. (https://github.com/fastlane/fastlane/pull/14574).")
9
+ return DisplayFamily.all.map(&:name)
10
+ end
33
11
 
34
- def exists?(type)
35
- types.include?(type)
36
- end
12
+ def self.exists?(type)
13
+ types.include?(type)
37
14
  end
38
15
  end
39
16
  end
@@ -0,0 +1,84 @@
1
+ require_relative "../module"
2
+
3
+ module Spaceship
4
+ module Tunes
5
+ # A definition of different styled displays used by devices
6
+ # that App Store Connect supports storing screenshots.
7
+ # Display styles often only vary based on screen resolution
8
+ # however other aspects of a displays physical apperance are
9
+ # also factored (i.e if the home indicator is provided via
10
+ # a hardware button or a software interface).
11
+ class DisplayFamily
12
+ # The display family name from the App Store Connect API that
13
+ # is used when uploading or listing screenshots. This value is
14
+ # then assigned to the
15
+ # Spaceship::Tunes::AppScreenshot#device_type attribute.
16
+ attr_accessor :name
17
+
18
+ # The user friendly name of this defintion.
19
+ #
20
+ # Source: Media Manager in App Store Connect.
21
+ attr_accessor :friendly_name
22
+
23
+ # The user friendly category for this defintion (i.e iPhone,
24
+ # Apple TV or Desktop).
25
+ attr_accessor :friendly_category_name
26
+
27
+ # An array of supported screen resolutions (in pixels) that are
28
+ # supported for the associated device.
29
+ #
30
+ # Source: https://help.apple.com/app-store-connect/#/devd274dd925
31
+ attr_accessor :screenshot_resolutions
32
+
33
+ # An internal identifier for the same device definition used
34
+ # in the DUClient.
35
+ #
36
+ # Source: You can find this by uploading an image in App Store
37
+ # Connect using your browser and then look for the
38
+ # X-Apple-Upload-Validation-RuleSets value in the uploads
39
+ # request headers.
40
+ attr_accessor :picture_type
41
+
42
+ # Similar to `picture_type`, but for iMessage screenshots.
43
+ attr_accessor :messages_picture_type
44
+
45
+ # Identifies if the device definition supports iMessage screenshots.
46
+ def messages_supported?
47
+ true unless messages_picture_type.nil?
48
+ end
49
+
50
+ # Finds a DisplayFamily definition.
51
+ #
52
+ # @param name (Symbol|String) The name of the display family being searched for.
53
+ # @return DisplayFamily object matching the given name.
54
+ def self.find(name)
55
+ name = name.to_sym if name.kind_of?(String)
56
+ lookup[name]
57
+ end
58
+
59
+ # All DisplayFamily types currently supported by App Store Connect.
60
+ def self.all
61
+ lookup.values
62
+ end
63
+
64
+ private_class_method
65
+
66
+ def self.lookup
67
+ return @lookup if defined?(@lookup)
68
+ display_families = JSON.parse(File.read(File.join(Spaceship::ROOT, "lib", "assets", "displayFamilies.json")))
69
+ @lookup ||= display_families.map { |data| [data["name"].to_sym, DisplayFamily.new(data)] }.to_h
70
+ end
71
+
72
+ private
73
+
74
+ def initialize(data)
75
+ @name = data["name"]
76
+ @friendly_name = data["friendly_name"]
77
+ @friendly_category_name = data["friendly_category_name"]
78
+ @screenshot_resolutions = data["screenshot_resolutions"]
79
+ @picture_type = data["picture_type"]
80
+ @messages_picture_type = data["messages_picture_type"]
81
+ end
82
+ end
83
+ end
84
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.121.0.beta.20190421200026
4
+ version: 2.121.0.beta.20190422200029
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kohki Miki
@@ -27,7 +27,7 @@ authors:
27
27
  autorequire:
28
28
  bindir: bin
29
29
  cert_chain: []
30
- date: 2019-04-21 00:00:00.000000000 Z
30
+ date: 2019-04-22 00:00:00.000000000 Z
31
31
  dependencies:
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: slack-notifier
@@ -1561,6 +1561,7 @@ files:
1561
1561
  - snapshot/lib/snapshot/test_command_generator_xcode_8.rb
1562
1562
  - snapshot/lib/snapshot/update.rb
1563
1563
  - spaceship/README.md
1564
+ - spaceship/lib/assets/displayFamilies.json
1564
1565
  - spaceship/lib/assets/languageMapping.json
1565
1566
  - spaceship/lib/assets/languageMappingReadable.json
1566
1567
  - spaceship/lib/spaceship.rb
@@ -1640,6 +1641,7 @@ files:
1640
1641
  - spaceship/lib/spaceship/tunes/build_train.rb
1641
1642
  - spaceship/lib/spaceship/tunes/developer_response.rb
1642
1643
  - spaceship/lib/spaceship/tunes/device_type.rb
1644
+ - spaceship/lib/spaceship/tunes/display_family.rb
1643
1645
  - spaceship/lib/spaceship/tunes/errors.rb
1644
1646
  - spaceship/lib/spaceship/tunes/iap.rb
1645
1647
  - spaceship/lib/spaceship/tunes/iap_detail.rb
@@ -1688,24 +1690,24 @@ metadata:
1688
1690
  post_install_message:
1689
1691
  rdoc_options: []
1690
1692
  require_paths:
1691
- - precheck/lib
1692
- - pem/lib
1693
- - pilot/lib
1693
+ - fastlane_core/lib
1694
+ - produce/lib
1694
1695
  - frameit/lib
1695
- - match/lib
1696
- - deliver/lib
1697
- - gym/lib
1698
1696
  - supply/lib
1699
- - produce/lib
1697
+ - fastlane/lib
1700
1698
  - scan/lib
1701
- - snapshot/lib
1702
- - spaceship/lib
1699
+ - precheck/lib
1703
1700
  - screengrab/lib
1704
- - fastlane_core/lib
1705
- - sigh/lib
1706
1701
  - cert/lib
1707
- - fastlane/lib
1702
+ - match/lib
1703
+ - pem/lib
1704
+ - deliver/lib
1708
1705
  - credentials_manager/lib
1706
+ - snapshot/lib
1707
+ - spaceship/lib
1708
+ - sigh/lib
1709
+ - pilot/lib
1710
+ - gym/lib
1709
1711
  required_ruby_version: !ruby/object:Gem::Requirement
1710
1712
  requirements:
1711
1713
  - - ">="