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
d4af7dfe
Commit
d4af7dfe
authored
Dec 24, 2013
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[push] Do not push to trunk during tests.
parent
20e6c430
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
push.rb
lib/cocoapods/command/push.rb
+4
-1
push_spec.rb
spec/functional/command/push_spec.rb
+5
-0
No files found.
lib/cocoapods/command/push.rb
View file @
d4af7dfe
...
...
@@ -61,16 +61,19 @@ module Pod
# @return [void] Silently test the CocoaPods trunk service.
#
def
test_trunk
return
if
skip_test_trunk
return
unless
@repo
==
"master"
require
'rest'
base_url
=
'https://trunk.cocoapods.org/api/v1'
podspec_files
.
each
do
|
spec_file
|
spec
=
Pod
::
Specification
.
from_file
(
spec_file
)
REST
.
post
(
"
#{
base_url
}
/pods"
,
spec
.
to_json
,
'Content-Type'
=>
'application/json; charset=utf-8'
,
'Authorization'
=>
"Token 46dbd9b53eedd840355750621e6385dd"
)
REST
.
post
(
"
#{
base_url
}
/pods"
,
spec
.
to_json
,
'Content-Type'
=>
'application/json; charset=utf-8'
,
'Authorization'
=>
"Token 46dbd9b53eedd840355750621e6385dd"
)
end
rescue
Exception
# Nothing
end
attr_accessor
:skip_test_trunk
# Performs a full lint against the podspecs.
#
...
...
spec/functional/command/push_spec.rb
View file @
d4af7dfe
...
...
@@ -5,6 +5,11 @@ module Pod
extend
SpecHelper
::
Command
extend
SpecHelper
::
TemporaryRepos
# Don't test push the spec to the trunk app
def
command
(
*
a
)
super
.
tap
{
|
cmd
|
cmd
.
send
(
:skip_test_trunk
=
,
true
)
}
end
before
do
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
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