Skip to content

Commit

Permalink
[Documentation] Improved #already_installed?
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Jun 27, 2012
1 parent aaa4a8d commit 69ae4cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/cocoapods/generator/documentation.rb
Expand Up @@ -71,7 +71,9 @@ def appledoc_options
end

def already_installed?
Pathname.new(File.expand_path("~/Library/Developer/Shared/Documentation/DocSets/org.cocoapods.#{name.gsub(/ /,'-')}.docset")).exist?
index = spec_appledoc_options.index('--company-id')
company_id = index ? spec_appledoc_options[index + 1] : docs_id
Pathname.new(File.expand_path("~/Library/Developer/Shared/Documentation/DocSets/#{company_id}.#{name.gsub(/ /,'-')}.docset")).exist?
end

def generate(install = false)
Expand Down

0 comments on commit 69ae4cc

Please sign in to comment.