fastlane 2.74.0.beta.20180106010004 → 2.74.0.beta.20180107010004

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. checksums.yaml +4 -4
  2. data/cert/lib/cert.rb +3 -17
  3. data/cert/lib/cert/commands_generator.rb +5 -0
  4. data/cert/lib/cert/module.rb +14 -0
  5. data/cert/lib/cert/options.rb +4 -2
  6. data/cert/lib/cert/runner.rb +7 -0
  7. data/credentials_manager/lib/credentials_manager.rb +3 -9
  8. data/credentials_manager/lib/credentials_manager/account_manager.rb +2 -0
  9. data/credentials_manager/lib/credentials_manager/appfile_config.rb +2 -0
  10. data/credentials_manager/lib/credentials_manager/cli.rb +2 -0
  11. data/deliver/lib/deliver.rb +15 -31
  12. data/deliver/lib/deliver/app_screenshot.rb +2 -0
  13. data/deliver/lib/deliver/commands_generator.rb +6 -1
  14. data/deliver/lib/deliver/detect_values.rb +9 -1
  15. data/deliver/lib/deliver/download_screenshots.rb +2 -0
  16. data/deliver/lib/deliver/generate_summary.rb +4 -0
  17. data/deliver/lib/deliver/html_generator.rb +2 -0
  18. data/deliver/lib/deliver/loader.rb +4 -0
  19. data/deliver/lib/deliver/module.rb +16 -0
  20. data/deliver/lib/deliver/options.rb +5 -2
  21. data/deliver/lib/deliver/runner.rb +14 -1
  22. data/deliver/lib/deliver/setup.rb +6 -2
  23. data/deliver/lib/deliver/submit_for_review.rb +2 -0
  24. data/deliver/lib/deliver/upload_assets.rb +2 -0
  25. data/deliver/lib/deliver/upload_metadata.rb +4 -0
  26. data/deliver/lib/deliver/upload_price_tier.rb +2 -0
  27. data/deliver/lib/deliver/upload_screenshots.rb +6 -0
  28. data/fastlane/lib/fastlane/actions/slack.rb +16 -11
  29. data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +3 -0
  30. data/fastlane/lib/fastlane/version.rb +1 -1
  31. data/fastlane_core/lib/fastlane_core.rb +42 -77
  32. data/fastlane_core/lib/fastlane_core/analytics/action_completion_context.rb +2 -0
  33. data/fastlane_core/lib/fastlane_core/analytics/action_launch_context.rb +2 -1
  34. data/fastlane_core/lib/fastlane_core/analytics/analytics_ingester_client.rb +4 -0
  35. data/fastlane_core/lib/fastlane_core/analytics/analytics_session.rb +3 -1
  36. data/fastlane_core/lib/fastlane_core/analytics/app_identifier_guesser.rb +3 -3
  37. data/fastlane_core/lib/fastlane_core/android_package_name_guesser.rb +5 -0
  38. data/fastlane_core/lib/fastlane_core/build_watcher.rb +4 -0
  39. data/fastlane_core/lib/fastlane_core/cert_checker.rb +2 -0
  40. data/fastlane_core/lib/fastlane_core/command_executor.rb +4 -0
  41. data/fastlane_core/lib/fastlane_core/configuration/commander_generator.rb +4 -2
  42. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +6 -1
  43. data/fastlane_core/lib/fastlane_core/configuration/configuration.rb +5 -3
  44. data/fastlane_core/lib/fastlane_core/configuration/configuration_file.rb +3 -0
  45. data/fastlane_core/lib/fastlane_core/crash_reporter/crash_report_generator.rb +2 -0
  46. data/fastlane_core/lib/fastlane_core/crash_reporter/crash_reporter.rb +7 -1
  47. data/fastlane_core/lib/fastlane_core/device_manager.rb +6 -0
  48. data/fastlane_core/lib/fastlane_core/fastlane_folder.rb +2 -0
  49. data/fastlane_core/lib/fastlane_core/feature/feature.rb +2 -0
  50. data/fastlane_core/lib/fastlane_core/features.rb +2 -0
  51. data/fastlane_core/lib/fastlane_core/helper.rb +5 -1
  52. data/fastlane_core/lib/fastlane_core/ios_app_identifier_guesser.rb +5 -0
  53. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +3 -1
  54. data/fastlane_core/lib/fastlane_core/ipa_upload_package_builder.rb +4 -0
  55. data/fastlane_core/lib/fastlane_core/itunes_search_api.rb +2 -0
  56. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +3 -0
  57. data/fastlane_core/lib/fastlane_core/keychain_importer.rb +2 -0
  58. data/fastlane_core/lib/fastlane_core/module.rb +31 -0
  59. data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +2 -0
  60. data/fastlane_core/lib/fastlane_core/pkg_upload_package_builder.rb +4 -0
  61. data/fastlane_core/lib/fastlane_core/print_table.rb +3 -0
  62. data/fastlane_core/lib/fastlane_core/project.rb +3 -0
  63. data/fastlane_core/lib/fastlane_core/provisioning_profile.rb +2 -0
  64. data/fastlane_core/lib/fastlane_core/swag.rb +3 -0
  65. data/fastlane_core/lib/fastlane_core/test_parser.rb +7 -0
  66. data/fastlane_core/lib/fastlane_core/tool_collector.rb +2 -0
  67. data/fastlane_core/lib/fastlane_core/ui/errors.rb +1 -0
  68. data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_common_error.rb +2 -0
  69. data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_crash.rb +2 -0
  70. data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_error.rb +2 -0
  71. data/fastlane_core/lib/fastlane_core/ui/errors/fastlane_shell_error.rb +2 -0
  72. data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +10 -1
  73. data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +4 -1
  74. data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +6 -0
  75. data/fastlane_core/lib/fastlane_core/ui/interface.rb +3 -0
  76. data/fastlane_core/lib/fastlane_core/ui/ui.rb +5 -5
  77. data/fastlane_core/lib/fastlane_core/update_checker/changelog.rb +2 -2
  78. data/fastlane_core/lib/fastlane_core/update_checker/update_checker.rb +5 -3
  79. data/frameit/lib/frameit.rb +0 -40
  80. data/frameit/lib/frameit/commands_generator.rb +7 -0
  81. data/frameit/lib/frameit/config_parser.rb +2 -0
  82. data/frameit/lib/frameit/dependency_checker.rb +2 -0
  83. data/frameit/lib/frameit/editor.rb +9 -0
  84. data/frameit/lib/frameit/frame_downloader.rb +5 -0
  85. data/frameit/lib/frameit/mac_editor.rb +3 -0
  86. data/frameit/lib/frameit/module.rb +40 -0
  87. data/frameit/lib/frameit/offsets.rb +3 -0
  88. data/frameit/lib/frameit/options.rb +4 -0
  89. data/frameit/lib/frameit/runner.rb +5 -1
  90. data/frameit/lib/frameit/screenshot.rb +9 -0
  91. data/frameit/lib/frameit/strings_parser.rb +2 -0
  92. data/frameit/lib/frameit/template_finder.rb +6 -0
  93. data/frameit/lib/frameit/trim_box.rb +2 -0
  94. data/gym/lib/gym.rb +9 -46
  95. data/gym/lib/gym/code_signing_mapping.rb +2 -0
  96. data/gym/lib/gym/commands_generator.rb +6 -3
  97. data/gym/lib/gym/detect_values.rb +4 -1
  98. data/gym/lib/gym/error_handler.rb +3 -0
  99. data/gym/lib/gym/generators/build_command_generator.rb +1 -0
  100. data/gym/lib/gym/generators/package_command_generator.rb +1 -1
  101. data/gym/lib/gym/generators/package_command_generator_xcode7.rb +5 -0
  102. data/gym/lib/gym/manager.rb +4 -0
  103. data/gym/lib/gym/module.rb +36 -0
  104. data/gym/lib/gym/options.rb +3 -2
  105. data/gym/lib/gym/runner.rb +8 -0
  106. data/gym/lib/gym/xcode.rb +2 -0
  107. data/gym/lib/gym/xcodebuild_fixes/generic_archive_fix.rb +3 -0
  108. data/match/lib/match.rb +12 -37
  109. data/match/lib/match/change_password.rb +4 -0
  110. data/match/lib/match/commands_generator.rb +9 -3
  111. data/match/lib/match/encrypt.rb +4 -0
  112. data/match/lib/match/generator.rb +7 -2
  113. data/match/lib/match/git_helper.rb +5 -0
  114. data/match/lib/match/module.rb +23 -0
  115. data/match/lib/match/nuke.rb +8 -0
  116. data/match/lib/match/options.rb +3 -2
  117. data/match/lib/match/runner.rb +11 -0
  118. data/match/lib/match/setup.rb +2 -0
  119. data/match/lib/match/spaceship_ensure.rb +5 -2
  120. data/match/lib/match/table_printer.rb +6 -0
  121. data/match/lib/match/utils.rb +3 -0
  122. data/pem/lib/pem.rb +3 -20
  123. data/pem/lib/pem/commands_generator.rb +4 -0
  124. data/pem/lib/pem/manager.rb +3 -0
  125. data/pem/lib/pem/module.rb +18 -0
  126. data/pem/lib/pem/options.rb +4 -2
  127. data/pilot/lib/pilot.rb +1 -14
  128. data/pilot/lib/pilot/build_manager.rb +6 -0
  129. data/pilot/lib/pilot/commands_generator.rb +8 -2
  130. data/pilot/lib/pilot/manager.rb +10 -3
  131. data/pilot/lib/pilot/module.rb +9 -0
  132. data/pilot/lib/pilot/options.rb +4 -2
  133. data/pilot/lib/pilot/tester_exporter.rb +6 -3
  134. data/pilot/lib/pilot/tester_importer.rb +3 -1
  135. data/pilot/lib/pilot/tester_manager.rb +6 -5
  136. data/precheck/lib/precheck.rb +2 -22
  137. data/precheck/lib/precheck/commands_generator.rb +8 -1
  138. data/precheck/lib/precheck/module.rb +21 -0
  139. data/precheck/lib/precheck/options.rb +4 -3
  140. data/precheck/lib/precheck/rule.rb +7 -4
  141. data/precheck/lib/precheck/rule_processor.rb +5 -2
  142. data/precheck/lib/precheck/rules/abstract_text_match_rule.rb +1 -1
  143. data/precheck/lib/precheck/rules/all.rb +1 -0
  144. data/precheck/lib/precheck/rules/copyright_date_rule.rb +1 -2
  145. data/precheck/lib/precheck/rules/curse_words_rule.rb +2 -1
  146. data/precheck/lib/precheck/rules/custom_text_rule.rb +1 -2
  147. data/precheck/lib/precheck/rules/free_stuff_iap_rule.rb +1 -2
  148. data/precheck/lib/precheck/rules/future_functionality_rule.rb +1 -2
  149. data/precheck/lib/precheck/rules/negative_apple_sentiment_rule.rb +1 -2
  150. data/precheck/lib/precheck/rules/other_platforms_rule.rb +1 -2
  151. data/precheck/lib/precheck/rules/placeholder_words_rule.rb +1 -2
  152. data/precheck/lib/precheck/rules/test_words_rule.rb +1 -2
  153. data/precheck/lib/precheck/rules/unreachable_urls_rule.rb +3 -1
  154. data/precheck/lib/precheck/runner.rb +6 -4
  155. data/produce/lib/produce.rb +6 -21
  156. data/produce/lib/produce/commands_generator.rb +5 -0
  157. data/produce/lib/produce/developer_center.rb +1 -0
  158. data/produce/lib/produce/group.rb +1 -0
  159. data/produce/lib/produce/itunes_connect.rb +5 -3
  160. data/produce/lib/produce/manager.rb +4 -0
  161. data/produce/lib/produce/merchant.rb +1 -0
  162. data/produce/lib/produce/module.rb +14 -0
  163. data/produce/lib/produce/options.rb +4 -2
  164. data/produce/lib/produce/service.rb +3 -0
  165. data/scan/lib/scan.rb +10 -40
  166. data/scan/lib/scan/commands_generator.rb +6 -2
  167. data/scan/lib/scan/detect_values.rb +4 -0
  168. data/scan/lib/scan/error_handler.rb +2 -0
  169. data/scan/lib/scan/manager.rb +4 -0
  170. data/scan/lib/scan/module.rb +32 -0
  171. data/scan/lib/scan/options.rb +3 -2
  172. data/scan/lib/scan/runner.rb +9 -0
  173. data/scan/lib/scan/slack_poster.rb +2 -0
  174. data/scan/lib/scan/test_command_generator.rb +2 -0
  175. data/scan/lib/scan/test_result_parser.rb +2 -0
  176. data/scan/lib/scan/xcpretty_reporter_options_generator.rb +2 -0
  177. data/screengrab/lib/screengrab.rb +7 -33
  178. data/screengrab/lib/screengrab/android_environment.rb +2 -0
  179. data/screengrab/lib/screengrab/commands_generator.rb +8 -0
  180. data/screengrab/lib/screengrab/dependency_checker.rb +2 -0
  181. data/screengrab/lib/screengrab/module.rb +24 -0
  182. data/screengrab/lib/screengrab/options.rb +3 -2
  183. data/screengrab/lib/screengrab/reports_generator.rb +3 -1
  184. data/screengrab/lib/screengrab/runner.rb +4 -0
  185. data/screengrab/lib/screengrab/setup.rb +2 -0
  186. data/sigh/lib/sigh.rb +4 -19
  187. data/sigh/lib/sigh/commands_generator.rb +5 -0
  188. data/sigh/lib/sigh/download_all.rb +5 -0
  189. data/sigh/lib/sigh/local_manage.rb +5 -0
  190. data/sigh/lib/sigh/manager.rb +3 -2
  191. data/sigh/lib/sigh/module.rb +16 -0
  192. data/sigh/lib/sigh/options.rb +3 -2
  193. data/sigh/lib/sigh/repair.rb +4 -0
  194. data/sigh/lib/sigh/resign.rb +3 -0
  195. data/sigh/lib/sigh/runner.rb +4 -0
  196. data/snapshot/lib/snapshot.rb +19 -61
  197. data/snapshot/lib/snapshot/collector.rb +5 -0
  198. data/snapshot/lib/snapshot/commands_generator.rb +4 -1
  199. data/snapshot/lib/snapshot/dependency_checker.rb +27 -23
  200. data/snapshot/lib/snapshot/detect_values.rb +7 -0
  201. data/snapshot/lib/snapshot/error_handler.rb +2 -0
  202. data/snapshot/lib/snapshot/fixes/hardware_keyboard_fix.rb +2 -0
  203. data/snapshot/lib/snapshot/fixes/simulator_zoom_fix.rb +2 -0
  204. data/snapshot/lib/snapshot/latest_os_version.rb +5 -2
  205. data/snapshot/lib/snapshot/module.rb +44 -0
  206. data/snapshot/lib/snapshot/options.rb +11 -2
  207. data/snapshot/lib/snapshot/reports_generator.rb +4 -2
  208. data/snapshot/lib/snapshot/reset_simulators.rb +3 -0
  209. data/snapshot/lib/snapshot/runner.rb +10 -0
  210. data/snapshot/lib/snapshot/screenshot_flatten.rb +2 -0
  211. data/snapshot/lib/snapshot/screenshot_rotate.rb +4 -1
  212. data/snapshot/lib/snapshot/setup.rb +2 -0
  213. data/snapshot/lib/snapshot/simulator_launchers/launcher_configuration.rb +0 -1
  214. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb +27 -27
  215. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_base.rb +8 -0
  216. data/snapshot/lib/snapshot/simulator_launchers/simulator_launcher_xcode_8.rb +4 -1
  217. data/snapshot/lib/snapshot/test_command_generator.rb +2 -1
  218. data/snapshot/lib/snapshot/test_command_generator_base.rb +10 -4
  219. data/snapshot/lib/snapshot/test_command_generator_xcode_8.rb +3 -1
  220. data/snapshot/lib/snapshot/update.rb +3 -0
  221. data/spaceship/lib/spaceship.rb +14 -36
  222. data/spaceship/lib/spaceship/client.rb +26 -76
  223. data/spaceship/lib/spaceship/commands_generator.rb +4 -2
  224. data/spaceship/lib/spaceship/du/du_client.rb +3 -0
  225. data/spaceship/lib/spaceship/du/upload_file.rb +2 -0
  226. data/spaceship/lib/spaceship/errors.rb +67 -0
  227. data/spaceship/lib/spaceship/globals.rb +1 -1
  228. data/spaceship/lib/spaceship/helper/plist_middleware.rb +1 -1
  229. data/spaceship/lib/spaceship/helper/rels_middleware.rb +2 -0
  230. data/spaceship/lib/spaceship/launcher.rb +7 -5
  231. data/spaceship/lib/spaceship/module.rb +4 -0
  232. data/spaceship/lib/spaceship/playground.rb +3 -0
  233. data/spaceship/lib/spaceship/portal/app.rb +3 -0
  234. data/spaceship/lib/spaceship/portal/app_group.rb +2 -0
  235. data/spaceship/lib/spaceship/portal/app_service.rb +38 -290
  236. data/spaceship/lib/spaceship/portal/certificate.rb +3 -1
  237. data/spaceship/lib/spaceship/portal/device.rb +5 -3
  238. data/spaceship/lib/spaceship/portal/invite.rb +2 -0
  239. data/spaceship/lib/spaceship/portal/key.rb +2 -0
  240. data/spaceship/lib/spaceship/portal/legacy_wrapper.rb +21 -0
  241. data/spaceship/lib/spaceship/portal/merchant.rb +2 -0
  242. data/spaceship/lib/spaceship/portal/passbook.rb +2 -0
  243. data/spaceship/lib/spaceship/portal/person.rb +2 -0
  244. data/spaceship/lib/spaceship/portal/persons.rb +3 -0
  245. data/spaceship/lib/spaceship/portal/portal_base.rb +3 -0
  246. data/spaceship/lib/spaceship/portal/portal_client.rb +37 -23
  247. data/spaceship/lib/spaceship/portal/provisioning_profile.rb +27 -20
  248. data/spaceship/lib/spaceship/portal/provisioning_profile_template.rb +2 -0
  249. data/spaceship/lib/spaceship/portal/spaceship.rb +13 -10
  250. data/spaceship/lib/spaceship/portal/ui/select_team.rb +2 -0
  251. data/spaceship/lib/spaceship/portal/website_push.rb +2 -0
  252. data/spaceship/lib/spaceship/spaceauth_runner.rb +4 -2
  253. data/spaceship/lib/spaceship/test_flight.rb +0 -1
  254. data/spaceship/lib/spaceship/test_flight/app_test_info.rb +4 -0
  255. data/spaceship/lib/spaceship/test_flight/base.rb +22 -17
  256. data/spaceship/lib/spaceship/test_flight/beta_review_info.rb +2 -0
  257. data/spaceship/lib/spaceship/test_flight/build.rb +211 -203
  258. data/spaceship/lib/spaceship/test_flight/build_trains.rb +4 -1
  259. data/spaceship/lib/spaceship/test_flight/client.rb +255 -251
  260. data/spaceship/lib/spaceship/test_flight/export_compliance.rb +2 -0
  261. data/spaceship/lib/spaceship/test_flight/group.rb +2 -0
  262. data/spaceship/lib/spaceship/test_flight/test_info.rb +2 -0
  263. data/spaceship/lib/spaceship/test_flight/tester.rb +114 -110
  264. data/spaceship/lib/spaceship/tunes/app_details.rb +5 -1
  265. data/spaceship/lib/spaceship/tunes/app_image.rb +2 -0
  266. data/spaceship/lib/spaceship/tunes/app_ratings.rb +2 -68
  267. data/spaceship/lib/spaceship/tunes/app_review.rb +55 -0
  268. data/spaceship/lib/spaceship/tunes/app_screenshot.rb +2 -0
  269. data/spaceship/lib/spaceship/tunes/app_submission.rb +1 -0
  270. data/spaceship/lib/spaceship/tunes/app_trailer.rb +2 -0
  271. data/spaceship/lib/spaceship/tunes/app_version.rb +11 -0
  272. data/spaceship/lib/spaceship/tunes/app_version_generated_promocodes.rb +2 -0
  273. data/spaceship/lib/spaceship/tunes/app_version_history.rb +2 -0
  274. data/spaceship/lib/spaceship/tunes/app_version_promocodes.rb +2 -0
  275. data/spaceship/lib/spaceship/tunes/app_version_ref.rb +2 -0
  276. data/spaceship/lib/spaceship/tunes/app_version_states_history.rb +2 -0
  277. data/spaceship/lib/spaceship/tunes/application.rb +18 -6
  278. data/spaceship/lib/spaceship/tunes/availability.rb +2 -0
  279. data/spaceship/lib/spaceship/tunes/build.rb +2 -0
  280. data/spaceship/lib/spaceship/tunes/build_details.rb +2 -0
  281. data/spaceship/lib/spaceship/tunes/build_train.rb +5 -1
  282. data/spaceship/lib/spaceship/tunes/developer_response.rb +23 -0
  283. data/spaceship/lib/spaceship/tunes/errors.rb +17 -0
  284. data/spaceship/lib/spaceship/tunes/iap_detail.rb +5 -0
  285. data/spaceship/lib/spaceship/tunes/iap_families.rb +1 -0
  286. data/spaceship/lib/spaceship/tunes/iap_family_details.rb +1 -0
  287. data/spaceship/lib/spaceship/tunes/iap_family_list.rb +1 -0
  288. data/spaceship/lib/spaceship/tunes/iap_list.rb +3 -0
  289. data/spaceship/lib/spaceship/tunes/iap_subscription_pricing_info.rb +46 -0
  290. data/spaceship/lib/spaceship/tunes/iap_subscription_pricing_tier.rb +2 -41
  291. data/spaceship/lib/spaceship/tunes/language_converter.rb +2 -0
  292. data/spaceship/lib/spaceship/tunes/legacy_wrapper.rb +13 -0
  293. data/spaceship/lib/spaceship/tunes/member.rb +3 -0
  294. data/spaceship/lib/spaceship/tunes/members.rb +2 -0
  295. data/spaceship/lib/spaceship/tunes/pricing_info.rb +42 -0
  296. data/spaceship/lib/spaceship/tunes/pricing_tier.rb +2 -37
  297. data/spaceship/lib/spaceship/tunes/recovery_device.rb +2 -0
  298. data/spaceship/lib/spaceship/tunes/sandbox_tester.rb +2 -0
  299. data/spaceship/lib/spaceship/tunes/spaceship.rb +2 -0
  300. data/spaceship/lib/spaceship/tunes/territory.rb +2 -0
  301. data/spaceship/lib/spaceship/tunes/transit_app_file.rb +2 -0
  302. data/spaceship/lib/spaceship/tunes/tunes.rb +34 -39
  303. data/spaceship/lib/spaceship/tunes/tunes_base.rb +2 -0
  304. data/spaceship/lib/spaceship/tunes/tunes_client.rb +20 -14
  305. data/spaceship/lib/spaceship/tunes/user_detail.rb +2 -0
  306. data/spaceship/lib/spaceship/tunes/version_set.rb +2 -0
  307. data/spaceship/lib/spaceship/two_step_client.rb +5 -1
  308. data/spaceship/lib/spaceship/ui.rb +7 -7
  309. data/supply/lib/supply/options.rb +2 -2
  310. metadata +31 -6
