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
ba041adf
Commit
ba041adf
authored
Jun 27, 2016
by
Mark Schall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up robocop warnings
parent
7b09cfc5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
push.rb
lib/cocoapods/command/repo/push.rb
+13
-4
push_spec.rb
spec/functional/command/repo/push_spec.rb
+2
-2
No files found.
lib/cocoapods/command/repo/push.rb
View file @
ba041adf
...
...
@@ -39,10 +39,7 @@ module Pod
@allow_warnings
=
argv
.
flag?
(
'allow-warnings'
)
@local_only
=
argv
.
flag?
(
'local-only'
)
@repo
=
argv
.
shift_argument
begin
@source
=
config
.
sources_manager
.
source_with_name_or_url
(
@repo
)
unless
@repo
.
nil?
rescue
end
@source
=
source_for_repo
@source_urls
=
argv
.
option
(
'sources'
,
config
.
sources_manager
.
all
.
map
(
&
:url
).
join
(
','
)).
split
(
','
)
@podspec
=
argv
.
shift_argument
@use_frameworks
=
!
argv
.
flag?
(
'use-libraries'
)
...
...
@@ -246,6 +243,18 @@ module Pod
podspec_files
.
count
end
# Returns source for @repo
#
# @note If URL is invalid or repo doesn't exist, validate! will throw the error
#
# @return [Source]
#
def
source_for_repo
config
.
sources_manager
.
source_with_name_or_url
(
@repo
)
unless
@repo
.
nil?
rescue
nil
end
#---------------------------------------------------------------------#
end
end
...
...
spec/functional/command/repo/push_spec.rb
View file @
ba041adf
...
...
@@ -16,7 +16,7 @@ module Pod
e
.
message
.
should
.
match
(
/Unable to find the `missing_repo` repo/
)
end
end
it
"complains if it can't get repo url"
do
Dir
.
chdir
(
fixture
(
'banana-lib'
))
do
Command
::
Repo
::
Add
.
any_instance
.
stubs
(
:clone_repo
)
...
...
@@ -126,7 +126,7 @@ module Pod
Dir
.
chdir
(
@upstream
)
{
`git checkout master -q`
}
(
@upstream
+
'PushTest/1.4/PushTest.podspec'
).
read
.
should
.
include
(
'PushTest'
)
end
it
'successfully pushes a spec to URL'
do
cmd
=
command
(
'repo'
,
'push'
,
@upstream
)
Dir
.
chdir
(
@upstream
)
{
`git checkout -b tmp_for_push -q`
}
...
...
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