<commit_before>module CocoapodsTapAcknowledgementsGenerator
  VERSION = "0.0.1"

  require 'cocoapods_install_metadata/plist_generator'

  Pod::Plugins.register(:post_install) do |options|
    require 'xcodeproj/ext'
    sandbox = Pod::Sandbox.new(options[:sandbox_root])
    options[:user_targets].each do |user_target|
      metadata = PlistGenerator.generate(user_target, sandbox)
      plist_path = sandbox.root + "#{user_target[:cocoapods_target_label]}-metadata.plist"
      Xcodeproj.write_plist(metadata, plist_path)


      user_target[:user_project_path]
      project = Xcodeproj::Project.open(user_target[:user_project_path])
      cocoapods_group = project.main_group["CocoaPods"]
      unless cocoapods_group
        cocoapods_group = project.main_group.new_group("CocoaPods", sandbox.root)
      end

      file_ref = cocoapods_group.files.find { |file| file.real_path == plist_path }
      unless file_ref
        file_ref = cocoapods_group.new_file(plist_path)
      end

      target = project.objects_by_uuid[user_target[:uuid]]
      unless target.resources_build_phase.files_references.include?(file_ref)
        target.add_resources([file_ref])
      end

      project.save
    end
  end

end
end<commit_msg>Stuff<commit_after>module CocoapodsTapAcknowledgementsGenerator
	VERSION = "0.0.1"

	require 'cocoapods_install_metadata/plist_generator'

	Pod::Plugins.register(:post_install) do |options|
		require 'xcodeproj/ext'
		sandbox = Pod::Sandbox.new(options[:sandbox_root])
		options[:user_targets].each do |user_target|
			metadata = PlistGenerator.generate(user_target, sandbox)
			plist_path = sandbox.root + "#{user_target[:cocoapods_target_label]}-metadata.plist"
			Xcodeproj.write_plist(metadata, plist_path)


			user_target[:user_project_path]
			project = Xcodeproj::Project.open(user_target[:user_project_path])
			cocoapods_group = project.main_group["CocoaPods"]
			unless cocoapods_group
				cocoapods_group = project.main_group.new_group("CocoaPods", sandbox.root)
			end

			file_ref = cocoapods_group.files.find { |file| file.real_path == plist_path }
			unless file_ref
				file_ref = cocoapods_group.new_file(plist_path)
			end

			target = project.objects_by_uuid[user_target[:uuid]]
			unless target.resources_build_phase.files_references.include?(file_ref)
				target.add_resources([file_ref])
			end

			project.save
		end
	end
end
{'fraction_non_alphanumeric': 0.1, 'fraction_numerical': 0.0025210084033613447, 'mean_word_length': 4.751207729468599, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5099723', 'n_tokens_mistral': 907, 'n_tokens_neox': 813, 'n_words': 110}