Commit e9ed7898 authored by 利辺羅エルネスト's avatar 利辺羅エルネスト

Merge branch 'master' of github.com:CocoaPods/CocoaPods

parents 23250690 8534296d
...@@ -5,8 +5,6 @@ env: ...@@ -5,8 +5,6 @@ env:
- RVM_RUBY_VERSION=1.9.3 NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2 && curl http://curl.haxx.se/ca/cacert.pem -o /usr/local/share/cacert.pem' SSL_CERT_FILE=/usr/local/share/cacert.pem GIT_AUTHOR_NAME=CocoaPods GIT_AUTHOR_EMAIL=cocoapods@example.com - RVM_RUBY_VERSION=1.9.3 NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2 && curl http://curl.haxx.se/ca/cacert.pem -o /usr/local/share/cacert.pem' SSL_CERT_FILE=/usr/local/share/cacert.pem GIT_AUTHOR_NAME=CocoaPods GIT_AUTHOR_EMAIL=cocoapods@example.com
before_install: before_install:
- source ~/.rvm/scripts/rvm && rvm use $RVM_RUBY_VERSION - source ~/.rvm/scripts/rvm && rvm use $RVM_RUBY_VERSION
- sudo chown -R $USER /usr/local
- brew install mercurial
install: eval $RUBY_VERSION_SPECIFIC && rake bootstrap[use_bundle_dir] install: eval $RUBY_VERSION_SPECIFIC && rake bootstrap[use_bundle_dir]
script: bundle exec rake spec:ci script: bundle exec rake spec:ci
notifications: notifications:
......
...@@ -4,6 +4,23 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -4,6 +4,23 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
## Master ## Master
###### Enhancements
* Documentation generation has been removed from CocoaPods as it graduated
to CocoaDocs. This decision was taken because CocoaDocs is a much better
solution which doesn't clutter Xcode's docsets while still allowing
access to the docsets with Xcode and with Dash. Removing this feature
keeps the installer leaner and easier to develop and paves the way for the
upcoming sandbox. Private pods can use pre install hook to generate the
documentation. If there will be enough demand this feature might be
reintegrated as plugin (see
[#1037](https://github.com/CocoaPods/CocoaPods/issues/1037)).
###### Bug fixes
* Inheriting `inhibit_warnings` per pod is now working
[#1032](https://github.com/CocoaPods/CocoaPods/issues/1032)
## 0.19.1 ## 0.19.1
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.19.0...0.19.1) [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.19.0...0.19.1)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.19.0...0.19.1) [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.19.0...0.19.1)
...@@ -29,6 +46,9 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -29,6 +46,9 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
* CocoaPods now defines the `COCOAPODS=1` macro in the Pod and the Client * CocoaPods now defines the `COCOAPODS=1` macro in the Pod and the Client
targets. This is useful for libraries which conditionally expose interfaces. targets. This is useful for libraries which conditionally expose interfaces.
[#903](https://github.com/CocoaPods/CocoaPods/issues/903) [#903](https://github.com/CocoaPods/CocoaPods/issues/903)
* Added support for the `private_header_files` attribute of the Specification
DSL.
[#998](https://github.com/CocoaPods/CocoaPods/issues/998)
* CocoaPods now defines the deployment target of the Pods project computed as * CocoaPods now defines the deployment target of the Pods project computed as
the minimum deployment target of the Pods libraries. the minimum deployment target of the Pods libraries.
[#556](https://github.com/CocoaPods/CocoaPods/issues/556) [#556](https://github.com/CocoaPods/CocoaPods/issues/556)
......
# CocoaPods – an Objective-C library manager # CocoaPods – an Objective-C library manager
[![Gem Version](https://badge.fury.io/rb/cocoapods.png)](http://badge.fury.io/rb/cocoapods)
[![Dependency Status](https://gemnasium.com/CocoaPods/CocoaPods.png)](https://gemnasium.com/CocoaPods/CocoaPods)
[![Build Status](https://travis-ci.org/CocoaPods/CocoaPods.png?branch=master)](https://travis-ci.org/CocoaPods/CocoaPods) [![Build Status](https://travis-ci.org/CocoaPods/CocoaPods.png?branch=master)](https://travis-ci.org/CocoaPods/CocoaPods)
[![Code Climate](https://codeclimate.com/github/CocoaPods/CocoaPods.png)](https://codeclimate.com/github/CocoaPods/CocoaPods)
[![Dependency Status](https://gemnasium.com/CocoaPods/CocoaPods.png)](https://gemnasium.com/CocoaPods/CocoaPods)
[![Gem Version](https://badge.fury.io/rb/cocoapods.png)](http://badge.fury.io/rb/cocoapods)
CocoaPods manages library dependencies for your Xcode project. CocoaPods manages library dependencies for your Xcode project.
......
...@@ -325,7 +325,7 @@ namespace :examples do ...@@ -325,7 +325,7 @@ namespace :examples do
puts "Building example: #{example}" puts "Building example: #{example}"
Dir.chdir(example.to_s) do Dir.chdir(example.to_s) do
execute_command "rm -rf Pods DerivedData" execute_command "rm -rf Pods DerivedData"
execute_command "#{'../../bin/' unless ENV['FROM_GEM']}pod install --verbose --no-repo-update" execute_command "#{'../../bin/' unless ENV['FROM_GEM']}sandbox-pod install --verbose --no-repo-update"
command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'" command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'"
if (example + 'Podfile').read.include?('platform :ios') if (example + 'Podfile').read.include?('platform :ios')
# Specifically build against the simulator SDK so we don't have to deal with code signing. # Specifically build against the simulator SDK so we don't have to deal with code signing.
...@@ -356,10 +356,6 @@ task :bootstrap, :use_bundle_dir? do |t, args| ...@@ -356,10 +356,6 @@ task :bootstrap, :use_bundle_dir? do |t, args|
else else
execute_command "bundle install" execute_command "bundle install"
end end
puts "Installing tools (Homebrew)"
execute_command "brew install appledoc" if `which appledoc`.strip.empty?
execute_command "brew install mercurial" if `which hg`.strip.empty?
end end
#-----------------------------------------------------------------------------# #-----------------------------------------------------------------------------#
......
#!/usr/bin/env ruby
# This bin wrapper runs the `pod` command in a OS X sandbox. The reason for this
# is to ensure that people can’t use malicious code from pod specifications.
#
# It does this by creating a ‘seatbelt’ profile on the fly and executing the
# given command through `/usr/bin/sandbox-exec`. This profile format is an
# undocumented format, which uses TinyScheme to implement its DSL.
#
# Even though it uses a undocumented format, it’s actually very self-explanatory.
# Because we use a whitelist approach, `(deny default)`, any action that is
# denied is logged to `/var/log/system.log`. So tailing that should provide
# enough information on steps that need to be take to get something to work.
#
# For more information see:
#
# * https://github.com/CocoaPods/CocoaPods/issues/939
# * http://reverse.put.as/wp-content/uploads/2011/08/The-Apple-Sandbox-BHDC2011-Slides.pdf
# * http://reverse.put.as/wp-content/uploads/2011/08/The-Apple-Sandbox-BHDC2011-Paper.pdf
# * https://github.com/s7ephen/OSX-Sandbox--Seatbelt--Profiles
# * `$ man sandbox-exec`
# * `$ ls /usr/share/sandbox`
if $0 == __FILE__
$:.unshift File.expand_path('../../lib', __FILE__)
end
require 'pathname'
require 'cocoapods/config'
pod_bin = File.expand_path('../pod', __FILE__)
pod_prefix = File.expand_path('../..', pod_bin)
require 'rbconfig'
ruby_bin = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
ruby_prefix = RbConfig::CONFIG['prefix']
prefixes = ['/bin', '/usr/bin', '/usr/libexec']
prefixes << `brew --prefix`.strip unless `which brew`.strip.empty?
# TODO add MacPorts. More?
developer_prefix = `xcode-select --print-path`.strip
xcode_app_path = File.expand_path('../..', developer_prefix)
require 'erb'
profile = ERB.new(DATA.read, 0, '>').result(TOPLEVEL_BINDING)
puts profile
command = ['/usr/bin/sandbox-exec', '-p', profile, pod_bin, *ARGV]
#puts command
exec *command
__END__
(version 1)
(debug allow)
(import "mDNSResponder.sb")
(allow file-ioctl)
(allow sysctl-read)
(allow mach-lookup)
(allow ipc-posix-shm)
(allow process-fork)
(allow system-socket)
; TODO make this stricter if possible
(allow network-outbound)
(allow process-exec
(regex
#"^<%= pod_bin %>"
#"^<%= ruby_bin %>"
#"^<%= File.join(developer_prefix, 'usr/bin/xcrun') %>"
#"^<%= File.join(developer_prefix, 'usr/bin/xcodebuild') %>"
<% prefixes.each do |prefix| %>
#"^<%= prefix %>/*"
<% end %>
)
)
(allow file-read-metadata)
(allow file-read*
(regex
; TODO see if we can restrict this more, but it's going to be hard
#"^/Users/[^.]+/*"
;#"^/Users/[^.]+/.netrc"
;#"^/Users/[^.]+/.gemrc"
;#"^/Users/[^.]+/.gem/*"
;#"^/Users/[^.]+/Library/.*"
#"^/Library/*"
#"^/System/Library/*"
#"^/usr/lib/*"
#"^/usr/share/*"
#"^/private/*"
#"^/dev/*"
#"^<%= ruby_prefix %>"
#"^<%= pod_prefix %>"
#"^<%= xcode_app_path %>"
#"^<%= Pod::Config.instance.repos_dir %>"
<% prefixes.each do |prefix| %>
#"^<%= prefix %>/*"
<% end %>
)
)
(allow file-write*
(regex
#"^<%= Pod::Config.instance.project_root %>"
#"^<%= Pod::Config.instance.repos_dir %>"
#"^/Users/[^.]+/Library/Caches/CocoaPods/*"
#"^/dev/dtracehelper"
#"^/dev/tty"
#"^/dev/null"
#"^/private/var"
)
)
(deny default)
...@@ -21,7 +21,7 @@ Gem::Specification.new do |s| ...@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
"in, third party open-source libraries, by creating a more centralized " \ "in, third party open-source libraries, by creating a more centralized " \
"ecosystem." "ecosystem."
s.files = Dir["lib/**/*.rb"] + %w{ bin/pod README.md LICENSE CHANGELOG.md } s.files = Dir["lib/**/*.rb"] + %w{ bin/pod bin/sandbox-pod README.md LICENSE CHANGELOG.md }
s.executables = %w{ pod } s.executables = %w{ pod }
s.require_paths = %w{ lib } s.require_paths = %w{ lib }
......
...@@ -55,7 +55,6 @@ module Pod ...@@ -55,7 +55,6 @@ module Pod
autoload :Acknowledgements, 'cocoapods/generator/acknowledgements' autoload :Acknowledgements, 'cocoapods/generator/acknowledgements'
autoload :BridgeSupport, 'cocoapods/generator/bridge_support' autoload :BridgeSupport, 'cocoapods/generator/bridge_support'
autoload :CopyResourcesScript, 'cocoapods/generator/copy_resources_script' autoload :CopyResourcesScript, 'cocoapods/generator/copy_resources_script'
autoload :Documentation, 'cocoapods/generator/documentation'
autoload :DummySource, 'cocoapods/generator/dummy_source' autoload :DummySource, 'cocoapods/generator/dummy_source'
autoload :Markdown, 'cocoapods/generator/acknowledgements/markdown' autoload :Markdown, 'cocoapods/generator/acknowledgements/markdown'
autoload :Plist, 'cocoapods/generator/acknowledgements/plist' autoload :Plist, 'cocoapods/generator/acknowledgements/plist'
......
...@@ -9,7 +9,6 @@ module Pod ...@@ -9,7 +9,6 @@ module Pod
def options def options
[ [
["--no-clean", "Leave SCM dirs like `.git' and `.svn' intact after downloading"], ["--no-clean", "Leave SCM dirs like `.git' and `.svn' intact after downloading"],
["--no-doc", "Skip documentation generation with appledoc"],
["--no-integrate", "Skip integration of the Pods libraries in the Xcode project(s)"], ["--no-integrate", "Skip integration of the Pods libraries in the Xcode project(s)"],
["--no-repo-update", "Skip running `pod repo update` before install"], ["--no-repo-update", "Skip running `pod repo update` before install"],
].concat(super) ].concat(super)
...@@ -22,7 +21,6 @@ module Pod ...@@ -22,7 +21,6 @@ module Pod
def initialize(argv) def initialize(argv)
config.clean = argv.flag?('clean', config.clean) config.clean = argv.flag?('clean', config.clean)
config.generate_docs = argv.flag?('doc', config.generate_docs)
config.integrate_targets = argv.flag?('integrate', config.integrate_targets) config.integrate_targets = argv.flag?('integrate', config.integrate_targets)
config.skip_repo_update = !argv.flag?('repo-update', !config.skip_repo_update) config.skip_repo_update = !argv.flag?('repo-update', !config.skip_repo_update)
super super
......
...@@ -12,12 +12,12 @@ module Pod ...@@ -12,12 +12,12 @@ module Pod
self.arguments = '[QUERY]' self.arguments = '[QUERY]'
def self.options def self.options
[[ [
"--full", "Search by name, summary, and description", ["--full", "Search by name, summary, and description"],
"--stats", "Show additional stats (like GitHub watchers and forks)", ["--stats", "Show additional stats (like GitHub watchers and forks)"],
"--ios", "Restricts the search to Pods supported on iOS", ["--ios", "Restricts the search to Pods supported on iOS"],
"--osx", "Restricts the search to Pods supported on OS X", ["--osx", "Restricts the search to Pods supported on OS X"]
]].concat(super) ].concat(super)
end end
def initialize(argv) def initialize(argv)
......
...@@ -11,8 +11,7 @@ module Pod ...@@ -11,8 +11,7 @@ module Pod
# #
# --- # ---
# skip_repo_update: true # skip_repo_update: true
# generate_docs: false # new_version_message: false
# install_docs: false
# #
DEFAULTS = { DEFAULTS = {
:verbose => false, :verbose => false,
...@@ -21,8 +20,6 @@ module Pod ...@@ -21,8 +20,6 @@ module Pod
:aggressive_cache => false, :aggressive_cache => false,
:clean => true, :clean => true,
:generate_docs => true,
:install_docs => true,
:integrate_targets => true, :integrate_targets => true,
:new_version_message => true, :new_version_message => true,
} }
...@@ -42,8 +39,8 @@ module Pod ...@@ -42,8 +39,8 @@ module Pod
attr_accessor :silent attr_accessor :silent
alias_method :silent?, :silent alias_method :silent?, :silent
# @return [Bool] Whether the generated documentation should be installed to # @return [Bool] Whether a message should be printed when a new version of
# Xcode. # CocoaPods is available.
# #
attr_accessor :new_version_message attr_accessor :new_version_message
alias_method :new_version_message?, :new_version_message alias_method :new_version_message?, :new_version_message
...@@ -57,18 +54,6 @@ module Pod ...@@ -57,18 +54,6 @@ module Pod
attr_accessor :clean attr_accessor :clean
alias_method :clean?, :clean alias_method :clean?, :clean
# @return [Bool] Whether the documentation should be generated for the
# installed Pods.
#
attr_accessor :generate_docs
alias_method :generate_docs?, :generate_docs
# @return [Bool] Whether the generated documentation should be installed to
# Xcode.
#
attr_accessor :install_docs
alias_method :install_docs?, :install_docs
# @return [Bool] Whether CocoaPods should integrate a user target and build # @return [Bool] Whether CocoaPods should integrate a user target and build
# the workspace or just create the Pods project. # the workspace or just create the Pods project.
# #
...@@ -81,11 +66,20 @@ module Pod ...@@ -81,11 +66,20 @@ module Pod
attr_accessor :skip_repo_update attr_accessor :skip_repo_update
alias_method :skip_repo_update?, :skip_repo_update alias_method :skip_repo_update?, :skip_repo_update
# Allows to set whether the downloader should use more aggressive caching
# options.
#
# @note The aggressive cache has lead to issues if a tag is updated to
# point to another commit.
#
attr_writer :aggressive_cache
# @return [Bool] Whether the downloader should use more aggressive caching # @return [Bool] Whether the downloader should use more aggressive caching
# options. # options.
# #
attr_accessor :aggressive_cache def aggressive_cache?
alias_method :aggressive_cache?, :aggressive_cache @aggressive_cache || (ENV['CP_AGGRESSIVE_CACHE'] != 'FALSE')
end
#--------------------------------------# #--------------------------------------#
......
require 'escape'
require 'active_support/core_ext/array/conversions'
module Pod
module Generator
# Generates the documentation for a Pod with the appledoc tool.
#
class Documentation
extend Executable
executable :appledoc
attr_reader :sandbox
attr_reader :specification
attr_reader :path_list
def initialize(sandbox, specification, path_list)
@sandbox = sandbox
@specification = specification.root
@path_list = path_list
end
DOC_SETS_PATH = "~/Library/Developer/Shared/Documentation/DocSets"
# @return [Bool] Whether the documentation for the current Pod is already
# installed in the system.
#
def already_installed?
index = spec_appledoc_options.index('--company-id')
company_id = index ? spec_appledoc_options[index + 1] : docs_id
docset_path = DOC_SETS_PATH + "/#{company_id}.#{name.gsub(/ /,'-')}.docset"
Pathname.new(File.expand_path(docset_path)).exist?
end
# Generates and optionally installs the documentation for the current
# Pod.
#
# @param [Bool] install_docset
# Whether the documentation should also be installed in Xcode.
#
# @note As the documentation is once per Pod to speed up the
# installation process it is generate for all the specs
# (including those not currently used). For this reason it is
# important that the documentation is generated before cleaning a
# Pod installation.
#
# @todo Passing the files explicitly clutters output and chokes on very
# long list (AWSiOSSDK). It is possible to just pass the dir of
# the pod, however this would include other files like demo
# projects.
#
# @return [void]
#
def generate(install_docset)
if `which appledoc`.strip.empty?
UI.warn "[!] Skipping documentation generation because appledoc can't be found.", [], true
return
end
target_path.mkpath
Dir.chdir(pod_root) do
appledoc apple_doc_command_line_arguments(install_docset)
end
if $?.exitstatus != 0
UI.warn "[!] Appledoc encountered an error (exitstatus: #{$?.exitstatus}), an update might be available to solve the issue."
end
end
#-----------------------------------------------------------------------#
public
# !@group Docset information.
# @return [String] The name of the docset
#
def name
specification.name + ' ' + specification.version.to_s
end
# @return [String] The company of the docset.
#
# @todo Set to CocoaPods?
#
def company
if specification.authors
specification.authors.keys.sort.to_sentence
else
'no-company'
end
end
# @return [String] The copyright of the docset.
#
def copyright
company
end
# @return [String] The description of the docset.
#
def description
specification.summary || specification.description || 'Generated by CocoaPods.'
end
# @return [String] The id of the docset, uniq for every Pod.
#
def docs_id
"org.cocoapods.#{specification.name.downcase}"
end
#-----------------------------------------------------------------------#
public
# !@group Paths.
# @return [Array<String>] the list of the headers to process
# with the appledoc tool.
#
def public_headers
absolute_paths = file_accessors.map(&:public_headers).flatten.uniq
absolute_paths.map { |f| f.relative_path_from(pod_root).to_s }
end
# @return [String] the path of the file to use as the index of
# documentation relative to the root of the Pod.
#
def index_file
readme_file = file_accessors.first.readme
readme_file.relative_path_from(pod_root).to_s if readme_file
end
#-----------------------------------------------------------------------#
public
# !@group Appledoc options.
# @return [Array<String>] The list of the appledoc options followed by
# their values as defined in the specification.
#
def spec_appledoc_options
return [] unless specification.documentation
specification.documentation[:appledoc] || []
end
# @return [Array<String>] The list of the appledoc options followed by
# their values.
#
# @note The appledoc tool terminates with an exits status of 1 if a
# warning was logged (see `--exit-threshold` option).
#
def appledoc_options
options = [
'--project-name', name,
'--docset-desc', description,
'--project-company', company,
'--docset-copyright', copyright,
'--company-id', docs_id,
'--ignore', '.m',
'--keep-undocumented-objects',
'--keep-undocumented-members',
'--keep-intermediate-files',
'--exit-threshold', '2'
]
options += ['--index-desc', index_file] if index_file
options += spec_appledoc_options
end
# @return [String] the arguments to pass to the appledoc command line
# tool, properly escaped.
#
# @param [Bool] install_docset
# Whether the documentation should also be installed in Xcode.
#
def apple_doc_command_line_arguments(install_docset)
arguments = appledoc_options
arguments += ['--output', target_path.to_s]
arguments += install_docset ? ['--create-docset'] : ['--no-create-docset']
arguments += public_headers
Escape.shell_command(arguments)
end
#-----------------------------------------------------------------------#
private
# !@group Private Helpers
def target_path
sandbox.documentation_dir + specification.name
end
def pod_root
path_list.root
end
def file_accessors
return @file_accessors if @file_accessors
@file_accessors = []
all_specs = [specification, *specification.subspecs]
all_specs.each do |spec|
spec.available_platforms.each do |platform|
accessor = Sandbox::FileAccessor.new(path_list, spec.consumer(platform))
@file_accessors << accessor
end
end
@file_accessors
end
end
end
end
...@@ -254,8 +254,6 @@ module Pod ...@@ -254,8 +254,6 @@ module Pod
@pod_installers ||= [] @pod_installers ||= []
pod_installer = PodSourceInstaller.new(sandbox, specs_by_platform) pod_installer = PodSourceInstaller.new(sandbox, specs_by_platform)
pod_installer.aggressive_cache = config.aggressive_cache? pod_installer.aggressive_cache = config.aggressive_cache?
pod_installer.generate_docs = config.generate_docs?
pod_installer.install_docs = config.install_docs?
pod_installer.install! pod_installer.install!
@pod_installers << pod_installer @pod_installers << pod_installer
@installed_specs.concat(specs_by_platform.values.flatten.uniq) @installed_specs.concat(specs_by_platform.values.flatten.uniq)
......
...@@ -24,8 +24,6 @@ module Pod ...@@ -24,8 +24,6 @@ module Pod
@sandbox = sandbox @sandbox = sandbox
@specs_by_platform = specs_by_platform @specs_by_platform = specs_by_platform
@generate_docs = false
@install_docs = false
@aggressive_cache = false @aggressive_cache = false
end end
...@@ -41,18 +39,6 @@ module Pod ...@@ -41,18 +39,6 @@ module Pod
# @!group Configuration # @!group Configuration
# @return [Bool] whether the documentation should be generated for the
# Pod.
#
attr_accessor :generate_docs
alias_method :generate_docs?, :generate_docs
# @return [Bool] whether the generated documentation should be installed
# in Xcode.
#
attr_accessor :install_docs
alias_method :install_docs?, :install_docs
# @return [Bool] whether the downloader should always check against the # @return [Bool] whether the downloader should always check against the
# remote if issues might be generated (mostly useful to speed up # remote if issues might be generated (mostly useful to speed up
# testing). # testing).
...@@ -73,8 +59,7 @@ module Pod ...@@ -73,8 +59,7 @@ module Pod
# @return [void] # @return [void]
# #
def install! def install!
download_source unless predownloaded? || local? download_source unless predownloaded? || local?
generate_docs if generate_docs?
end end
# Cleans the installations if appropriate. # Cleans the installations if appropriate.
...@@ -121,20 +106,6 @@ module Pod ...@@ -121,20 +106,6 @@ module Pod
end end
end end
# Generates the documentation for the Pod.
#
# @return [void]
#
def generate_docs
if documentation_generator.already_installed?
UI.section " > Using existing documentation"
else
UI.section " > Installing documentation" do
documentation_generator.generate(install_docs?)
end
end
end
# Removes all the files not needed for the installation according to the # Removes all the files not needed for the installation according to the
# specs by platform. # specs by platform.
# #
...@@ -162,13 +133,6 @@ module Pod ...@@ -162,13 +133,6 @@ module Pod
@downloader @downloader
end end
# @return [Generator::Documentation] The documentation generator to use
# for generating the documentation.
#
def documentation_generator
@documentation_generator ||= Generator::Documentation.new(sandbox, root_spec, path_list)
end
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
private private
......
...@@ -89,11 +89,6 @@ module Pod ...@@ -89,11 +89,6 @@ module Pod
library.target = @target library.target = @target
end end
ENABLE_OBJECT_USE_OBJC_FROM = {
:ios => Version.new('6'),
:osx => Version.new('10.8')
}
# Adds the build files of the pods to the target and adds a reference to # Adds the build files of the pods to the target and adds a reference to
# the frameworks of the Pods. # the frameworks of the Pods.
# #
...@@ -320,6 +315,11 @@ module Pod ...@@ -320,6 +315,11 @@ module Pod
support_files_group.new_file(relative_path) support_files_group.new_file(relative_path)
end end
ENABLE_OBJECT_USE_OBJC_FROM = {
:ios => Version.new('6'),
:osx => Version.new('10.8')
}
# Returns the compiler flags for the source files of the given specification. # Returns the compiler flags for the source files of the given specification.
# #
# The following behavior is regarding the `OS_OBJECT_USE_OBJC` flag. When # The following behavior is regarding the `OS_OBJECT_USE_OBJC` flag. When
......
...@@ -191,7 +191,6 @@ module Pod ...@@ -191,7 +191,6 @@ module Pod
config.sandbox_root = validation_dir + 'Pods' config.sandbox_root = validation_dir + 'Pods'
config.silent = !config.verbose config.silent = !config.verbose
config.integrate_targets = false config.integrate_targets = false
config.generate_docs = false
config.skip_repo_update = true config.skip_repo_update = true
end end
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Finding Podfile changes Finding Podfile changes
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Resolving dependencies of `Podfile` Resolving dependencies of `Podfile`
...@@ -19,9 +19,8 @@ Downloading dependencies ...@@ -19,9 +19,8 @@ Downloading dependencies
true true
$ /usr/bin/git config core.bare $ /usr/bin/git config core.bare
true true
> Updating cache git repo (CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6) $ /usr/bin/git rev-list --max-count=1 v3.1.0
$ /usr/bin/git remote update f7176f4798d068d233dca5223ae4bd9c8059e830
Fetching origin
$ /usr/bin/git init $ /usr/bin/git init
Initialized empty Git repository in ROOT/tmp/install_custom_workspace/Pods/Reachability/.git/ Initialized empty Git repository in ROOT/tmp/install_custom_workspace/Pods/Reachability/.git/
$ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' $ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6'
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Fetching external sources Fetching external sources
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Fetching external sources Fetching external sources
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Resolving dependencies of `Podfile` Resolving dependencies of `Podfile`
...@@ -37,9 +37,8 @@ Downloading dependencies ...@@ -37,9 +37,8 @@ Downloading dependencies
true true
$ /usr/bin/git config core.bare $ /usr/bin/git config core.bare
true true
> Updating cache git repo (CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6) $ /usr/bin/git rev-list --max-count=1 v3.1.0
$ /usr/bin/git remote update f7176f4798d068d233dca5223ae4bd9c8059e830
Fetching origin
$ /usr/bin/git init $ /usr/bin/git init
Initialized empty Git repository in ROOT/tmp/install_multiple_targets/Pods/Reachability/.git/ Initialized empty Git repository in ROOT/tmp/install_multiple_targets/Pods/Reachability/.git/
$ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' $ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6'
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Resolving dependencies of `Podfile` Resolving dependencies of `Podfile`
...@@ -16,9 +16,8 @@ Downloading dependencies ...@@ -16,9 +16,8 @@ Downloading dependencies
true true
$ /usr/bin/git config core.bare $ /usr/bin/git config core.bare
true true
> Updating cache git repo (CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6) $ /usr/bin/git rev-list --max-count=1 v3.1.0
$ /usr/bin/git remote update f7176f4798d068d233dca5223ae4bd9c8059e830
Fetching origin
$ /usr/bin/git init $ /usr/bin/git init
Initialized empty Git repository in ROOT/tmp/install_new/Pods/Reachability/.git/ Initialized empty Git repository in ROOT/tmp/install_new/Pods/Reachability/.git/
$ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' $ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6'
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Resolving dependencies of `Podfile` Resolving dependencies of `Podfile`
...@@ -16,9 +16,8 @@ Downloading dependencies ...@@ -16,9 +16,8 @@ Downloading dependencies
true true
$ /usr/bin/git config core.bare $ /usr/bin/git config core.bare
true true
> Updating cache git repo (CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6) $ /usr/bin/git rev-list --max-count=1 v3.1.0
$ /usr/bin/git remote update f7176f4798d068d233dca5223ae4bd9c8059e830
Fetching origin
$ /usr/bin/git init $ /usr/bin/git init
Initialized empty Git repository in ROOT/tmp/install_podfile_callbacks/Pods/Reachability/.git/ Initialized empty Git repository in ROOT/tmp/install_podfile_callbacks/Pods/Reachability/.git/
$ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' $ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6'
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Fetching external sources Fetching external sources
...@@ -19,9 +19,8 @@ Downloading dependencies ...@@ -19,9 +19,8 @@ Downloading dependencies
true true
$ /usr/bin/git config core.bare $ /usr/bin/git config core.bare
true true
> Updating cache git repo (CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6) $ /usr/bin/git rev-list --max-count=1 v3.1.0
$ /usr/bin/git remote update f7176f4798d068d233dca5223ae4bd9c8059e830
Fetching origin
$ /usr/bin/git init $ /usr/bin/git init
Initialized empty Git repository in ROOT/tmp/install_podspec/Pods/Reachability/.git/ Initialized empty Git repository in ROOT/tmp/install_podspec/Pods/Reachability/.git/
$ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' $ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6'
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Finding Podfile changes Finding Podfile changes
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Fetching external sources Fetching external sources
...@@ -19,9 +19,8 @@ Downloading dependencies ...@@ -19,9 +19,8 @@ Downloading dependencies
true true
$ /usr/bin/git config core.bare $ /usr/bin/git config core.bare
true true
> Updating cache git repo (CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6) $ /usr/bin/git rev-list --max-count=1 v3.1.0
$ /usr/bin/git remote update f7176f4798d068d233dca5223ae4bd9c8059e830
Fetching origin
$ /usr/bin/git init $ /usr/bin/git init
Initialized empty Git repository in ROOT/tmp/install_spec_callbacks/Pods/Reachability/.git/ Initialized empty Git repository in ROOT/tmp/install_spec_callbacks/Pods/Reachability/.git/
$ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' $ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6'
......
$ pod install --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod install --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Fetching external sources Fetching external sources
......
$ pod spec lint --quick --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod spec lint --quick --verbose --no-color 2>&1
-> Reachability -> Reachability (3.1.0) -> Reachability -> Reachability (3.1.0)
Analyzed 1 podspec. Analyzed 1 podspec.
......
$ pod update --no-repo-update --no-doc --verbose --no-color 2>&1 CP_AGGRESSIVE_CACHE=TRUE $ pod update --no-repo-update --verbose --no-color 2>&1
Analyzing dependencies Analyzing dependencies
Finding Podfile changes Finding Podfile changes
...@@ -19,9 +19,8 @@ Downloading dependencies ...@@ -19,9 +19,8 @@ Downloading dependencies
true true
$ /usr/bin/git config core.bare $ /usr/bin/git config core.bare
true true
> Updating cache git repo (CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6) $ /usr/bin/git rev-list --max-count=1 v3.1.0
$ /usr/bin/git remote update f7176f4798d068d233dca5223ae4bd9c8059e830
Fetching origin
$ /usr/bin/git init $ /usr/bin/git init
Initialized empty Git repository in ROOT/tmp/update/Pods/Reachability/.git/ Initialized empty Git repository in ROOT/tmp/update/Pods/Reachability/.git/
$ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' $ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6'
......
...@@ -88,7 +88,7 @@ end ...@@ -88,7 +88,7 @@ end
# environment. # environment.
# #
def launch_binary(arguments, folder) def launch_binary(arguments, folder)
command = "#{POD_BINARY} #{arguments} --verbose --no-color 2>&1" command = "CP_AGGRESSIVE_CACHE=TRUE #{POD_BINARY} #{arguments} --verbose --no-color 2>&1"
Dir.chdir(TMP_DIR + folder) do Dir.chdir(TMP_DIR + folder) do
output = `#{command}` output = `#{command}`
it "$ pod #{arguments}" do it "$ pod #{arguments}" do
...@@ -306,59 +306,53 @@ describe "Integration take 2" do ...@@ -306,59 +306,53 @@ describe "Integration take 2" do
# Test subspecs inheritance # Test subspecs inheritance
describe "Integrates a project with CocoaPods" do describe "Integrates a project with CocoaPods" do
check "install --no-repo-update --no-doc", "install_new" check "install --no-repo-update", "install_new"
end end
describe "Adds a Pod to an existing installation" do describe "Adds a Pod to an existing installation" do
check "install --no-repo-update --no-doc", "install_add_pod" check "install --no-repo-update", "install_add_pod"
end end
describe "Removes a Pod from an existing installation" do describe "Removes a Pod from an existing installation" do
check "install --no-repo-update --no-doc", "install_remove_pod" check "install --no-repo-update", "install_remove_pod"
end end
describe "Creates an installation with multiple target definitions" do describe "Creates an installation with multiple target definitions" do
check "install --no-repo-update --no-doc", "install_multiple_targets" check "install --no-repo-update", "install_multiple_targets"
end end
describe "Installs a Pod with different subspecs activated across different targets" do describe "Installs a Pod with different subspecs activated across different targets" do
check "install --no-repo-update --no-doc", "install_subspecs" check "install --no-repo-update", "install_subspecs"
end end
describe "Installs a Pod with a local source" do describe "Installs a Pod with a local source" do
check "install --no-repo-update --no-doc", "install_local_source" check "install --no-repo-update", "install_local_source"
end end
describe "Installs a Pod with an external source" do describe "Installs a Pod with an external source" do
check "install --no-repo-update --no-doc", "install_external_source" check "install --no-repo-update", "install_external_source"
end end
describe "Installs a Pod given the podspec" do describe "Installs a Pod given the podspec" do
check "install --no-repo-update --no-doc", "install_podspec" check "install --no-repo-update", "install_podspec"
end end
describe "Performs an installation using a custom workspace" do describe "Performs an installation using a custom workspace" do
check "install --no-repo-update --no-doc", "install_custom_workspace" check "install --no-repo-update", "install_custom_workspace"
end end
# @todo add tests for all the hooks API # @todo add tests for all the hooks API
# #
describe "Runs the Podfile callbacks" do describe "Runs the Podfile callbacks" do
check "install --no-repo-update --no-doc", "install_podfile_callbacks" check "install --no-repo-update", "install_podfile_callbacks"
end end
# @todo add tests for all the hooks API # @todo add tests for all the hooks API
# #
describe "Runs the specification callbacks" do describe "Runs the specification callbacks" do
check "install --no-repo-update --no-doc", "install_spec_callbacks" check "install --no-repo-update", "install_spec_callbacks"
end end
# @todo requires CocoaPods 0.17
#
# describe "Generates the documentation of Pod during installation" do
# check "install --no-repo-update --no-doc", "install_docs"
# end
end end
#--------------------------------------# #--------------------------------------#
...@@ -366,7 +360,7 @@ describe "Integration take 2" do ...@@ -366,7 +360,7 @@ describe "Integration take 2" do
describe "Pod update" do describe "Pod update" do
describe "Updates an existing installation" do describe "Updates an existing installation" do
check "update --no-repo-update --no-doc", "update" check "update --no-repo-update", "update"
end end
end end
......
...@@ -87,31 +87,5 @@ module Pod ...@@ -87,31 +87,5 @@ module Pod
#--------------------------------------# #--------------------------------------#
if `which appledoc`.strip.empty?
puts " ! ".red << "Skipping because the `appledoc` executable can't be found."
else
# @todo fix the config of the hook
it "generates documentation of all pods by default" do
podfile = Podfile.new do
platform :ios
xcodeproj 'dummy'
pod 'JSONKit', '1.4'
pod 'SSToolkit', '1.0.0'
end
config.generate_docs = true
config.install_docs = false
Generator::Documentation.any_instance.stubs(:already_installed?).returns(false)
installer = Installer.new(config.sandbox, podfile)
installer.install!
doc = (config.sandbox_root + 'Documentation/JSONKit/html/index.html').read
doc.should.include?('<title>JSONKit 1.4 Reference</title>')
doc = (config.sandbox_root + 'Documentation/SSToolkit/html/index.html').read
doc.should.include?('<title>SSToolkit 1.0.0 Reference</title>')
end
end
end end
end end
# Encoding: utf-8
module Bacon module Bacon
summary_at_exit summary_at_exit
...@@ -11,8 +13,9 @@ module Bacon ...@@ -11,8 +13,9 @@ module Bacon
"\e[32m#{string}\e[0m" "\e[32m#{string}\e[0m"
when :yellow when :yellow
"\e[33m#{string}\e[0m" "\e[33m#{string}\e[0m"
when :none
string
else else
# Support for Conque
"\e[0m#{string}\e[0m" "\e[0m#{string}\e[0m"
end end
end end
...@@ -43,14 +46,24 @@ module Bacon ...@@ -43,14 +46,24 @@ module Bacon
#:nodoc: #:nodoc:
def handle_requirement(description, disabled = false) def handle_requirement(description, disabled = false)
start_time = Time.now.to_f
error = yield error = yield
elapsed_time = ((Time.now.to_f - start_time) * 1000).round
if !error.empty? if !error.empty?
puts Bacon.color(:red, "#{spaces}- #{description} [FAILED]") puts Bacon.color(:red, "#{spaces}- #{description} [FAILED]")
elsif disabled elsif disabled
puts Bacon.color(:yellow, "#{spaces}- #{description} [DISABLED]") puts Bacon.color(:yellow, "#{spaces}- #{description} [DISABLED]")
else else
puts Bacon.color(:green, "#{spaces}- #{description}") time_color = case elapsed_time
when 0..200
:none
when 200..500
:yellow
else
:red
end
puts Bacon.color(:green, "#{spaces}✓ ") + "#{description} " + Bacon.color(time_color, "(#{elapsed_time} ms)")
end end
end end
......
...@@ -11,8 +11,6 @@ module Bacon ...@@ -11,8 +11,6 @@ module Bacon
c.silent = true c.silent = true
c.repos_dir = fixture('spec-repos') c.repos_dir = fixture('spec-repos')
c.installation_root = SpecHelper.temporary_directory c.installation_root = SpecHelper.temporary_directory
c.install_docs = false
c.generate_docs = false
c.skip_repo_update = true c.skip_repo_update = true
end end
......
...@@ -21,6 +21,13 @@ module Pod ...@@ -21,6 +21,13 @@ module Pod
config.repos_dir.should == Pathname.new("~/.cocoapods").expand_path config.repos_dir.should == Pathname.new("~/.cocoapods").expand_path
end end
it "allows to specify whether the aggressive cache should be used with an environment variable" do
config.aggressive_cache = false
ENV['CP_AGGRESSIVE_CACHE'] = 'TRUE'
config.aggressive_cache?.should.be.true
ENV.delete('CP_AGGRESSIVE_CACHE')
end
it "allows to specify the repos dir with an environment variable" do it "allows to specify the repos dir with an environment variable" do
ENV['CP_REPOS_DIR'] = '~/custom_repos_dir' ENV['CP_REPOS_DIR'] = '~/custom_repos_dir'
config.repos_dir.should == Pathname.new("~/custom_repos_dir").expand_path config.repos_dir.should == Pathname.new("~/custom_repos_dir").expand_path
......
require File.expand_path('../../../spec_helper', __FILE__)
module Pod
describe Generator::Documentation do
before do
sandbox = config.sandbox
spec = fixture_spec('banana-lib/BananaLib.podspec')
root = fixture('banana-lib')
path_list = Sandbox::PathList.new(root)
@doc_installer = Generator::Documentation.new(sandbox, spec, path_list)
end
it 'returns the Pod documentation header files' do
@doc_installer.public_headers.sort.should == %w[ Classes/Banana.h ].sort
end
it 'returns an empty array in case there are no appledoc options specified' do
@doc_installer.specification.stubs(:documentation).returns({})
@doc_installer.spec_appledoc_options.should == []
end
it 'returns the Pod documentation options' do
expected = [
'--project-name', 'BananaLib 1.0',
'--docset-desc', 'Chunky bananas!',
'--project-company', 'Banana Corp and Monkey Boy',
'--docset-copyright', 'Banana Corp and Monkey Boy',
'--company-id', 'org.cocoapods.bananalib',
'--ignore', '.m',
'--keep-undocumented-objects',
'--keep-undocumented-members',
'--keep-intermediate-files',
'--exit-threshold', '2',
'--index-desc', 'README',
'--project-company', 'Banana Corp',
'--company-id', 'com.banana'
]
options = @doc_installer.appledoc_options
expected.each do |expected_option|
options.should.include?(expected_option)
end
end
it "returns the command line arguments to pass to the appledoc tool" do
arguments = @doc_installer.apple_doc_command_line_arguments(install_docset=false)
arguments.should.include?("--project-name 'BananaLib 1.0' ")
arguments.should.include?(" --docset-desc 'Chunky bananas!' ")
arguments.should.include?(" --project-company 'Banana Corp and Monkey Boy' ")
arguments.should.include?(" --docset-copyright 'Banana Corp and Monkey Boy' ")
arguments.should.include?(" --company-id org.cocoapods.bananalib ")
arguments.should.include?(" --ignore .m ")
arguments.should.include?(" --keep-undocumented-objects ")
arguments.should.include?(" --keep-undocumented-members ")
arguments.should.include?(" --keep-intermediate-files ")
arguments.should.include?(" --exit-threshold 2 ")
arguments.should.include?(" --index-desc README ")
arguments.should.include?(" --project-company 'Banana Corp' ")
arguments.should.include?(" --company-id com.banana ")
# arguments.should.include?(" --output tmp/Pods/Documentation/BananaLib ")
arguments.should.include?(" --no-create-docset Classes/Banana.h")
arguments.should.include?(" Classes/Banana.h")
end
#-------------------------------------------------------------------------#
if !`which appledoc`.strip.empty?
describe "Appledoc integration" do
before do
@doc_installer.generate(false)
end
it 'creates the html' do
docs_path = config.sandbox.root + "Documentation/BananaLib/html"
docs_path.should.exist
(docs_path + 'index.html').read.should.include?('BananaObj')
(docs_path + 'Classes/BananaObj.html').read.should.include?('Bananas are cool')
end
end
else
puts "[!] Skipping documentation generation specs, because appledoc can't be found."
end
end
end
...@@ -14,14 +14,6 @@ module Pod ...@@ -14,14 +14,6 @@ module Pod
describe "In General" do describe "In General" do
it "doesn't generate docs by default" do
@installer.should.not.generate_docs?
end
it "doesn't installs the docs by default" do
@installer.should.not.install_docs?
end
it "doesn't use an aggressive cache by default" do it "doesn't use an aggressive cache by default" do
@installer.should.not.aggressive_cache? @installer.should.not.aggressive_cache?
end end
...@@ -73,31 +65,6 @@ module Pod ...@@ -73,31 +65,6 @@ module Pod
#--------------------------------------# #--------------------------------------#
describe "Documentation" do
it "generates the documentation if needed" do
@installer.generate_docs = true
@installer.documentation_generator.expects(:generate)
@installer.install!
end
it "doesn't generates the documentation if it is already installed" do
@installer.generate_docs = true
@installer.documentation_generator.stubs(:already_installed?).returns(true)
@installer.documentation_generator.expects(:generate).never
@installer.install!
end
it "doesn't generates the documentation if disabled in the config" do
@installer.generate_docs = false
@installer.documentation_generator.expects(:generate).never
@installer.install!
end
end
#--------------------------------------#
describe "Cleaning" do describe "Cleaning" do
it "cleans the paths non used by the installation" do it "cleans the paths non used by the installation" do
......
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