fastlane 2.156.1 → 2.157.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +82 -82
  3. data/deliver/lib/deliver.rb +1 -0
  4. data/deliver/lib/deliver/app_screenshot_iterator.rb +26 -29
  5. data/deliver/lib/deliver/detect_values.rb +4 -1
  6. data/deliver/lib/deliver/languages.rb +7 -0
  7. data/deliver/lib/deliver/loader.rb +4 -5
  8. data/deliver/lib/deliver/runner.rb +8 -5
  9. data/deliver/lib/deliver/upload_screenshots.rb +34 -17
  10. data/fastlane/lib/fastlane/actions/{.git_commit.rb.swp → .ensure_git_status_clean.rb.swp} +0 -0
  11. data/fastlane/lib/fastlane/actions/.hockey.rb.swp +0 -0
  12. data/fastlane/lib/fastlane/actions/.slack.rb.swp +0 -0
  13. data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
  14. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +12 -8
  15. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +120 -0
  16. data/fastlane/lib/fastlane/actions/commit_version_bump.rb +1 -1
  17. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -0
  18. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +17 -1
  19. data/fastlane/lib/fastlane/actions/download_dsyms.rb +89 -68
  20. data/fastlane/lib/fastlane/actions/set_changelog.rb +3 -2
  21. data/fastlane/lib/fastlane/actions/sonar.rb +5 -0
  22. data/fastlane/lib/fastlane/actions/spaceship_stats.rb +73 -0
  23. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +4 -0
  24. data/fastlane/lib/fastlane/version.rb +1 -1
  25. data/fastlane/swift/Deliverfile.swift +1 -1
  26. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  27. data/fastlane/swift/Fastlane.swift +78 -18
  28. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  29. data/fastlane/swift/Gymfile.swift +1 -1
  30. data/fastlane/swift/GymfileProtocol.swift +1 -1
  31. data/fastlane/swift/Matchfile.swift +1 -1
  32. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  33. data/fastlane/swift/Precheckfile.swift +1 -1
  34. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  35. data/fastlane/swift/Scanfile.swift +1 -1
  36. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  37. data/fastlane/swift/Screengrabfile.swift +1 -1
  38. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  39. data/fastlane/swift/Snapshotfile.swift +1 -1
  40. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  41. data/fastlane_core/lib/fastlane_core/command_executor.rb +1 -0
  42. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +71 -42
  43. data/gym/lib/gym/error_handler.rb +1 -1
  44. data/match/lib/match/spaceship_ensure.rb +5 -5
  45. data/{fastlane/lib/fastlane/.erb_template_helper.rb.swp → pilot/lib/pilot/.manager.rb.swp} +0 -0
  46. data/pilot/lib/pilot/build_manager.rb +15 -4
  47. data/pilot/lib/pilot/manager.rb +15 -5
  48. data/pilot/lib/pilot/options.rb +16 -0
  49. data/produce/lib/produce/itunes_connect.rb +3 -2
  50. data/screengrab/lib/screengrab/runner.rb +29 -10
  51. data/sigh/lib/assets/resign.sh +9 -6
  52. data/sigh/lib/sigh/runner.rb +5 -4
  53. data/spaceship/lib/spaceship.rb +4 -0
  54. data/spaceship/lib/spaceship/client.rb +3 -0
  55. data/spaceship/lib/spaceship/connect_api.rb +1 -15
  56. data/spaceship/lib/spaceship/{.DS_Store → connect_api/.DS_Store} +0 -0
  57. data/spaceship/lib/spaceship/connect_api/api_client.rb +270 -0
  58. data/spaceship/lib/spaceship/connect_api/client.rb +155 -210
  59. data/spaceship/lib/spaceship/connect_api/file_uploader.rb +2 -0
  60. data/spaceship/lib/spaceship/connect_api/models/app.rb +5 -5
  61. data/spaceship/lib/spaceship/connect_api/models/app_price_point.rb +26 -0
  62. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +7 -1
  63. data/spaceship/lib/spaceship/connect_api/provisioning/client.rb +8 -17
  64. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +75 -64
  65. data/spaceship/lib/spaceship/connect_api/spaceship.rb +98 -0
  66. data/spaceship/lib/spaceship/connect_api/testflight/client.rb +8 -17
  67. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +288 -277
  68. data/spaceship/lib/spaceship/connect_api/token.rb +46 -5
  69. data/spaceship/lib/spaceship/connect_api/token_refresh_middleware.rb +24 -0
  70. data/spaceship/lib/spaceship/connect_api/tunes/client.rb +8 -17
  71. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +725 -706
  72. data/spaceship/lib/spaceship/connect_api/users/client.rb +8 -17
  73. data/spaceship/lib/spaceship/connect_api/users/users.rb +28 -17
  74. data/spaceship/lib/spaceship/stats_middleware.rb +65 -0
  75. metadata +33 -22
  76. data/spaceship/lib/spaceship/connect_api/.client.rb.swp +0 -0
