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
b08b005e
Commit
b08b005e
authored
Jul 12, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experimental support for bleeding version for git repos.
parent
d4f319bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
4 deletions
+41
-4
dependency.rb
lib/cocoapods/dependency.rb
+13
-2
resolver.rb
lib/cocoapods/resolver.rb
+1
-0
specification.rb
lib/cocoapods/specification.rb
+27
-2
No files found.
lib/cocoapods/dependency.rb
View file @
b08b005e
...
...
@@ -6,7 +6,8 @@ require 'open-uri'
module
Pod
class
Dependency
<
Gem
::
Dependency
attr_reader
:external_source
attr_reader
:external_source
,
:bleeding
alias
:bleeding?
:bleeding
attr_accessor
:specification
def
initialize
(
*
name_and_version_requirements
,
&
block
)
...
...
@@ -18,6 +19,13 @@ module Pod
elsif
!
name_and_version_requirements
.
empty?
&&
block
.
nil?
if
name_and_version_requirements
.
last
.
is_a?
(
Hash
)
@external_source
=
ExternalSources
.
from_params
(
name_and_version_requirements
[
0
].
split
(
'/'
).
first
,
name_and_version_requirements
.
pop
)
elsif
name_and_version_requirements
.
last
.
is_a?
(
Symbol
)
symbol
=
name_and_version_requirements
.
pop
if
symbol
==
:bleeding
@bleeding
=
true
else
raise
Informative
,
"Unrecognized symbol `
#{
symbol
}
' for dependency `
#{
name_and_version_requirements
[
0
]
}
'"
end
end
super
(
*
name_and_version_requirements
)
...
...
@@ -68,7 +76,10 @@ module Pod
elsif
@version_requirements
!=
Gem
::
Requirement
.
default
version
<<
@version_requirements
.
to_s
end
version
.
empty?
?
@name
:
"
#{
@name
}
(
#{
version
}
)"
result
=
@name
result
=
result
+
" (
#{
version
}
)"
unless
version
.
empty?
result
=
result
+
" [BLEEDING]"
if
bleeding?
result
end
def
specification_from_sandbox
(
sandbox
,
platform
)
...
...
lib/cocoapods/resolver.rb
View file @
b08b005e
...
...
@@ -65,6 +65,7 @@ module Pod
@loaded_specs
<<
spec
.
name
@specs
[
spec
.
name
]
=
spec
spec
.
activate_platform
(
target_definition
.
platform
)
spec
.
bleeding
=
dependency
.
bleeding?
# And recursively load the dependencies of the spec.
find_dependency_specs
(
spec
,
spec
.
dependencies
,
target_definition
)
if
spec
.
dependencies
end
...
...
lib/cocoapods/specification.rb
View file @
b08b005e
...
...
@@ -187,8 +187,14 @@ module Pod
### Top level attributes. These attributes represent the unique features of pod and can't be specified by subspecs.
# @!method bleeding
#
# @return [BOOL] returns wheter the specification is in bleeding mode.
#
top_attr_accessor
:bleeding
alias_method
:bleeding?
,
:bleeding
top_attr_accessor
:defined_in_file
top_attr_accessor
:source
top_attr_accessor
:homepage
top_attr_accessor
:summary
top_attr_accessor
:documentation
...
...
@@ -198,6 +204,23 @@ module Pod
top_attr_reader
:description
,
lambda
{
|
instance
,
ivar
|
ivar
||
instance
.
summary
}
top_attr_writer
:description
,
lambda
{
|
d
|
d
.
strip_heredoc
}
# @!method source
#
# @abstract
# Returns the source of the pod. If the specification is set in bleeding mode
# and the source is a git repository the head of master will be returned.
#
top_attr_writer
:source
top_attr_reader
:source
,
lambda
{
|
instance
,
ivar
|
if
instance
.
bleeding?
raise
Informative
,
'Bleeding is supported only for git repos'
unless
ivar
[
:git
]
{
:git
=>
ivar
[
:git
]
}
else
ivar
end
}
# @!method license
#
# @abstract
...
...
@@ -439,7 +462,9 @@ module Pod
end
def
to_s
"
#{
name
}
(
#{
version
}
)"
result
=
"
#{
name
}
(
#{
version
}
)"
result
<<
" [BLEEDING]"
if
bleeding?
result
end
def
inspect
...
...
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