Commit 383eb578 authored by Fabio Pelosin's avatar Fabio Pelosin

Merge branch 'master' into sandbox_reorganization_544

* master: (41 commits)
  [Changelog]
  [Changelog]
  [CHANGELOG] Small cleanups.
  [CHANGELOG] Expand on hooks deprecation.
  [CHANGELOG] Slight formatting change.
  Release 0.23.0.rc1
  [Rakefile] Allow to release with changes in the Gemfile.lock file
  [RakeFile] Add note about the examples
  [Gemfile] Require cocoapods-core:master
  [Gemfile] Require cocoapods-core from the feature-prepare_command branch
  [Gemfile] Require cocoapods-core from the master branch
  [Gemspec] Bump dependencies version
  [Specification::DSL] Add prepare_command
  [Changelog]
  [Specification::DSL] frameworks_bundles -> vendored_frameworks; library_files -> vendored_libraries
  [Installer] Move target dependency logic to Xcodeproj 2
  [Changelog]
  [Installer] Move target dependency logic to Xcodeproj
  [Specification] Add support for resource bundles
  [Changelog]
  ...

Conflicts:
	spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
parents 46c17eae 488a7cce
......@@ -4,8 +4,73 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
## Master
* Added license information to `podfile-info` subcommand.
[#1219](https://github.com/CocoaPods/CocoaPods/issues/1219)
## 0.23.0.rc1
###### Enhancements
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.22.3...0.23.0.rc1)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.22.3...0.23.0.rc1)
[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.8.1...0.9.0)
[cocoapods-downloader](https://github.com/CocoaPods/cocoapods-downloader/compare/0.1.1...0.1.2)
* Added `prepare_command` attribute to Specification DSL. The prepare command
will replace the `pre_install` hook. The `post_install` hook has also been
deprecated.
[#1247](https://github.com/CocoaPods/CocoaPods/issues/1247)
The reason we provided Ruby hooks at first, was because we wanted to offer
the option to make any required configuration possible. By now, however, we
have a pretty good idea of the use-cases and are therefore locking down the
freedom that was once available. In turn, we’re adding attributes that can
replace the most common use-cases. _(See the enhancements directly following
this entry for more info)._
The second reason we need to lock this down is because this is the last
remaining obstacle to fully serialize specifications, which we need in order
to move to a ‘spec push’ web-service in the future.
* Added `resource_bundles` attribute to the Specification DSL.
[#743](https://github.com/CocoaPods/CocoaPods/issues/743)
[#1186](https://github.com/CocoaPods/CocoaPods/issues/1186)
* Added `vendored_frameworks` attribute to the Specification DSL.
[#809](https://github.com/CocoaPods/CocoaPods/issues/809)
[#1075](https://github.com/CocoaPods/CocoaPods/issues/1075)
* Added `vendored_libraries` attribute to the Specification DSL.
[#809](https://github.com/CocoaPods/CocoaPods/issues/809)
[#1075](https://github.com/CocoaPods/CocoaPods/issues/1075)
* Restructured `.cocoapods` folder to contain repos in a subdirectory.
[Ian Ynda-Hummel](https://github.com/ianyh)
[#1150](https://github.com/CocoaPods/CocoaPods/issues/1150)
* Improved `pod spec create` template.
[#1223](https://github.com/CocoaPods/CocoaPods/issues/1223)
* Added copy&paste-friendly dependency to `pod search`.
[#1073](https://github.com/CocoaPods/CocoaPods/issues/1073)
* Improved performance of the installation of Pods with git
sources which specify a tag.
[#1077](https://github.com/CocoaPods/CocoaPods/issues/1077)
* Core Data `xcdatamodeld` files are now properly referenced from the Pods
project.
[#1155](https://github.com/CocoaPods/CocoaPods/issues/1155)
* Removed punctuation check from the specification validations.
[#1155](https://github.com/CocoaPods/CocoaPods/issues/1155)
* Deprecated the `documentation` attribute of the Specification DSL.
[Core#20](https://github.com/CocoaPods/Core/issues/20)
###### Bug Fixes
* Fix copy resource script issue related to filenames with spaces.
[Denis Hennessy](https://github.com/dhennessy)
[#1231](https://github.com/CocoaPods/CocoaPods/issues/1231)
## 0.22.3
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.22.2...0.22.3)
......@@ -39,6 +104,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[#1201](https://github.com/CocoaPods/CocoaPods/pull/1201)
## 0.22.2
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.22.1...0.22.2)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.22.1...0.22.2)
......
......@@ -7,29 +7,29 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision: b56cbd3145fbf97ff9589d70f7bc6f8b88c9a626
revision: 63f310adb5210854b34c3d94bb9452bafd7cbc26
branch: master
specs:
cocoapods-core (0.22.3)
cocoapods-core (0.23.0.rc1)
activesupport (~> 3.2.13)
json (~> 1.8.0)
nap (~> 0.5.1)
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: da60c7e415f150846d3120e9e3b7310d534446ff
revision: 83c3e0781cbea05c704d02523610fe43f3ea062c
branch: master
specs:
xcodeproj (0.8.1)
xcodeproj (0.9.0)
activesupport (~> 3.2.13)
colored (~> 1.2)
GIT
remote: https://github.com/CocoaPods/cocoapods-downloader.git
revision: 2cc10348d9eb35862d900d79c72cd967388962b9
revision: 7cfddec468aa0d4da1256368b4d3fd466664bcd9
branch: master
specs:
cocoapods-downloader (0.1.1)
cocoapods-downloader (0.1.2)
GIT
remote: https://github.com/alloy/kicker.git
......@@ -61,16 +61,16 @@ GIT
PATH
remote: .
specs:
cocoapods (0.22.3)
cocoapods (0.23.0.rc1)
activesupport (~> 3.2.13)
claide (~> 0.3.2)
cocoapods-core (= 0.22.3)
cocoapods-downloader (~> 0.1.1)
cocoapods-core (= 0.23.0.rc1)
cocoapods-downloader (~> 0.1.2)
colored (~> 1.2)
escape (~> 0.0.4)
json (~> 1.8.0)
open4 (~> 1.3.0)
xcodeproj (~> 0.8.1)
xcodeproj (~> 0.9.0)
GEM
remote: http://rubygems.org/
......
......@@ -62,6 +62,7 @@ namespace :gem do
diff_lines = `git diff --name-only`.strip.split("\n")
diff_lines.delete('CHANGELOG.md')
diff_lines.delete('Gemfile.lock')
if diff_lines.size == 0
$stderr.puts "[!] Change the version number yourself in lib/cocoapods/gem_version.rb"
......@@ -117,7 +118,7 @@ namespace :gem do
silent_sh "gem install --install-dir='#{tmp_gems}' #{gem_filename}"
# Then release
sh "git commit lib/cocoapods/gem_version.rb CHANGELOG.md -m 'Release #{gem_version}'"
sh "git commit lib/cocoapods/gem_version.rb CHANGELOG.md Gemfile.lock -m 'Release #{gem_version}'"
sh "git tag -a #{gem_version} -m 'Release #{gem_version}'"
sh "git push origin master"
sh "git push origin --tags"
......@@ -214,7 +215,7 @@ namespace :spec do
title 'Running the specs'
sh "bundle exec bacon #{specs('**')}"
unless Pathname.new(ENV['HOME']+'/.cocoapods/master').exist?
unless Pathname.new(ENV['HOME']+'/.cocoapods/repos/master').exist?
title 'Ensuring specs repo is up to date'
sh "./bin/pod setup"
end
......@@ -323,6 +324,10 @@ namespace :examples do
desc "Build all examples"
task :build do
# TODO: sometimes it uses the installed gem
# Rake::Task['gem:install'].invoke
examples.entries.each do |example|
puts "Building example: #{example}"
Dir.chdir(example.to_s) do
......
......@@ -29,8 +29,8 @@ s.files = Dir["lib/**/*.rb"] + %w{ bin/pod bin/sandbox-pod README.md LICENSE CHA
# Link with the version of CocoaPods-Core
s.add_runtime_dependency 'cocoapods-core', "= #{Pod::VERSION}"
s.add_runtime_dependency 'claide', '~> 0.3.2'
s.add_runtime_dependency 'cocoapods-downloader', '~> 0.1.1'
s.add_runtime_dependency 'xcodeproj', '~> 0.8.1'
s.add_runtime_dependency 'cocoapods-downloader', '~> 0.1.2'
s.add_runtime_dependency 'xcodeproj', '~> 0.9.0'
s.add_runtime_dependency 'colored', '~> 1.2'
s.add_runtime_dependency 'escape', '~> 0.0.4'
......
......@@ -42,9 +42,6 @@ module Pod
autoload :PrefixHeader, 'cocoapods/generator/prefix_header'
autoload :TargetEnvironmentHeader, 'cocoapods/generator/target_environment_header'
autoload :XCConfig, 'cocoapods/generator/xcconfig'
autoload :AggregateXCConfig, 'cocoapods/generator/xcconfig/aggregate_xcconfig'
autoload :PublicPodXCConfig, 'cocoapods/generator/xcconfig/public_pod_xcconfig'
autoload :PrivatePodXCConfig, 'cocoapods/generator/xcconfig/private_pod_xcconfig'
end
module Hooks
......
......@@ -9,8 +9,8 @@ module Pod
self.description = <<-DESC
Validates NAME.podspec or `*.podspec' in the current working dir, creates
a directory and version folder for the pod in the local copy of
REPO (~/.cocoapods/[REPO]), copies the podspec file into the version directory,
and finally it pushes REPO to its remote.
REPO (~/.cocoapods/repos/[REPO]), copies the podspec file into the version
directory, and finally it pushes REPO to its remote.
DESC
self.arguments = 'REPO [NAME.podspec]'
......
......@@ -13,7 +13,7 @@ module Pod
self.summary = 'Add a spec repo.'
self.description = <<-DESC
Clones `URL` in the local spec-repos directory at `~/.cocoapods`. The
Clones `URL` in the local spec-repos directory at `~/.cocoapods/repos/`. The
remote can later be referred to by `NAME`.
DESC
......@@ -48,7 +48,7 @@ module Pod
self.description = <<-DESC
Updates the local clone of the spec-repo `NAME`. If `NAME` is omitted
this will update all spec-repos in `~/.cocoapods`.
this will update all spec-repos in `~/.cocoapods/repos`.
DESC
self.arguments = '[NAME]'
......
require 'fileutils'
module Pod
class Command
class Setup < Command
......@@ -30,6 +32,8 @@ module Pod
set_master_repo_url
set_master_repo_branch
update_master_repo
elsif old_master_repo_dir.exist?
migrate_repos
else
add_master_repo
end
......@@ -43,6 +47,21 @@ module Pod
# @!group Setup steps
# Migrates any repos from the old directory structure to the new directory
# structure.
#
# @return [void]
def migrate_repos
config.repos_dir.mkpath
Dir.foreach old_master_repo_dir.parent do |repo_dir|
source_repo_dir = old_master_repo_dir.parent + repo_dir
target_repo_dir = config.repos_dir + repo_dir
if not repo_dir =~ /\.+/ and source_repo_dir != config.repos_dir
FileUtils.mv source_repo_dir, target_repo_dir
end
end
end
# Sets the url of the master repo according to whether it is push.
#
# @return [void]
......@@ -129,6 +148,12 @@ module Pod
def master_repo_dir
SourcesManager.master_repo_dir
end
# @return [Pathname] the directory of the old master repo.
#
def old_master_repo_dir
Pathname.new('~/.cocoapods/master').expand_path
end
end
end
end
......@@ -448,7 +448,7 @@ Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#
......@@ -459,9 +459,9 @@ Pod::Spec.new do |s|
s.description = <<-DESC
A longer description of #{data[:name]} in Markdown format.
* Think: Why did you write this? What is the focus? What does it do?
* CocoaPods will be using this to generate tags, and improve search results.
* Think: Why did you write this? What is the focus? What does it do?
* CocoaPods will be using this to generate tags, and improve search results.
* Try to keep it short, snappy and to the point.
* Finally, don't worry about the indent, CocoaPods strips it!
DESC
......@@ -474,17 +474,17 @@ Pod::Spec.new do |s|
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#
s.license = 'MIT'
s.license = 'MIT (example)'
# s.license = { :type => 'MIT', :file => 'FILE_LICENSE' }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors by using the SCM log. E.g. $ git log. If no email can be
# Specify the authors of the library, with email addresses. Email addresses
# of the authors by using the SCM log. E.g. $ git log. If no email can be
# found CocoaPods accept just the names.
#
......@@ -494,7 +494,7 @@ Pod::Spec.new do |s|
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#
......@@ -509,7 +509,7 @@ Pod::Spec.new do |s|
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Specify the location from where the source should be retrieved.
# Supports git, hg, svn and HTTP.
#
......@@ -517,9 +517,9 @@ Pod::Spec.new do |s|
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
#
# CocoaPods is smart about how it include source code, for source files
# giving a folder will include any h, m, mm, c & cpp files. For header
# giving a folder will include any h, m, mm, c & cpp files. For header
# files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#
......@@ -534,7 +534,7 @@ Pod::Spec.new do |s|
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
......@@ -545,10 +545,10 @@ Pod::Spec.new do |s|
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
#
# s.framework = 'SomeFramework'
# s.frameworks = 'SomeFramework', 'AnotherFramework'
......@@ -558,9 +558,9 @@ Pod::Spec.new do |s|
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
# s.requires_arc = true
......
......@@ -132,10 +132,17 @@ module Pod
# @!group Paths
# @return [Pathname] the directory where repos, templates and configuration
# files are stored.
#
def home_dir
@home_dir ||= Pathname.new(ENV['CP_HOME_DIR'] || "~/.cocoapods").expand_path
end
# @return [Pathname] the directory where the CocoaPods sources are stored.
#
def repos_dir
@repos_dir ||= Pathname.new(ENV['CP_REPOS_DIR'] || "~/.cocoapods").expand_path
@repos_dir ||= Pathname.new(ENV['CP_REPOS_DIR'] || "~/.cocoapods/repos").expand_path
end
attr_writer :repos_dir
......@@ -261,7 +268,7 @@ module Pod
# @return [Pathname] The path of the file which contains the user settings.
#
def user_settings_file
repos_dir + "config.yaml"
home_dir + "config.yaml"
end
# Sets the values of the attributes with the given hash.
......
module Pod
# The version of the cocoapods command line tool.
#
VERSION = '0.22.3' unless defined? Pod::VERSION
VERSION = '0.23.0.rc1' unless defined? Pod::VERSION
end
......@@ -70,7 +70,7 @@ module Pod
def script
script = install_resources_function
resources.each do |resource|
script += "install_resource '#{resource}'\n"
script += %Q[install_resource "#{resource}"\n]
end
script += RSYNC_CALL
script
......@@ -101,9 +101,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \\"${PODS_ROOT}/$1\\" \\"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \\"${PODS_ROOT}/$1\\" \\"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \\"${PODS_ROOT}/$1\\" \\"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,124 +5,12 @@ module Pod
# for each Pod and for each Pod target definition. The aggregates the
# configurations of the Pods and define target specific settings.
#
class XCConfig
module XCConfig
# @return [Target] the target represented by this xcconfig.
#
attr_reader :target
# @param [Target] target @see target
#
def initialize(target)
@target = target
end
# @return [Sandbox] the sandbox of this target.
#
def sandbox
target.sandbox
end
# @return [Xcodeproj::Config] The generated xcconfig.
#
attr_reader :xcconfig
# Generates and saves the xcconfig to the given path.
#
# @param [Pathname] path
# the path where the prefix header should be stored.
#
# @return [void]
#
def save_as(path)
generate.save_as(path)
end
#-----------------------------------------------------------------------#
# @!group Private helpers.
private
# @return [String] the default linker flags. `-ObjC` is always included
# while `-fobjc-arc` is included only if requested in the
# Podfile.
#
def default_ld_flags
ld_flags = '-ObjC'
if target.target_definition.podfile.set_arc_compatibility_flag? and
target.spec_consumers.any? { |consumer| consumer.requires_arc? }
ld_flags << ' -fobjc-arc'
end
ld_flags
end
# Converts an array of strings to a single string where the each string
# is surrounded by double quotes and separated by a space. Used to
# represent strings in a xcconfig file.
#
# @param [Array<String>] strings
# a list of strings.
#
# @return [String] the resulting string.
#
def quote(strings)
strings.sort.map { |s| %W|"#{s}"| }.join(" ")
end
# Configures the given Xcconfig according to the build settings of the
# given Specification.
#
# @param [Specification::Consumer] consumer
# The consumer of the specification.
#
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
#
def add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.merge!(consumer.xcconfig)
xcconfig.libraries.merge(consumer.libraries)
xcconfig.frameworks.merge(consumer.frameworks)
xcconfig.weak_frameworks.merge(consumer.weak_frameworks)
add_developers_frameworks_if_needed(consumer, xcconfig)
end
# @return [Array<String>] The search paths for the developer frameworks.
#
# @todo Inheritance should be properly handled in Xcconfigs.
#
DEVELOPER_FRAMEWORKS_SEARCH_PATHS = [
'$(inherited)',
'"$(SDKROOT)/Developer/Library/Frameworks"',
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
]
# Adds the search paths of the developer frameworks to the specification
# if needed. This is done because the `SenTestingKit` requires them and
# adding them to each specification which requires it is repetitive and
# error prone.
#
# @param [Specification::Consumer] consumer
# The consumer of the specification.
#
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
#
# @return [void]
#
def add_developers_frameworks_if_needed(consumer, xcconfig)
if xcconfig.frameworks.include?('SenTestingKit')
search_paths = xcconfig.attributes['FRAMEWORK_SEARCH_PATHS'] ||= ''
DEVELOPER_FRAMEWORKS_SEARCH_PATHS.each do |search_path|
unless search_paths.include?(search_path)
search_paths << ' ' unless search_paths.empty?
search_paths << search_path
end
end
end
end
#-----------------------------------------------------------------------#
autoload :AggregateXCConfig, 'cocoapods/generator/xcconfig/aggregate_xcconfig'
autoload :PublicPodXCConfig, 'cocoapods/generator/xcconfig/public_pod_xcconfig'
autoload :PrivatePodXCConfig, 'cocoapods/generator/xcconfig/private_pod_xcconfig'
autoload :XCConfigHelper, 'cocoapods/generator/xcconfig/xcconfig_helper'
end
end
......
module Pod
module Generator
module XCConfig
# Generates the xcconfigs for the aggregate targets.
#
class AggregateXCConfig < XCConfig
class AggregateXCConfig
# @return [Target] the target represented by this xcconfig.
#
attr_reader :target
# @param [Target] target @see target
#
def initialize(target)
@target = target
end
# @return [Xcodeproj::Config] The generated xcconfig.
#
attr_reader :xcconfig
# Generates and saves the xcconfig to the given path.
#
# @param [Pathname] path
# the path where the prefix header should be stored.
#
# @return [void]
#
def save_as(path)
generate.save_as(path)
end
# Generates the xcconfig.
#
......@@ -12,19 +38,28 @@ module Pod
# Each namespaced configuration value is merged into the Pod
# xcconfig file.
#
# @todo This doesn't include the specs xcconfigs anymore and now the
# logic is duplicated.
#
# @return [Xcodeproj::Config]
#
def generate
@xcconfig = Xcodeproj::Config.new({
'OTHER_LDFLAGS' => default_ld_flags,
'HEADER_SEARCH_PATHS' => quote(sandbox.public_headers.search_paths),
'PODS_ROOT' => target.relative_pods_root,
'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(target.sandbox.public_headers.search_paths),
'PODS_ROOT' => target.relative_pods_root,
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
})
target.pod_targets.each do |pod_target|
pod_target.spec_consumers.each do |consumer|
add_spec_build_settings_to_xcconfig(consumer, @xcconfig)
pod_target.file_accessors.each do |file_accessor|
XCConfigHelper.add_spec_build_settings_to_xcconfig(file_accessor.spec_consumer, @xcconfig)
file_accessor.vendored_frameworks.each do |vendored_framework|
XCConfigHelper.add_framework_build_settings(vendored_framework, @xcconfig, target.sandbox.root)
end
file_accessor.vendored_libraries.each do |vendored_library|
XCConfigHelper.add_library_build_settings(vendored_library, @xcconfig, target.sandbox.root)
end
end
end
......@@ -42,3 +77,4 @@ module Pod
end
end
end
end
module Pod
module Generator
module XCConfig
# Generates the private xcconfigs for the pod targets.
#
......@@ -7,7 +8,11 @@ module Pod
# values of the public namespaced xcconfig with the default private
# configuration values required by CocoaPods.
#
class PrivatePodXCConfig < XCConfig
class PrivatePodXCConfig
# @return [Target] the target represented by this xcconfig.
#
attr_reader :target
# @return [Xcodeproj::Config] The public xcconfig which this one will
# use.
......@@ -18,21 +23,37 @@ module Pod
# @param [Xcodeproj::Config] public_xcconfig @see public_xcconfig
#
def initialize(target, public_xcconfig)
super(target)
@target = target
@public_xcconfig = public_xcconfig
end
# @return [Xcodeproj::Config] The generated xcconfig.
#
attr_reader :xcconfig
# Generates and saves the xcconfig to the given path.
#
# @param [Pathname] path
# the path where the prefix header should be stored.
#
# @return [void]
#
def save_as(path)
generate.save_as(path)
end
# Generates the xcconfig.
#
# @return [Xcodeproj::Config]
#
def generate
search_pahts = target.build_headers.search_paths.concat(target.sandbox.public_headers.search_paths)
config = {
'OTHER_LDFLAGS' => default_ld_flags,
'PODS_ROOT' => '${SRCROOT}',
'HEADER_SEARCH_PATHS' => quote(target.build_headers.search_paths) + ' ' + quote(sandbox.public_headers.search_paths),
'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
'PODS_ROOT' => '${SRCROOT}',
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(search_pahts),
'GCC_PREPROCESSOR_DEFINITIONS' => 'COCOAPODS=1',
# 'USE_HEADERMAP' => 'NO'
# 'USE_HEADERMAP' => 'NO'
}
xcconfig_hash = add_xcconfig_namespaced_keys(public_xcconfig.to_hash, config, target.xcconfig_prefix)
......@@ -93,3 +114,4 @@ module Pod
end
end
end
end
module Pod
module Generator
module XCConfig
# Generates the public xcconfigs for the pod targets.
#
......@@ -8,7 +9,21 @@ module Pod
# xcconfig includes the standard podspec defined values including
# libraries, frameworks, weak frameworks and xcconfig overrides.
#
class PublicPodXCConfig < XCConfig
class PublicPodXCConfig
# @return [Target] the target represented by this xcconfig.
#
attr_reader :target
# @param [Target] target @see target
#
def initialize(target)
@target = target
end
# @return [Xcodeproj::Config] The generated xcconfig.
#
attr_reader :xcconfig
# Generates and saves the xcconfig to the given path.
#
......@@ -27,8 +42,14 @@ module Pod
#
def generate
@xcconfig = Xcodeproj::Config.new
target.spec_consumers.each do |consumer|
add_spec_build_settings_to_xcconfig(consumer, @xcconfig)
target.file_accessors.each do |file_accessor|
XCConfigHelper.add_spec_build_settings_to_xcconfig(file_accessor.spec_consumer, @xcconfig)
file_accessor.vendored_frameworks.each do |vendored_framework|
XCConfigHelper.add_framework_build_settings(vendored_framework, @xcconfig, target.sandbox.root)
end
file_accessor.vendored_libraries.each do |vendored_library|
XCConfigHelper.add_library_build_settings(vendored_library, @xcconfig, target.sandbox.root)
end
end
@xcconfig
end
......@@ -38,3 +59,4 @@ module Pod
end
end
end
end
module Pod
module Generator
module XCConfig
# Stores the shared logic of the classes of the XCConfig module.
#
module XCConfigHelper
# Converts an array of strings to a single string where the each string
# is surrounded by double quotes and separated by a space. Used to
# represent strings in a xcconfig file.
#
# @param [Array<String>] strings
# a list of strings.
#
# @return [String] the resulting string.
#
def self.quote(strings)
strings.sort.map { |s| %W|"#{s}"| }.join(" ")
end
# @return [String] the default linker flags. `-ObjC` is always included
# while `-fobjc-arc` is included only if requested in the
# Podfile.
#
def self.default_ld_flags(target)
ld_flags = '-ObjC'
if target.target_definition.podfile.set_arc_compatibility_flag? and
target.spec_consumers.any? { |consumer| consumer.requires_arc? }
ld_flags << ' -fobjc-arc'
end
ld_flags
end
# Configures the given Xcconfig according to the build settings of the
# given Specification.
#
# @param [Specification::Consumer] consumer
# The consumer of the specification.
#
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
#
def self.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.merge!(consumer.xcconfig)
xcconfig.libraries.merge(consumer.libraries)
xcconfig.frameworks.merge(consumer.frameworks)
xcconfig.weak_frameworks.merge(consumer.weak_frameworks)
add_developers_frameworks_if_needed(xcconfig)
end
# Configures the given Xcconfig with the the build settings for the given
# framework path.
#
# @param [Pathanme] framework_path
# The path of the framework.
#
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
#
def self.add_framework_build_settings(framework_path, xcconfig, sandbox_root)
name = File.basename(framework_path, ".framework")
dirname = File.dirname(framework_path).sub(sandbox_root.to_s, '$(PODS_ROOT)')
build_settings = {
'OTHER_LDFLAGS' => "-framework #{name}",
'FRAMEWORK_SEARCH_PATHS' => quote([dirname])
}
xcconfig.merge!(build_settings)
end
# Configures the given Xcconfig with the the build settings for the given
# framework path.
#
# @param [Pathanme] framework_path
# The path of the framework.
#
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
#
def self.add_library_build_settings(library_path, xcconfig, sandbox_root)
name = File.basename(library_path, ".a").sub(/\Alib/, '')
dirname = File.dirname(library_path).sub(sandbox_root.to_s, '$(PODS_ROOT)')
build_settings = {
'OTHER_LDFLAGS' => "-l#{name}",
'LIBRARY_SEARCH_PATHS' => quote([dirname])
}
xcconfig.merge!(build_settings)
end
# @return [Array<String>] The search paths for the developer frameworks.
#
DEVELOPER_FRAMEWORKS_SEARCH_PATHS = [
'$(inherited)',
'"$(SDKROOT)/Developer/Library/Frameworks"',
'"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
]
# Adds the search paths of the developer frameworks to the specification
# if needed. This is done because the `SenTestingKit` requires them and
# adding them to each specification which requires it is repetitive and
# error prone.
#
# @param [Xcodeproj::Config] xcconfig
# The xcconfig to edit.
#
# @return [void]
#
def self.add_developers_frameworks_if_needed(xcconfig)
if xcconfig.frameworks.include?('SenTestingKit')
search_paths = xcconfig.attributes['FRAMEWORK_SEARCH_PATHS'] ||= ''
DEVELOPER_FRAMEWORKS_SEARCH_PATHS.each do |search_path|
unless search_paths.include?(search_path)
search_paths << ' ' unless search_paths.empty?
search_paths << search_path
end
end
end
end
#---------------------------------------------------------------------#
end
end
end
end
......@@ -294,7 +294,7 @@ module Pod
#
def prepare_pods_project
UI.message "- Creating Pods project" do
@pods_project = Pod::Project.new(sandbox.project_path)
@pods_project = Pod::Project.new(sandbox)
if config.podfile_path
@pods_project.add_podfile(config.podfile_path)
end
......@@ -346,7 +346,7 @@ module Pod
def set_target_dependencies
aggregate_targets.each do |aggregate_target|
aggregate_target.pod_targets.each do |pod_target|
add_dependency(aggregate_target, pod_target)
aggregate_target.target.add_dependency(pod_target.target)
pod_target.dependencies.each do |dep|
unless dep == pod_target.pod_name
......@@ -355,30 +355,13 @@ module Pod
unless pod_dependency_target
puts "[BUG] DEP: #{dep}"
end
add_dependency(pod_target, pod_dependency_target)
pod_target.target.add_dependency(pod_dependency_target.target)
end
end
end
end
end
# TODO: tmp - move
#
def add_dependency(dependent_target, dependency_target)
container_proxy = pods_project.new(Xcodeproj::Project::PBXContainerItemProxy)
container_proxy.container_portal = pods_project.root_object.uuid
container_proxy.proxy_type = '1'
container_proxy.remote_global_id_string = dependency_target.target.uuid
container_proxy.remote_info = dependency_target.target.name
dependency = pods_project.new(Xcodeproj::Project::PBXTargetDependency)
dependency.target = dependency_target.target
dependency.targetProxy = container_proxy
dependent_target.target.dependencies << dependency
end
# Links the aggregate targets with all the dependent libraries.
#
# @note This is run in the integration step to ensure that targets
......
......@@ -35,7 +35,9 @@ module Pod
def install!
refresh_file_accessors
add_source_files_references
add_resources_references
add_frameworks_bundles
add_vendored_libraries
add_resources
link_headers
end
......@@ -71,13 +73,27 @@ module Pod
#
def add_source_files_references
UI.message "- Adding source files to Pods project" do
file_accessors.each do |file_accessor|
files = file_accessor.source_files
spec_name = file_accessor.spec.name
local = sandbox.local?(file_accessor.spec.root.name)
parent_group = local ? pods_project.local_pods : pods_project.pods
pods_project.add_file_references(files, spec_name, parent_group)
end
add_file_acessors_paths_to_pods_group(:source_files, :source_files)
end
end
# Adds the bundled frameworks to the Pods project
#
# @return [void]
#
def add_frameworks_bundles
UI.message "- Adding frameworks to Pods project" do
add_file_acessors_paths_to_pods_group(:vendored_frameworks, :frameworks_and_libraries)
end
end
# Adds the bundled libraries to the Pods project
#
# @return [void]
#
def add_vendored_libraries
UI.message "- Adding frameworks to Pods project" do
add_file_acessors_paths_to_pods_group(:vendored_libraries, :frameworks_and_libraries)
end
end
......@@ -88,16 +104,10 @@ module Pod
#
# @return [void]
#
def add_resources_references
def add_resources
UI.message "- Adding resources to Pods project" do
file_accessors.each do |file_accessor|
file_accessor.resources.each do |resources|
files = file_accessor.resources
spec_name = file_accessor.spec.name
parent_group = pods_project.resources
pods_project.add_file_references(files, spec_name, parent_group)
end
end
add_file_acessors_paths_to_pods_group(:resources, :resources)
add_file_acessors_paths_to_pods_group(:resource_bundle_files, :resources)
end
end
......@@ -138,6 +148,28 @@ module Pod
@file_accessors ||= libraries.map(&:file_accessors).flatten.compact
end
# Adds file references to the list of the paths returned by the file
# accessor with the given key to the given group of the Pods project.
#
# @param [Symbol] file_accessor_key
# The method of the file accessor which would return the list of
# the paths.
#
# @param [Symbol] group_key
# The key of the group of the Pods project.
#
# @return [void]
#
def add_file_acessors_paths_to_pods_group(file_accessor_key, group_key)
file_accessors.each do |file_accessor|
paths = file_accessor.send(file_accessor_key)
paths.each do |path|
group = pods_project.group_for_spec(file_accessor.spec.name, group_key)
pods_project.add_file_reference(path, group)
end
end
end
# Computes the destination sub-directory in the sandbox
#
# @param [Pathname] headers_sandbox
......
require 'active_support/core_ext/string/strip'
module Pod
class Installer
......@@ -60,6 +62,7 @@ module Pod
#
def install!
download_source unless predownloaded? || local?
run_prepare_command
end
# Cleans the installations if appropriate.
......@@ -106,6 +109,24 @@ module Pod
end
end
extend Executable
executable :bash
# Runs the prepare command bash script of the spec.
#
# @return [void]
#
def run_prepare_command
return unless root_spec.prepare_command
UI.section(" > Running prepare command", '', 1) do
Dir.chdir(root) do
prepare_command = root_spec.prepare_command.strip_heredoc.chomp
full_command = "\nset -e\n" + prepare_command
bash!(full_command)
end
end
end
# Removes all the files not needed for the installation according to the
# specs by platform.
#
......@@ -229,12 +250,15 @@ module Pod
#
def used_files
files = [
file_accessors.map(&:source_files),
file_accessors.map(&:resources),
file_accessors.map(&:preserve_paths),
file_accessors.map(&:vendored_frameworks),
file_accessors.map(&:vendored_libraries),
file_accessors.map(&:resource_bundle_files),
file_accessors.map(&:license),
file_accessors.map(&:prefix_header),
file_accessors.map(&:preserve_paths),
file_accessors.map(&:readme),
file_accessors.map(&:license),
file_accessors.map(&:resources),
file_accessors.map(&:source_files),
]
files.flatten.compact.map{ |path| path.to_s }.uniq
......
......@@ -34,7 +34,7 @@ module Pod
def create_xcconfig_file
path = library.xcconfig_path
UI.message "- Generating xcconfig file at #{UI.path(path)}" do
gen = Generator::AggregateXCConfig.new(library)
gen = Generator::XCConfig::AggregateXCConfig.new(library)
gen.save_as(path)
library.xcconfig = gen.xcconfig
xcconfig_file_ref = add_file_to_support_group(path)
......@@ -90,7 +90,11 @@ module Pod
path = library.copy_resources_script_path
UI.message "- Generating copy resources script at #{UI.path(path)}" do
file_accessors = library.pod_targets.map(&:file_accessors).flatten
resources = file_accessors.map { |accessor| accessor.resources.flatten.map {|res| project.relativize(res)} }.flatten
resource_paths = file_accessors.map { |accessor| accessor.resources.flatten.map {|res| project.relativize(res)} }.flatten
resource_bundles = file_accessors.map { |accessor| accessor.resource_bundles.keys.map {|name| "${BUILD_DIR}/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/#{name}.bundle" } }.flatten
resources = []
resources.concat(resource_paths)
resources.concat(resource_bundles)
resources << bridge_support_file if bridge_support_file
generator = Generator::CopyResourcesScript.new(resources, library.platform)
generator.save_as(path)
......
......@@ -14,6 +14,7 @@ module Pod
UI.message "- Installing target `#{library.name}` #{library.platform}" do
add_target
add_files_to_build_phases
add_resources_bundle_targets
create_suport_files_group
create_xcconfig_file
create_prefix_header
......@@ -21,10 +22,10 @@ module Pod
end
end
#-----------------------------------------------------------------------#
private
#-----------------------------------------------------------------------#
# Adds the build files of the pods to the target and adds a reference to
# the frameworks of the Pods.
#
......@@ -49,20 +50,48 @@ module Pod
end
end
# Adds the resources of the Pods to the Pods project.
#
# @note The source files are grouped by Pod and in turn by subspec
# (recursively) in the resources group.
#
# @return [void]
#
def add_resources_bundle_targets
UI.message "- Adding resource bundles to Pods project" do
library.file_accessors.each do |file_accessor|
file_accessor.resource_bundles.each do |bundle_name, paths|
file_references = paths.map { |sf| project.file_reference(sf) }
group = project.group_for_spec(file_accessor.spec.name, :resources)
product_group = project.group_for_spec(file_accessor.spec.name, :resources)
bundle_target = project.new_resources_bundle(bundle_name, file_accessor.spec_consumer.platform_name, product_group)
bundle_target.add_resources(file_references)
target.add_dependency(bundle_target)
end
end
end
end
# Generates the contents of the xcconfig file and saves it to disk.
#
# @return [void]
#
def create_xcconfig_file
path = library.xcconfig_path
public_gen = Generator::PublicPodXCConfig.new(library)
public_gen = Generator::XCConfig::PublicPodXCConfig.new(library)
UI.message "- Generating public xcconfig file at #{UI.path(path)}" do
public_gen.save_as(path)
#
# TODO
add_file_to_support_group(path)
# relative_path = path.relative_path_from(sandbox.root)
# group = project.group_for_spec(library.root_spec.name, :support_files)
# group.new_file(relative_path)
end
path = library.xcconfig_private_path
private_gen = Generator::PrivatePodXCConfig.new(library, public_gen.xcconfig)
private_gen = Generator::XCConfig::PrivatePodXCConfig.new(library, public_gen.xcconfig)
UI.message "- Generating private xcconfig file at #{UI.path(path)}" do
private_gen.save_as(path)
xcconfig_file_ref = add_file_to_support_group(path)
......
......@@ -9,16 +9,20 @@ module Pod
#
class Project < Xcodeproj::Project
# @return [Pathname] the path of the xcodeproj file which stores the
# project.
# @return [Sandbox] the sandbox which returns the information about which
# Pods are local.
#
attr_reader :path
attr_reader :sandbox
# @param [Sandbox] sandbox @see #sandbox
#
def initialize(path = nil)
def initialize(sandbox)
super(nil) # Recreate the project from scratch for now.
@path = path
# TODO
raise unless sandbox.is_a?(Sandbox)
@sandbox = sandbox
@path = sandbox.project_path
@support_files_group = new_group('Targets Support Files')
@refs_by_absolute_path = {}
......@@ -107,25 +111,25 @@ module Pod
@resources ||= new_group('Resources')
end
# Adds a group as child to the `Pods` group namespacing subspecs.
#
# @param [String] spec_name
# The full name of the specification.
#
# @param [PBXGroup] root_group
# The group where to add the specification. Either `Pods` or `Local
# Pods`.
#
# @return [PBXGroup] the group for the spec with the given name.
#
def add_spec_group(spec_name, root_group)
current_group = root_group
group = nil
spec_name.split('/').each do |name|
group = current_group[name] || current_group.new_group(name)
current_group = group
def group_for_spec(spec_name, type = nil)
local = sandbox.local?(spec_name)
parent_group = local ? local_pods : pods
spec_group = add_spec_group(spec_name, parent_group)
if type
case type
when :source_files then sub_group = 'Source Files'
when :resources then sub_group = 'Resources'
when :frameworks_and_libraries then sub_group = 'Frameworks & Libraries'
when :support_files then sub_group = 'Support Files'
else raise "[BUG]"
end
spec_group.find_subpath(sub_group, true)
else
spec_group
end
group
end
#-------------------------------------------------------------------------#
......@@ -154,7 +158,7 @@ module Pod
# @return [void]
#
def add_file_references(absolute_path, spec_name, parent_group)
group = add_spec_group(spec_name, parent_group)
group = group_for_spec(spec_name, :source_files)
absolute_path.each do |file|
existing = file_reference(file)
unless existing
......@@ -165,6 +169,13 @@ module Pod
end
end
# TODO: missing customization for file reference
#
def add_file_reference(absolute_path, group)
ref = group.new_file(relativize(absolute_path))
@refs_by_absolute_path[absolute_path] = ref
end
# Returns the file reference for the given absolute file path.
#
# @param [Pathname,String] absolute_path
......@@ -204,6 +215,28 @@ module Pod
#
attr_reader :refs_by_absolute_path
# Returns a subgroup of the give group for the given spec creating it if
# needed.
#
# @param [String] spec_name
# The full name of the specification.
#
# @param [PBXGroup] root_group
# The group where to add the specification. Either `Pods` or `Local
# Pods`.
#
# @return [PBXGroup] the group for the spec with the given name.
#
def add_spec_group(spec_name, root_group)
current_group = root_group
group = nil
spec_name.split('/').each do |name|
group = current_group[name] || current_group.new_group(name)
current_group = group
end
group
end
#-------------------------------------------------------------------------#
end
......
......@@ -21,11 +21,15 @@ module Pod
#
attr_reader :spec_consumer
# @param [Sandbox::PathList] path_list @see path_list
# @param [Sandbox::PathList, Pathname] path_list @see path_list
# @param [Specification::Consumer] spec_consumer @see spec_consumer
#
def initialize(path_list, spec_consumer)
@path_list = path_list
if path_list.is_a?(PathList)
@path_list = path_list
else
@path_list = PathList.new(path_list)
end
@spec_consumer = spec_consumer
unless @spec_consumer
......@@ -36,7 +40,7 @@ module Pod
# @return [Pathname] the directory which contains the files of the Pod.
#
def root
path_list.root
path_list.root if path_list
end
# @return [Specification] the specification.
......@@ -54,7 +58,7 @@ module Pod
# @return [String] A string suitable for debugging.
#
def inspect
"<#{self.class} spec=#{spec.name} platform=#{platform_name} root=#{path_list.root}>"
"<#{self.class} spec=#{spec.name} platform=#{platform_name} root=#{root}>"
end
#-----------------------------------------------------------------------#
......@@ -102,6 +106,40 @@ module Pod
paths_for_attribute(:preserve_paths, true)
end
# @return [Array<Pathname>] The paths of the framework bundles that come
# shipped with the Pod.
#
def vendored_frameworks
paths_for_attribute(:vendored_frameworks, true)
end
# @return [Array<Pathname>] The paths of the library bundles that come
# shipped with the Pod.
#
def vendored_libraries
paths_for_attribute(:vendored_libraries)
end
# @return [Hash{String => Array<Pathname>}] A hash that describes the
# resource bundles of the Pod. The keys reppresent the name of
# the bundle while the values the path of the resources.
#
def resource_bundles
result = {}
spec_consumer.resource_bundles.each do |name, file_patterns|
paths = expanded_paths(file_patterns, :include_dirs => true)
result[name] = paths
end
result
end
# @return [Array<Pathname>] The paths of the files which should be
# included in resources bundles by the Pod.
#
def resource_bundle_files
resource_bundles.values.flatten
end
# @return [Pathname] The of the prefix header file of the specification.
#
def prefix_header
......@@ -159,8 +197,6 @@ module Pod
#
# @return [String] the glob pattern.
#
# @todo Move to the cocoapods-core so it appears in the docs?
#
def glob_for_attribute(attrbute)
globs = {
:source_files => '*.{h,hpp,hh,m,mm,c,cpp}'.freeze,
......@@ -185,8 +221,6 @@ module Pod
#
# @return [Array<Pathname>] A list of the paths.
#
# @todo Implement case insensitive search
#
def expanded_paths(patterns, options = {})
return [] if patterns.empty?
result = []
......
......@@ -164,6 +164,7 @@ module Pod
pod = Specification::Set::Presenter.new(set, statistics_provider)
title("\n-> #{pod.name} (#{pod.version})".green, '', 1) do
puts_indented pod.summary
puts_indented "pod '#{pod.name}', '~> #{pod.version}'"
labeled('Homepage', pod.homepage)
labeled('Source', pod.source_url)
labeled('Versions', pod.verions_by_source)
......
......@@ -23,8 +23,10 @@ module Pod
Dir.chdir(temporary_directory) do
output = run_command('podfile-info')
output.should.include? '- BananaLib - Chunky bananas!'
output.should.include? '- JSONKit - A Very High Performance Objective-C JSON Library.'
output.should.include? '- BananaLib'
output.should.include? 'Chunky bananas!'
output.should.include? '- JSONKit'
output.should.include? 'A Very High Performance Objective-C JSON Library.'
end
end
end
......
......@@ -45,5 +45,26 @@ module Pod
Dir.chdir(config.repos_dir + 'master') { `git remote set-url origin git@github.com:CocoaPods/Specs.git` }
command('setup').url.should == 'git@github.com:CocoaPods/Specs.git'
end
before do
FileUtils.rm_rf(test_repo_path)
set_up_old_test_repo
config.repos_dir = SpecHelper.temporary_directory + 'cocoapods/repos'
Command::Setup.any_instance.stubs(:old_master_repo_dir).returns(SpecHelper.temporary_directory + 'cocoapods/master')
end
it "migrates repos from the old directory structure to the new one" do
source = SpecHelper.temporary_directory + 'cocoapods/master'
target = config.repos_dir + 'master'
source.should.exist?
target.should.not.exist?
output = run_command('setup')
source.should.not.exist?
target.should.exist?
end
end
end
......@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,11 +5,13 @@ File References:
- SystemConfiguration.framework
- Pods:
- JSONKit:
- JSONKit.h
- JSONKit.m
- Source Files:
- JSONKit.h
- JSONKit.m
- Reachability:
- Reachability.h
- Reachability.m
- Source Files:
- Reachability.h
- Reachability.m
- Products:
- libPods-JSONKit.a
- libPods-Reachability.a
......
......@@ -37,17 +37,21 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-JSONKit` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-JSONKit.xcconfig`
- Generating private xcconfig file at `Pods/Pods-JSONKit-Private.xcconfig`
- Generating prefix header at `Pods/Pods-JSONKit-prefix.pch`
- Generating dummy source file at `Pods/Pods-JSONKit-dummy.m`
- Installing target `Pods-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-Reachability-prefix.pch`
......
......@@ -8,4 +8,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -8,4 +8,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,8 +5,11 @@ File References:
- SystemConfiguration.framework
- Pods:
- Reachability:
- Reachability.h
- Reachability.m
- Source Files:
- Reachability.h
- Reachability.m
- Reachability.h
- Reachability.m
- Products:
- libPods-SampleApp_1-Reachability.a
- libPods-SampleApp_2-Reachability.a
......
......@@ -21,9 +21,9 @@ Downloading dependencies
true
$ /usr/bin/git rev-list --max-count=1 v3.1.0
f7176f4798d068d233dca5223ae4bd9c8059e830
$ /usr/bin/git init
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 clone 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' 'ROOT/tmp/install_custom_workspace/Pods/Reachability'
Cloning into 'ROOT/tmp/install_custom_workspace/Pods/Reachability'...
done.
$ /usr/bin/git fetch origin tags/v3.1.0 2>&1
From CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6
* tag v3.1.0 -> FETCH_HEAD
......@@ -36,17 +36,21 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-SampleApp_1-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-SampleApp_1-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-SampleApp_1-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-SampleApp_1-Reachability-prefix.pch`
- Generating dummy source file at `Pods/Pods-SampleApp_1-Reachability-dummy.m`
- Installing target `Pods-SampleApp_2-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-SampleApp_2-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-SampleApp_2-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-SampleApp_2-Reachability-prefix.pch`
......
......@@ -15,4 +15,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -15,4 +15,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,11 +5,13 @@ File References:
- Pods:
- PodTest:
- subspec_1:
- subspec_1.h
- subspec_1.m
- Source Files:
- subspec_1.h
- subspec_1.m
- subspec_2:
- subspec_2.h
- subspec_2.m
- Source Files:
- subspec_2.h
- subspec_2.m
- Products:
- libPods-PodTest.a
- libPods.a
......
......@@ -66,7 +66,7 @@ Targets:
WRAPPER_EXTENSION: app
FRAMEWORK_SEARCH_PATHS:
- $(inherited)
- ! '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
- '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
IPHONEOS_DEPLOYMENT_TARGET: '6.1'
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: iOS App/iOS App-Info.plist
......@@ -82,7 +82,7 @@ Targets:
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
FRAMEWORK_SEARCH_PATHS:
- $(inherited)
- ! '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
- '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
IPHONEOS_DEPLOYMENT_TARGET: '6.1'
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: iOS App/iOS App-Info.plist
......
......@@ -4,7 +4,7 @@ Analyzing dependencies
Fetching external sources
-> Pre-downloading: `PodTest` from `PodTest-hg-source`
> Mercurial download
$ /opt/local/bin/hg clone "PodTest-hg-source" "ROOT/tmp/install_external_source/Pods/PodTest"
$ /usr/local/bin/hg clone "PodTest-hg-source" "ROOT/tmp/install_external_source/Pods/PodTest"
updating to branch default
5 files updated, 0 files merged, 0 files removed, 0 files unresolved
......@@ -25,11 +25,14 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-PodTest` iOS 4.3
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-PodTest.xcconfig`
- Generating private xcconfig file at `Pods/Pods-PodTest-Private.xcconfig`
- Generating prefix header at `Pods/Pods-PodTest-prefix.pch`
......
......@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,8 +5,9 @@ File References:
- SystemConfiguration.framework
- Local Pods:
- Reachability:
- Reachability.h
- Reachability.m
- Source Files:
- Reachability.h
- Reachability.m
- Products:
- libPods-Reachability.a
- libPods.a
......
......@@ -66,7 +66,7 @@ Targets:
WRAPPER_EXTENSION: app
FRAMEWORK_SEARCH_PATHS:
- $(inherited)
- ! '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
- '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
IPHONEOS_DEPLOYMENT_TARGET: '6.1'
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: iOS App/iOS App-Info.plist
......@@ -82,7 +82,7 @@ Targets:
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
FRAMEWORK_SEARCH_PATHS:
- $(inherited)
- ! '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
- '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
IPHONEOS_DEPLOYMENT_TARGET: '6.1'
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: iOS App/iOS App-Info.plist
......
......@@ -19,11 +19,14 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-Reachability` iOS 4.3
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-Reachability-prefix.pch`
......
......@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,11 +5,17 @@ File References:
- SystemConfiguration.framework
- Pods:
- Reachability:
- Reachability.h
- Reachability.m
- Source Files:
- Reachability.h
- Reachability.m
- Reachability.h
- Reachability.m
- JSONKit:
- JSONKit.h
- JSONKit.m
- Source Files:
- JSONKit.h
- JSONKit.m
- JSONKit.h
- JSONKit.m
- Products:
- libPods-Reachability.a
- libPods-SampleApp_2-JSONKit.a
......
......@@ -119,7 +119,7 @@ Targets:
Build Settings:
WRAPPER_EXTENSION: octest
COMBINE_HIDPI_IMAGES: 'YES'
FRAMEWORK_SEARCH_PATHS: ! '"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
FRAMEWORK_SEARCH_PATHS: '"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
TEST_HOST: $(BUNDLE_LOADER)
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: SampleAppTests/SampleAppTests-Info.plist
......@@ -131,7 +131,7 @@ Targets:
Build Settings:
WRAPPER_EXTENSION: octest
COMBINE_HIDPI_IMAGES: 'YES'
FRAMEWORK_SEARCH_PATHS: ! '"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
FRAMEWORK_SEARCH_PATHS: '"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
TEST_HOST: $(BUNDLE_LOADER)
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: SampleAppTests/SampleAppTests-Info.plist
......
......@@ -39,9 +39,9 @@ Downloading dependencies
true
$ /usr/bin/git rev-list --max-count=1 v3.1.0
f7176f4798d068d233dca5223ae4bd9c8059e830
$ /usr/bin/git init
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 clone 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' 'ROOT/tmp/install_multiple_targets/Pods/Reachability'
Cloning into 'ROOT/tmp/install_multiple_targets/Pods/Reachability'...
done.
$ /usr/bin/git fetch origin tags/v3.1.0 2>&1
From CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6
* tag v3.1.0 -> FETCH_HEAD
......@@ -54,29 +54,35 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-Reachability-prefix.pch`
- Generating dummy source file at `Pods/Pods-Reachability-dummy.m`
- Installing target `Pods-SampleApp_2-JSONKit` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-SampleApp_2-JSONKit.xcconfig`
- Generating private xcconfig file at `Pods/Pods-SampleApp_2-JSONKit-Private.xcconfig`
- Generating prefix header at `Pods/Pods-SampleApp_2-JSONKit-prefix.pch`
- Generating dummy source file at `Pods/Pods-SampleApp_2-JSONKit-dummy.m`
- Installing target `Pods-SampleApp_2-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-SampleApp_2-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-SampleApp_2-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-SampleApp_2-Reachability-prefix.pch`
- Generating dummy source file at `Pods/Pods-SampleApp_2-Reachability-dummy.m`
- Installing target `Pods-test-JSONKit` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-test-JSONKit.xcconfig`
- Generating private xcconfig file at `Pods/Pods-test-JSONKit-Private.xcconfig`
- Generating prefix header at `Pods/Pods-test-JSONKit-prefix.pch`
......
......@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,8 +5,9 @@ File References:
- SystemConfiguration.framework
- Pods:
- Reachability:
- Reachability.h
- Reachability.m
- Source Files:
- Reachability.h
- Reachability.m
- Products:
- libPods-Reachability.a
- libPods.a
......
......@@ -18,9 +18,9 @@ Downloading dependencies
true
$ /usr/bin/git rev-list --max-count=1 v3.1.0
f7176f4798d068d233dca5223ae4bd9c8059e830
$ /usr/bin/git init
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 clone 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' 'ROOT/tmp/install_new/Pods/Reachability'
Cloning into 'ROOT/tmp/install_new/Pods/Reachability'...
done.
$ /usr/bin/git fetch origin tags/v3.1.0 2>&1
From CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6
* tag v3.1.0 -> FETCH_HEAD
......@@ -33,11 +33,14 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-Reachability-prefix.pch`
......
......@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,8 +5,9 @@ File References:
- SystemConfiguration.framework
- Pods:
- Reachability:
- Reachability.h
- Reachability.m
- Source Files:
- Reachability.h
- Reachability.m
- Products:
- libPods-Reachability.a
- libPods.a
......
......@@ -18,9 +18,9 @@ Downloading dependencies
true
$ /usr/bin/git rev-list --max-count=1 v3.1.0
f7176f4798d068d233dca5223ae4bd9c8059e830
$ /usr/bin/git init
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 clone 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' 'ROOT/tmp/install_podfile_callbacks/Pods/Reachability'
Cloning into 'ROOT/tmp/install_podfile_callbacks/Pods/Reachability'...
done.
$ /usr/bin/git fetch origin tags/v3.1.0 2>&1
From CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6
* tag v3.1.0 -> FETCH_HEAD
......@@ -34,11 +34,14 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-Reachability-prefix.pch`
......
......@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,8 +5,9 @@ File References:
- SystemConfiguration.framework
- Pods:
- Reachability:
- Reachability.h
- Reachability.m
- Source Files:
- Reachability.h
- Reachability.m
- Products:
- libPods-Reachability.a
- libPods.a
......
......@@ -21,9 +21,9 @@ Downloading dependencies
true
$ /usr/bin/git rev-list --max-count=1 v3.1.0
f7176f4798d068d233dca5223ae4bd9c8059e830
$ /usr/bin/git init
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 clone 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' 'ROOT/tmp/install_podspec/Pods/Reachability'
Cloning into 'ROOT/tmp/install_podspec/Pods/Reachability'...
done.
$ /usr/bin/git fetch origin tags/v3.1.0 2>&1
From CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6
* tag v3.1.0 -> FETCH_HEAD
......@@ -36,11 +36,14 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-Reachability-prefix.pch`
......
......@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,8 +5,9 @@ File References:
- SystemConfiguration.framework
- Pods:
- Reachability:
- Reachability.h
- Reachability.m
- Source Files:
- Reachability.h
- Reachability.m
- Products:
- libPods-Reachability.a
- libPods.a
......
......@@ -23,11 +23,14 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-Reachability-prefix.pch`
......
......@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: c1e48cc25f8e7cba878c83ad1981d334ef325522
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Reachability: c1e48cc25f8e7cba878c83ad1981d334ef325522
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,10 +5,11 @@ File References:
- SystemConfiguration.framework
- Pods:
- Reachability:
- Reachability.h
- Reachability.m
- TestClass.h
- TestClass.m
- Source Files:
- Reachability.h
- Reachability.m
- TestClass.h
- TestClass.m
- Products:
- libPods-Reachability.a
- libPods.a
......
......@@ -21,9 +21,9 @@ Downloading dependencies
true
$ /usr/bin/git rev-list --max-count=1 v3.1.0
f7176f4798d068d233dca5223ae4bd9c8059e830
$ /usr/bin/git init
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 clone 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' 'ROOT/tmp/install_spec_callbacks/Pods/Reachability'
Cloning into 'ROOT/tmp/install_spec_callbacks/Pods/Reachability'...
done.
$ /usr/bin/git fetch origin tags/v3.1.0 2>&1
From CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6
* tag v3.1.0 -> FETCH_HEAD
......@@ -37,11 +37,14 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-Reachability-prefix.pch`
......
......@@ -13,4 +13,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -13,4 +13,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -6,11 +6,13 @@ File References:
- Pods:
- PodTest:
- subspec_1:
- subspec_1.h
- subspec_1.m
- Source Files:
- subspec_1.h
- subspec_1.m
- subspec_2:
- subspec_2.h
- subspec_2.m
- Source Files:
- subspec_2.h
- subspec_2.m
- Products:
- libPods-OS X App-PodTest.a
- libPods-iOS App-PodTest.a
......
......@@ -69,7 +69,7 @@ Targets:
WRAPPER_EXTENSION: app
FRAMEWORK_SEARCH_PATHS:
- $(inherited)
- ! '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
- '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
IPHONEOS_DEPLOYMENT_TARGET: '6.1'
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: iOS App/iOS App-Info.plist
......@@ -85,7 +85,7 @@ Targets:
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
FRAMEWORK_SEARCH_PATHS:
- $(inherited)
- ! '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
- '"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks"'
IPHONEOS_DEPLOYMENT_TARGET: '6.1'
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: iOS App/iOS App-Info.plist
......
......@@ -4,12 +4,12 @@ Analyzing dependencies
Fetching external sources
-> Pre-downloading: `PodTest` from `PodTest-hg-source`
> Mercurial download
$ /opt/local/bin/hg clone "PodTest-hg-source" "ROOT/tmp/install_subspecs/Pods/PodTest"
$ /usr/local/bin/hg clone "PodTest-hg-source" "ROOT/tmp/install_subspecs/Pods/PodTest"
updating to branch default
5 files updated, 0 files merged, 0 files removed, 0 files unresolved
-> Pre-downloading: `PodTest` from `PodTest-hg-source`
> Mercurial download
$ /opt/local/bin/hg clone "PodTest-hg-source" "ROOT/tmp/install_subspecs/Pods/PodTest"
$ /usr/local/bin/hg clone "PodTest-hg-source" "ROOT/tmp/install_subspecs/Pods/PodTest"
updating to branch default
5 files updated, 0 files merged, 0 files removed, 0 files unresolved
......@@ -31,17 +31,21 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-OS X App-PodTest` OS X 10.6
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-OS X App-PodTest.xcconfig`
- Generating private xcconfig file at `Pods/Pods-OS X App-PodTest-Private.xcconfig`
- Generating prefix header at `Pods/Pods-OS X App-PodTest-prefix.pch`
- Generating dummy source file at `Pods/Pods-OS X App-PodTest-dummy.m`
- Installing target `Pods-iOS App-PodTest` iOS 4.3
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-iOS App-PodTest.xcconfig`
- Generating private xcconfig file at `Pods/Pods-iOS App-PodTest-Private.xcconfig`
- Generating prefix header at `Pods/Pods-iOS App-PodTest-prefix.pch`
......
......@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.22.2
COCOAPODS: 0.22.3
......@@ -21,9 +21,17 @@ install_resource()
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodel | *.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/$1.momd"
*.xcdatamodel)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
;;
*.xcdatamodeld)
echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
;;
/*)
echo "$1"
echo "$1" >> "$RESOURCES_TO_COPY"
;;
*)
echo "${PODS_ROOT}/$1"
......
......@@ -5,8 +5,9 @@ File References:
- SystemConfiguration.framework
- Pods:
- Reachability:
- Reachability.h
- Reachability.m
- Source Files:
- Reachability.h
- Reachability.m
- Products:
- libPods-Reachability.a
- libPods.a
......
......@@ -21,9 +21,9 @@ Downloading dependencies
true
$ /usr/bin/git rev-list --max-count=1 v3.1.0
f7176f4798d068d233dca5223ae4bd9c8059e830
$ /usr/bin/git init
Initialized empty Git repository in ROOT/tmp/update/Pods/Reachability/.git/
$ /usr/bin/git remote add origin 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6'
$ /usr/bin/git clone 'CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6' 'ROOT/tmp/update/Pods/Reachability'
Cloning into 'ROOT/tmp/update/Pods/Reachability'...
done.
$ /usr/bin/git fetch origin tags/v3.1.0 2>&1
From CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6
* tag v3.1.0 -> FETCH_HEAD
......@@ -36,11 +36,14 @@ Downloading dependencies
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding frameworks to Pods project
- Adding frameworks to Pods project
- Adding resources to Pods project
- Linking headers
- Installing libraries
- Installing target `Pods-Reachability` iOS 6.0
- Adding Build files
- Adding resource bundles to Pods project
- Generating public xcconfig file at `Pods/Pods-Reachability.xcconfig`
- Generating private xcconfig file at `Pods/Pods-Reachability-Private.xcconfig`
- Generating prefix header at `Pods/Pods-Reachability-prefix.pch`
......
......@@ -45,7 +45,7 @@ module SpecHelper
repo_path('master')
end
# Sets up a lighweight master repo in `tmp/cocoapods/master` with the
# Sets up a lighweight master repo in `tmp/cocoapods/repos/master` with the
# contents of `spec/fixtures/spec-repos/test_repo`.
#
def set_up_test_repo
......@@ -57,10 +57,26 @@ module SpecHelper
repo_make('master')
end
def test_old_repo_path
repo_path('../master')
end
# Sets up a lighweight master repo in `tmp/cocoapods/master` with the
# contents of `spec/fixtures/spec-repos/test_repo`.
#
def set_up_old_test_repo
require 'fileutils'
test_old_repo_path.mkpath
origin = ROOT + 'spec/fixtures/spec-repos/test_repo/.'
destination = tmp_repos_path + '../master'
FileUtils.cp_r(origin, destination)
repo_make('../master')
end
#--------------------------------------#
def tmp_repos_path
SpecHelper.temporary_directory + 'cocoapods'
SpecHelper.temporary_directory + 'cocoapods/repos'
end
module_function :tmp_repos_path
......
......@@ -15,12 +15,12 @@ module Pod
@sut.should.be.instance_of Config
end
it "returns the path to the spec-repos dir" do
@sut.repos_dir.should == Pathname.new("~/.cocoapods").expand_path
it "returns the path to the home dir" do
@sut.home_dir.should == Pathname.new("~/.cocoapods").expand_path
end
it "returns the path to the spec-repos dir" do
@sut.repos_dir.should == Pathname.new("~/.cocoapods").expand_path
@sut.repos_dir.should == Pathname.new("~/.cocoapods/repos").expand_path
end
it "allows to specify whether the aggressive cache should be used with an environment variable" do
......@@ -30,6 +30,12 @@ module Pod
ENV.delete('CP_AGGRESSIVE_CACHE')
end
it "allows to specify the home dir with an environment variable" do
ENV['CP_HOME_DIR'] = '~/custom_home_dir'
@sut.home_dir.should == Pathname.new("~/custom_home_dir").expand_path
ENV.delete('CP_HOME_DIR')
end
it "allows to specify the repos dir with an environment variable" do
ENV['CP_REPOS_DIR'] = '~/custom_repos_dir'
@sut.repos_dir.should == Pathname.new("~/custom_repos_dir").expand_path
......
require File.expand_path('../../../../spec_helper', __FILE__)
module Pod
describe Generator::AggregateXCConfig do
before do
@spec = fixture_spec('banana-lib/BananaLib.podspec')
@consumer = @spec.consumer(:ios)
target_definition = Podfile::TargetDefinition.new('Pods', nil)
@target = AggregateTarget.new(target_definition, config.sandbox)
@target.client_root = config.sandbox.root.dirname
@target.stubs(:platform).returns(:ios)
@pod_target = PodTarget.new([@spec], target_definition, config.sandbox)
@pod_target.stubs(:platform).returns(:ios)
@pod_target.stubs(:spec_consumers).returns([@consumer])
@target.pod_targets = [@pod_target]
@generator = Generator::AggregateXCConfig.new(@target)
module Generator
module XCConfig
describe AggregateXCConfig do
before do
@spec = fixture_spec('banana-lib/BananaLib.podspec')
@consumer = @spec.consumer(:ios)
target_definition = Podfile::TargetDefinition.new('Pods', nil)
@target = AggregateTarget.new(target_definition, config.sandbox)
@target.client_root = config.sandbox.root.dirname
@target.stubs(:platform).returns(:ios)
@pod_target = PodTarget.new([@spec], target_definition, config.sandbox)
@pod_target.stubs(:platform).returns(:ios)
@pod_target.stubs(:spec_consumers).returns([@consumer])
@target.pod_targets = [@pod_target]
@generator = AggregateXCConfig.new(@target)
end
it "returns the path of the pods root relative to the user project" do
@generator.target.relative_pods_root.should == '${SRCROOT}/Pods/Generated'
end
#-----------------------------------------------------------------------#
before do
@podfile = Podfile.new
@target.target_definition.stubs(:podfile).returns(@podfile)
@xcconfig = @generator.generate
end
it "generates the xcconfig" do
@xcconfig.class.should == Xcodeproj::Config
end
it "configures the project to load all members that implement Objective-c classes or categories from the static library" do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-ObjC'
end
it 'does not add the -fobjc-arc to OTHER_LDFLAGS by default as Xcode 4.3.2 does not support it' do
@consumer.stubs(:requires_arc?).returns(true)
@xcconfig.to_hash['OTHER_LDFLAGS'].should.not.include("-fobjc-arc")
end
it 'adds the -fobjc-arc to OTHER_LDFLAGS if any pods require arc and the podfile explicitly requires it' do
@podfile.stubs(:set_arc_compatibility_flag?).returns(true)
@consumer.stubs(:requires_arc?).returns(true)
@xcconfig = @generator.generate
@xcconfig.to_hash['OTHER_LDFLAGS'].split(" ").should.include("-fobjc-arc")
end
it "sets the PODS_ROOT build variable" do
@xcconfig.to_hash['PODS_ROOT'].should == '${SRCROOT}/Pods/Generated'
end
it 'adds the sandbox public headers search paths to the xcconfig, with quotes' do
expected = "\"#{config.sandbox.public_headers.search_paths.join('" "')}\""
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should == expected
end
it 'adds the COCOAPODS macro definition' do
@xcconfig.to_hash['GCC_PREPROCESSOR_DEFINITIONS'].should.include 'COCOAPODS=1'
end
it 'inherits the parent GCC_PREPROCESSOR_DEFINITIONS value' do
@xcconfig.to_hash['GCC_PREPROCESSOR_DEFINITIONS'].should.include '$(inherited)'
end
#-----------------------------------------------------------------------#
before do
@path = temporary_directory + 'sample.xcconfig'
@generator.save_as(@path)
end
it "saves the xcconfig" do
generated = Xcodeproj::Config.new(@path)
generated.class.should == Xcodeproj::Config
end
end
end
it "returns the sandbox" do
@generator.sandbox.class.should == Sandbox
end
it "returns the path of the pods root relative to the user project" do
@generator.target.relative_pods_root.should == '${SRCROOT}/Pods/Generated'
end
#-----------------------------------------------------------------------#
before do
@podfile = Podfile.new
@target.target_definition.stubs(:podfile).returns(@podfile)
@xcconfig = @generator.generate
end
it "generates the xcconfig" do
@xcconfig.class.should == Xcodeproj::Config
end
it "configures the project to load all members that implement Objective-c classes or categories from the static library" do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-ObjC'
end
it 'does not add the -fobjc-arc to OTHER_LDFLAGS by default as Xcode 4.3.2 does not support it' do
@consumer.stubs(:requires_arc?).returns(true)
@xcconfig.to_hash['OTHER_LDFLAGS'].should.not.include("-fobjc-arc")
end
it 'adds the -fobjc-arc to OTHER_LDFLAGS if any pods require arc and the podfile explicitly requires it' do
@podfile.stubs(:set_arc_compatibility_flag?).returns(true)
@consumer.stubs(:requires_arc?).returns(true)
@xcconfig = @generator.generate
@xcconfig.to_hash['OTHER_LDFLAGS'].split(" ").should.include("-fobjc-arc")
end
it "sets the PODS_ROOT build variable" do
@xcconfig.to_hash['PODS_ROOT'].should == '${SRCROOT}/Pods/Generated'
end
it 'adds the sandbox public headers search paths to the xcconfig, with quotes' do
expected = "\"#{config.sandbox.public_headers.search_paths.join('" "')}\""
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should == expected
end
it 'adds the COCOAPODS macro definition' do
@xcconfig.to_hash['GCC_PREPROCESSOR_DEFINITIONS'].should.include 'COCOAPODS=1'
end
it 'inherits the parent GCC_PREPROCESSOR_DEFINITIONS value' do
@xcconfig.to_hash['GCC_PREPROCESSOR_DEFINITIONS'].should.include '$(inherited)'
end
#-----------------------------------------------------------------------#
before do
@path = temporary_directory + 'sample.xcconfig'
@generator.save_as(@path)
end
it "saves the xcconfig" do
generated = Xcodeproj::Config.new(@path)
generated.class.should == Xcodeproj::Config
end
end
end
require File.expand_path('../../../../spec_helper', __FILE__)
module Pod
describe Generator::PrivatePodXCConfig do
describe "in general" do
before do
@spec = fixture_spec('banana-lib/BananaLib.podspec')
@consumer = @spec.consumer(:ios)
target_definition = Podfile::TargetDefinition.new('Pods', nil)
@pod_target = PodTarget.new([@spec], target_definition, config.sandbox)
@pod_target.stubs(:platform).returns(:ios)
public_xcconfig = Xcodeproj::Config.new({"OTHER_LDFLAGS"=>"-framework SystemConfiguration"})
@generator = Generator::PrivatePodXCConfig.new(@pod_target, public_xcconfig)
end
it "returns the sandbox" do
@generator.sandbox.class.should == Sandbox
end
before do
@podfile = Podfile.new
@pod_target.target_definition.stubs(:podfile).returns(@podfile)
@xcconfig = @generator.generate
end
it "generates the xcconfig" do
@xcconfig.class.should == Xcodeproj::Config
end
it "configures the project to load all members that implement Objective-c classes or categories from the static library" do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-ObjC'
end
it 'does not add the -fobjc-arc to OTHER_LDFLAGS by default as Xcode 4.3.2 does not support it' do
@consumer.stubs(:requires_arc?).returns(true)
@xcconfig.to_hash['OTHER_LDFLAGS'].should.not.include("-fobjc-arc")
end
it 'adds the -fobjc-arc to OTHER_LDFLAGS if any pods require arc and the podfile explicitly requires it' do
@podfile.stubs(:set_arc_compatibility_flag?).returns(true)
@consumer.stubs(:requires_arc?).returns(true)
@xcconfig = @generator.generate
@xcconfig.to_hash['OTHER_LDFLAGS'].split(" ").should.include("-fobjc-arc")
end
it "sets the PODS_ROOT build variable" do
@xcconfig.to_hash['PODS_ROOT'].should.not == nil
end
it 'adds the library build headers and public headers search paths to the xcconfig, with quotes' do
private_headers = "\"#{@pod_target.build_headers.search_paths.join('" "')}\""
public_headers = "\"#{config.sandbox.public_headers.search_paths.join('" "')}\""
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should.include private_headers
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should.include public_headers
end
module Generator
module XCConfig
describe PrivatePodXCConfig do
describe "in general" do
before do
@spec = fixture_spec('banana-lib/BananaLib.podspec')
@consumer = @spec.consumer(:ios)
target_definition = Podfile::TargetDefinition.new('Pods', nil)
@pod_target = PodTarget.new([@spec], target_definition, config.sandbox)
@pod_target.stubs(:platform).returns(:ios)
public_xcconfig = Xcodeproj::Config.new({"OTHER_LDFLAGS"=>"-framework SystemConfiguration"})
@generator = PrivatePodXCConfig.new(@pod_target, public_xcconfig)
@podfile = Podfile.new
@pod_target.target_definition.stubs(:podfile).returns(@podfile)
@xcconfig = @generator.generate
end
it "generates the xcconfig" do
@xcconfig.class.should == Xcodeproj::Config
end
it "configures the project to load all members that implement Objective-c classes or categories from the static library" do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include '-ObjC'
end
it 'does not add the -fobjc-arc to OTHER_LDFLAGS by default as Xcode 4.3.2 does not support it' do
@consumer.stubs(:requires_arc?).returns(true)
@xcconfig.to_hash['OTHER_LDFLAGS'].should.not.include("-fobjc-arc")
end
it 'adds the -fobjc-arc to OTHER_LDFLAGS if any pods require arc and the podfile explicitly requires it' do
@podfile.stubs(:set_arc_compatibility_flag?).returns(true)
@consumer.stubs(:requires_arc?).returns(true)
@xcconfig = @generator.generate
@xcconfig.to_hash['OTHER_LDFLAGS'].split(" ").should.include("-fobjc-arc")
end
it "sets the PODS_ROOT build variable" do
@xcconfig.to_hash['PODS_ROOT'].should.not == nil
end
it 'adds the library build headers and public headers search paths to the xcconfig, with quotes' do
private_headers = "\"#{@pod_target.build_headers.search_paths.join('" "')}\""
public_headers = "\"#{config.sandbox.public_headers.search_paths.join('" "')}\""
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should.include private_headers
@xcconfig.to_hash['HEADER_SEARCH_PATHS'].should.include public_headers
end
it 'adds the COCOAPODS macro definition' do
@xcconfig.to_hash['GCC_PREPROCESSOR_DEFINITIONS'].should.include 'COCOAPODS=1'
end
it 'adds the pod namespaced configuration items' do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include("${#{@pod_target.xcconfig_prefix}OTHER_LDFLAGS}")
end
it 'sets the relative path of the pods root for spec libraries to ${SRCROOT}' do
@xcconfig.to_hash['PODS_ROOT'].should == '${SRCROOT}'
end
it "saves the xcconfig" do
path = temporary_directory + 'sample.xcconfig'
@generator.save_as(path)
generated = Xcodeproj::Config.new(path)
generated.class.should == Xcodeproj::Config
end
it 'adds the COCOAPODS macro definition' do
@xcconfig.to_hash['GCC_PREPROCESSOR_DEFINITIONS'].should.include 'COCOAPODS=1'
end
it 'adds the pod namespaced configuration items' do
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include("${#{@pod_target.xcconfig_prefix}OTHER_LDFLAGS}")
end
end
it 'sets the relative path of the pods root for spec libraries to ${SRCROOT}' do
@xcconfig.to_hash['PODS_ROOT'].should == '${SRCROOT}'
end
#-------------------------------------------------------------------------#
it "saves the xcconfig" do
path = temporary_directory + 'sample.xcconfig'
@generator.save_as(path)
generated = Xcodeproj::Config.new(path)
generated.class.should == Xcodeproj::Config
end
describe "Private Helpers" do
end
before do
@sut = PrivatePodXCConfig.new(stub(), stub())
end
#-------------------------------------------------------------------------#
#----------------------------------------#
describe "Private Helpers" do
describe "#add_xcconfig_namespaced_keys" do
before do
@sut = Generator::PrivatePodXCConfig.new(stub(), stub())
end
it "appends to the values of the keys of the destination the value of the keys of the source" do
source_config = { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/MyPod' }
destination_config = { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/BuildHeaders' }
result = @sut.send(:add_xcconfig_namespaced_keys, source_config, destination_config, 'PREFIX_')
result.should == { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/BuildHeaders ${PREFIX_HEADER_SEARCH_PATHS}' }
end
#----------------------------------------#
it "uses the key of the destination xcconfig if not present in the source" do
source_config = { }
destination_config = { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/BuildHeaders' }
result = @sut.send(:add_xcconfig_namespaced_keys, source_config, destination_config, 'PREFIX_')
result.should == { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/BuildHeaders' }
end
describe "#add_xcconfig_namespaced_keys" do
it "preserves any value of the source not present in the destination" do
source_config = { 'EXCLUDED_SOURCE_FILE_NAMES' => 'ZBarReaderViewImpl_Simulator.m' }
destination_config = { }
result = @sut.send(:add_xcconfig_namespaced_keys, source_config, destination_config, 'PREFIX_')
result.should == { 'EXCLUDED_SOURCE_FILE_NAMES' => '${PREFIX_EXCLUDED_SOURCE_FILE_NAMES}' }
end
it "appends to the values of the keys of the destination the value of the keys of the source" do
source_config = { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/MyPod' }
destination_config = { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/BuildHeaders' }
result = @sut.send(:add_xcconfig_namespaced_keys, source_config, destination_config, 'PREFIX_')
result.should == { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/BuildHeaders ${PREFIX_HEADER_SEARCH_PATHS}' }
end
end
it "uses the key of the destination xcconfig if not present in the source" do
source_config = { }
destination_config = { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/BuildHeaders' }
result = @sut.send(:add_xcconfig_namespaced_keys, source_config, destination_config, 'PREFIX_')
result.should == { 'HEADER_SEARCH_PATHS' => '${PODS_ROOT}/BuildHeaders' }
end
#----------------------------------------#
it "preserves any value of the source not present in the destination" do
source_config = { 'EXCLUDED_SOURCE_FILE_NAMES' => 'ZBarReaderViewImpl_Simulator.m' }
destination_config = { }
result = @sut.send(:add_xcconfig_namespaced_keys, source_config, destination_config, 'PREFIX_')
result.should == { 'EXCLUDED_SOURCE_FILE_NAMES' => '${PREFIX_EXCLUDED_SOURCE_FILE_NAMES}' }
end
describe "#conditional_less_key" do
end
it "returns the key without the xcconfig conditional syntax if present" do
result = @sut.send(:conditional_less_key, 'EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*][arch=*]')
result.should == 'EXCLUDED_SOURCE_FILE_NAMES'
end
#----------------------------------------#
it "returns the key as it is if no conditional syntax is present" do
result = @sut.send(:conditional_less_key, 'EXCLUDED_SOURCE_FILE_NAMES')
result.should == 'EXCLUDED_SOURCE_FILE_NAMES'
end
describe "#conditional_less_key" do
end
it "returns the key without the xcconfig conditional syntax if present" do
result = @sut.send(:conditional_less_key, 'EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*][arch=*]')
result.should == 'EXCLUDED_SOURCE_FILE_NAMES'
end
it "returns the key as it is if no conditional syntax is present" do
result = @sut.send(:conditional_less_key, 'EXCLUDED_SOURCE_FILE_NAMES')
result.should == 'EXCLUDED_SOURCE_FILE_NAMES'
end
#-------------------------------------------------------------------------#
end
end
#-------------------------------------------------------------------------#
end
end
require File.expand_path('../../../../spec_helper', __FILE__)
module Pod
describe Generator::PublicPodXCConfig do
before do
@spec = fixture_spec('banana-lib/BananaLib.podspec')
@target_definition = Podfile::TargetDefinition.new('Pods', nil)
@pod_target = PodTarget.new([@spec], @target_definition, config.sandbox)
@pod_target.stubs(:platform).returns(:ios)
@generator = Generator::PublicPodXCConfig.new(@pod_target)
module Generator
module XCConfig
describe PublicPodXCConfig do
before do
@spec = fixture_spec('banana-lib/BananaLib.podspec')
@target_definition = Podfile::TargetDefinition.new('Pods', nil)
@pod_target = PodTarget.new([@spec], @target_definition, config.sandbox)
@pod_target.stubs(:platform).returns(:ios)
@generator = PublicPodXCConfig.new(@pod_target)
@podfile = Podfile.new
@spec.xcconfig = { 'OTHER_LDFLAGS' => '-no_compact_unwind' }
@spec.frameworks = ['QuartzCore']
@spec.weak_frameworks = ['iAd']
@spec.libraries = ['xml2']
file_accessors = [Sandbox::FileAccessor.new(fixture('banana-lib'), @spec.consumer(:ios))]
# vendored_framework_paths = [config.sandbox.root + 'BananaLib/BananaLib.framework']
# Sandbox::FileAccessor.any_instance.stubs(:vendored_frameworks).returns(vendored_framework_paths)
@pod_target.target_definition.stubs(:podfile).returns(@podfile)
@pod_target.stubs(:file_accessors).returns(file_accessors)
@xcconfig = @generator.generate
end
it "generates the xcconfig" do
@xcconfig.class.should == Xcodeproj::Config
end
it "includes the xcconfig of the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-no_compact_unwind')
end
it "includes the libraries for the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-lxml2')
end
it "includes the frameworks of the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-framework QuartzCore')
end
it "includes the weak-frameworks of the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-weak_framework iAd')
end
it "includes the developer frameworks search paths when SenTestingKit is detected" do
@spec.xcconfig = { 'OTHER_LDFLAGS' => '-no_compact_unwind' }
@spec.frameworks = ['SenTestingKit']
xcconfig = @generator.generate
framework_search_paths = xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS']
framework_search_paths.should.include('$(SDKROOT)/Developer')
end
it "doesn't include the developer frameworks if already present" do
@spec.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"' }
@spec.frameworks = ['SenTestingKit']
xcconfig = @generator.generate
framework_search_paths = xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].split(' ')
framework_search_paths.select { |path| path == '"$(SDKROOT)/Developer/Library/Frameworks"'}.count.should == 1
framework_search_paths.select { |path| path == '"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'}.count.should == 1
end
it "includes the build settings of the frameworks bundles of the spec" do
config.sandbox.stubs(:root).returns(fixture(''))
xcconfig = @generator.generate
xcconfig.to_hash["FRAMEWORK_SEARCH_PATHS"].should.include?('"$(PODS_ROOT)/banana-lib"')
end
it "includes the build settings of the libraries shipped with the spec" do
config.sandbox.stubs(:root).returns(fixture(''))
xcconfig = @generator.generate
xcconfig.to_hash["LIBRARY_SEARCH_PATHS"].should.include?('"$(PODS_ROOT)/banana-lib"')
end
#-----------------------------------------------------------------------#
before do
@path = temporary_directory + 'sample.xcconfig'
@generator.save_as(@path)
end
it "saves the xcconfig" do
generated = Xcodeproj::Config.new(@path)
generated.class.should == Xcodeproj::Config
end
it "writes the xcconfig with a prefix computed from the target definition and root spec" do
generated = Xcodeproj::Config.new(@path)
generated.to_hash.each { |k, v| k.should.start_with(@pod_target.xcconfig_prefix) }
end
end
end
it "returns the sandbox" do
@generator.sandbox.class.should == Sandbox
end
#-----------------------------------------------------------------------#
before do
@podfile = Podfile.new
@pod_target.target_definition.stubs(:podfile).returns(@podfile)
@spec.xcconfig = { 'OTHER_LDFLAGS' => '-no_compact_unwind' }
@spec.frameworks = ['QuartzCore']
@spec.weak_frameworks = ['iAd']
@spec.libraries = ['xml2']
@xcconfig = @generator.generate
end
it "generates the xcconfig" do
@xcconfig.class.should == Xcodeproj::Config
end
it "includes the xcconfig of the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-no_compact_unwind')
end
it "includes the libraries for the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-lxml2')
end
it "includes the frameworks of the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-framework QuartzCore')
end
it "includes the weak-frameworks of the specifications" do
@xcconfig.to_hash["OTHER_LDFLAGS"].should.include('-weak_framework iAd')
end
it "includes the developer frameworks search paths when SenTestingKit is detected" do
@spec.xcconfig = { 'OTHER_LDFLAGS' => '-no_compact_unwind' }
@spec.frameworks = ['SenTestingKit']
xcconfig = @generator.generate
xcconfig.to_hash["FRAMEWORK_SEARCH_PATHS"].should == '$(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
end
it "doesn't include the developer frameworks if already present" do
spec = fixture_spec('banana-lib/BananaLib.podspec')
pod_target = PodTarget.new([@spec, spec], @target_definition, config.sandbox)
pod_target.stubs(:platform).returns(:ios)
generator = Generator::PublicPodXCConfig.new(pod_target)
@spec.frameworks = ['SenTestingKit']
spec.frameworks = ['SenTestingKit']
xcconfig = generator.generate
xcconfig.to_hash["FRAMEWORK_SEARCH_PATHS"].should == '$(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
end
#-----------------------------------------------------------------------#
before do
@path = temporary_directory + 'sample.xcconfig'
@generator.save_as(@path)
end
it "saves the xcconfig" do
generated = Xcodeproj::Config.new(@path)
generated.class.should == Xcodeproj::Config
end
it "writes the xcconfig with a prefix computed from the target definition and root spec" do
generated = Xcodeproj::Config.new(@path)
generated.to_hash.each { |k, v| k.should.start_with(@pod_target.xcconfig_prefix) }
end
end
end
require File.expand_path('../../../../spec_helper', __FILE__)
module Pod
module Generator
module XCConfig
describe XCConfigHelper do
before do
@sut = XCConfigHelper
end
#---------------------------------------------------------------------#
describe "::default_ld_flags" do
it "returns the default linker flags" do
podfile = stub( :set_arc_compatibility_flag? => false )
target_definition = stub( :podfile => podfile )
target = stub( :target_definition => target_definition )
result = @sut.default_ld_flags(target)
result.should == '-ObjC'
end
it "includes the ARC compatibility flag if required by the Podfile" do
podfile = stub( :set_arc_compatibility_flag? => true )
target_definition = stub( :podfile => podfile )
spec_consumer = stub( :requires_arc? => true )
target = stub( :target_definition => target_definition, :spec_consumers => [spec_consumer] )
result = @sut.default_ld_flags(target)
result.should == '-ObjC -fobjc-arc'
end
end
#---------------------------------------------------------------------#
describe "::quote" do
it "quotes strings" do
result = @sut.quote(['string1', 'string2'])
result.should == '"string1" "string2"'
end
end
#---------------------------------------------------------------------#
describe "::add_spec_build_settings_to_xcconfig" do
it "adds the build settings of the consumer" do
xcconfig = Xcodeproj::Config.new
consumer = stub({
:xcconfig => { 'OTHER_LDFLAGS' => '-framework SenTestingKit' },
:libraries => [],
:frameworks => [],
:weak_frameworks => [],
})
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['OTHER_LDFLAGS'].should == '-framework SenTestingKit'
end
it "adds the libraries of the xcconfig" do
xcconfig = Xcodeproj::Config.new
consumer = stub({
:xcconfig => {},
:libraries => ['xml2'],
:frameworks => [],
:weak_frameworks => [],
})
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['OTHER_LDFLAGS'].should == '-lxml2'
end
it "adds the frameworks of the xcconfig" do
xcconfig = Xcodeproj::Config.new
consumer = stub({
:xcconfig => {},
:libraries => [],
:frameworks => ['CoreAnimation'],
:weak_frameworks => [],
})
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['OTHER_LDFLAGS'].should == '-framework CoreAnimation'
end
it "adds the weak frameworks of the xcconfig" do
xcconfig = Xcodeproj::Config.new
consumer = stub({
:xcconfig => {},
:libraries => [],
:frameworks => [],
:weak_frameworks => ['iAd'],
})
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['OTHER_LDFLAGS'].should == '-weak_framework iAd'
end
it "adds the developer frameworks search paths if needed" do
xcconfig = Xcodeproj::Config.new
consumer = stub({
:xcconfig => {},
:libraries => [],
:frameworks => ['SenTestingKit'],
:weak_frameworks => [],
})
@sut.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should.include('DEVELOPER_LIBRARY_DIR')
end
end
#---------------------------------------------------------------------#
describe "::add_framework_build_settings" do
it "adds the build settings of a framework to the given xcconfig" do
framework_path = config.sandbox.root + 'Parse/Parse.framework'
xcconfig = Xcodeproj::Config.new
@sut.add_framework_build_settings(framework_path, xcconfig, config.sandbox.root)
hash_config = xcconfig.to_hash
hash_config['OTHER_LDFLAGS'].should == "-framework Parse"
hash_config['FRAMEWORK_SEARCH_PATHS'].should == '"$(PODS_ROOT)/Parse"'
end
it "doesn't ovverides exiting linker flags" do
framework_path = config.sandbox.root + 'Parse/Parse.framework'
xcconfig = Xcodeproj::Config.new( { 'OTHER_LDFLAGS' => '-framework CoreAnimation' } )
@sut.add_framework_build_settings(framework_path, xcconfig, config.sandbox.root)
hash_config = xcconfig.to_hash
hash_config['OTHER_LDFLAGS'].should == "-framework CoreAnimation -framework Parse"
end
it "doesn't ovverides exiting frameworks search paths" do
framework_path = config.sandbox.root + 'Parse/Parse.framework'
xcconfig = Xcodeproj::Config.new( { 'FRAMEWORK_SEARCH_PATHS' => '"path/to/frameworks"' } )
@sut.add_framework_build_settings(framework_path, xcconfig, config.sandbox.root)
hash_config = xcconfig.to_hash
hash_config['FRAMEWORK_SEARCH_PATHS'].should == '"path/to/frameworks" "$(PODS_ROOT)/Parse"'
end
end
#---------------------------------------------------------------------#
describe "::add_library_build_settings" do
it "adds the build settings of a framework to the given xcconfig" do
path = config.sandbox.root + 'MapBox/Proj4/libProj4.a'
xcconfig = Xcodeproj::Config.new
@sut.add_library_build_settings(path, xcconfig, config.sandbox.root)
hash_config = xcconfig.to_hash
hash_config['OTHER_LDFLAGS'].should == "-lProj4"
hash_config['LIBRARY_SEARCH_PATHS'].should == '"$(PODS_ROOT)/MapBox/Proj4"'
end
end
#---------------------------------------------------------------------#
describe "::add_framework_build_settings" do
it "adds the developer frameworks search paths to the xcconfig if SenTestingKit has been detected" do
xcconfig = Xcodeproj::Config.new({'OTHER_LDFLAGS' => '-framework SenTestingKit'})
@sut.add_developers_frameworks_if_needed(xcconfig)
frameworks_search_paths = xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS']
frameworks_search_paths.should.include?('$(inherited)')
frameworks_search_paths.should.include?('"$(SDKROOT)/Developer/Library/Frameworks"')
frameworks_search_paths.should.include?('"$(DEVELOPER_LIBRARY_DIR)/Frameworks"')
end
end
#---------------------------------------------------------------------#
end
end
end
end
......@@ -7,7 +7,7 @@ module Pod
@file_accessor = fixture_file_accessor('banana-lib/BananaLib.podspec')
@pod_target = PodTarget.new([], nil, config.sandbox)
@pod_target.file_accessors = [@file_accessor]
@project = Project.new(config.sandbox.project_path)
@project = Project.new(config.sandbox)
@installer = Installer::FileReferencesInstaller.new(config.sandbox, [@pod_target], @project)
end
......@@ -23,9 +23,7 @@ module Pod
it "adds the files references of the source files the Pods project" do
@installer.install!
group_ref = @installer.pods_project['Pods/BananaLib']
group_ref.should.be.not.nil
file_ref = @installer.pods_project['Pods/BananaLib/Banana.m']
file_ref = @installer.pods_project['Pods/BananaLib/Source Files/Banana.m']
file_ref.should.be.not.nil
file_ref.path.should == "../../../spec/fixtures/banana-lib/Classes/Banana.m"
end
......@@ -33,17 +31,21 @@ module Pod
it "adds the files references of the local Pods in a dedicated group" do
config.sandbox.store_local_path('BananaLib', 'Some Path')
@installer.install!
group_ref = @installer.pods_project['Local Pods/BananaLib']
group_ref.should.be.not.nil
file_ref = @installer.pods_project['Local Pods/BananaLib/Banana.m']
file_ref = @installer.pods_project['Local Pods/BananaLib/Source Files/Banana.m']
file_ref.should.be.not.nil
end
xit "adds the file references of the frameworks of the projet" do
end
xit "adds the file references of the libraries of the project" do
end
it "adds the files references of the resources the Pods project" do
@installer.install!
group_ref = @installer.pods_project['Resources/BananaLib']
group_ref.should.be.not.nil
file_ref = @installer.pods_project['Resources/BananaLib/logo-sidebar.png']
file_ref = @installer.pods_project['Pods/BananaLib/Resources/logo-sidebar.png']
file_ref.should.be.not.nil
file_ref.path.should == "../../../spec/fixtures/banana-lib/Resources/logo-sidebar.png"
end
......@@ -72,53 +74,63 @@ module Pod
describe "Private Helpers" do
it "returns the file accessors" do
pod_target_1 = PodTarget.new([], nil, config.sandbox)
pod_target_1.file_accessors = [fixture_file_accessor('banana-lib/BananaLib.podspec')]
pod_target_2 = PodTarget.new([], nil, config.sandbox)
pod_target_2.file_accessors = [fixture_file_accessor('banana-lib/BananaLib.podspec')]
installer = Installer::FileReferencesInstaller.new(config.sandbox, [pod_target_1, pod_target_2], @project)
roots = installer.send(:file_accessors).map { |fa| fa.path_list.root }
roots.should == [fixture('banana-lib'), fixture('banana-lib')]
end
it "handles libraries empty libraries without file accessors" do
pod_target_1 = PodTarget.new([], nil, config.sandbox)
pod_target_1.file_accessors = []
installer = Installer::FileReferencesInstaller.new(config.sandbox, [pod_target_1], @project)
roots = installer.send(:file_accessors).should == []
describe "#file_accessors" do
it "returns the file accessors" do
pod_target_1 = PodTarget.new([], nil, config.sandbox)
pod_target_1.file_accessors = [fixture_file_accessor('banana-lib/BananaLib.podspec')]
pod_target_2 = PodTarget.new([], nil, config.sandbox)
pod_target_2.file_accessors = [fixture_file_accessor('banana-lib/BananaLib.podspec')]
installer = Installer::FileReferencesInstaller.new(config.sandbox, [pod_target_1, pod_target_2], @project)
roots = installer.send(:file_accessors).map { |fa| fa.path_list.root }
roots.should == [fixture('banana-lib'), fixture('banana-lib')]
end
it "handles libraries empty libraries without file accessors" do
pod_target_1 = PodTarget.new([], nil, config.sandbox)
pod_target_1.file_accessors = []
installer = Installer::FileReferencesInstaller.new(config.sandbox, [pod_target_1], @project)
roots = installer.send(:file_accessors).should == []
end
end
it "returns the header mappings" do
headers_sandbox = Pathname.new('BananaLib')
headers = [Pathname.new('BananaLib/Banana.h')]
mappings = @installer.send(:header_mappings, headers_sandbox, @file_accessor, headers)
mappings.should == {
headers_sandbox => [Pathname.new('BananaLib/Banana.h')]
}
end
describe "#add_file_acessors_paths_to_pods_group" do
xit "adds the paths of the paths of the file accessor corresponding to the given key to the Pods project" do
it "takes into account the header dir specified in the spec" do
headers_sandbox = Pathname.new('BananaLib')
headers = [Pathname.new('BananaLib/Banana.h')]
@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')]
}
end
end
it "takes into account the header mappings dir specified in the spec" do
headers_sandbox = Pathname.new('BananaLib')
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') => [header_1],
(headers_sandbox + 'dir_2') => [header_2],
}
describe "#add_file_acessors_paths_to_pods_group" do
it "returns the header mappings" do
headers_sandbox = Pathname.new('BananaLib')
headers = [Pathname.new('BananaLib/Banana.h')]
mappings = @installer.send(:header_mappings, headers_sandbox, @file_accessor, headers)
mappings.should == {
headers_sandbox => [Pathname.new('BananaLib/Banana.h')]
}
end
it "takes into account the header dir specified in the spec" do
headers_sandbox = Pathname.new('BananaLib')
headers = [Pathname.new('BananaLib/Banana.h')]
@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')]
}
end
it "takes into account the header mappings dir specified in the spec" do
headers_sandbox = Pathname.new('BananaLib')
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') => [header_1],
(headers_sandbox + 'dir_2') => [header_2],
}
end
end
end
......
......@@ -65,6 +65,28 @@ module Pod
#--------------------------------------#
describe "Prepare command" do
it "runs the prepare command if one has been declared in the spec" do
@spec.prepare_command = "echo test"
@installer.expects(:bash!).once
@installer.install!
end
it "doesn't run the prepare command if it hasn't been declared in the spec" do
@installer.expects(:bash!).never
@installer.install!
end
it "raises if the prepare command fails" do
@spec.prepare_command = "missing_command"
should.raise Informative do
@installer.install!
end.message.should.match /command not found/
end
end
#--------------------------------------#
describe "Cleaning" do
it "cleans the paths non used by the installation" do
......@@ -171,11 +193,13 @@ module Pod
it "compacts the used files as nil would be converted to the empty string" do
Sandbox::FileAccessor.any_instance.stubs(:source_files)
Sandbox::FileAccessor.any_instance.stubs(:vendored_libraries)
Sandbox::FileAccessor.any_instance.stubs(:resources).returns(nil)
Sandbox::FileAccessor.any_instance.stubs(:preserve_paths)
Sandbox::FileAccessor.any_instance.stubs(:prefix_header)
Sandbox::FileAccessor.any_instance.stubs(:readme)
Sandbox::FileAccessor.any_instance.stubs(:license)
Sandbox::FileAccessor.any_instance.stubs(:vendored_frameworks)
paths = @installer.send(:used_files)
paths.should == []
end
......
......@@ -9,7 +9,7 @@ module Pod
xcodeproj 'dummy'
end
@target_definition = @podfile.target_definitions['Pods']
@project = Project.new(config.sandbox.project_path)
@project = Project.new(config.sandbox)
config.sandbox.project = @project
path_list = Sandbox::PathList.new(fixture('banana-lib'))
......@@ -137,6 +137,14 @@ module Pod
script.read.should.include?('logo-sidebar.png')
end
xit "adds the resources bundles to the copy resources script" do
end
xit "adds the bridge support file to the copy resources script, if one was created" do
end
it "creates the acknowledgements files " do
@installer.install!
markdown = config.sandbox.generated_dir_root + 'Pods-acknowledgements.markdown'
......
......@@ -9,7 +9,7 @@ module Pod
xcodeproj 'dummy'
end
@target_definition = @podfile.target_definitions['Pods']
@project = Project.new(config.sandbox.project_path)
@project = Project.new(config.sandbox)
config.sandbox.project = @project
path_list = Sandbox::PathList.new(fixture('banana-lib'))
......@@ -114,6 +114,12 @@ module Pod
#--------------------------------------#
xit 'adds the resource bundle targets' do
end
#--------------------------------------#
it "creates the xcconfig file" do
@installer.install!
file = config.sandbox.root + @pod_target.xcconfig_private_path
......
......@@ -9,7 +9,7 @@ module Pod
xcodeproj 'dummy'
end
@target_definition = @podfile.target_definitions['Pods']
@project = Project.new(config.sandbox.project_path)
@project = Project.new(config.sandbox)
config.sandbox.project = @project
path_list = Sandbox::PathList.new(fixture('banana-lib'))
......
......@@ -16,7 +16,7 @@ module Pod
end
end
config.sandbox.project = Project.new()
config.sandbox.project = Project.new(config.sandbox)
Xcodeproj::Project.new.save_as(config.sandbox.project_path)
@library = AggregateTarget.new(@podfile.target_definitions['Pods'], config.sandbox)
@library.client_root = sample_project_path.dirname
......
......@@ -4,7 +4,7 @@ module Pod
describe Project do
before do
@project = Project.new(config.sandbox.project_path)
@project = Project.new(config.sandbox)
end
#-------------------------------------------------------------------------#
......@@ -50,22 +50,6 @@ module Pod
@project.resources.name.should == 'Resources'
end
it "adds a group for a specification" do
group = @project.add_spec_group('JSONKit', @project.pods)
@project.pods.children.should.include?(group)
g = @project['Pods/JSONKit']
g.name.should == 'JSONKit'
g.children.should.be.empty?
end
it "namespaces subspecs in groups" do
group = @project.add_spec_group('JSONKit/Subspec', @project.pods)
@project.pods.groups.find { |g| g.name == 'JSONKit' }.children.should.include?(group)
g = @project['Pods/JSONKit/Subspec']
g.name.should == 'Subspec'
g.children.should.be.empty?
end
end
#-------------------------------------------------------------------------#
......@@ -75,7 +59,7 @@ module Pod
it "adds the file references for the given source files" do
source_files = [ config.sandbox.pod_dir("A_POD") + "some_file.m" ]
@project.add_file_references(source_files, 'BananaLib', @project.pods)
group = @project['Pods/BananaLib']
group = @project['Pods/BananaLib/Source Files']
group.should.not.be.nil
group.children.map(&:path).should == [ "Sources/A_POD/some_file.m" ]
end
......@@ -84,7 +68,7 @@ module Pod
source_files = [ config.sandbox.pod_dir("A_POD") + "some_file.m" ]
@project.add_file_references(source_files, 'BananaLib', @project.pods)
@project.add_file_references(source_files, 'BananaLib', @project.pods)
group = @project['Pods/BananaLib']
group = @project['Pods/BananaLib/Source Files']
group.children.count.should == 1
group.children.first.path.should == "Sources/A_POD/some_file.m"
end
......@@ -108,15 +92,35 @@ module Pod
#-------------------------------------------------------------------------#
describe "File references" do
describe "Private helpers" do
describe "#refs_by_absolute_path" do
it "stores the references by absolute path" do
file = config.sandbox.root + "A_POD/some_file.m"
@project.add_file_references([file], 'BananaLib', @project.pods)
refs_by_absolute_path = @project.send(:refs_by_absolute_path)
refs_by_absolute_path.should == {
file => @project.file_reference(file)
}
end
end
it "stores the references by absolute path" do
file = config.sandbox.root + "A_POD/some_file.m"
@project.add_file_references([file], 'BananaLib', @project.pods)
refs_by_absolute_path = @project.send(:refs_by_absolute_path)
refs_by_absolute_path.should == {
file => @project.file_reference(file)
}
describe "#add_spec_group" do
it "adds a group for a specification" do
group = @project.send(:add_spec_group, 'JSONKit', @project.pods)
@project.pods.children.should.include?(group)
g = @project['Pods/JSONKit']
g.name.should == 'JSONKit'
g.children.should.be.empty?
end
it "namespaces subspecs in groups" do
group = @project.send(:add_spec_group, 'JSONKit/Subspec', @project.pods)
@project.pods.groups.find { |g| g.name == 'JSONKit' }.children.should.include?(group)
g = @project['Pods/JSONKit/Subspec']
g.name.should == 'Subspec'
g.children.should.be.empty?
end
end
end
......
......@@ -103,6 +103,32 @@ module Pod
@accessor.preserve_paths.should.include?(@root + "Resources")
end
it "returns the paths of the framework bundles" do
@accessor.vendored_frameworks.should.include?(@root + "Bananalib.framework")
end
it "returns the paths of the library files" do
@accessor.vendored_libraries.should.include?(@root + "libBananalib.a")
end
it "returns the resource bundles of the pod" do
@spec_consumer.stubs(:resource_bundles).returns({"BananaLib" => "Resources/*"})
resource_paths = [
@root + "Resources/logo-sidebar.png",
@root + "Resources/sub_dir",
]
@accessor.resource_bundles.should == { "BananaLib" => resource_paths }
end
it "returns the paths of the files of the resource bundles" do
@spec_consumer.stubs(:resource_bundles).returns({"BananaLib" => "Resources/*"})
resource_paths = [
@root + "Resources/logo-sidebar.png",
@root + "Resources/sub_dir",
]
@accessor.resource_bundle_files.should == resource_paths
end
it "returns the prefix header of the specification" do
@accessor.prefix_header.should == @root + 'Classes/BananaLib.pch'
end
......
......@@ -23,6 +23,7 @@ module Pod
README
Resources/logo-sidebar.png
Resources/sub_dir/logo-sidebar.png
libBananalib.a
preserve_me.txt
sub-dir/sub-dir-2/somefile.txt
]
......@@ -35,7 +36,7 @@ module Pod
dirs.reject! do |f|
f.include?('libPusher') || f.include?('.git')
end
dirs.sort.should == %w| Classes Resources Resources/sub_dir sub-dir sub-dir/sub-dir-2 |
dirs.sort.should == %w| Bananalib.framework Classes Resources Resources/sub_dir sub-dir sub-dir/sub-dir-2 |
end
it "handles directories with glob metacharacters" 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