@@ -1,3 +1,5 @@
1
+ require_relative 'portal_base'
2
+
1
3
  module Spaceship
2
4
  module Portal
3
5
  class ProvisioningProfileTemplate < PortalBase
@@ -1,3 +1,6 @@
1
+ require_relative 'portal_client'
2
+ require_relative 'app_service'
3
+
1
4
  module Spaceship
2
5
  module Portal
3
6
  class << self
@@ -17,7 +20,7 @@ module Spaceship
17
20
  #
18
21
  # @raise InvalidUserCredentialsError: raised if authentication failed
19
22
  #
20
- # @return (Spaceship::Client) The client the login method was called for
23
+ # @return (Spaceship::Portal::Client) The client the login method was called for
21
24
  def login(user = nil, password = nil)
22
25
  @client = PortalClient.login(user, password)
23
26
  end
@@ -41,47 +44,47 @@ module Spaceship
41
44
 
42
45
  # @return (Class) Access the apps for the spaceship
43
46
  def app
44
- Spaceship::App.set_client(@client)
47
+ Spaceship::Portal::App.set_client(@client)
45
48
  end
46
49
 
47
50
  # @return (Class) Access the pass types for the spaceship
48
51
  def passbook
49
- Spaceship::Passbook.set_client(@client)
52
+ Spaceship::Portal::Passbook.set_client(@client)
50
53
  end
