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
1564c00f
Commit
1564c00f
authored
Apr 03, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Repo::Push] Update for new public source methods
parent
dc37e1b0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
Gemfile.lock
Gemfile.lock
+1
-1
push.rb
lib/cocoapods/command/repo/push.rb
+9
-3
push_spec.rb
spec/functional/command/repo/push_spec.rb
+2
-4
No files found.
Gemfile.lock
View file @
1564c00f
...
...
@@ -7,7 +7,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision:
ec49c1259eabe6cdf6a9f416fc5c0ca905c4ced2
revision:
bb1c7033bb34016da92364222fd20517c4e25d2a
branch: seg-source-metadata
specs:
cocoapods-core (1.0.0.beta.6)
...
...
lib/cocoapods/command/repo/push.rb
View file @
1564c00f
...
...
@@ -38,7 +38,7 @@ module Pod
@allow_warnings
=
argv
.
flag?
(
'allow-warnings'
)
@local_only
=
argv
.
flag?
(
'local-only'
)
@repo
=
argv
.
shift_argument
@source
=
config
.
sources_manager
.
source
_with_name_or_url
(
@repo
)
@source
=
config
.
sources_manager
.
source
s
([
@repo
]).
first
@source_urls
=
argv
.
option
(
'sources'
,
config
.
sources_manager
.
all
.
map
(
&
:url
).
join
(
','
)).
split
(
','
)
@podspec
=
argv
.
shift_argument
@use_frameworks
=
!
argv
.
flag?
(
'use-libraries'
)
...
...
@@ -49,8 +49,14 @@ module Pod
end
def
validate!
super
help!
'A spec-repo name is required.'
unless
@repo
unless
@source
.
repo
.
directory?
raise
Informative
,
"Unable to find the `
#{
@repo
}
` repo. "
\
'If it has not yet been cloned, add it via `pod repo add`.'
end
super
end
def
run
...
...
@@ -162,7 +168,7 @@ module Pod
UI
.
puts
"
\n
Adding the
#{
'spec'
.
pluralize
(
count
)
}
to the `
#{
@repo
}
' repo
\n
"
.
yellow
podspec_files
.
each
do
|
spec_file
|
spec
=
Pod
::
Specification
.
from_file
(
spec_file
)
output_path
=
@source
.
specs_dir
+
@source
.
send
(
:pod_path
,
name
)
+
version
.
to_s
output_path
=
@source
.
pod_path
(
spec
.
name
)
+
spec
.
version
.
to_s
if
@message
&&
!
@message
.
empty?
message
=
@message
elsif
output_path
.
exist?
...
...
spec/functional/command/repo/push_spec.rb
View file @
1564c00f
...
...
@@ -12,10 +12,8 @@ module Pod
it
"complains if it can't find the repo"
do
Dir
.
chdir
(
fixture
(
'banana-lib'
))
do
cmd
=
command
(
'repo'
,
'push'
,
'missing_repo'
)
cmd
.
expects
(
:check_if_master_repo
)
cmd
.
expects
(
:validate_podspec_files
).
returns
(
true
)
e
=
lambda
{
cmd
.
run
}.
should
.
raise
Informative
e
.
message
.
should
.
match
(
/repo not found/
)
e
=
lambda
{
cmd
.
validate!
}.
should
.
raise
Informative
e
.
message
.
should
.
match
(
/Unable to find the `missing_repo` repo/
)
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