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.
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
# File 'lib/pod_builder/podfile_item.rb', line 368 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}'" elsif @podspec_path e += ", :podspec => '#{@podspec_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 prebuilt_info_path = PodBuilder::prebuiltpath("#{root_name}/#{Configuration::prebuilt_info_filename}") if File.exist?(prebuilt_info_path) data = JSON.parse(File.read(prebuilt_info_path)) 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 |