<commit_before>require 'run_loop'

if RunLoop.const_defined?(:Ipa)
  "\033[34mRunLoop::Ipa patch can be removed.\033[0m"
else
  "\033[34mApplying RunLoop::Ipa patch.\033[0m"
  module RunLoop
    # A model of the an .ipa - a application binary for iOS devices.
    class Ipa


      # The path to this .ipa.
      # @!attribute [r] path
      # @return [String] A path to this .ipa.
      attr_reader :path

      # The bundle identifier of this ipa.
      # @!attribute [r] bundle_identifier
      # @return [String] The bundle identifier of this ipa; obtained by inspecting
      #  the app's Info.plist.
      attr_reader :bundle_identifier

      # Create a new ipa instance.
      # @param [String] path_to_ipa The path the .ipa file.
      # @return [Calabash::Ipa] A new ipa instance.
      # @raise [RuntimeError] If the file does not exist.
      # @raise [RuntimeError] If the file does not end in .ipa.
      def initialize(path_to_ipa)
        unless File.exist? path_to_ipa
          raise "Expected an ipa at '#{path_to_ipa}'"
        end

        unless path_to_ipa.end_with?('.ipa')
          raise "Expected '#{path_to_ipa}' to be"
        end
        @path = path_to_ipa
      end

      # @!visibility private
      def to_s
        "#<Ipa: #{bundle_identifier}: '#{path}'>"
      end

      # The bundle identifier of this ipa.
      # @return [String] A string representation of this ipa's CFBundleIdentifier
      # @raise [RuntimeError] If ipa does not expand into a Payload/<app name>.app<commit_msg>iOS run-loop patch: fixup ipa error message<commit_after>require 'run_loop'

if RunLoop.const_defined?(:Ipa)
  "\033[34mRunLoop::Ipa patch can be removed.\033[0m"
else
  "\033[34mApplying RunLoop::Ipa patch.\033[0m"
  module RunLoop
    # A model of the an .ipa - a application binary for iOS devices.
    class Ipa


      # The path to this .ipa.
      # @!attribute [r] path
      # @return [String] A path to this .ipa.
      attr_reader :path

      # The bundle identifier of this ipa.
      # @!attribute [r] bundle_identifier
      # @return [String] The bundle identifier of this ipa; obtained by inspecting
      #  the app's Info.plist.
      attr_reader :bundle_identifier

      # Create a new ipa instance.
      # @param [String] path_to_ipa The path the .ipa file.
      # @return [Calabash::Ipa] A new ipa instance.
      # @raise [RuntimeError] If the file does not exist.
      # @raise [RuntimeError] If the file does not end in .ipa.
      def initialize(path_to_ipa)
        unless File.exist? path_to_ipa
          raise "Expected an ipa at '#{path_to_ipa}'"
        end

        unless path_to_ipa.end_with?('.ipa')
          raise "Expected '#{path_to_ipa}' to be an ipa"
        end
        @path = path_to_ipa
      end

      # @!visibility private
      def to_s
        "#<Ipa: #{bundle_identifier}: '#{path}'>"
      end

      # The bundle identifier of this ipa.
      # @return [String] A string representation of this ipa's CFBundleIdentifier
      # @raise [RuntimeError] If ipa does not expand into a Payload/<app name>.app
{'fraction_non_alphanumeric': 0.09795653584171261, 'fraction_numerical': 0.01167693804735647, 'mean_word_length': 2.496598639455782, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '2950704', 'n_tokens_mistral': 998, 'n_tokens_neox': 982, 'n_words': 337}