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
7fc60b51
Commit
7fc60b51
authored
Jul 17, 2012
by
Eloy Durán
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:CocoaPods/CocoaPods
parents
92d7a92e
8fe74160
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
push.rb
lib/cocoapods/command/push.rb
+4
-2
podfile.rb
lib/cocoapods/podfile.rb
+15
-1
podfile_spec.rb
spec/unit/podfile_spec.rb
+8
-1
No files found.
lib/cocoapods/command/push.rb
View file @
7fc60b51
...
@@ -14,7 +14,8 @@ module Pod
...
@@ -14,7 +14,8 @@ module Pod
end
end
def
self
.
options
def
self
.
options
[[
"--allow-warnings"
,
"Allows to push if warnings are not evitable"
]].
concat
(
super
)
[
[
"--allow-warnings"
,
"Allows to push if warnings are not evitable"
],
[
"--local-only"
,
"Does not perform the step of pushing REPO to its remote"
]
].
concat
(
super
)
end
end
extend
Executable
extend
Executable
...
@@ -22,6 +23,7 @@ module Pod
...
@@ -22,6 +23,7 @@ module Pod
def
initialize
(
argv
)
def
initialize
(
argv
)
@allow_warnings
=
argv
.
option
(
'--allow-warnings'
)
@allow_warnings
=
argv
.
option
(
'--allow-warnings'
)
@local_only
=
argv
.
option
(
'--local-only'
)
@repo
=
argv
.
shift_argument
@repo
=
argv
.
shift_argument
@podspec
=
argv
.
shift_argument
@podspec
=
argv
.
shift_argument
super
unless
argv
.
empty?
&&
@repo
super
unless
argv
.
empty?
&&
@repo
...
@@ -32,7 +34,7 @@ module Pod
...
@@ -32,7 +34,7 @@ module Pod
check_repo_status
check_repo_status
update_repo
update_repo
add_specs_to_repo
add_specs_to_repo
push_repo
push_repo
unless
@local_only
puts
puts
end
end
...
...
lib/cocoapods/podfile.rb
View file @
7fc60b51
module
Pod
module
Pod
class
Podfile
class
Podfile
class
Informative
<
::
Pod
::
Informative
def
podfile_line
@podfile_line
||=
self
.
backtrace
.
find
{
|
t
|
t
=~
/Podfile/
}
end
def
message
if
podfile_line
super
+
" (
#{
podfile_line
}
)
\n
"
.
red
else
super
end
end
end
class
UserProject
class
UserProject
include
Config
::
Mixin
include
Config
::
Mixin
...
@@ -200,7 +214,7 @@ module Pod
...
@@ -200,7 +214,7 @@ module Pod
when
:osx
when
:osx
target
=
'10.6'
target
=
'10.6'
else
else
raise
Informative
,
"Unsupported platform: platform must be one of [:ios, :osx]"
raise
::
Pod
::
Podfile
::
Informative
,
"Unsupported platform: platform must be one of [:ios, :osx]"
end
end
end
end
@target_definition
.
platform
=
Platform
.
new
(
name
,
target
)
@target_definition
.
platform
=
Platform
.
new
(
name
,
target
)
...
...
spec/unit/podfile_spec.rb
View file @
7fc60b51
...
@@ -19,7 +19,14 @@ describe "Pod::Podfile" do
...
@@ -19,7 +19,14 @@ describe "Pod::Podfile" do
it
"raise error if unsupported platform is supplied"
do
it
"raise error if unsupported platform is supplied"
do
lambda
{
lambda
{
Pod
::
Podfile
.
new
{
platform
:iOS
}
Pod
::
Podfile
.
new
{
platform
:iOS
}
}.
should
.
raise
(
StandardError
,
"Unsupported platform"
)
}.
should
.
raise
Pod
::
Podfile
::
Informative
begin
Pod
::
Podfile
.
new
{
platform
:iOS
}
rescue
Pod
::
Podfile
::
Informative
=>
e
e
.
stubs
(
:podfile_line
).
returns
(
"./podfile_spec.rb:1"
)
e
.
message
.
should
.
be
=~
/podfile_spec\.rb:1/
end
end
end
it
"adds dependencies"
do
it
"adds dependencies"
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