Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: CocoaPods/CocoaPods
...
head fork: CocoaPods/CocoaPods
  • 17 commits
  • 43 files changed
  • 0 commit comments
  • 2 contributors
Showing with 178 additions and 104 deletions.
  1. +1 −1  .travis.yml
  2. +19 −3 CHANGELOG.md
  3. +1 −1  Gemfile
  4. +23 −12 Rakefile
  5. +1 −1  examples/AFNetworking Mac Example/Podfile.lock
  6. +1 −1  examples/AFNetworking iOS Example/Podfile.lock
  7. +1 −1  examples/TargetTest/Podfile.lock
  8. +14 −0 lib/cocoapods.rb
  9. +11 −4 lib/cocoapods/command.rb
  10. +2 −2 lib/cocoapods/config.rb
  11. +6 −0 lib/cocoapods/external_sources.rb
  12. +1 −1  lib/cocoapods/gem_version.rb
  13. +5 −5 lib/cocoapods/installer/file_references_installer.rb
  14. +0 −8 lib/cocoapods/installer/pod_source_installer.rb
  15. +16 −11 lib/cocoapods/sandbox/file_accessor.rb
  16. +2 −2 lib/cocoapods/user_interface.rb
  17. +5 −5 lib/cocoapods/user_interface/error_report.rb
  18. +1 −1  spec/integration/install_add_pod/after/Podfile.lock
  19. +1 −1  spec/integration/install_add_pod/after/Pods/Manifest.lock
  20. +1 −1  spec/integration/install_external_source/after/Podfile.lock
  21. +1 −1  spec/integration/install_external_source/after/Pods/Manifest.lock
  22. +1 −1  spec/integration/install_local_source/after/Podfile.lock
  23. +1 −1  spec/integration/install_local_source/after/Pods/Manifest.lock
  24. +1 −1  spec/integration/install_multiple_targets/after/Podfile.lock
  25. +1 −1  spec/integration/install_multiple_targets/after/Pods/Manifest.lock
  26. +1 −1  spec/integration/install_new/after/Podfile.lock
  27. +1 −1  spec/integration/install_new/after/Pods/Manifest.lock
  28. +1 −1  spec/integration/install_podfile_callbacks/after/Podfile.lock
  29. +1 −1  spec/integration/install_podfile_callbacks/after/Pods/Manifest.lock
  30. +1 −1  spec/integration/install_podspec/after/Podfile.lock
  31. +1 −1  spec/integration/install_podspec/after/Pods/Manifest.lock
  32. +1 −1  spec/integration/install_remove_pod/after/Podfile.lock
  33. +1 −1  spec/integration/install_remove_pod/after/Pods/Manifest.lock
  34. +1 −1  spec/integration/install_spec_callbacks/after/Podfile.lock
  35. +1 −1  spec/integration/install_spec_callbacks/after/Pods/Manifest.lock
  36. +1 −1  spec/integration/install_subspecs/after/Podfile.lock
  37. +1 −1  spec/integration/install_subspecs/after/Pods/Manifest.lock
  38. +1 −1  spec/integration/update/after/Podfile.lock
  39. +1 −1  spec/integration/update/after/Pods/Manifest.lock
  40. +3 −0  spec/integration_2.rb
  41. +10 −0 spec/unit/config_spec.rb
  42. +10 −14 spec/unit/installer/file_references_installer_spec.rb
  43. +24 −10 spec/unit/sandbox/file_accessor_spec.rb
