Method: PodBuilder::PodfileItem#entry

Defined in:
lib/pod_builder/podfile_item.rb

#entry(include_version = true, include_pb_entry = true) ⇒ String

Returns The podfile entry.

Returns:

  • (String)

    The podfile entry



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/pod_builder/podfile_item.rb', line 245

def entry(include_version = true, include_pb_entry = true)
  e = "pod '#{@name}'"

  unless include_version
    return e
  end

  if is_external
    if @path
      e += ", :path => '#{@path}'"  
    else
      if @repo
        e += ", :git => '#{@repo}'"  
      end
      if @tag
        e += ", :tag => '#{@tag}'"
      end
      if @commit
        e += ", :commit => '#{@commit}'"  
      end
      if @branch
        e += ", :branch => '#{@branch}'"  
      end
    end
  else
    e += ", '=#{@version}'"  
  end

  if include_pb_entry && !is_prebuilt
    plists = Dir.glob(PodBuilder::basepath("Rome/**/#{module_name}.framework/#{Configuration::framework_plist_filename}"))
    if plists.count > 0
      plist = CFPropertyList::List.new(:file => plists.first)
      data = CFPropertyList.native_types(plist.value)
      swift_version = data["swift_version"]
      is_static = data["is_static"] || false
    
      e += "#{prebuilt_marker()} is<#{is_static}>"
      if swift_version
        e += " sv<#{swift_version}>"
      end
    else
      e += prebuilt_marker()
    end
  end

  return e
end