lib/spaceship/tunes/tunes_client.rb in spaceship-0.27.1 vs lib/spaceship/tunes/tunes_client.rb in spaceship-0.27.2

- old
+ new

@@ -44,11 +44,16 @@ # @return (Array) A list of all available teams def teams return @teams if @teams r = request(:get, "ra/user/detail") - @teams = parse_response(r, 'data')['associatedAccounts'] + @teams = parse_response(r, 'data')['associatedAccounts'].sort_by do |team| + [ + team['contentProvider']['name'], + team['contentProvider']['contentProviderId'] + ] + end end # @return (String) The currently selected Team ID def team_id return @current_team_id if @current_team_id @@ -121,10 +126,11 @@ send_shared_login_request(user, password) end # rubocop:disable Metrics/CyclomaticComplexity # rubocop:disable Metrics/PerceivedComplexity + # rubocop:disable Metrics/AbcSize def handle_itc_response(raw) return unless raw return unless raw.kind_of? Hash data = raw['data'] || raw # sometimes it's with data, sometimes it isn't @@ -180,10 +186,11 @@ return data end # rubocop:enable Metrics/CyclomaticComplexity # rubocop:enable Metrics/PerceivedComplexity + # rubocop:enable Metrics/AbcSize ##################################################### # @!group Applications ##################################################### @@ -288,10 +295,10 @@ version_platform = platform['platformString'] app_version_data(app_id, version_platform: version_platform, version_id: version_id) end - def app_version_data(app_id, version_platform: nil, version_id:nil) + def app_version_data(app_id, version_platform: nil, version_id: nil) raise "app_id is required" unless app_id raise "version_platform is required" unless version_platform raise "version_id is required" unless version_id r = request(:get, "ra/apps/#{app_id}/platforms/#{version_platform}/versions/#{version_id}")