lib/cocoapods_acknowledgements.rb in cocoapods-acknowledgements-1.1.2 vs lib/cocoapods_acknowledgements.rb in cocoapods-acknowledgements-1.1.3
- old
+ new
@@ -30,13 +30,13 @@
project.save
end
- # TODO: Code golf this
- def self.settings_bundle_in_project
- Dir.glob("**/*Settings.bundle").first
+ def self.settings_bundle_in_project(project)
+ file = project.files.find { |f| f.path =~ /Settings\.bundle$/ }
+ file.real_path.to_path unless file.nil?
end
Pod::HooksManager.register('cocoapods-acknowledgements', :post_install) do |context, user_options|
require 'cocoapods'
require 'set'
@@ -75,10 +75,10 @@
settings_metadata = SettingsPlistGenerator.generate(umbrella_target, sandbox, excluded_pods)
# We need to look for a Settings.bundle
# and add this to the root of the bundle
- settings_bundle = settings_bundle_in_project
+ settings_bundle = settings_bundle_in_project(project)
if settings_bundle == nil
Pod::UI.warn "Could not find a Settings.bundle to add the Pod Settings Plist to."
else
settings_plist_path = settings_bundle + "/#{umbrella_target.cocoapods_target_label}-settings-metadata.plist"
save_metadata(settings_metadata, settings_plist_path, project, sandbox, user_target_uuid)