@@ -1,27 +1,18 @@
1
- require_relative '../client'
1
+ require_relative '../api_client'
2
+ require_relative './users'
2
3
  require_relative '../../tunes/tunes_client'
3
4
 
4
5
  module Spaceship
5
6
  class ConnectAPI
6
7
  module Users
7
- class Client < Spaceship::ConnectAPI::Client
8
- def self.instance
9
- # Verify there is a token or a client that can be used
10
- if Spaceship::ConnectAPI.token
11
- if @client.nil? || @client.token != Spaceship::ConnectAPI.token
12
- @client = Client.new(token: Spaceship::ConnectAPI.token)
13
- end
14
- elsif Spaceship::Tunes.client
15
- # Initialize new client if new or if team changed
16
- if @client.nil? || @client.team_id != Spaceship::Tunes.client.team_id
17
- @client = Client.client_with_authorization_from(Spaceship::Tunes.client)
18
- end
19
- end
8
+ class Client < Spaceship::ConnectAPI::APIClient
9
+ def initialize(cookie: nil, current_team_id: nil, token: nil, another_client: nil)
10
+ another_client ||= Spaceship::Tunes.client if cookie.nil? && token.nil?
20
11
 
21
- # Need to handle not having a client but this shouldn't ever happen
22
- raise "Please login using `Spaceship::Tunes.login('user', 'password')`" unless @client
12
+ super(cookie: cookie, current_team_id: current_team_id, token: token, another_client: another_client)
23
13
 
24
- @client
14
+ self.extend(Spaceship::ConnectAPI::Users::API)
15
+ self.users_request_client = self
25
16
  end
26
17
 
27
18
  def self.hostname
@@ -3,26 +3,37 @@ require 'spaceship/connect_api/users/client'
3
3
  module Spaceship
4
4
  class ConnectAPI
5
5
  module Users
6
- #
7
- # users
8
- #
6
+ module API
7
+ def users_request_client=(users_request_client)
8
+ @users_request_client = users_request_client
9
+ end
9
10
 
10
- def get_users(filter: {}, includes: nil, limit: nil, sort: nil)
11
- params = Client.instance.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
12
- Client.instance.get("users", params)
13
- end
11
+ def users_request_client
12
+ return @users_request_client if @users_request_client
13
+ raise TypeError, "You need to instantiate this module with users_request_client"
14
+ end
15
+
16
+ #
17
+ # users
18
+ #
19
+
20
+ def get_users(filter: {}, includes: nil, limit: nil, sort: nil)
21
+ params = users_request_client.build_params(filter: filter, includes: includes, limit: limit, sort: sort)
22
+ users_request_client.get("users", params)
23
+ end
14
24
 
15
- def add_user_visible_apps(user_id: nil, app_ids: nil)
16
- body = {
17
- data: app_ids.map do |app_id|
18
- {
19
- type: "apps",
20
- id: app_id
21
- }
22
- end
23
- }
25
+ def add_user_visible_apps(user_id: nil, app_ids: nil)
26
+ body = {
27
+ data: app_ids.map do |app_id|
28
+ {
29
+ type: "apps",
30
+ id: app_id
31
+ }
32
+ end
33
+ }
24
34
 
