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
dd70ffdd
Commit
dd70ffdd
authored
Sep 19, 2014
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2489 from laiso/json_spec
[Installer] Load '*.podspec.json' file from `:path` directive.
parents
f317cf7a
fb2478f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
CHANGELOG.md
CHANGELOG.md
+8
-0
path_source.rb
lib/cocoapods/external_sources/path_source.rb
+3
-2
path_source_spec.rb
spec/unit/external_sources/path_source_spec.rb
+7
-0
No files found.
CHANGELOG.md
View file @
dd70ffdd
...
...
@@ -2,6 +2,14 @@
To install or update CocoaPods see this
[
guide
](
http://docs.cocoapods.org/guides/installing_cocoapods.html
)
.
## Master
##### Bug Fixes
*
Fixes the detection of JSON podspecs included via
`:path`
.
[
laiso
](
https://github.com/laiso
)
[
#2489
](
https://github.com/CocoaPods/CocoaPods/pull/2489
)
## 0.34.0.rc2
...
...
lib/cocoapods/external_sources/path_source.rb
View file @
dd70ffdd
...
...
@@ -16,7 +16,7 @@ module Pod
raise
Informative
,
"No podspec found for `
#{
name
}
` in "
\
"`
#{
declared_path
}
`"
end
store_podspec
(
sandbox
,
podspec
)
store_podspec
(
sandbox
,
podspec
,
podspec
.
extname
==
'.json'
)
is_absolute
=
absolute?
(
declared_path
)
sandbox
.
store_local_path
(
name
,
podspec
.
dirname
,
is_absolute
)
end
...
...
@@ -42,7 +42,8 @@ module Pod
# @return [Pathname] The absolute path of the podspec.
#
def
podspec_path
Pathname
(
normalized_podspec_path
(
declared_path
))
path
=
Pathname
(
normalized_podspec_path
(
declared_path
))
path
.
exist?
?
path
:
Pathname
(
"
#{
path
}
.json"
)
end
# @return [Bool]
...
...
spec/unit/external_sources/path_source_spec.rb
View file @
dd70ffdd
...
...
@@ -87,6 +87,13 @@ module Pod
path
=
@subject
.
send
(
:podspec_path
)
path
.
should
==
Pathname
(
ENV
[
'HOME'
])
+
'Reachability/Reachability.podspec'
end
it
'falls back to .podspec.json when .podspec doesnt exist'
do
@subject
.
stubs
(
:params
).
returns
(
:path
=>
'Reachability'
)
Pathname
.
any_instance
.
stubs
(
:exist?
).
returns
(
false
)
path
=
@subject
.
send
(
:podspec_path
)
path
.
should
==
fixture
(
'integration/Reachability/Reachability.podspec.json'
)
end
end
describe
'#absolute?'
do
...
...
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