51
54
 
52
55
  # @return (Class) Access the website pushes for the spaceship
53
56
  def website_push
54
- Spaceship::WebsitePush.set_client(@client)
57
+ Spaceship::Portal::WebsitePush.set_client(@client)
55
58
  end
56
59
 
57
60
  # @return (Class) Access the app groups for the spaceship
58
61
  def app_group
59
- Spaceship::AppGroup.set_client(@client)
62
+ Spaceship::Portal::AppGroup.set_client(@client)
60
63
  end
61
64
 
62
65
  # @return (Class) Access app services for the spaceship
63
66
  def app_service
64
- Spaceship::AppService
67
+ Spaceship::Portal::AppService
65
68
  end
66
69
 
67
70
  # @return (Class) Access the devices for the spaceship
68
71
  def device
69
- Spaceship::Device.set_client(@client)
72
+ Spaceship::Portal::Device.set_client(@client)
70
73
  end
71
74
 
72
75
  # @return (Class) Access the certificates for the spaceship
73
76
  def certificate
74
- Spaceship::Certificate.set_client(@client)
77
+ Spaceship::Portal::Certificate.set_client(@client)
75
78
  end
76
79
 
77
80
  # @return (Class) Access the provisioning profiles for the spaceship
78
81
  def provisioning_profile