25
- Client.instance.post("users/#{user_id}/relationships/visibleApps", body)
35
+ users_request_client.post("users/#{user_id}/relationships/visibleApps", body)
36
+ end
26
37
  end
27
38
  end
28
39
  end
@@ -0,0 +1,65 @@
1
+ require 'faraday'
2
+
3
+ require_relative 'globals'
4
+
5
+ module Spaceship
6
+ class StatsMiddleware < Faraday::Middleware
7
+ ServiceOption = Struct.new(:name, :url, :auth_type)
8
+ URLLog = Struct.new(:url, :auth_type)
9
+ class << self
10
+ def services
11
+ return @services if @services
12
+
13
+ require_relative 'tunes/tunes_client'
14
+ require_relative 'portal/portal_client'
15
+ require_relative 'connect_api/testflight/client'
16
+ require_relative 'connect_api/provisioning/client'
17
+
18
+ @services ||= [
19
+ ServiceOption.new("App Store Connect API (official)", "api.appstoreconnect.apple.com", "JWT"),
20
+ ServiceOption.new("App Store Connect API (web session)", Spaceship::ConnectAPI::TestFlight::Client.hostname.gsub("https://", ""), "Web session"),
21
+ ServiceOption.new("App Store Connect API (web session)", Spaceship::ConnectAPI::Provisioning::Client.hostname.gsub("https://", ""), "Web session"),
22
+ ServiceOption.new("Legacy iTunesConnect Auth", "idmsa.apple.com", "Web session"),
23
+ ServiceOption.new("Legacy iTunesConnect Auth", "appstoreconnect.apple.com/olympus/v1/", "Web session"),
24
+ ServiceOption.new("Legacy iTunesConnect", Spaceship::TunesClient.hostname.gsub("https://", ""), "Web session"),
25
+ ServiceOption.new("Legacy iTunesConnect Developer Portal", Spaceship::PortalClient.hostname.gsub("https://", ""), "Web session")
26
+ ]
27
+ end
28
+
29
+ def service_stats
30
+ @service_stats ||= Hash.new(0)
31
+ end
32
+
33
+ def request_logs
34
+ @request_logs ||= []
35
+ @request_logs
36
+ end
37
+ end
38
+
39
+ def initialize(app)
40
+ super(app)
41
+ end
42
+
43
+ def call(env)
44
+ log(env)
45
+ @app.call(env)
46
+ end
47
+
48
+ def log(env)
49
+ return false unless env && env.url && (uri = URI.parse(env.url.to_s))
50
+ service = StatsMiddleware.services.find do |s|
51
+ uri.to_s.include?(s.url)
52
+ end
53
+
54
+ service = ServiceOption.new("Unknown", uri.host, "Unknown") if service.nil?
55
+ StatsMiddleware.service_stats[service] += 1
56
+
57
+ StatsMiddleware.request_logs << URLLog.new(uri.to_s, service.auth_type)
58
+
59
+ return true
60
+ rescue => e
61
+ puts("Failed to log spaceship stats - #{e.message}") if Spaceship::Globals.verbose?
62
+ return false
63
+ end
64
+ end
65
+ end
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.156.1
4
+ version: 2.157.4
5
5
  platform: ruby
6
6
  authors:
7
+ - Josh Holtz
8
+ - Manu Wallner
9
+ - Fumiya Nakamura
10
+ - Helmut Januschka
11
+ - Olivier Halligon
7
12
  - Aaron Brager
8
13
  - Luka Mirosevic
9
14
  - Maksym Grebenets
10
- - Jorge Revuelta H
11
- - Manu Wallner
12
- - Stefan Natchev
13
- - Andrew McBurney
14
- - Matthew Ellis
15
- - Josh Holtz
16
- - Max Ott
17
15
  - Iulian Onofrei
18
- - Joshua Liebowitz
19
- - Jimmy Dee
20
- - Daniel Jankowski
21
- - Jan Piotrowski
22
- - Kohki Miki
23
16
  - Jérôme Lacoste
