Commit a24b4ba3 authored by Fabio Pelosin's avatar Fabio Pelosin

Better support for bleeding mode with subspecs.

parent d57bb9ff
...@@ -48,7 +48,12 @@ module Pod ...@@ -48,7 +48,12 @@ module Pod
pods.each do |pod| pods.each do |pod|
unless config.silent? unless config.silent?
marker = config.verbose ? "\n-> ".green : '' marker = config.verbose ? "\n-> ".green : ''
name = pod.top_specification.preferred_dependency ? "#{pod.top_specification.name}/#{pod.top_specification.preferred_dependency} (#{pod.top_specification.version})" : pod.to_s if pod.top_specification.preferred_dependency
name = "#{pod.top_specification.name}/#{pod.top_specification.preferred_dependency} (#{pod.top_specification.version})"
name << "[BLEEDING]" if pod.top_specification.bleeding?
else
name = pod.to_s
end
puts marker << ( pod.exists? ? "Using #{name}" : "Installing #{name}".green ) puts marker << ( pod.exists? ? "Using #{name}" : "Installing #{name}".green )
end end
......
...@@ -65,7 +65,7 @@ module Pod ...@@ -65,7 +65,7 @@ module Pod
@loaded_specs << spec.name @loaded_specs << spec.name
@specs[spec.name] = spec @specs[spec.name] = spec
spec.activate_platform(target_definition.platform) spec.activate_platform(target_definition.platform)
spec.top_level_parent.bleeding = dependency.bleeding? spec.bleeding = dependency.bleeding?
# And recursively load the dependencies of the spec. # And recursively load the dependencies of the spec.
find_dependency_specs(spec, spec.dependencies, target_definition) if spec.dependencies find_dependency_specs(spec, spec.dependencies, target_definition) if spec.dependencies
end end
......
...@@ -180,20 +180,21 @@ module Pod ...@@ -180,20 +180,21 @@ module Pod
@platform = Platform.new(*platform) @platform = Platform.new(*platform)
end end
# If not platform is specified all the platforms are returned.
def available_platforms
platform.nil? ? @define_for_platforms.map { |platform| Platform.new(platform, deployment_target(platform)) } : [ platform ]
end
### Top level attributes. These attributes represent the unique features of pod and can't be specified by subspecs.
# @!method bleeding # @!method bleeding
# #
# @return [BOOL] returns wheter the specification is in bleeding mode. # @return [BOOL] returns wheter the specification is in bleeding mode.
# #
top_attr_accessor :bleeding attr_accessor :bleeding
alias_method :bleeding?, :bleeding alias_method :bleeding?, :bleeding
# If not platform is specified all the platforms are returned.
def available_platforms
platform.nil? ? @define_for_platforms.map { |platform| Platform.new(platform, deployment_target(platform)) } : [ platform ]
end
### Top level attributes. These attributes represent the unique features of pod and can't be specified by subspecs.
top_attr_accessor :defined_in_file top_attr_accessor :defined_in_file
top_attr_accessor :homepage top_attr_accessor :homepage
top_attr_accessor :summary top_attr_accessor :summary
...@@ -463,7 +464,7 @@ module Pod ...@@ -463,7 +464,7 @@ module Pod
def to_s def to_s
result = "#{name} (#{version})" result = "#{name} (#{version})"
result << " [BLEEDING]" if top_level_parent.bleeding? result << " [BLEEDING]" if bleeding?
result result
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment