<commit_before>require 'pathname'

module Pod
  class Config
    def self.instance
      @instance ||= new
    end

    def self.instance=(instance)
      @instance = instance
    end

    attr_accessor :repos_dir, :project_root, :project_pods_root
    attr_accessor :clean, :verbose, :silent
    attr_accessor :doc, :doc_install, :force_doc
    attr_accessor :integrate_targets

    alias_method :clean?,             :clean
    alias_method :verbose?,           :verbose
    alias_method :silent?,            :silent
    alias_method :doc?,               :doc # TODO rename to generate_docs?
    alias_method :doc_install?,       :doc_install
    alias_method :force_doc?,         :force_doc
    alias_method :integrate_targets?, :integrate_targets

    def initialize
      @repos_dir = Pathname.new(File.expand_path("~/.cocoapods"))
      @verbose = @silent = @force_doc = false
      @clean = @doc = @doc_install = @integrate_targets = true
    end

    def project_root
      @project_root ||= Pathname.pwd
    end

    def project_pods_root
      @project_pods_root ||= project_root + 'Pods'
    end

    def project_podfile
      @project_podfile ||= project_root + 'Podfile'
    end

    def headers_symlink_root
      @headers_symlink_root ||= "#{project_pods_root}/Headers"
    end

    # Returns the spec at the pat returned from `project_podfile`.
    def podfile
      @podfile ||= begin
        Podfile.from_file(project_podfile) if project_podfile.exist?
      end
    end

    def ios?
      require 'colored'
      caller.find { |line| line =~ /^(.+.podspec):\d*/ }
      puts "[!] The use of `config.ios?` is deprecated and will be removed in version 0.7.#{" Called from: #{$1}" if $1}".red
      podfile.target_definitions[:default].platform == :ios if podfile
    end

    def osx?
      require 'colored'
      caller.find { |line| line =~ /^(.+.podspec):\d*/ }
      puts "[!] The use of `config.ios?` is deprecated and will be removed in version 0.7.#{" Called from: #{$1}" if $1}".red
      podfile.target_definitions[:default].platform == :osx if podfile
    end

    module Mixin
      def config
        Config.instance
      end
    end
  end
end<commit_msg>fix typo in deprecation warning on config.osx? method<commit_after>require 'pathname'

module Pod
  class Config
    def self.instance
      @instance ||= new
    end

    def self.instance=(instance)
      @instance = instance
    end

    attr_accessor :repos_dir, :project_root, :project_pods_root
    attr_accessor :clean, :verbose, :silent
    attr_accessor :doc, :doc_install, :force_doc
    attr_accessor :integrate_targets

    alias_method :clean?,             :clean
    alias_method :verbose?,           :verbose
    alias_method :silent?,            :silent
    alias_method :doc?,               :doc # TODO rename to generate_docs?
    alias_method :doc_install?,       :doc_install
    alias_method :force_doc?,         :force_doc
    alias_method :integrate_targets?, :integrate_targets

    def initialize
      @repos_dir = Pathname.new(File.expand_path("~/.cocoapods"))
      @verbose = @silent = @force_doc = false
      @clean = @doc = @doc_install = @integrate_targets = true
    end

    def project_root
      @project_root ||= Pathname.pwd
    end

    def project_pods_root
      @project_pods_root ||= project_root + 'Pods'
    end

    def project_podfile
      @project_podfile ||= project_root + 'Podfile'
    end

    def headers_symlink_root
      @headers_symlink_root ||= "#{project_pods_root}/Headers"
    end

    # Returns the spec at the pat returned from `project_podfile`.
    def podfile
      @podfile ||= begin
        Podfile.from_file(project_podfile) if project_podfile.exist?
      end
    end

    def ios?
      require 'colored'
      caller.find { |line| line =~ /^(.+.podspec):\d*/ }
      puts "[!] The use of `config.ios?` is deprecated and will be removed in version 0.7.#{" Called from: #{$1}" if $1}".red
      podfile.target_definitions[:default].platform == :ios if podfile
    end

    def osx?
      require 'colored'
      caller.find { |line| line =~ /^(.+.podspec):\d*/ }
      puts "[!] The use of `config.osx?` is deprecated and will be removed in version 0.7.#{" Called from: #{$1}" if $1}".red
      podfile.target_definitions[:default].platform == :osx if podfile
    end

    module Mixin
      def config
        Config.instance
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10743427017225748, 'fraction_numerical': 0.003626473254759746, 'mean_word_length': 2.6380873866446826, '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': '5735660', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1392, 'n_words': 370}