24
- - Fumiya Nakamura
25
- - Olivier Halligon
17
+ - Jimmy Dee
26
18
  - Felix Krause
19
+ - Jorge Revuelta H
20
+ - Stefan Natchev
21
+ - Jan Piotrowski
22
+ - Max Ott
27
23
  - Danielle Tomlinson
28
- - Helmut Januschka
24
+ - Kohki Miki
25
+ - Daniel Jankowski
26
+ - Joshua Liebowitz
27
+ - Andrew McBurney
28
+ - Matthew Ellis
29
29
  autorequire:
30
30
  bindir: bin
31
31
  cert_chain: []
32
- date: 2020-08-13 00:00:00.000000000 Z
32
+ date: 2020-09-04 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: slack-notifier
@@ -950,6 +950,7 @@ files:
950
950
  - deliver/lib/deliver/download_screenshots.rb
951
951
  - deliver/lib/deliver/generate_summary.rb
952
952
  - deliver/lib/deliver/html_generator.rb
953
+ - deliver/lib/deliver/languages.rb
953
954
  - deliver/lib/deliver/loader.rb
954
955
  - deliver/lib/deliver/module.rb
955
956
  - deliver/lib/deliver/options.rb
@@ -979,10 +980,12 @@ files:
979
980
  - fastlane/lib/assets/s3_plist_template.erb
980
981
  - fastlane/lib/assets/s3_version_template.erb
981
982
  - fastlane/lib/fastlane.rb
982
- - fastlane/lib/fastlane/.erb_template_helper.rb.swp
983
983
  - fastlane/lib/fastlane/action.rb
984
984
  - fastlane/lib/fastlane/action_collector.rb
985
- - fastlane/lib/fastlane/actions/.git_commit.rb.swp
985
+ - fastlane/lib/fastlane/actions/.ensure_git_status_clean.rb.swp
986
+ - fastlane/lib/fastlane/actions/.hockey.rb.swp
987
+ - fastlane/lib/fastlane/actions/.slack.rb.swp
988
+ - fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp
986
989
  - fastlane/lib/fastlane/actions/README.md
987
990
  - fastlane/lib/fastlane/actions/actions_helper.rb
988
991
  - fastlane/lib/fastlane/actions/adb.rb
@@ -990,6 +993,7 @@ files:
990
993
  - fastlane/lib/fastlane/actions/add_extra_platforms.rb
991
994
  - fastlane/lib/fastlane/actions/add_git_tag.rb
992
995
  - fastlane/lib/fastlane/actions/app_store_build_number.rb
996
+ - fastlane/lib/fastlane/actions/app_store_connect_api_key.rb
993
997
  - fastlane/lib/fastlane/actions/appaloosa.rb
994
998
  - fastlane/lib/fastlane/actions/appetize.rb
995
999
  - fastlane/lib/fastlane/actions/appetize_viewing_url_generator.rb
@@ -1176,6 +1180,7 @@ files:
1176
1180
  - fastlane/lib/fastlane/actions/snapshot.rb
1177
1181
  - fastlane/lib/fastlane/actions/sonar.rb
1178
1182
  - fastlane/lib/fastlane/actions/spaceship_logs.rb
1183
+ - fastlane/lib/fastlane/actions/spaceship_stats.rb
1179
1184
  - fastlane/lib/fastlane/actions/splunkmint.rb
1180
1185
  - fastlane/lib/fastlane/actions/spm.rb
1181
1186
  - fastlane/lib/fastlane/actions/ssh.rb
@@ -1319,6 +1324,7 @@ files:
1319
1324
  - fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.pbxproj
1320
1325
  - fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
1321
1326
  - fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
1327
+ - fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate
1322
1328
  - fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme
1323
1329
  - fastlane/swift/FastlaneSwiftRunner/README.txt
1324
1330
  - fastlane/swift/Gymfile.swift
@@ -1478,6 +1484,7 @@ files:
1478
1484
  - pem/lib/pem/options.rb
