Class: LicenseFinder::CocoaPods
Instance Method Summary
collapse
#active?, #command_exists?, #current_packages_with_relations, #detected_package_path, id, #initialize, #installed?, #prepare, #prepare_command, #project_root?, takes_priority_over
Instance Method Details
#current_packages ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/license_finder/package_managers/cocoa_pods.rb', line 7
def current_packages
podfile = YAML.load_file(lockfile_path)
podfile['PODS'].map do |pod|
pod = pod.keys.first if pod.is_a?(Hash)
name, version = pod.scan(/(.*)\s\((.*)\)/).flatten
CocoaPodsPackage.new(
name,
version,
license_texts[name],
logger: logger
)
end
end
|
#package_management_command ⇒ Object
24
25
26
|
# File 'lib/license_finder/package_managers/cocoa_pods.rb', line 24
def package_management_command
LicenseFinder::Platform.darwin? ? 'pod' : nil
end
|
#possible_package_paths ⇒ Object
28
29
30
|
# File 'lib/license_finder/package_managers/cocoa_pods.rb', line 28
def possible_package_paths
[project_path.join('Podfile')]
end
|