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
76892430
Commit
76892430
authored
May 07, 2015
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[pod repo push] Improve error when podspec is missing
Ref #3494
parent
aa11287e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
push.rb
lib/cocoapods/command/repo/push.rb
+9
-3
push_spec.rb
spec/functional/command/repo/push_spec.rb
+6
-0
No files found.
lib/cocoapods/command/repo/push.rb
View file @
76892430
...
@@ -190,9 +190,15 @@ module Pod
...
@@ -190,9 +190,15 @@ module Pod
# @return [Array<Pathname>] The path of the specifications to push.
# @return [Array<Pathname>] The path of the specifications to push.
#
#
def
podspec_files
def
podspec_files
files
=
Pathname
.
glob
(
@podspec
||
'*.podspec'
)
if
@podspec
raise
Informative
,
"Couldn't find any .podspec file in current directory"
if
files
.
empty?
path
=
Pathname
(
@podspec
)
files
raise
Informative
,
"Couldn't find
#{
@podspec
}
"
unless
path
.
exist?
[
path
]
else
files
=
Pathname
.
glob
(
'*.podspec'
)
raise
Informative
,
"Couldn't find any .podspec files in current directory"
if
files
.
empty?
files
end
end
end
# @return [Integer] The number of the podspec files to push.
# @return [Integer] The number of the podspec files to push.
...
...
spec/functional/command/repo/push_spec.rb
View file @
76892430
...
@@ -25,6 +25,12 @@ module Pod
...
@@ -25,6 +25,12 @@ module Pod
e
.
message
.
should
.
match
(
/Couldn't find any .podspec/
)
e
.
message
.
should
.
match
(
/Couldn't find any .podspec/
)
end
end
it
"complains if it can't find the given podspec"
do
repo_make
(
'test_repo'
)
e
=
lambda
{
run_command
(
'repo'
,
'push'
,
'test_repo'
,
'testspec.podspec'
)
}.
should
.
raise
Pod
::
Informative
e
.
message
.
should
.
match
(
/Couldn't find testspec\.podspec/
)
end
it
"it raises if the specification doesn't validate"
do
it
"it raises if the specification doesn't validate"
do
repo_make
(
'test_repo'
)
repo_make
(
'test_repo'
)
Dir
.
chdir
(
temporary_directory
)
do
Dir
.
chdir
(
temporary_directory
)
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