class CocoaPodsAcknowledgements::AddOns::SwiftPackageAccumulator
Public Class Methods
new(xcodeproj_path = nil)
click to toggle source
@param xcodeproj_path [Pathname] the directory to look for podspecs.
# File lib/cocoapods_acknowledgements/addons/swift_package_accumulator.rb, line 10 def initialize(xcodeproj_path = nil) if xcodeproj_path.nil? @files = [] else build_dir = %x{xcodebuild -project "#{xcodeproj_path}" -showBuildSettings | grep -m 1 BUILD_DIR | grep -oEi "\/.*"}.strip source_packages_dir = Pathname(build_dir) + "../../SourcePackages/checkouts" @files = Dir[source_packages_dir + "*/*.podspec"] # skip nested git submodules end end
Public Instance Methods
acknowledgements()
click to toggle source
@return [Array<Acknowledgement>] the array of Acknowledgement
objects.
# File lib/cocoapods_acknowledgements/addons/swift_package_accumulator.rb, line 22 def acknowledgements @files.map { |file| Acknowledgement.new(file) } end