Class: PodBuilder::Podspec
- Inherits:
-
Object
- Object
- PodBuilder::Podspec
- Defined in:
- lib/pod_builder/podspec.rb
Class Method Summary collapse
Class Method Details
.generate(analyzer) ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/pod_builder/podspec.rb', line 32 def self.generate(analyzer) puts "Generating PodBuilder's local podspec".yellow buildable_items = Podfile.podfile_items_at(PodBuilder::basepath("Podfile")).sort_by { |x| x.name } podspec_items = podspec_items_from(buildable_items) platform = analyzer.result.targets.first.platform generate_podspec_from(podspec_items, platform) end |
.include?(pod_name) ⇒ Boolean
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/pod_builder/podspec.rb', line 43 def self.include?(pod_name) podspec_path = PodBuilder::basepath("PodBuilder.podspec") unless File.exist?(podspec_path) return false end if Configuration.subspecs_to_split.include?(pod_name) pod_name = pod_name.gsub("/", "_") else pod_name = pod_name.split("/").first end podspec_content = File.read(podspec_path) return podspec_content.include?("s.subspec '#{pod_name}' do |p|") end |