1479
1485
  - pilot/README.md
1480
1486
  - pilot/lib/pilot.rb
1487
+ - pilot/lib/pilot/.manager.rb.swp
1481
1488
  - pilot/lib/pilot/build_manager.rb
1482
1489
  - pilot/lib/pilot/commands_generator.rb
1483
1490
  - pilot/lib/pilot/features.rb
@@ -1605,12 +1612,12 @@ files:
1605
1612
  - spaceship/lib/assets/languageMapping.json
1606
1613
  - spaceship/lib/assets/languageMappingReadable.json
1607
1614
  - spaceship/lib/spaceship.rb
1608
- - spaceship/lib/spaceship/.DS_Store
1609
1615
  - spaceship/lib/spaceship/base.rb
1610
1616
  - spaceship/lib/spaceship/client.rb
1611
1617
  - spaceship/lib/spaceship/commands_generator.rb
1612
1618
  - spaceship/lib/spaceship/connect_api.rb
1613
- - spaceship/lib/spaceship/connect_api/.client.rb.swp
1619
+ - spaceship/lib/spaceship/connect_api/.DS_Store
1620
+ - spaceship/lib/spaceship/connect_api/api_client.rb
1614
1621
  - spaceship/lib/spaceship/connect_api/client.rb
1615
1622
  - spaceship/lib/spaceship/connect_api/file_uploader.rb
1616
1623
  - spaceship/lib/spaceship/connect_api/model.rb
@@ -1622,6 +1629,7 @@ files:
1622
1629
  - spaceship/lib/spaceship/connect_api/models/app_preview.rb
1623
1630
  - spaceship/lib/spaceship/connect_api/models/app_preview_set.rb
1624
1631
  - spaceship/lib/spaceship/connect_api/models/app_price.rb
1632
+ - spaceship/lib/spaceship/connect_api/models/app_price_point.rb
1625
1633
  - spaceship/lib/spaceship/connect_api/models/app_price_tier.rb
1626
1634
  - spaceship/lib/spaceship/connect_api/models/app_screenshot.rb
1627
1635
  - spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb
@@ -1659,9 +1667,11 @@ files:
1659
1667
  - spaceship/lib/spaceship/connect_api/provisioning/client.rb
1660
1668
  - spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb
1661
1669
  - spaceship/lib/spaceship/connect_api/response.rb
1670
+ - spaceship/lib/spaceship/connect_api/spaceship.rb
1662
1671
  - spaceship/lib/spaceship/connect_api/testflight/client.rb
1663
1672
  - spaceship/lib/spaceship/connect_api/testflight/testflight.rb
1664
1673
  - spaceship/lib/spaceship/connect_api/token.rb
1674
+ - spaceship/lib/spaceship/connect_api/token_refresh_middleware.rb
1665
1675
  - spaceship/lib/spaceship/connect_api/tunes/client.rb
1666
1676
  - spaceship/lib/spaceship/connect_api/tunes/tunes.rb
1667
1677
  - spaceship/lib/spaceship/connect_api/users/client.rb
@@ -1700,6 +1710,7 @@ files:
1700
1710
  - spaceship/lib/spaceship/portal/website_push.rb
1701
1711
  - spaceship/lib/spaceship/provider.rb
1702
1712
  - spaceship/lib/spaceship/spaceauth_runner.rb
1713
+ - spaceship/lib/spaceship/stats_middleware.rb
1703
1714
  - spaceship/lib/spaceship/test_flight.rb
1704
1715
  - spaceship/lib/spaceship/test_flight/app_test_info.rb
1705
1716
  - spaceship/lib/spaceship/test_flight/base.rb
@@ -1816,7 +1827,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1816
1827
  - !ruby/object:Gem::Version
1817
1828
  version: '0'
1818
1829
  requirements: []
1819
- rubygems_version: 3.0.6
1830
+ rubygems_version: 3.0.3
1820
1831
  signing_key:
1821
1832
  specification_version: 4
1822
1833
  summary: The easiest way to automate beta deployments and releases for your iOS and