79
- Spaceship::ProvisioningProfile.set_client(@client)
82
+ Spaceship::Portal::ProvisioningProfile.set_client(@client)
80
83
  end
81
84
 
82
85
  # @return (Class) Access the merchants for the spaceship
83
86
  def merchant
84
- Spaceship::Merchant.set_client(@client)
87
+ Spaceship::Portal::Merchant.set_client(@client)
85
88
  end
86
89
  end
87
90
  end
@@ -31,6 +31,7 @@ module Spaceship
31
31
  # {...}
32
32
  # ]
33
33
 
34
+ # rubocop:disable Lint/MissingRequireStatement
34
35
  def self.ci?
35
36
  if Object.const_defined?("FastlaneCore") && FastlaneCore.const_defined?("Helper")
36
37
  return FastlaneCore::Helper.ci?
@@ -44,6 +45,7 @@ module Spaceship
44
45
  end
45
46
  return true
46
47
  end
48
+ # rubocop:enable Lint/MissingRequireStatement
47
49
 
48
50
  def select_team
49
51
  teams = client.teams
@@ -1,3 +1,5 @@
1
+ require_relative 'portal_base'
2
+
1
3
  module Spaceship
2
4
  module Portal
3
5
  # Represents an Website Push ID from the Developer Portal
@@ -1,7 +1,9 @@
1
- require "colored"
2
- require "credentials_manager"
1
+ require 'colored'
2
+ require 'credentials_manager/appfile_config'
3
3
  require 'yaml'
