<commit_before># encoding: utf-8

module FIR
  module Build

    def build_ipa *args, options
      # initialize build options
      if File.exist?(args.first)
        build_dir = File.absolute_path(args.shift.to_s) # pop the first param
      else
        build_dir = Dir.pwd
      end

      build_cmd       = "xcodebuild build -sdk iphoneos"
      build_tmp_dir   = Dir.mktmpdir
      custom_settings = parse_custom_settings(args)         # ['a=1', 'b=2'] => { 'a' => '1', 'b' => '2' }
      configuration   = options[:configuration]
      target_name     = options[:target]
      scheme_name     = options[:scheme]
      output_path     = options[:output].blank? ? "#{build_dir}/build_ipa" : File.absolute_path(options[:output].to_s)<commit_msg>fix nil path<commit_after># encoding: utf-8

module FIR
  module Build

    def build_ipa *args, options
      # initialize build options
      if args.first.blank? || !File.exist?(args.first)
        build_dir = Dir.pwd
      else
        build_dir = File.absolute_path(args.shift.to_s) # pop the first param
      end

      build_cmd       = "xcodebuild build -sdk iphoneos"
      build_tmp_dir   = Dir.mktmpdir
      custom_settings = parse_custom_settings(args)         # ['a=1', 'b=2'] => { 'a' => '1', 'b' => '2' }
      configuration   = options[:configuration]
      target_name     = options[:target]
      scheme_name     = options[:scheme]
      output_path     = options[:output].blank? ? "#{build_dir}/build_ipa" : File.absolute_path(options[:output].to_s)
{'fraction_non_alphanumeric': 0.1250822909809085, 'fraction_numerical': 0.0065832784726793945, 'mean_word_length': 2.6803874092009687, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3909854', 'n_tokens_mistral': 491, 'n_tokens_neox': 489, 'n_words': 104}