Skip to content

Commit 34901cf

Browse files
author
GaoJi
committed
update folder function
1 parent 10c82da commit 34901cf

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/cocoapods-developing-folder/folder_DSL.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,24 @@ module Pod
44
class Podfile
55
module DSL
66

7-
def folder(path)
7+
def folder(path, *requirements)
88
basePath = Pathname.new path
9-
def import_pod(path)
9+
def import_pod(path, *requirements)
1010
podspec = path.children.find do |p|
1111
!p.directory? and p.extname == ".podspec"
1212
end
1313
if podspec != nil
14-
pod podspec.basename(".podspec").to_s, :path => path.to_path
14+
options = (requirements.last || {}).clone
15+
options[:path] = path.to_path
16+
pod(podspec.basename(".podspec").to_s, options)
1517
end
1618
path.children.each do |p|
1719
if p.directory?
18-
import_pod(p)
20+
import_pod(p, *requirements)
1921
end
2022
end
2123
end
22-
import_pod basePath
24+
import_pod basePath, *requirements
2325
end
2426

2527
end

0 commit comments

Comments
 (0)