Sha256: 30105fd3f57eec1d6f0d81b8176c33f2246b2235b3e7db8ce2a75e4642dae057

Contents?: true

Size: 1.22 KB

Versions: 12

Compression:

Stored size: 1.22 KB

Contents

require 'singleton'
require 'cocoapods'
require 'cocoapods-core'

module LgPodPlugin

  class LProject
    include Singleton

    attr_reader :podfile
    attr_reader :lockfile
    attr_reader :update
    attr_reader :targets
    attr_reader :workspace
    attr_reader :repo_update
    attr_reader :external_pods
    attr_reader :need_update_pods
    attr_accessor :cache_specs
    def setup(workspace,podfile_path, update, repo_update)
      @podfile = Pod::Podfile.from_file(podfile_path)
      @update = update
      @workspace = workspace
      @repo_update = repo_update
      lockfile_path = workspace.join("Podfile.lock")
      @lockfile = Pod::Lockfile.from_file(lockfile_path) if lockfile_path.exist?
      target =  @podfile.send(:current_target_definition)
      children = target.children
      @targets = Array.new
      external_pods = Hash.new
      children.each do |s|
        target = LPodTarget.new(s)
        external_pods.merge!(target.dependencies)
        @targets.append(target)
      end
      @cache_specs = Hash.new
      @external_pods = Hash.new.merge!(external_pods)
      @need_update_pods = Hash.new.merge!(external_pods)
      self
    end

    def self.shared
      return LProject.instance
    end

  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
lg_pod_plugin-1.1.5.9 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.5.7 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.5.6 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.5.5 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.5.4 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.5.3 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.5.2 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.5.1 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.4.4 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.4.3 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.4.2 lib/lg_pod_plugin/installer/project.rb
lg_pod_plugin-1.1.4 lib/lg_pod_plugin/installer/project.rb