lib/cocoapods/app_group/setup.rb in cocoapods-app_group-0.4.0 vs lib/cocoapods/app_group/setup.rb in cocoapods-app_group-0.4.1
- old
+ new
@@ -21,26 +21,30 @@
pod_target = podfile.root_target_definitions.flat_map(&:children).find do |target|
target.label == "Pods-#{target}"
end
if pod_target
- pod_target.store_pod 'AppGroup', path: pod_path.relative_path_from(Pathname.pwd).to_path
+ pod_target.store_pod 'AppGroup', podspec: podspec_path.relative_path_from(Pathname.pwd).to_path
else
Pod::UI.puts "Could not find a target named '#{target}' in your Podfile. Stopping keys".red
end
end
else
# otherwise let it go in global
- podfile.pod 'AppGroup', path: pod_path.relative_path_from(Pathname.pwd).to_path
+ podfile.pod 'AppGroup', podspec: podspec_path.relative_path_from(Pathname.pwd).to_path
end
end
def root
Pod::Config.instance.installation_root
end
def pod_path
root.+('Pods/CocoaPodsAppGroup/')
+ end
+
+ def podspec_path
+ pod_path.join("AppGroup.podspec.json")
end
def template(name)
Pathname(__dir__) + '../../../templates' + name
end