2  .travis.yml
View
@@ -4,7 +4,7 @@ env:
- RVM_RUBY_VERSION=system NOEXEC_DISABLE=1 RUBY_VERSION_SPECIFIC='sudo gem update --system && sudo gem install bundler --no-ri --no-rdoc'
- 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
before_install: source ~/.rvm/scripts/rvm && rvm use $RVM_RUBY_VERSION
-install: eval $RUBY_VERSION_SPECIFIC && rake bootstrap
+install: eval $RUBY_VERSION_SPECIFIC && rake bootstrap[use_bundle_dir]
script: bundle exec rake spec:ci
notifications:
campfire:
22 CHANGELOG.md
View
@@ -1,6 +1,21 @@
+## 0.17.0.rc2
+[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.0.rc1...0.17.0.rc2)
+• [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.0.rc1...0.17.0.rc2)
+
+###### Bug fixes
+
+- Restored output coloring.
+- Fixed a crash related to subspecs
+ [#819](https://github.com/CocoaPods/CocoaPods/issues/819)
+- Git repos were not cached for dependencies with external sources.
+ [#820](https://github.com/CocoaPods/CocoaPods/issues/820)
+- Restored support for directories for the preserve_patterns specification
+ attribute.
+ [#823](https://github.com/CocoaPods/CocoaPods/issues/823)
+
## 0.17.0.rc1
-[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/master...0.17)
-• [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.5.0...master)
+[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.16.4...0.17.0.rc1)
+• [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.4.3...0.5.0)
• [cocoapods-core](https://github.com/CocoaPods/Core)
• [cocoapods-downloader](https://github.com/CocoaPods/cocoapods-downloader)
@@ -17,6 +32,7 @@ CocoaPods internals and need to be updated:
- LibComponentLogging-pods/0.0.1/LibComponentLogging-pods.podspec
- RestKit/0.9.3/RestKit.podspec
- Three20/1.0.11/Three20.podspec
+- ARAnalytics/1.1/ARAnalytics.podspec
Other specifications, might present compatibility issues for the reasons
presented below.
@@ -53,7 +69,7 @@ presented below.
###### Enhancements
-- Released preview [documentation](docs.cocoapods.org).
+- Released preview [documentation](http://docs.cocoapods.org).
- CocoaPods now has support for working in teams and not committing the Pods
folder, as it will keep track of the status of the Pods folder.
[#552](https://github.com/CocoaPods/CocoaPods/issues/552)
2  Gemfile
View
@@ -14,7 +14,7 @@ group :development do
# gem "xcodeproj", :path => "../Xcodeproj"
# gem "cocoapods-downloader", :path => "../cocoapods-downloader"
- gem "mocha", "~> 0.11.4"
+ gem "mocha"
gem "bacon"
gem "mocha-on-bacon"
gem "rake"
35 Rakefile
View
@@ -48,7 +48,7 @@ namespace :gem do
desc "Run all specs, build and install gem, commit version change, tag version change, and push everything"
task :release do
- unless true|| ENV['SKIP_CHECKS']
+ unless ENV['SKIP_CHECKS']
if `git symbolic-ref HEAD 2>/dev/null`.strip.split('/').last != 'master'
$stderr.puts "[!] You need to be on the `master' branch in order to be able to do a release."
exit 1
@@ -153,15 +153,6 @@ namespace :spec do
FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
end
- def title(title)
- cyan_title = "\033[0;36m#{title}\033[0m"
- puts
- puts "-" * 80
- puts "| #{cyan_title.ljust(87)} |"
- puts "-" * 80
- puts
- end
-
#--------------------------------------#
desc "Automatically run specs for updated files"
@@ -289,6 +280,7 @@ end
#-----------------------------------------------------------------------------#
+task :examples => "examples:build"
namespace :examples do
def examples
@@ -347,12 +339,18 @@ end
#-----------------------------------------------------------------------------#
desc "Initializes your working copy to run the specs"
-task :bootstrap do
+task :bootstrap, :use_bundle_dir? do |t, args|
+ title "Environment bootstrap"
+
puts "Updating submodules"
execute_command "git submodule update --init --recursive"
puts "Installing gems"
- execute_command "bundle install"
+ if args[:use_bundle_dir?]
+ execute_command "bundle install --path ./travis_bundle_dir"
+ else
+ execute_command "bundle install"
+ end
puts "Installing tools (Homebrew)"
execute_command "brew install appledoc" if `which appledoc`.strip.empty?
@@ -365,3 +363,16 @@ desc "Run all specs"
task :spec => 'spec:all'
task :default => :spec
+
+#-----------------------------------------------------------------------------#
+
+# group helpers
+
+def title(title)
+ cyan_title = "\033[0;36m#{title}\033[0m"
+ puts
+ puts "-" * 80
+ puts cyan_title
+ puts "-" * 80
+ puts
+end
2  examples/AFNetworking Mac Example/Podfile.lock
View
@@ -25,4 +25,4 @@ SPEC CHECKSUMS:
FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  examples/AFNetworking iOS Example/Podfile.lock
View
@@ -25,4 +25,4 @@ SPEC CHECKSUMS:
FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  examples/TargetTest/Podfile.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
14 lib/cocoapods.rb
View
@@ -16,6 +16,20 @@ def message
end
end
+ # @return [String] The directory where CocoaPods caches the downloads.
+ #
+ # @todo The {Installer::PodSourceInstaller} and the #{ExternalSources}
+ # classes build and configure the downloader from scratch.
+ #
+ CACHE_ROOT = "~/Library/Caches/CocoaPods"
+
+ # @return [Fixnum] The maximum size for the cache expressed in Mb.
+ #
+ # @todo The {Installer::PodSourceInstaller} and the #{ExternalSources}
+ # classes build and configure the downloader from scratch.
+ #
+ MAX_CACHE_SIZE = 500
+
require 'cocoapods-core'
require 'xcodeproj'
require 'cocoapods/downloader'
15 lib/cocoapods/command.rb
View
@@ -21,7 +21,7 @@ def self.options
def self.parse(argv)
command = super
- unless SourcesManager.master_repo_functional? || command.is_a?(Setup) || ENV['SKIP_SETUP']
+ unless SourcesManager.master_repo_functional? || command.is_a?(Setup) || command.is_a?(Repo::Add) || ENV['SKIP_SETUP']
Setup.new(CLAide::ARGV.new([])).run
end
command
@@ -52,11 +52,18 @@ def self.report_error(error)
#
# @todo We should probably not even load colored unless needed.
#
+ # @todo Move silent flag to CLAide.
+ #
+ # @note It is importat that the commadnds don't overide the default
+ # settings if their flag is missing (i.e. their value is nil)
+ #
def initialize(argv)
- config.silent = argv.flag?('silent', config.silent)
- config.verbose = argv.flag?('verbose', config.verbose?)
- String.send(:define_method, :colorize) { |string , _| string } unless self.colorize_output?
super
+ config.silent = argv.flag?('silent', config.silent)
+ config.verbose = self.verbose? unless self.verbose.nil?
+ unless self.colorize_output?
+ String.send(:define_method, :colorize) { |string , _| string }
+ end
end
#-------------------------------------------------------------------------#
4 lib/cocoapods/config.rb
View
@@ -113,7 +113,7 @@ def verbose
# @return [Pathname] the directory where the CocoaPods sources are stored.
#
def repos_dir
- @repos_dir ||= Pathname.new(ENV['HOME'] + "/.cocoapods")
+ @repos_dir ||= Pathname.new(ENV['CP_REPOS_DIR'] || "~/.cocoapods").expand_path
end
attr_writer :repos_dir
@@ -165,7 +165,7 @@ def lockfile
# @return [Pathname] The path of the file which contains the user settings.
#
def user_settings_file
- Pathname.new(ENV['HOME'] + "/.cocoapods/config.yaml")
+ repos_dir + "config.yaml"
end
# Sets the values of the attributes with the given hash.
6 lib/cocoapods/external_sources.rb
View
@@ -122,6 +122,9 @@ def description
# marked as pre-downloaded indicating to the installer that only
# clean operations are needed.
#
+ # @todo The downloader configuration is the same of the
+ # #{PodSourceInstaller} and it needs to be kept in sync.
+ #
# @return [void]
#
def pre_download(sandbox)
@@ -129,6 +132,9 @@ def pre_download(sandbox)
target = sandbox.root + name
target.rmtree if target.exist?
downloader = Downloader.for_target(target, params)
+ downloader.cache_root = CACHE_ROOT
+ downloader.max_cache_size = MAX_CACHE_SIZE
+ downloader.aggressive_cache = false
downloader.download
store_podspec(sandbox, target + "#{name}.podspec")
sandbox.store_pre_downloaded_pod(name)
2  lib/cocoapods/gem_version.rb
View
@@ -2,6 +2,6 @@ module Pod
# The version of the cocoapods command line tool.
#
- VERSION = '0.17.0.rc1' unless defined? Pod::VERSION
+ VERSION = '0.17.0.rc2' unless defined? Pod::VERSION
end
10 lib/cocoapods/installer/file_references_installer.rb
View
@@ -113,12 +113,11 @@ def link_headers
sandbox.build_headers.add_search_path(headers_sandbox)
sandbox.public_headers.add_search_path(headers_sandbox)
- consumer = file_accessor.spec_consumer
- header_mappings(headers_sandbox, consumer, file_accessor.headers).each do |namespaced_path, files|
+ header_mappings(headers_sandbox, file_accessor, file_accessor.headers).each do |namespaced_path, files|
sandbox.build_headers.add_files(namespaced_path, files)
end
- header_mappings(headers_sandbox, consumer, file_accessor.public_headers).each do |namespaced_path, files|
+ header_mappings(headers_sandbox, file_accessor, file_accessor.public_headers).each do |namespaced_path, files|
sandbox.public_headers.add_files(namespaced_path, files)
end
end
@@ -154,7 +153,8 @@ def file_accessors
# headers folders as the keys and the absolute paths of the
# header files as the values.
#
- def header_mappings(headers_sandbox, consumer, headers)
+ def header_mappings(headers_sandbox, file_accessor, headers)
+ consumer = file_accessor.spec_consumer
dir = headers_sandbox
dir = dir + consumer.header_dir if consumer.header_dir
@@ -162,7 +162,7 @@ def header_mappings(headers_sandbox, consumer, headers)
headers.each do |header|
sub_dir = dir
if consumer.header_mappings_dir
- header_mappings_dir = Pathname.new(consumer.header_mappings_dir)
+ header_mappings_dir = file_accessor.path_list.root + consumer.header_mappings_dir
relative_path = header.relative_path_from(header_mappings_dir)
sub_dir = sub_dir + relative_path.dirname
end
8 lib/cocoapods/installer/pod_source_installer.rb
View
@@ -152,14 +152,6 @@ def clean_installation
# @!group Dependencies
- # @return [String] The directory where CocoaPods caches the downloads.
- #
- CACHE_ROOT = "~/Library/Caches/CocoaPods"
-
- # @return [Fixnum] The maximum size for the cache expressed in Mb.
- #
- MAX_CACHE_SIZE = 500
-
# @return [Downloader] The downloader to use for the retrieving the
# source.
#
27 lib/cocoapods/sandbox/file_accessor.rb
View
@@ -5,6 +5,8 @@ class Sandbox
# taking into account any exclude pattern and the default extensions to use
# for directories.
#
+ # @note The FileAccessor always returns absolute paths.
+ #
class FileAccessor
HEADER_EXTENSIONS = Xcodeproj::Constants::HEADER_FILES_EXTENSIONS
@@ -31,6 +33,12 @@ def initialize(path_list, spec_consumer)
end
end
+ # @return [Pathname] the directory which contains the files of the Pod.
+ #
+ def root
+ path_list.root
+ end
+
# @return [Specification] the specification.
#
def spec
@@ -39,14 +47,14 @@ def spec
# @return [Specification] the platform used to consume the specification.
#
- def platform
- spec_consumer.platform
+ def platform_name
+ spec_consumer.platform_name
end
# @return [String] A string suitable for debugging.
#
def inspect
- "<#{self.class} spec=#{spec.name} platform=#{spec_consumer.platform} root=#{path_list.root}>"
+ "<#{self.class} spec=#{spec.name} platform=#{platform_name} root=#{path_list.root}>"
end
#-----------------------------------------------------------------------#
@@ -83,17 +91,13 @@ def public_headers
# specification grouped by destination.
#
def resources
- options = {
- :exclude_patterns => spec_consumer.exclude_files,
- :include_dirs => true,
- }
- expanded_paths(spec_consumer.resources, options)
+ paths_for_attribute(:resources, true)
end
# @return [Array<Pathname>] the files of the specification to preserve.
#
def preserve_paths
- paths_for_attribute(:preserve_paths)
+ paths_for_attribute(:preserve_paths, true)
end
# @return [Pathname] The of the prefix header file of the specification.
@@ -136,11 +140,12 @@ def license
#
# @return [Array<Pathname>] the paths.
#
- def paths_for_attribute(attribute)
+ def paths_for_attribute(attribute, include_dirs = false)
file_patterns = spec_consumer.send(attribute)
options = {
:exclude_patterns => spec_consumer.exclude_files,
- :dir_pattern => glob_for_attribute(attribute)
+ :dir_pattern => glob_for_attribute(attribute),
+ :include_dirs => include_dirs,
}
expanded_paths(file_patterns, options)
end
4 lib/cocoapods/user_interface.rb
View
@@ -145,7 +145,7 @@ def notice(message)
# return [void]
#
def warn(message, actions = [], verbose_only = false)
- warnings << { :message => message, :actions => actions }
+ warnings << { :message => message, :actions => actions, :verbose_only => verbose_only }
end
# Prints the stored warnings. This method is intended to be called at the
@@ -154,9 +154,9 @@ def warn(message, actions = [], verbose_only = false)
# @return [void]
#
def print_warnings
- return if config.silent? && verbose_only
STDOUT.flush
warnings.each do |warning|
+ next if warning[:verbose_only] && !config.verbose?
STDERR.puts("\n[!] #{warning[:message]}".yellow)
warning[:actions].each do |action|
indented = wrap_string(action, " - ")
10 lib/cocoapods/user_interface/error_report.rb
View
@@ -7,7 +7,7 @@ module Pod
module UserInterface
module ErrorReport
class << self
- def report(error)
+ def report(exception)
return <<-EOS
#{'――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――'.reversed}
@@ -36,16 +36,16 @@ def report(error)
### Error
```
-#{error.message}
-#{error.backtrace.join("\n")}
+#{exception.class} - #{exception.message}
+#{exception.backtrace.join("\n")}
```
#{'――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――'.reversed}
#{'[!] Oh no, an error occurred.'.red}
-#{error_from_podfile(error)}
+#{error_from_podfile(exception)}
#{'Search for existing github issues similar to yours:'.yellow}
-#{"https://github.com/CocoaPods/CocoaPods/issues/search?q=#{CGI.escape(error.message)}"}
+#{"https://github.com/CocoaPods/CocoaPods/issues/search?q=#{CGI.escape(exception.message)}"}
#{'If none exists, create a ticket, with the template displayed above, on:'.yellow}
https://github.com/CocoaPods/CocoaPods/issues/new
2  spec/integration/install_add_pod/after/Podfile.lock
View
@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_add_pod/after/Pods/Manifest.lock
View
@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_external_source/after/Podfile.lock
View
@@ -15,4 +15,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_external_source/after/Pods/Manifest.lock
View
@@ -15,4 +15,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_local_source/after/Podfile.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_local_source/after/Pods/Manifest.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_multiple_targets/after/Podfile.lock
View
@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_multiple_targets/after/Pods/Manifest.lock
View
@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 3d4708953ea7ae399a49777372d8b060a43ddd27
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_new/after/Podfile.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_new/after/Pods/Manifest.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_podfile_callbacks/after/Podfile.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_podfile_callbacks/after/Pods/Manifest.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_podspec/after/Podfile.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_podspec/after/Pods/Manifest.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_remove_pod/after/Podfile.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_remove_pod/after/Pods/Manifest.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_spec_callbacks/after/Podfile.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: fc385e96bfc6d73ff55de863145498352d1c12ea
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_spec_callbacks/after/Pods/Manifest.lock
View
@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: fc385e96bfc6d73ff55de863145498352d1c12ea
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_subspecs/after/Podfile.lock
View
@@ -13,4 +13,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/install_subspecs/after/Pods/Manifest.lock
View
@@ -13,4 +13,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/update/after/Podfile.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
2  spec/integration/update/after/Pods/Manifest.lock
View
@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: 1c8584c5f26fa776695efef95caaa50402c94cfb
-COCOAPODS: 0.17.0.rc1
+COCOAPODS: 0.17.0.rc2
3  spec/integration_2.rb
View
@@ -145,6 +145,9 @@ def check_with_folder(folder)
when %r[/xcuserdata/], %r[\.pbxproj$]
# Projects are compared through the more readable yaml representation
next
+ when %r[execution_output.txt$]
+ # TODO The output from the caches changes on Travis
+ next
end
it relative_path do
10 spec/unit/config_spec.rb
View
@@ -16,6 +16,16 @@ module Pod
it "returns the path to the spec-repos dir" do
config.repos_dir.should == Pathname.new("~/.cocoapods").expand_path
end
+
+ it "returns the path to the spec-repos dir" do
+ config.repos_dir.should == Pathname.new("~/.cocoapods").expand_path
+ end
+
+ it "allows to specify the repos dir with an environment variable" do
+ ENV['CP_REPOS_DIR'] = '~/custom_repos_dir'
+ config.repos_dir.should == Pathname.new("~/custom_repos_dir").expand_path
+ ENV.delete('CP_REPOS_DIR')
+ end
end
describe "Concerning a user's project, which is expected in the current working directory" do
24 spec/unit/installer/file_references_installer_spec.rb
View
@@ -91,9 +91,8 @@ module Pod
it "returns the header mappings" do
headers_sandbox = Pathname.new('BananaLib')
- consumer = @file_accessor.spec_consumer
headers = [Pathname.new('BananaLib/Banana.h')]
- mappings = @installer.send(:header_mappings, headers_sandbox, consumer, headers)
+ mappings = @installer.send(:header_mappings, headers_sandbox, @file_accessor, headers)
mappings.should == {
headers_sandbox => [Pathname.new('BananaLib/Banana.h')]
}
@@ -101,10 +100,9 @@ module Pod
it "takes into account the header dir specified in the spec" do
headers_sandbox = Pathname.new('BananaLib')
- consumer = @file_accessor.spec_consumer
headers = [Pathname.new('BananaLib/Banana.h')]
- consumer.stubs(:header_dir).returns('Sub_dir')
- mappings = @installer.send(:header_mappings, headers_sandbox, consumer, headers)
+ @file_accessor.spec_consumer.stubs(:header_dir).returns('Sub_dir')
+ mappings = @installer.send(:header_mappings, headers_sandbox, @file_accessor, headers)
mappings.should == {
(headers_sandbox + 'Sub_dir') => [Pathname.new('BananaLib/Banana.h')]
}
@@ -112,16 +110,14 @@ module Pod
it "takes into account the header mappings dir specified in the spec" do
headers_sandbox = Pathname.new('BananaLib')
- consumer = @file_accessor.spec_consumer
- headers = [
- Pathname.new('BananaLib/sub_dir/dir_1/banana_1.h'),
- Pathname.new('BananaLib/sub_dir/dir_2/banana_2.h'),
- ]
- consumer.stubs(:header_mappings_dir).returns('BananaLib/sub_dir')
- mappings = @installer.send(:header_mappings, headers_sandbox, consumer, headers)
+ header_1 = @file_accessor.root + 'BananaLib/sub_dir/dir_1/banana_1.h'
+ header_2 = @file_accessor.root + 'BananaLib/sub_dir/dir_2/banana_2.h'
+ headers = [ header_1, header_2 ]
+ @file_accessor.spec_consumer.stubs(:header_mappings_dir).returns('BananaLib/sub_dir')
+ mappings = @installer.send(:header_mappings, headers_sandbox, @file_accessor, headers)
mappings.should == {
- (headers_sandbox + 'dir_1') => [Pathname.new('BananaLib/sub_dir/dir_1/banana_1.h')],
- (headers_sandbox + 'dir_2') => [Pathname.new('BananaLib/sub_dir/dir_2/banana_2.h')],
+ (headers_sandbox + 'dir_1') => [header_1],
+ (headers_sandbox + 'dir_2') => [header_2],
}
end
34 spec/unit/sandbox/file_accessor_spec.rb
View
@@ -13,14 +13,6 @@ module Pod
describe "In general" do
- it "returns the root" do
- @accessor.path_list.should == @path_list
- end
-
- it "returns the specification" do
- @accessor.spec_consumer.should == @spec_consumer
- end
-
it "raises if the consumer is nil" do
e = lambda { FileAccessor.new(@path_list, nil) }.should.raise Informative
e.message.should.match /without a specification consumer/
@@ -34,6 +26,18 @@ module Pod
e.message.should.match /non existent folder/
end
+ it "returns the root" do
+ @accessor.root.should == @path_list.root
+ end
+
+ it "returns the specification" do
+ @accessor.spec.should == @spec
+ end
+
+ it "returns the platform for which the spec is being consumed" do
+ @accessor.platform_name.should == :ios
+ end
+
end
#-------------------------------------------------------------------------#
@@ -76,12 +80,21 @@ module Pod
]
end
- it "returns the preserve path" do
+ it "includes folders in the resources" do
+ @accessor.resources.should.include?(@root + "Resources/sub_dir")
+ end
+
+ it "returns the preserve paths" do
@accessor.preserve_paths.sort.should == [
@root + "preserve_me.txt"
]
end
+ it "includes folders in the preserve paths" do
+ @spec_consumer.stubs(:preserve_paths).returns(["Resources"])
+ @accessor.preserve_paths.should.include?(@root + "Resources")
+ end
+
it "returns the prefix header of the specification" do
@accessor.prefix_header.should == @root + 'Classes/BananaLib.pch'
end
@@ -116,7 +129,8 @@ module Pod
file_patterns = ["Classes/*.{h,m}", "Vendor"]
options = {
:exclude_patterns => ["Classes/**/osx/**/*", "Resources/**/osx/**/*"],
- :dir_pattern => "*.{h,hpp,hh,m,mm,c,cpp}"
+ :dir_pattern => "*.{h,hpp,hh,m,mm,c,cpp}",
+ :include_dirs => false,
}
@spec.exclude_files = options[:exclude_patterns]
@accessor.expects(:expanded_paths).with(file_patterns, options)

No commit comments for this range

Something went wrong with that request. Please try again.