4
4
 
5
+ require_relative 'tunes/tunes_client'
6
+
5
7
  module Spaceship
6
8
  class SpaceauthRunner
7
9
  def initialize(username: nil)
@@ -1,4 +1,3 @@
1
-
2
1
  require 'spaceship/test_flight/client'
3
2
  require 'spaceship/test_flight/base'
4
3
  require 'spaceship/test_flight/app_test_info'
@@ -1,3 +1,7 @@
1
+ require_relative 'base'
2
+ require_relative 'test_info'
3
+ require_relative 'beta_review_info'
4
+
1
5
  module Spaceship::TestFlight
2
6
  class AppTestInfo < Base
3
7
  # AppTestInfo wraps a test_info and beta_review_info in the format required to manage test_info
@@ -1,23 +1,28 @@
1
- module Spaceship::TestFlight
2
- class Base < Spaceship::Base
3
- def self.client
4
- @client ||= Client.client_with_authorization_from(Spaceship::Tunes.client)
5
- end
1
+ require_relative '../base'
2
+ require_relative '../tunes/tunes_client'
6
3
 
7
- ##
8
- # Have subclasses inherit the client from their superclass
9
- #
10
- # Essentially, we are making a class-inheritable-accessor as described here:
11
- # https://apidock.com/rails/v4.2.7/Class/class_attribute
12
- def self.inherited(subclass)
13
- this_class = self
14
- subclass.define_singleton_method(:client) do
15
- this_class.client
4
+ module Spaceship
5
+ module TestFlight
6
+ class Base < Spaceship::Base
7
+ def self.client
8
+ @client ||= Client.client_with_authorization_from(Spaceship::Tunes.client)
16
9
  end
