Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
4f14c872
Commit
4f14c872
authored
Mar 30, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Sandbox] Cache “Local Podspec” specs
parent
505f9395
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
abstract_external_source.rb
lib/cocoapods/external_sources/abstract_external_source.rb
+2
-0
sandbox.rb
lib/cocoapods/sandbox.rb
+8
-8
No files found.
lib/cocoapods/external_sources/abstract_external_source.rb
View file @
4f14c872
...
@@ -170,8 +170,10 @@ module Pod
...
@@ -170,8 +170,10 @@ module Pod
rescue
Pod
::
DSLError
=>
e
rescue
Pod
::
DSLError
=>
e
raise
Informative
,
"Failed to load '
#{
name
}
' podspec:
#{
e
.
message
}
"
raise
Informative
,
"Failed to load '
#{
name
}
' podspec:
#{
e
.
message
}
"
end
end
defined_in_file
=
spec
.
defined_in_file
spec
.
defined_in_file
=
nil
spec
.
defined_in_file
=
nil
validate_podspec
(
spec
)
validate_podspec
(
spec
)
spec
.
defined_in_file
=
defined_in_file
sandbox
.
store_podspec
(
name
,
spec
,
true
,
true
)
sandbox
.
store_podspec
(
name
,
spec
,
true
,
true
)
end
end
...
...
lib/cocoapods/sandbox.rb
View file @
4f14c872
...
@@ -62,6 +62,7 @@ module Pod
...
@@ -62,6 +62,7 @@ module Pod
@checkout_sources
=
{}
@checkout_sources
=
{}
@development_pods
=
{}
@development_pods
=
{}
@pods_with_absolute_path
=
[]
@pods_with_absolute_path
=
[]
@stored_podspecs
=
{}
end
end
# @return [Lockfile] the manifest which contains the information about the
# @return [Lockfile] the manifest which contains the information about the
...
@@ -209,7 +210,7 @@ module Pod
...
@@ -209,7 +210,7 @@ module Pod
# @return [Specification] the specification if the file is found.
# @return [Specification] the specification if the file is found.
#
#
def
specification
(
name
)
def
specification
(
name
)
if
file
=
specification_path
(
name
)
@stored_podspecs
[
name
]
||=
if
file
=
specification_path
(
name
)
original_path
=
development_pods
[
name
]
original_path
=
development_pods
[
name
]
Specification
.
from_file
(
original_path
||
file
)
Specification
.
from_file
(
original_path
||
file
)
end
end
...
@@ -262,20 +263,19 @@ module Pod
...
@@ -262,20 +263,19 @@ module Pod
end
end
FileUtils
.
copy
(
podspec
,
output_path
)
FileUtils
.
copy
(
podspec
,
output_path
)
when
Specification
when
Specification
raise
ArgumentError
unless
json
output_path
.
open
(
'w'
)
{
|
f
|
f
.
puts
(
podspec
.
to_pretty_json
)
}
output_path
.
open
(
'w'
)
{
|
f
|
f
.
puts
(
podspec
.
to_pretty_json
)
}
spec
=
podspec
.
dup
spec
=
podspec
.
dup
spec
.
defined_in_file
=
output_path
spec
.
defined_in_file
=
output_path
else
raise
ArgumentError
end
end
spec
||=
Dir
.
chdir
(
podspec
.
is_a?
(
Pathname
)
?
File
.
dirname
(
podspec
)
:
Dir
.
pwd
)
do
spec
||=
Specification
.
from_file
(
output_path
)
spec
=
Specification
.
from_file
(
output_path
)
unless
spec
.
name
==
name
unless
spec
.
name
==
name
raise
Informative
,
"The name of the given podspec `
#{
spec
.
name
}
` doesn't match the expected one `
#{
name
}
`"
raise
Informative
,
"The name of the given podspec `
#{
spec
.
name
}
` doesn't match the expected one `
#{
name
}
`"
end
spec
end
end
@stored_podspecs
[
spec
.
name
]
=
spec
end
end
#-------------------------------------------------------------------------#
#-------------------------------------------------------------------------#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment