Commit 6564e717 authored by Fabio Pelosin's avatar Fabio Pelosin

Removed config mixin from some classes.

parent 6ef156eb
...@@ -84,7 +84,6 @@ module Pod ...@@ -84,7 +84,6 @@ module Pod
# the UI indentation lever. # the UI indentation lever.
# #
class Indenter < ::Array class Indenter < ::Array
include Config::Mixin
# @return [Fixnum] The indentation level of the UI. # @return [Fixnum] The indentation level of the UI.
# #
......
...@@ -5,7 +5,6 @@ module Pod ...@@ -5,7 +5,6 @@ module Pod
module Generator module Generator
class Documentation class Documentation
include Config::Mixin
extend Executable extend Executable
executable :appledoc executable :appledoc
...@@ -86,6 +85,12 @@ module Pod ...@@ -86,6 +85,12 @@ module Pod
# projects. # projects.
# #
def generate(install = false) def generate(install = false)
if `which appledoc`.strip.empty?
UI.warn "[!] Skipping documentation generation because appledoc can't be found.",
actions = [], verbose_only = true
return
end
options = appledoc_options options = appledoc_options
options += ['--output', @target_path.to_s] options += ['--output', @target_path.to_s]
options += install ? ['--create-docset'] : ['--no-create-docset'] options += install ? ['--create-docset'] : ['--no-create-docset']
...@@ -97,11 +102,9 @@ module Pod ...@@ -97,11 +102,9 @@ module Pod
end end
if $?.exitstatus != 0 if $?.exitstatus != 0
puts "[!] Appledoc encountered an error (exitstatus: #{$?.exitstatus}), an update might be available to solve the issue." unless config.silent? UI.warn "[!] Appledoc encountered an error (exitstatus: #{$?.exitstatus}), an update might be available to solve the issue."
end end
rescue Informative
puts "[!] Skipping documentation generation because appledoc can't be found." if config.verbose?
end end
end end
end end
......
...@@ -189,7 +189,7 @@ module Pod ...@@ -189,7 +189,7 @@ module Pod
libraries = [] libraries = []
podfile.target_definitions.values.each do |target_definition| podfile.target_definitions.values.each do |target_definition|
lib = Library.new(target_definition) lib = Library.new(target_definition)
lib.support_files_root = config.sandbox.library_support_files_dir(lib.name) lib.support_files_root = sandbox.library_support_files_dir(lib.name)
if config.integrate_targets? if config.integrate_targets?
lib.user_project_path = compute_user_project_path(target_definition) lib.user_project_path = compute_user_project_path(target_definition)
......
...@@ -16,8 +16,6 @@ module Pod ...@@ -16,8 +16,6 @@ module Pod
# #
class Resolver class Resolver
include Config::Mixin
# @return [Sandbox] the Sandbox used by the resolver to find external # @return [Sandbox] the Sandbox used by the resolver to find external
# dependencies. # dependencies.
# #
...@@ -76,7 +74,7 @@ module Pod ...@@ -76,7 +74,7 @@ module Pod
# definition. # definition.
# #
def resolve def resolve
@cached_sources = Source::Aggregate.new(config.repos_dir) @cached_sources = SourcesManager.aggregate
@cached_sets = {} @cached_sets = {}
@cached_specs = {} @cached_specs = {}
@specs_by_target = {} @specs_by_target = {}
......
...@@ -120,7 +120,8 @@ module Pod ...@@ -120,7 +120,8 @@ module Pod
# #
# return [void] # return [void]
# #
def warn(message, actions = []) def warn(message, actions = [], verbose_only = false)
return if config.silent? && verbose_only
STDERR.puts("\n[!] #{message}".yellow) STDERR.puts("\n[!] #{message}".yellow)
actions.each do |action| actions.each do |action|
indented = wrap_string(action, " - ") indented = wrap_string(action, " - ")
......
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