17
- end
18
10
 
19
- def to_json
20
- raw_data.to_json
11
+ ##
12
+ # Have subclasses inherit the client from their superclass
13
+ #
14
+ # Essentially, we are making a class-inheritable-accessor as described here:
15
+ # https://apidock.com/rails/v4.2.7/Class/class_attribute
16
+ def self.inherited(subclass)
17
+ this_class = self
18
+ subclass.define_singleton_method(:client) do
19
+ this_class.client
20
+ end
21
+ end
22
+
23
+ def to_json
24
+ raw_data.to_json
25
+ end
21
26
  end
22
27
  end
23
28
  end
@@ -1,3 +1,5 @@
1
+ require_relative 'base'
2
+
1
3
  module Spaceship::TestFlight
2
4
  class BetaReviewInfo < Base
3
5
  attr_accessor :contact_first_name, :contact_last_name, :contact_phone, :contact_email
@@ -1,208 +1,216 @@
1
1
  require 'time'
2
2
 
3
- module Spaceship::TestFlight
4
- class Build < Base
5
- # @example
6
- # "com.sample.app"
7
- attr_accessor :bundle_id
8
-
9
- # @example
10
- # "testflight.build.state.testing.active"
11
- # @example
12
- # "testflight.build.state.processing"
13
- attr_accessor :internal_state
14
-
15
- # @example
16
- # "testflight.build.state.submit.ready"
17
- # @example
18
- # "testflight.build.state.processing"
19
- attr_accessor :external_state
20
-
21
- # Internal build ID (int)
22
- # @example
23
- # 19285309
24
- attr_accessor :id
25
-
26
- # @example
27
- # "1.0"
28
- attr_accessor :train_version
29
-
30
- # @example
31
- # "152"
32
- attr_accessor :build_version
33
-
34
- attr_accessor :beta_review_info
35
-
36
- attr_accessor :export_compliance
37
-
38
- attr_accessor :test_info
39
-
40
- attr_accessor :install_count
41
- attr_accessor :invite_count
42
- attr_accessor :crash_count
43
-
44
- attr_accessor :did_notify
45
-
46
- attr_accessor :upload_date
47
-
48
- attr_accessor :dsym_url
49
- attr_accessor :build_sdk
50
- attr_accessor :include_symbols
51
- attr_accessor :number_of_asset_packs
52
- attr_accessor :contains_odr
53
- attr_accessor :file_name
54
-
55
- attr_mapping({
56
- 'appAdamId' => :app_id,
57
- 'providerId' => :provider_id,
58
- 'bundleId' => :bundle_id,
59
- 'trainVersion' => :train_version,
60
- 'buildVersion' => :build_version,
61
- 'betaReviewInfo' => :beta_review_info,
62
- 'exportCompliance' => :export_compliance,
63
- 'internalState' => :internal_state,
64
- 'externalState' => :external_state,
65
- 'testInfo' => :test_info,
66
- 'installCount' => :install_count,
67
- 'inviteCount' => :invite_count,
68
- 'crashCount' => :crash_count,
69
- 'didNotify' => :did_notify,
70
- 'uploadDate' => :upload_date,
71
- 'id' => :id,
72
- 'dSYMUrl' => :dsym_url,
73
- 'buildSdk' => :build_sdk,
74
- 'includesSymbols' => :include_symbols,
75
- 'numberOfAssetPacks' => :number_of_asset_packs,
76
- 'containsODR' => :contains_odr,
77
- 'fileName' => :file_name
78
- })
79
-
80
- BUILD_STATES = {
81
- processing: 'testflight.build.state.processing',
82
- active: 'testflight.build.state.testing.active',
83
- ready_to_submit: 'testflight.build.state.submit.ready',
84
- ready_to_test: 'testflight.build.state.testing.ready',
85
- export_compliance_missing: 'testflight.build.state.export.compliance.missing',
86
- review_rejected: 'testflight.build.state.review.rejected'
87
- }
88
-
89
- # Find a Build by `build_id`.
90
- #
91
- # @return (Spaceship::TestFlight::Build)
92
- def self.find(app_id: nil, build_id: nil)
93
- attrs = client.get_build(app_id: app_id, build_id: build_id)
94
- self.new(attrs)
95
- end
96
-
97
- def self.all(app_id: nil, platform: nil, retry_count: 0)
98
- trains = BuildTrains.all(app_id: app_id, platform: platform, retry_count: retry_count)
99
- trains.values.flatten
100
- end
101
-
102
- def self.builds_for_train(app_id: nil, platform: nil, train_version: nil, retry_count: 3)
103
- builds_data = client.get_builds_for_train(app_id: app_id, platform: platform, train_version: train_version, retry_count: retry_count)
104
- builds_data.map { |data| self.new(data) }
105
- end
106
-
107
- # Just the builds, as a flat array, that are still processing
108
- def self.all_processing_builds(app_id: nil, platform: nil, retry_count: 0)
109
- all(app_id: app_id, platform: platform, retry_count: retry_count).find_all(&:processing?)
110
- end
111
-
112
- def self.latest(app_id: nil, platform: nil)
113
- all(app_id: app_id, platform: platform).sort_by(&:upload_date).last
114
- end
115
-
116
- # reload the raw_data resource for this build.
117
- # This is useful when we start with a partial build response as returned by the BuildTrains,
118
- # but then need to look up some attributes on the full build representation.
119
- #
120
- # Note: this will overwrite any non-saved changes to the object
121
- #
122
- # @return (Spaceship::Base::DataHash) the raw_data of the build.
123
- def reload
124
- self.raw_data = self.class.find(app_id: app_id, build_id: id).raw_data
125
- end
126
-
127
- def ready_to_submit?
128
- external_state == BUILD_STATES[:ready_to_submit]
129
- end
130
-
131
- def ready_to_test?
132
- external_state == BUILD_STATES[:ready_to_test]
133
- end
134
-
135
- def active?
136
- external_state == BUILD_STATES[:active]
137
- end
138
-
139
- def processing?
140
- external_state == BUILD_STATES[:processing]
141
- end
142
-
143
- def export_compliance_missing?
144
- external_state == BUILD_STATES[:export_compliance_missing]
145
- end
146
-
147
- def review_rejected?
148
- external_state == BUILD_STATES[:review_rejected]
149
- end
150
-
151
- def processed?
152
- active? || ready_to_submit? || export_compliance_missing? || review_rejected?
153
- end
154
-
155
- # Getting builds from BuildTrains only gets a partial Build object
156
- # We are then requesting the full build from iTC when we need to access
157
- # any of the variables below, because they are not included in the partial Build objects
158
- #
159
- # `super` here calls `beta_review_info` as defined by the `attr_mapping` above.
160
- # @return (Spaceship::TestFlight::BetaReviewInfo)
161
- def beta_review_info
162
- super || reload
163
- BetaReviewInfo.new(super)
164
- end
165
-
166
- # @return (Spaceship::TestFlight::ExportCompliance)
167
- def export_compliance
168
- super || reload
169
- ExportCompliance.new(super)
170
- end
171
-
172
- # @return (Spaceship::TestFlight::TestInfo)
173
- def test_info
174
- super || reload
175
- TestInfo.new(super)
176
- end
177
-
178
- # @return (Time) an parsed Time value for the upload_date
179
- def upload_date
180
- Time.parse(super)
181
- end
182
-
183
- # saves the changes to the Build object to TestFlight
184
- def save!
185
- client.put_build(app_id: app_id, build_id: id, build: self)
186
- end
187
-
188
- def update_build_information!(description: nil, feedback_email: nil, whats_new: nil)
189
- test_info.description = description if description
190
- test_info.feedback_email = feedback_email if feedback_email
191
- test_info.whats_new = whats_new if whats_new
192
- save!
193
- end
194
-
195
- def submit_for_testflight_review!
196
- return if ready_to_test?
197
- client.post_for_testflight_review(app_id: app_id, build_id: id, build: self)
198
- end
199
-
200
- def expire!
201
- client.expire_build(app_id: app_id, build_id: id, build: self)
202
- end
203
-
204
- def add_group!(group)
205
- client.add_group_to_build(app_id: app_id, group_id: group.id, build_id: id)
3
+ require_relative 'base'
4
+ require_relative 'test_info'
5
+ require_relative 'export_compliance'
6
+ require_relative 'beta_review_info'
7
+ require_relative 'build_trains'
8
+
9
+ module Spaceship
10
+ module TestFlight
11
+ class Build < Base
12
+ # @example
13
+ # "com.sample.app"
14
+ attr_accessor :bundle_id
15
+
16
+ # @example
17
+ # "testflight.build.state.testing.active"
18
+ # @example
19
+ # "testflight.build.state.processing"
20
+ attr_accessor :internal_state
21
+
22
+ # @example
23
+ # "testflight.build.state.submit.ready"
24
+ # @example
25
+ # "testflight.build.state.processing"
26
+ attr_accessor :external_state
27
+
28
+ # Internal build ID (int)
29
+ # @example
30
+ # 19285309
31
+ attr_accessor :id
32
+
33
+ # @example
34
+ # "1.0"
35
+ attr_accessor :train_version
36
+
37
+ # @example
38
+ # "152"
39
+ attr_accessor :build_version
40
+
41
+ attr_accessor :beta_review_info
42
+
43
+ attr_accessor :export_compliance
44
+
45
+ attr_accessor :test_info
46
+
47
+ attr_accessor :install_count
48
+ attr_accessor :invite_count
49
+ attr_accessor :crash_count
50
+
51
+ attr_accessor :did_notify
52
+
53
+ attr_accessor :upload_date
54
+
55
+ attr_accessor :dsym_url
56
+ attr_accessor :build_sdk
57
+ attr_accessor :include_symbols
58
+ attr_accessor :number_of_asset_packs
59
+ attr_accessor :contains_odr
60
+ attr_accessor :file_name
61
+
62
+ attr_mapping({
63
+ 'appAdamId' => :app_id,
64
+ 'providerId' => :provider_id,
65
+ 'bundleId' => :bundle_id,
66
+ 'trainVersion' => :train_version,
67
+ 'buildVersion' => :build_version,
68
+ 'betaReviewInfo' => :beta_review_info,
69
+ 'exportCompliance' => :export_compliance,
70
+ 'internalState' => :internal_state,
71
+ 'externalState' => :external_state,
72
+ 'testInfo' => :test_info,
73
+ 'installCount' => :install_count,
74
+ 'inviteCount' => :invite_count,
75
+ 'crashCount' => :crash_count,
76
+ 'didNotify' => :did_notify,
77
+ 'uploadDate' => :upload_date,
78
+ 'id' => :id,
79
+ 'dSYMUrl' => :dsym_url,
80
+ 'buildSdk' => :build_sdk,
81
+ 'includesSymbols' => :include_symbols,
82
+ 'numberOfAssetPacks' => :number_of_asset_packs,
83
+ 'containsODR' => :contains_odr,
84
+ 'fileName' => :file_name
85
+ })
86
+
87
+ BUILD_STATES = {
88
+ processing: 'testflight.build.state.processing',
89
+ active: 'testflight.build.state.testing.active',
90
+ ready_to_submit: 'testflight.build.state.submit.ready',
91
+ ready_to_test: 'testflight.build.state.testing.ready',
92
+ export_compliance_missing: 'testflight.build.state.export.compliance.missing',
93
+ review_rejected: 'testflight.build.state.review.rejected'
94
+ }
95
+
96
+ # Find a Build by `build_id`.
97
+ #
98
+ # @return (Spaceship::TestFlight::Build)
99
+ def self.find(app_id: nil, build_id: nil)
100
+ attrs = client.get_build(app_id: app_id, build_id: build_id)
101
+ self.new(attrs)
102
+ end
103
+
104
+ def self.all(app_id: nil, platform: nil, retry_count: 0)
105
+ trains = BuildTrains.all(app_id: app_id, platform: platform, retry_count: retry_count)
106
+ trains.values.flatten
107
+ end
108
+
109
+ def self.builds_for_train(app_id: nil, platform: nil, train_version: nil, retry_count: 3)
110
+ builds_data = client.get_builds_for_train(app_id: app_id, platform: platform, train_version: train_version, retry_count: retry_count)
111
+ builds_data.map { |data| self.new(data) }
112
+ end
113
+
114
+ # Just the builds, as a flat array, that are still processing
115
+ def self.all_processing_builds(app_id: nil, platform: nil, retry_count: 0)
116
+ all(app_id: app_id, platform: platform, retry_count: retry_count).find_all(&:processing?)
117
+ end
118
+
119
+ def self.latest(app_id: nil, platform: nil)
120
+ all(app_id: app_id, platform: platform).sort_by(&:upload_date).last
121
+ end
122
+
123
+ # reload the raw_data resource for this build.
124
+ # This is useful when we start with a partial build response as returned by the BuildTrains,
125
+ # but then need to look up some attributes on the full build representation.
126
+ #
127
+ # Note: this will overwrite any non-saved changes to the object
128
+ #
129
+ # @return (Spaceship::Base::DataHash) the raw_data of the build.
130
+ def reload
131
+ self.raw_data = self.class.find(app_id: app_id, build_id: id).raw_data
132
+ end
133
+
134
+ def ready_to_submit?
135
+ external_state == BUILD_STATES[:ready_to_submit]
136
+ end
137
+
138
+ def ready_to_test?
139
+ external_state == BUILD_STATES[:ready_to_test]
140
+ end
141
+
142
+ def active?
143
+ external_state == BUILD_STATES[:active]
144
+ end
145
+
146
+ def processing?
147
+ external_state == BUILD_STATES[:processing]
148
+ end
149
+
150
+ def export_compliance_missing?
151
+ external_state == BUILD_STATES[:export_compliance_missing]
152
+ end
153
+
154
+ def review_rejected?
155
+ external_state == BUILD_STATES[:review_rejected]
156
+ end
157
+
158
+ def processed?
159
+ active? || ready_to_submit? || export_compliance_missing? || review_rejected?
160
+ end
161
+
162
+ # Getting builds from BuildTrains only gets a partial Build object
163
+ # We are then requesting the full build from iTC when we need to access
164
+ # any of the variables below, because they are not included in the partial Build objects
165
+ #
166
+ # `super` here calls `beta_review_info` as defined by the `attr_mapping` above.
167
+ # @return (Spaceship::TestFlight::BetaReviewInfo)
168
+ def beta_review_info
169
+ super || reload
170
+ BetaReviewInfo.new(super)
171
+ end
172
+
173
+ # @return (Spaceship::TestFlight::ExportCompliance)
174
+ def export_compliance
175
+ super || reload
176
+ ExportCompliance.new(super)
177
+ end
178
+
179
+ # @return (Spaceship::TestFlight::TestInfo)
180
+ def test_info
181
+ super || reload
182
+ TestInfo.new(super)
183
+ end
184
+
185
+ # @return (Time) an parsed Time value for the upload_date
186
+ def upload_date
187
+ Time.parse(super)
188
+ end
189
+
190
+ # saves the changes to the Build object to TestFlight
191
+ def save!
192
+ client.put_build(app_id: app_id, build_id: id, build: self)
193
+ end
194
+
195
+ def update_build_information!(description: nil, feedback_email: nil, whats_new: nil)
196
+ test_info.description = description if description
197
+ test_info.feedback_email = feedback_email if feedback_email
198
+ test_info.whats_new = whats_new if whats_new
199
+ save!
200
+ end
201
+
202
+ def submit_for_testflight_review!
203
+ return if ready_to_test?
204
+ client.post_for_testflight_review(app_id: app_id, build_id: id, build: self)
205
+ end
206
+
207
+ def expire!
208
+ client.expire_build(app_id: app_id, build_id: id, build: self)
209
+ end
210
+
211
+ def add_group!(group)
212
+ client.add_group_to_build(app_id: app_id, group_id: group.id, build_id: id)
213
+ end
206
214
  end
207
215
  end
208
216
  end