<commit_before>require 'fastlane_core/itunes_connect/itunes_connect'

module Produce
  # Every method you call here, might take a time
  class ItunesConnect < FastlaneCore::ItunesConnect
    
    APPS_URL = "https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app"

    NEW_APP_CLASS = ".new-button.ng-isolate-scope"

    def run(config)
      @config = config

      if ENV["CREATED_NEW_APP_ID"].to_i > 0
        # We just created this App ID, this takes about 3 minutes to show up on iTunes Connect
        Helper.log.info "Waiting for 3 minutes to make sure, the App ID is synced to iTunes Connect".yellow
        sleep 180
        unless app_exists?
          Helper.log.info "Couldn't find new app yet, we're waiting for another 2 minutes.".yellow
          sleep 120
        end
      end
<commit_msg>Workaround aroung iTunes Connect caching<commit_after>require 'fastlane_core/itunes_connect/itunes_connect'

module Produce
  # Every method you call here, might take a time
  class ItunesConnect < FastlaneCore::ItunesConnect
    
    APPS_URL = "https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app"

    NEW_APP_CLASS = ".new-button.ng-isolate-scope"

    def run(config)
      @config = config

      if ENV["CREATED_NEW_APP_ID"].to_i > 0
        # We just created this App ID, this takes about 3 minutes to show up on iTunes Connect
        Helper.log.info "Waiting for 3 minutes to make sure, the App ID is synced to iTunes Connect".yellow
        sleep 180
        open_new_app_popup # for some reason, we have to refresh the page twice to get it working
        
        unless app_exists?
          Helper.log.info "Couldn't find new app yet, we're waiting for another 2 minutes.".yellow
          sleep 120
        end
      end

{'fraction_non_alphanumeric': 0.07086614173228346, 'fraction_numerical': 0.01124859392575928, 'mean_word_length': 2.801282051282051, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6485697', 'n_tokens_mistral': 572, 'n_tokens_neox': 521, 'n_words': 179}