Module: Pod::Podfile::DSL

Defined in:
lib/cocoapods-byte-csjm/gm.rb

Instance Method Summary collapse

Instance Method Details

#gm_release_target!(option = true) ⇒ Object



640
641
642
# File 'lib/cocoapods-byte-csjm/gm.rb', line 640

def gm_release_target!(option = true)
  current_target_definition.gm_release_target!(option)
end

#original_pluginObject



666
# File 'lib/cocoapods-byte-csjm/gm.rb', line 666

alias_method :original_plugin, :plugin

#original_podObject



644
# File 'lib/cocoapods-byte-csjm/gm.rb', line 644

alias_method :original_pod, :pod

#plugin(name, options = {}) ⇒ Object



667
668
669
670
# File 'lib/cocoapods-byte-csjm/gm.rb', line 667

def plugin(name, options = {})
  GM::Recorder.instance.set_plugin_load true if name == 'cocoapods-byte-csjm'
  original_plugin(name, options)
end

#pod(name = nil, *requirements) ⇒ Object



645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
# File 'lib/cocoapods-byte-csjm/gm.rb', line 645

def pod(name = nil, *requirements)
  CSJMPlugin.action do |recoder|
    if recoder.get_global_note.auto_load
      unless current_target_definition.is_add_adapter_dependencys
        current_target_definition.is_add_adapter_dependencys = true
        Pod::UserInterface.section 'CSJM plugin start auto load dependencies ' do
          GM::Adn_Adapter.get_all_adapter.each {|item|
            if  GM::Recorder.instance.global_note.auto_load_whitelist.include?(GM::Adn_Adapter.get_adn item) || GM::Recorder.instance.global_note.auto_load_whitelist.size==0
              title_options = { :verbose_prefix => '-> '.green }
              Pod::UserInterface.titled_section("add #{item}", title_options)
              current_target_definition.store_pod(item,[String.new(">=0")] )
            end
          }
        end
      end
    end

  end
  original_pod(name, *requirements)
end

#use_gm_adapter_update!(option = true) ⇒ Object



636
637
638
# File 'lib/cocoapods-byte-csjm/gm.rb', line 636

def use_gm_adapter_update!(option = true)
  current_target_definition.use_gm_adapter_update!(option)
end