Commit 99adf867 authored by Fabio Pelosin's avatar Fabio Pelosin

Merge branch 'master' into Rename-no-update-option

* master: (30 commits)
  [Generator::Documentation] Namespace ids by Pod
  [Generator::Xcconfig] Add developer frameworks search paths if needed
  [Specs] Fix for improved support for pre-release versions
  [CHANGELOG] Update for Xcodeproj 0.5.4.
  [Command::Search] Add support for `--ios` and `--osx`
  Changelog [ci skip]
  [Library] Add #client_root
  Release 0.17.2
  [Integration] Actually add the result of the install_custom_workspace check
  [Integration] Update Lockfiles
  [Examples] Remove FileList references [skip ci]
  Changelog [ci skip]
  [SourcesManager] Search robustness.
  [Command::Spec] Remove FileList references from template
  [LibraryRepresentation] Fix crash in #prefix_header_path
  [Installer] Remove duplicates form #installed_specs
  [PathList] Expand excluded folders
  Changelog
  [UserProjectIntegrator] Return an absolute path for the workspace.
  [Examples] Remove lockfiles from source control
  ...
parents 9f311c5b 7b148d39
...@@ -24,7 +24,7 @@ spec/fixtures/integration/Headers/ ...@@ -24,7 +24,7 @@ spec/fixtures/integration/Headers/
spec/fixtures/vcr spec/fixtures/vcr
# Examples # Examples
examples/Podfile examples/**/Podfile.lock
examples/Pods examples/Pods
examples/**/Pods examples/**/Pods
examples/RelativePathProject/RelativePathProject/RelativePathProject.xcodeproj examples/RelativePathProject/RelativePathProject/RelativePathProject.xcodeproj
......
## 0.17.3 (unreleased)
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.2...0.17.3)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.2...0.17.3)
[Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.5.2...0.5.4)
###### Enhancements
* The `pod search` commands now accepts the `--ios` and the `--osx` arguments
to filter the results by platform.
[#625](https://github.com/CocoaPods/CocoaPods/issues/625)
* The developer frameworks are automatically added if `SenTestingKit` is
detected. There is no need to specify them in specifications anymore.
[#771](https://github.com/CocoaPods/CocoaPods/issues/771)
###### Bug fixes
* Improved handling for Xcode projects containing non ASCII characters.
Special thanks to Cédric Luthi (@0xced), Vincent Isambart (@vincentisambart),
and Manfred Stienstra (@Manfred) for helping to develop the workaround.
[#926](https://github.com/CocoaPods/CocoaPods/issues/926)
* Corrected improper configuration of the PODS_ROOT xcconfig variable in
non-integrating installations.
[#918](https://github.com/CocoaPods/CocoaPods/issues/918)
* Improved support for pre-release versions using dashes.
[#935](https://github.com/CocoaPods/CocoaPods/issues/935)
* Documentation sets are now namespaced by pod solving improper attribution.
[#659](https://github.com/CocoaPods/CocoaPods/issues/659)
## 0.17.2
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.1...0.17.2)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.1...0.17.2)
###### Bug fixes
* Fix crash related to the specification of the workspace as a relative path.
[#920](https://github.com/CocoaPods/CocoaPods/issues/920)
* Fix an issue related to the `podspec` dsl directive of the Podfile for
specifications with internal dependencies.
[#928](https://github.com/CocoaPods/CocoaPods/issues/928)
* Fix crash related to search from the command line.
[#929](https://github.com/CocoaPods/CocoaPods/issues/929)
###### Ancillary enhancements
* Enabled the FileList deprecation warning in the Linter.
* CocoaPods will raise if versions requirements are specified for dependencies
with external sources.
* The exclude patterns now handle folders automatically.
## 0.17.1
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.0...0.17.1)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.0...0.17.1)
###### Bug fixes
* Always create the CACHE_ROOT directory when performing a search.
[#917](https://github.com/CocoaPods/CocoaPods/issues/917)
## 0.17.0 ## 0.17.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.0.rc7...0.17.0)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.0.rc7...0.17.0)
#### GM
###### Bug fixes
* Don’t break when specifying doc options, but not appledoc ones.
[#906](https://github.com/CocoaPods/CocoaPods/issues/906)
* Sort resolved specifications.
[#907](https://github.com/CocoaPods/CocoaPods/issues/907)
* Subspecs do not need to include HEAD information.
[#905](https://github.com/CocoaPods/CocoaPods/issues/905)
###### Ancillary enhancements
* Allow the analyzer to do its work without updating sources.
[motion-cocoapods#50](https://github.com/HipByte/motion-cocoapods/pull/50)
#### rc7 #### rc7
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.0.rc6...0.17.0.rc7) [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.0.rc6...0.17.0.rc7)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.0.rc6...0.17.0.rc7) [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.0.rc6...0.17.0.rc7)
###### Bug fixes ###### Bug fixes
- Fixed an issue which lead to the missing declaration of the plural directives - Fixed an issue which lead to the missing declaration of the plural directives
of the Specification DSL. of the Specification DSL.
[#816](https://github.com/CocoaPods/CocoaPods/issues/816) [#816](https://github.com/CocoaPods/CocoaPods/issues/816)
......
...@@ -79,7 +79,7 @@ namespace :gem do ...@@ -79,7 +79,7 @@ namespace :gem do
require 'date' require 'date'
# First check if the required Xcodeproj gem has been pushed # First check if the required gems have been pushed
gem_spec = eval(File.read(File.expand_path('../cocoapods.gemspec', __FILE__))) gem_spec = eval(File.read(File.expand_path('../cocoapods.gemspec', __FILE__)))
gem_names = ['xcodeproj', 'cocoapods-core', 'cocoapods-downloader', 'claide'] gem_names = ['xcodeproj', 'cocoapods-core', 'cocoapods-downloader', 'claide']
gem_names.each do |gem_name| gem_names.each do |gem_name|
......
PODS:
- AFNetworking (0.7.0):
- JSONKit
- FormatterKit (1.0.0):
- FormatterKit/ArrayFormatter (= 1.0.0)
- FormatterKit/LocationFormatter (= 1.0.0)
- FormatterKit/OrdinalNumberFormatter (= 1.0.0)
- FormatterKit/TimeIntervalFormatter (= 1.0.0)
- FormatterKit/UnitOfInformationFormatter (= 1.0.0)
- FormatterKit/URLRequestFormatter (= 1.0.0)
- FormatterKit/ArrayFormatter (1.0.0)
- FormatterKit/LocationFormatter (1.0.0)
- FormatterKit/OrdinalNumberFormatter (1.0.0)
- FormatterKit/TimeIntervalFormatter (1.0.0)
- FormatterKit/UnitOfInformationFormatter (1.0.0)
- FormatterKit/URLRequestFormatter (1.0.0)
- JSONKit (1.5pre)
DEPENDENCIES:
- AFNetworking (~> 0.7.0)
- FormatterKit
SPEC CHECKSUMS:
AFNetworking: 7bf22b0ed1d9068909cd67206db78204eb63dd2c
FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
COCOAPODS: 0.17.0.rc7
PODS:
- AFNetworking (0.7.0):
- JSONKit
- FormatterKit (1.0.0):
- FormatterKit/ArrayFormatter (= 1.0.0)
- FormatterKit/LocationFormatter (= 1.0.0)
- FormatterKit/OrdinalNumberFormatter (= 1.0.0)
- FormatterKit/TimeIntervalFormatter (= 1.0.0)
- FormatterKit/UnitOfInformationFormatter (= 1.0.0)
- FormatterKit/URLRequestFormatter (= 1.0.0)
- FormatterKit/ArrayFormatter (1.0.0)
- FormatterKit/LocationFormatter (1.0.0)
- FormatterKit/OrdinalNumberFormatter (1.0.0)
- FormatterKit/TimeIntervalFormatter (1.0.0)
- FormatterKit/UnitOfInformationFormatter (1.0.0)
- FormatterKit/URLRequestFormatter (1.0.0)
- JSONKit (1.5pre)
DEPENDENCIES:
- AFNetworking (~> 0.7.0)
- FormatterKit
SPEC CHECKSUMS:
AFNetworking: 7bf22b0ed1d9068909cd67206db78204eb63dd2c
FormatterKit: 12dea999a2df19e389f7b821962fc4088de8b821
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
COCOAPODS: 0.17.0.rc7
...@@ -71,24 +71,17 @@ Pod::Spec.new do |s| ...@@ -71,24 +71,17 @@ Pod::Spec.new do |s|
# added to the Pods project. If the pattern is a directory then the # added to the Pods project. If the pattern is a directory then the
# path will automatically have '*.{h,m,mm,c,cpp}' appended. # path will automatically have '*.{h,m,mm,c,cpp}' appended.
# #
# Alternatively, you can use the FileList class for even more control
# over the selected files.
# (See http://rake.rubyforge.org/classes/Rake/FileList.html.)
#
s.source_files = 'Classes', 'Classes/**/*.{h,m}' s.source_files = 'Classes', 'Classes/**/*.{h,m}'
# A list of resources included with the Pod. These are copied into the # A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. # target bundle with a build phase script.
# #
# Also allows the use of the FileList class like `source_files does.
#
# s.resource = "icon.png" # s.resource = "icon.png"
# s.resources = "Resources/*.png" # s.resources = "Resources/*.png"
# A list of paths to preserve after installing the Pod. # A list of paths to preserve after installing the Pod.
# CocoaPods cleans by default any file that is not used. # CocoaPods cleans by default any file that is not used.
# Please don't include documentation, example, and test files. # Please don't include documentation, example, and test files.
# Also allows the use of the FileList class like `source_files does.
# #
# s.preserve_paths = "FilesToSave", "MoreFilesToSave" # s.preserve_paths = "FilesToSave", "MoreFilesToSave"
......
PODS:
- JSONKit (1.5pre)
DEPENDENCIES:
- JSONKit
SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
COCOAPODS: 0.17.0.rc7
require 'rubygems' require 'rubygems'
module Pod module Pod
require 'pathname'
require 'cocoapods/gem_version' require 'cocoapods/gem_version'
require 'cocoapods-core' require 'cocoapods-core'
require 'xcodeproj' require 'xcodeproj'
...@@ -16,12 +18,13 @@ module Pod ...@@ -16,12 +18,13 @@ module Pod
end end
end end
# @return [String] The directory where CocoaPods caches the downloads. # @return [Pathname] The directory where CocoaPods caches the downloads.
# #
# @todo The {Installer::PodSourceInstaller} and the #{ExternalSources} # @todo The {Installer::PodSourceInstaller} and the #{ExternalSources}
# classes build and configure the downloader from scratch. # classes build and configure the downloader from scratch.
# #
CACHE_ROOT = "#{ENV['HOME']}/Library/Caches/CocoaPods" CACHE_ROOT = Pathname.new(File.join(ENV['HOME'], 'Library/Caches/CocoaPods'))
CACHE_ROOT.mkpath unless CACHE_ROOT.exist?
# @return [Fixnum] The maximum size for the cache expressed in Mb. # @return [Fixnum] The maximum size for the cache expressed in Mb.
# #
...@@ -30,7 +33,7 @@ module Pod ...@@ -30,7 +33,7 @@ module Pod
# #
MAX_CACHE_SIZE = 500 MAX_CACHE_SIZE = 500
Pod::Specification::Set::Statistics.instance.cache_file = Pathname.new(CACHE_ROOT) + 'statistics.yml' Pod::Specification::Set::Statistics.instance.cache_file = CACHE_ROOT + 'statistics.yml'
autoload :Command, 'cocoapods/command' autoload :Command, 'cocoapods/command'
autoload :Executable, 'cocoapods/executable' autoload :Executable, 'cocoapods/executable'
...@@ -44,8 +47,6 @@ module Pod ...@@ -44,8 +47,6 @@ module Pod
autoload :UI, 'cocoapods/user_interface' autoload :UI, 'cocoapods/user_interface'
autoload :Validator, 'cocoapods/validator' autoload :Validator, 'cocoapods/validator'
autoload :Pathname, 'pathname'
module Generator module Generator
autoload :Acknowledgements, 'cocoapods/generator/acknowledgements' autoload :Acknowledgements, 'cocoapods/generator/acknowledgements'
autoload :BridgeSupport, 'cocoapods/generator/bridge_support' autoload :BridgeSupport, 'cocoapods/generator/bridge_support'
......
...@@ -14,13 +14,17 @@ module Pod ...@@ -14,13 +14,17 @@ module Pod
def self.options def self.options
[[ [[
"--full", "Search by name, summary, and description", "--full", "Search by name, summary, and description",
"--stats", "Show additional stats (like GitHub watchers and forks)" "--stats", "Show additional stats (like GitHub watchers and forks)",
"--ios", "Restricts the search to Pods supported on iOS",
"--osx", "Restricts the search to Pods supported on OS X",
]].concat(super) ]].concat(super)
end end
def initialize(argv) def initialize(argv)
@full_text_search = argv.flag?('full') @full_text_search = argv.flag?('full')
@stats = argv.flag?('stats') @stats = argv.flag?('stats')
@supported_on_ios = argv.flag?('ios')
@supported_on_osx = argv.flag?('osx')
@query = argv.shift_argument @query = argv.shift_argument
super super
end end
...@@ -32,10 +36,16 @@ module Pod ...@@ -32,10 +36,16 @@ module Pod
def run def run
sets = SourcesManager.search_by_name(@query.strip, @full_text_search) sets = SourcesManager.search_by_name(@query.strip, @full_text_search)
if @supported_on_ios
sets.reject!{ |set| !set.specification.available_platforms.map(&:name).include?(:ios) }
end
if @supported_on_osx
sets.reject!{ |set| !set.specification.available_platforms.map(&:name).include?(:osx) }
end
sets.each do |set| sets.each do |set|
begin begin
UI.pod(set, (@stats ? :stats : :normal)) UI.pod(set, (@stats ? :stats : :normal))
rescue DSLError => e rescue DSLError
UI.warn "Skipping `#{set.name}` because the podspec contains errors." UI.warn "Skipping `#{set.name}` because the podspec contains errors."
end end
end end
......
...@@ -505,13 +505,12 @@ Pod::Spec.new do |s| ...@@ -505,13 +505,12 @@ Pod::Spec.new do |s|
# path will automatically have '*.{h,m,mm,c,cpp}' appended. # path will automatically have '*.{h,m,mm,c,cpp}' appended.
# #
s.source_files = 'Classes', 'Classes/**/*.{h,m}' s.source_files = 'Classes', 'Classes/**/*.{h,m}'
s.exclude_files = 'Classes/Exclude'
# A list of file patterns which select the header files that should be # A list of file patterns which select the header files that should be
# made available to the application. If the pattern is a directory then the # made available to the application. If the pattern is a directory then the
# path will automatically have '*.h' appended. # path will automatically have '*.h' appended.
# #
# Also allows the use of the FileList class like `source_files' does.
#
# If you do not explicitly set the list of public header files, # If you do not explicitly set the list of public header files,
# all headers of source_files will be made public. # all headers of source_files will be made public.
# #
...@@ -520,15 +519,12 @@ Pod::Spec.new do |s| ...@@ -520,15 +519,12 @@ Pod::Spec.new do |s|
# A list of resources included with the Pod. These are copied into the # A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. # target bundle with a build phase script.
# #
# Also allows the use of the FileList class like `source_files' does.
#
# s.resource = "icon.png" # s.resource = "icon.png"
# s.resources = "Resources/*.png" # s.resources = "Resources/*.png"
# A list of paths to preserve after installing the Pod. # A list of paths to preserve after installing the Pod.
# CocoaPods cleans by default any file that is not used. # CocoaPods cleans by default any file that is not used.
# Please don't include documentation, example, and test files. # Please don't include documentation, example, and test files.
# Also allows the use of the FileList class like `source_files' does.
# #
# s.preserve_paths = "FilesToSave", "MoreFilesToSave" # s.preserve_paths = "FilesToSave", "MoreFilesToSave"
......
...@@ -132,7 +132,7 @@ module Pod ...@@ -132,7 +132,7 @@ module Pod
target = sandbox.root + name target = sandbox.root + name
target.rmtree if target.exist? target.rmtree if target.exist?
downloader = Downloader.for_target(target, params) downloader = Downloader.for_target(target, params)
downloader.cache_root = CACHE_ROOT downloader.cache_root = CACHE_ROOT.to_s
downloader.max_cache_size = MAX_CACHE_SIZE downloader.max_cache_size = MAX_CACHE_SIZE
downloader.aggressive_cache = false downloader.aggressive_cache = false
downloader.download downloader.download
......
...@@ -2,6 +2,6 @@ module Pod ...@@ -2,6 +2,6 @@ module Pod
# The version of the cocoapods command line tool. # The version of the cocoapods command line tool.
# #
VERSION = '0.17.0.rc7' unless defined? Pod::VERSION VERSION = '0.17.2' unless defined? Pod::VERSION
end end
...@@ -54,8 +54,7 @@ module Pod ...@@ -54,8 +54,7 @@ module Pod
# #
def generate(install_docset) def generate(install_docset)
if `which appledoc`.strip.empty? if `which appledoc`.strip.empty?
UI.warn "[!] Skipping documentation generation because appledoc can't be found.", UI.warn "[!] Skipping documentation generation because appledoc can't be found.", [], true
actions = [], verbose_only = true
return return
end end
...@@ -106,10 +105,10 @@ module Pod ...@@ -106,10 +105,10 @@ module Pod
specification.summary || specification.description || 'Generated by CocoaPods.' specification.summary || specification.description || 'Generated by CocoaPods.'
end end
# @return [String] The id of the docset. # @return [String] The id of the docset, uniq for every Pod.
# #
def docs_id def docs_id
'org.cocoapods' "org.cocoapods.#{specification.name.downcase}"
end end
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
......
...@@ -61,10 +61,7 @@ module Pod ...@@ -61,10 +61,7 @@ module Pod
}) })
spec_consumers.each do |consumer| spec_consumers.each do |consumer|
@xcconfig.merge!(consumer.xcconfig); add_spec_build_settings_to_xcconfig(consumer, @xcconfig)
@xcconfig.libraries.merge(consumer.libraries);
@xcconfig.frameworks.merge(consumer.frameworks);
@xcconfig.weak_frameworks.merge(consumer.weak_frameworks);
end end
@xcconfig @xcconfig
...@@ -124,6 +121,63 @@ module Pod ...@@ -124,6 +121,63 @@ module Pod
def quote(strings) def quote(strings)
strings.sort.map { |s| %W|"#{s}"| }.join(" ") strings.sort.map { |s| %W|"#{s}"| }.join(" ")
end 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.
#
# @return [void]
#
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
#-----------------------------------------------------------------------#
end end
end end
end end
......
...@@ -27,6 +27,8 @@ module Pod ...@@ -27,6 +27,8 @@ module Pod
# @return [Pathname] The path of the prefix_header # @return [Pathname] The path of the prefix_header
# #
def prefix_header_path def prefix_header_path
UI.warn "LibraryRepresentation#prefix_header_path is deprecated. " \
"Use the specification `prefix_header_contents` attribute."
library.prefix_header_path library.prefix_header_path
end end
alias :prefix_header_filename :prefix_header_path alias :prefix_header_filename :prefix_header_path
......
...@@ -248,7 +248,7 @@ module Pod ...@@ -248,7 +248,7 @@ module Pod
pod_installer.install_docs = config.install_docs? pod_installer.install_docs = config.install_docs?
pod_installer.install! pod_installer.install!
@pod_installers << pod_installer @pod_installers << pod_installer
@installed_specs.concat(specs_by_platform.values.flatten) @installed_specs.concat(specs_by_platform.values.flatten.uniq)
end end
# Cleans the sources of the Pods if the config instructs to do so. # Cleans the sources of the Pods if the config instructs to do so.
......
...@@ -180,6 +180,7 @@ module Pod ...@@ -180,6 +180,7 @@ module Pod
targets = compute_user_project_targets(target_definition, user_project) targets = compute_user_project_targets(target_definition, user_project)
lib.user_project_path = project_path lib.user_project_path = project_path
lib.client_root = project_path.dirname
lib.user_target_uuids = targets.map(&:uuid) lib.user_target_uuids = targets.map(&:uuid)
lib.user_build_configurations = compute_user_build_configurations(target_definition, targets) lib.user_build_configurations = compute_user_build_configurations(target_definition, targets)
lib.platform = compute_platform_for_target_definition(target_definition, targets) lib.platform = compute_platform_for_target_definition(target_definition, targets)
...@@ -187,7 +188,7 @@ module Pod ...@@ -187,7 +188,7 @@ module Pod
unless target_definition.platform unless target_definition.platform
raise Informative, "It is necessary to specify the platform in the Podfile if not integrating." raise Informative, "It is necessary to specify the platform in the Podfile if not integrating."
end end
lib.user_project_path = config.installation_root lib.client_root = config.installation_root
lib.user_target_uuids = [] lib.user_target_uuids = []
lib.user_build_configurations = {} lib.user_build_configurations = {}
lib.platform = target_definition.platform lib.platform = target_definition.platform
......
...@@ -190,7 +190,7 @@ module Pod ...@@ -190,7 +190,7 @@ module Pod
# the name of the Pod. # the name of the Pod.
# #
def resolved_spec_names(pod) def resolved_spec_names(pod)
specs.select { |s| s.root.name == pod }.map(&:name).uniq specs.select { |s| s.root.name == pod }.map(&:name).uniq.sort
end end
# @return [Array<String>] The name of the specifications stored in the # @return [Array<String>] The name of the specifications stored in the
...@@ -200,7 +200,7 @@ module Pod ...@@ -200,7 +200,7 @@ module Pod
# the name of the Pod. # the name of the Pod.
# #
def sandbox_spec_names(pod) def sandbox_spec_names(pod)
sandbox_manifest.pod_names.select { |name| Specification.root_name(name) == pod }.uniq sandbox_manifest.pod_names.select { |name| Specification.root_name(name) == pod }.uniq.sort
end end
# @return [Specification] The root specification for the Pod with the # @return [Specification] The root specification for the Pod with the
......
...@@ -156,7 +156,7 @@ module Pod ...@@ -156,7 +156,7 @@ module Pod
def downloader def downloader
return @downloader if @downloader return @downloader if @downloader
@downloader = Downloader.for_target(root, root_spec.source.dup) @downloader = Downloader.for_target(root, root_spec.source.dup)
@downloader.cache_root = CACHE_ROOT @downloader.cache_root = CACHE_ROOT.to_s
@downloader.max_cache_size = MAX_CACHE_SIZE @downloader.max_cache_size = MAX_CACHE_SIZE
@downloader.aggressive_cache = aggressive_cache? @downloader.aggressive_cache = aggressive_cache?
@downloader @downloader
......
...@@ -142,7 +142,11 @@ module Pod ...@@ -142,7 +142,11 @@ module Pod
# #
def workspace_path def workspace_path
if podfile.workspace_path if podfile.workspace_path
Pathname.new(podfile.workspace_path) declared_path = podfile.workspace_path
path_with_ext = File.extname(declared_path) == '.xcworkspace' ? declared_path : "#{declared_path}.xcworkspace"
podfile_dir = File.dirname(podfile.defined_in_file || '')
absolute_path = File.expand_path(path_with_ext, podfile_dir)
Pathname.new(absolute_path)
elsif user_project_paths.count == 1 elsif user_project_paths.count == 1
project = user_project_paths.first.basename('.xcodeproj') project = user_project_paths.first.basename('.xcodeproj')
installation_root + "#{project}.xcworkspace" installation_root + "#{project}.xcworkspace"
......
...@@ -53,6 +53,13 @@ module Pod ...@@ -53,6 +53,13 @@ module Pod
# #
attr_accessor :support_files_root attr_accessor :support_files_root
# @return [Pathname] the folder where the client is stored used for
# computing the relative paths. If integrating it should be the
# folder where the user project is stored, otherwise it should
# be the installation root.
#
attr_accessor :client_root
# @return [Pathname] the path of the user project that this library will # @return [Pathname] the path of the user project that this library will
# integrate as identified by the analyzer. # integrate as identified by the analyzer.
# #
...@@ -157,7 +164,7 @@ module Pod ...@@ -157,7 +164,7 @@ module Pod
# variable of the user's project. # variable of the user's project.
# #
def relative_pods_root def relative_pods_root
"${SRCROOT}/#{support_files_root.relative_path_from(user_project_path.dirname)}" "${SRCROOT}/#{support_files_root.relative_path_from(client_root)}"
end end
# @return [String] the path of the xcconfig file relative to the root of # @return [String] the path of the xcconfig file relative to the root of
...@@ -189,7 +196,7 @@ module Pod ...@@ -189,7 +196,7 @@ module Pod
# @return [String] the computed path. # @return [String] the computed path.
# #
def relative_to_srcroot(path) def relative_to_srcroot(path)
path.relative_path_from(user_project_path.dirname).to_s path.relative_path_from(client_root).to_s
end end
end end
end end
...@@ -112,7 +112,10 @@ module Pod ...@@ -112,7 +112,10 @@ module Pod
end.flatten end.flatten
list = list.map { |path| Pathname.new(path) } list = list.map { |path| Pathname.new(path) }
list -= relative_glob(exclude_patterns) if exclude_patterns if exclude_patterns
exclude_options = { :dir_pattern => '**/*', :include_dirs => include_dirs }
list -= relative_glob(exclude_patterns, exclude_options)
end
list list
end end
......
...@@ -95,10 +95,14 @@ module Pod ...@@ -95,10 +95,14 @@ module Pod
def updated_search_index def updated_search_index
if search_index_path.exist? if search_index_path.exist?
stored_index = YAML.load(search_index_path.read) stored_index = YAML.load(search_index_path.read)
if stored_index && stored_index.is_a?(Hash)
search_index = aggregate.update_search_index(stored_index) search_index = aggregate.update_search_index(stored_index)
else else
search_index = aggregate.generate_search_index search_index = aggregate.generate_search_index
end end
else
search_index = aggregate.generate_search_index
end
File.open(search_index_path, 'w') {|f| f.write(search_index.to_yaml) } File.open(search_index_path, 'w') {|f| f.write(search_index.to_yaml) }
search_index search_index
...@@ -107,8 +111,7 @@ module Pod ...@@ -107,8 +111,7 @@ module Pod
# @return [Pathname] The path where the search index should be stored. # @return [Pathname] The path where the search index should be stored.
# #
def search_index_path def search_index_path
caches_path = Pathname.new(File.expand_path(CACHE_ROOT)) CACHE_ROOT + 'search_index.yaml'
caches_path + 'search_index.yaml'
end end
public public
......
...@@ -5,6 +5,8 @@ Pod::Spec.new do |s| ...@@ -5,6 +5,8 @@ Pod::Spec.new do |s|
s.homepage = 'http://banana-corp.local/banana-lib.html' s.homepage = 'http://banana-corp.local/banana-lib.html'
s.summary = 'Chunky bananas!' s.summary = 'Chunky bananas!'
s.description = 'Full of chunky bananas.' s.description = 'Full of chunky bananas.'
s.platform = :ios
s.source = { :git => 'http://banana-corp.local/banana-lib.git', :tag => 'v1.0' } s.source = { :git => 'http://banana-corp.local/banana-lib.git', :tag => 'v1.0' }
s.source_files = 'Classes/*.{h,m}', 'Vendor' s.source_files = 'Classes/*.{h,m}', 'Vendor'
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework SystemConfiguration' } s.xcconfig = { 'OTHER_LDFLAGS' => '-framework SystemConfiguration' }
......
...@@ -31,5 +31,18 @@ module Pod ...@@ -31,5 +31,18 @@ module Pod
output = run_command('search', 'Engelhart', '--full') output = run_command('search', 'Engelhart', '--full')
output.should.include? 'JSONKit' output.should.include? 'JSONKit'
end end
it "restricts the search to Pods supported on iOS" do
output = run_command('search', 'BananaLib', '--ios')
output.should.include? 'BananaLib'
Specification.any_instance.stubs(:available_platforms).returns([Platform.osx])
output = run_command('search', 'BananaLib', '--ios')
output.should.not.include? 'BananaLib'
end
it "restricts the search to Pods supported on iOS" do
output = run_command('search', 'BananaLib', '--osx')
output.should.not.include? 'BananaLib'
end
end end
end end
...@@ -10,4 +10,4 @@ SPEC CHECKSUMS: ...@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601 JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -10,4 +10,4 @@ SPEC CHECKSUMS: ...@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601 JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -25,8 +25,7 @@ Downloading dependencies ...@@ -25,8 +25,7 @@ Downloading dependencies
$ /usr/bin/git rev-list --max-count=1 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce $ /usr/bin/git rev-list --max-count=1 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce
0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce
> Cloning to Pods folder > Cloning to Pods folder
$ /usr/bin/git clone "CACHES_DIR/GitHub/de3e1c97c03ac13b29e7533beea2d2131589900f" $ /usr/bin/git clone "CACHES_DIR/GitHub/de3e1c97c03ac13b29e7533beea2d2131589900f" "ROOT/tmp/install_add_pod/Pods/JSONKit"
"ROOT/tmp/install_add_pod/Pods/JSONKit"
Cloning into 'ROOT/tmp/install_add_pod/Pods/JSONKit'... Cloning into 'ROOT/tmp/install_add_pod/Pods/JSONKit'...
done. done.
$ /usr/bin/git checkout -b activated-pod-commit 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce 2>&1 $ /usr/bin/git checkout -b activated-pod-commit 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce 2>&1
......
PODS:
- Reachability (3.1.0)
DEPENDENCIES:
- Reachability
- Reachability (= 3.1.0)
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.2
../../Reachability/Reachability.h
\ No newline at end of file
PODS:
- Reachability (3.1.0)
DEPENDENCIES:
- Reachability
- Reachability (= 3.1.0)
SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.2
# Acknowledgements
This application makes use of the following third party libraries:
## Reachability
Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Generated by CocoaPods - http://cocoapods.org
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</string>
<key>Title</key>
<string>Reachability</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - http://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
@interface PodsDummy_Pods_SampleApp_1 : NSObject
@end
@implementation PodsDummy_Pods_SampleApp_1
@end
// WARNING: This feature of CocoaPods is present for discussion purposes and might be discontinued or changed in future
#define __COCOA_PODS
#define __POD_Reachability
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "Pods-SampleApp_1-header.h"
#!/bin/sh
install_resource()
{
case $1 in
*.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.framework)
echo "rsync -rp ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
rsync -rp "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.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 "cp -R ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
cp -R "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
;;
esac
}
ALWAYS_SEARCH_USER_PATHS = YES
HEADER_SEARCH_PATHS = ${PODS_HEADERS_SEARCH_PATHS}
OTHER_LDFLAGS = -ObjC -framework SystemConfiguration
PODS_BUILD_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/Reachability"
PODS_HEADERS_SEARCH_PATHS = ${PODS_PUBLIC_HEADERS_SEARCH_PATHS}
PODS_PUBLIC_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Reachability"
PODS_ROOT = ${SRCROOT}/Pods
\ No newline at end of file
# Acknowledgements
This application makes use of the following third party libraries:
## Reachability
Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Generated by CocoaPods - http://cocoapods.org
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</string>
<key>Title</key>
<string>Reachability</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - http://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>
@interface PodsDummy_Pods_SampleApp_2 : NSObject
@end
@implementation PodsDummy_Pods_SampleApp_2
@end
// WARNING: This feature of CocoaPods is present for discussion purposes and might be discontinued or changed in future
#define __COCOA_PODS
#define __POD_Reachability
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "Pods-SampleApp_2-header.h"
#!/bin/sh
install_resource()
{
case $1 in
*.storyboard)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.xib)
echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.framework)
echo "rsync -rp ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
rsync -rp "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.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 "cp -R ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
cp -R "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
;;
esac
}
ALWAYS_SEARCH_USER_PATHS = YES
HEADER_SEARCH_PATHS = ${PODS_HEADERS_SEARCH_PATHS}
OTHER_LDFLAGS = -ObjC -framework SystemConfiguration
PODS_BUILD_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/Reachability"
PODS_HEADERS_SEARCH_PATHS = ${PODS_PUBLIC_HEADERS_SEARCH_PATHS}
PODS_PUBLIC_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Reachability"
PODS_ROOT = ${SRCROOT}/Pods
\ No newline at end of file
File References:
- Frameworks:
- Foundation.framework
- SystemConfiguration.framework
- Pods:
- Reachability:
- Reachability.h
- Reachability.m
- Products:
- libPods-SampleApp_1.a
- libPods-SampleApp_2.a
- Targets Support Files:
- Pods-SampleApp_1:
- Pods-SampleApp_1.xcconfig
- Pods-SampleApp_1-header.h
- Pods-SampleApp_1-prefix.pch
- Pods-SampleApp_1-resources.sh
- Pods-SampleApp_1-acknowledgements.plist
- Pods-SampleApp_1-acknowledgements.markdown
- Pods-SampleApp_1-dummy.m
- Pods-SampleApp_2:
- Pods-SampleApp_2.xcconfig
- Pods-SampleApp_2-header.h
- Pods-SampleApp_2-prefix.pch
- Pods-SampleApp_2-resources.sh
- Pods-SampleApp_2-acknowledgements.plist
- Pods-SampleApp_2-acknowledgements.markdown
- Pods-SampleApp_2-dummy.m
- Podfile
Targets:
- Pods-SampleApp_1:
Build Phases:
- SourcesBuildPhase:
- Reachability.m
- Pods-SampleApp_1-dummy.m
- FrameworksBuildPhase:
- Foundation.framework
- HeadersBuildPhase:
- Reachability.h
Build Configurations:
- Release:
Build Settings:
VALIDATE_PRODUCT: 'YES'
PUBLIC_HEADERS_FOLDER_PATH: $(TARGET_NAME)
DSTROOT: /tmp/xcodeproj.dst
GCC_PREFIX_HEADER: Pods-SampleApp_1-prefix.pch
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
COPY_PHASE_STRIP: 'YES'
PRODUCT_NAME: $(TARGET_NAME)
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods-SampleApp_1.xcconfig
- Debug:
Build Settings:
PUBLIC_HEADERS_FOLDER_PATH: $(TARGET_NAME)
DSTROOT: /tmp/xcodeproj.dst
GCC_PREPROCESSOR_DEFINITIONS:
- DEBUG=1
- $(inherited)
GCC_SYMBOLS_PRIVATE_EXTERN: 'NO'
GCC_PREFIX_HEADER: Pods-SampleApp_1-prefix.pch
GCC_OPTIMIZATION_LEVEL: '0'
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
COPY_PHASE_STRIP: 'NO'
SDKROOT: iphoneos
PRODUCT_NAME: $(TARGET_NAME)
GCC_DYNAMIC_NO_PIC: 'NO'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
PODS_ROOT: ${SRCROOT}
ARCHS: $(ARCHS_STANDARD_32_BIT)
SKIP_INSTALL: 'YES'
Base Configuration: Pods-SampleApp_1.xcconfig
- Pods-SampleApp_2:
Build Phases:
- SourcesBuildPhase:
- Reachability.m
- Pods-SampleApp_2-dummy.m
- FrameworksBuildPhase:
- Foundation.framework
- HeadersBuildPhase:
- Reachability.h
Build Configurations:
- Release:
Build Settings:
VALIDATE_PRODUCT: 'YES'
PUBLIC_HEADERS_FOLDER_PATH: $(TARGET_NAME)
DSTROOT: /tmp/xcodeproj.dst
GCC_PREFIX_HEADER: Pods-SampleApp_2-prefix.pch
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
COPY_PHASE_STRIP: 'YES'
PRODUCT_NAME: $(TARGET_NAME)
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods-SampleApp_2.xcconfig
- Debug:
Build Settings:
PUBLIC_HEADERS_FOLDER_PATH: $(TARGET_NAME)
DSTROOT: /tmp/xcodeproj.dst
GCC_PREPROCESSOR_DEFINITIONS:
- DEBUG=1
- $(inherited)
GCC_SYMBOLS_PRIVATE_EXTERN: 'NO'
GCC_PREFIX_HEADER: Pods-SampleApp_2-prefix.pch
GCC_OPTIMIZATION_LEVEL: '0'
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
COPY_PHASE_STRIP: 'NO'
SDKROOT: iphoneos
PRODUCT_NAME: $(TARGET_NAME)
GCC_DYNAMIC_NO_PIC: 'NO'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
PODS_ROOT: ${SRCROOT}
ARCHS: $(ARCHS_STANDARD_32_BIT)
SKIP_INSTALL: 'YES'
Base Configuration: Pods-SampleApp_2.xcconfig
Build Configurations:
- Release:
Build Settings: {}
- Debug:
Build Settings: {}
# Reachability
This is a drop-in replacement for Apples Reachability class. It is ARC compatible, uses the new GCD methods to notify of network interface changes.
In addition to the standard NSNotification it supports the use of Blocks for when the network becomes reachable and unreachable.
Finally you can specify wether or not a WWAN connection is considered "reachable".
## A Simple example
This sample uses Blocks to tell you when the interface state has changed. The blocks will be called on a BACKGROUND THREAD so you need to dispatch UI updates onto the main thread.
// allocate a reachability object
Reachability* reach = [Reachability reachabilityWithHostname:@"www.google.com"];
// set the blocks
reach.reachableBlock = ^(Reachability*reach)
{
NSLog(@"REACHABLE!");
};
reach.unreachableBlock = ^(Reachability*reach)
{
NSLog(@"UNREACHABLE!");
};
// start the notifier which will cause the reachability object to retain itself!
[reach startNotifier];
## Another simple example
This sample will use NSNotifications to tell you when the interface has changed, they will be delivered on the MAIN THREAD so you *can* do UI updates from within the function.
In addition it asks the Reachability object to consider the WWAN (3G/EDGE/CDMA) as a non-reachable connection (you might use this if you are writing a video streaming app, for example, to save the users data plan).
// allocate a reachability object
Reachability* reach = [Reachability reachabilityWithHostname:@"www.google.com"];
// tell the reachability that we DONT want to be reachable on 3G/EDGE/CDMA
reach.reachableOnWWAN = NO;
// here we set up a NSNotification observer. The Reachability that caused the notification
// is passed in the object parameter
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reachabilityChanged:)
name:kReachabilityChangedNotification
object:nil];
[reach startNotifier]
\ No newline at end of file
/*
Copyright (c) 2011, Tony Million.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#import <Foundation/Foundation.h>
#import <SystemConfiguration/SystemConfiguration.h>
#import <sys/socket.h>
#import <netinet/in.h>
#import <netinet6/in6.h>
#import <arpa/inet.h>
#import <ifaddrs.h>
#import <netdb.h>
/**
* Does ARC support support GCD objects?
* It does if the minimum deployment target is iOS 6+ or Mac OS X 8+
**/
#if TARGET_OS_IPHONE
// Compiling for iOS
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000 // iOS 6.0 or later
#define NEEDS_DISPATCH_RETAIN_RELEASE 0
#else // iOS 5.X or earlier
#define NEEDS_DISPATCH_RETAIN_RELEASE 1
#endif
#else
// Compiling for Mac OS X
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 // Mac OS X 10.8 or later
#define NEEDS_DISPATCH_RETAIN_RELEASE 0
#else
#define NEEDS_DISPATCH_RETAIN_RELEASE 1 // Mac OS X 10.7 or earlier
#endif
#endif
extern NSString *const kReachabilityChangedNotification;
typedef enum
{
// Apple NetworkStatus Compatible Names.
NotReachable = 0,
ReachableViaWiFi = 2,
ReachableViaWWAN = 1
} NetworkStatus;
@class Reachability;
typedef void (^NetworkReachable)(Reachability * reachability);
typedef void (^NetworkUnreachable)(Reachability * reachability);
@interface Reachability : NSObject
@property (nonatomic, copy) NetworkReachable reachableBlock;
@property (nonatomic, copy) NetworkUnreachable unreachableBlock;
@property (nonatomic, assign) BOOL reachableOnWWAN;
+(Reachability*)reachabilityWithHostname:(NSString*)hostname;
+(Reachability*)reachabilityForInternetConnection;
+(Reachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress;
+(Reachability*)reachabilityForLocalWiFi;
-(Reachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref;
-(BOOL)startNotifier;
-(void)stopNotifier;
-(BOOL)isReachable;
-(BOOL)isReachableViaWWAN;
-(BOOL)isReachableViaWiFi;
// WWAN may be available, but not active until a connection has been established.
// WiFi may require a connection for VPN on Demand.
-(BOOL)isConnectionRequired; // Identical DDG variant.
-(BOOL)connectionRequired; // Apple's routine.
// Dynamic, on demand connection?
-(BOOL)isConnectionOnDemand;
// Is user intervention required?
-(BOOL)isInterventionRequired;
-(NetworkStatus)currentReachabilityStatus;
-(SCNetworkReachabilityFlags)reachabilityFlags;
-(NSString*)currentReachabilityString;
-(NSString*)currentReachabilityFlags;
@end
File References:
- SampleApp:
- CPAppDelegate.h
- CPAppDelegate.m
- MainMenu.xib:
- en
- Supporting Files:
- SampleApp-Info.plist
- InfoPlist.strings:
- en
- main.m
- SampleApp-Prefix.pch
- Credits.rtf:
- en
- Frameworks:
- Cocoa.framework
- Other Frameworks:
- AppKit.framework
- CoreData.framework
- Foundation.framework
- libPods-SampleApp_1.a
- Products:
- SampleApp.app
- Pods-SampleApp_1.xcconfig
Targets:
- SampleApp_1:
Build Phases:
- SourcesBuildPhase:
- main.m
- CPAppDelegate.m
- FrameworksBuildPhase:
- Cocoa.framework
- libPods-SampleApp_1.a
- ResourcesBuildPhase:
- InfoPlist.strings
- Credits.rtf
- MainMenu.xib
- Copy Pods Resources: []
Build Configurations:
- Debug:
Build Settings:
WRAPPER_EXTENSION: app
COMBINE_HIDPI_IMAGES: 'YES'
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: SampleApp/SampleApp-Info.plist
GCC_PREFIX_HEADER: SampleApp/SampleApp-Prefix.pch
PRODUCT_NAME: $(TARGET_NAME)
Base Configuration: Pods-SampleApp_1.xcconfig
- Release:
Build Settings:
WRAPPER_EXTENSION: app
COMBINE_HIDPI_IMAGES: 'YES'
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: SampleApp/SampleApp-Info.plist
GCC_PREFIX_HEADER: SampleApp/SampleApp-Prefix.pch
PRODUCT_NAME: $(TARGET_NAME)
Base Configuration: Pods-SampleApp_1.xcconfig
Build Configurations:
- Debug:
Build Settings:
CLANG_WARN_ENUM_CONVERSION: 'YES'
GCC_WARN_ABOUT_RETURN_TYPE: 'YES'
GCC_PREPROCESSOR_DEFINITIONS:
- DEBUG=1
- $(inherited)
ONLY_ACTIVE_ARCH: 'YES'
GCC_SYMBOLS_PRIVATE_EXTERN: 'NO'
GCC_WARN_UNINITIALIZED_AUTOS: 'YES'
CLANG_CXX_LANGUAGE_STANDARD: gnu++0x
CLANG_WARN_INT_CONVERSION: 'YES'
MACOSX_DEPLOYMENT_TARGET: '10.8'
CLANG_WARN_CONSTANT_CONVERSION: 'YES'
GCC_OPTIMIZATION_LEVEL: '0'
GCC_C_LANGUAGE_STANDARD: gnu99
CLANG_WARN__DUPLICATE_METHOD_MATCH: 'YES'
GCC_WARN_64_TO_32_BIT_CONVERSION: 'YES'
CLANG_WARN_EMPTY_BODY: 'YES'
ALWAYS_SEARCH_USER_PATHS: 'NO'
COPY_PHASE_STRIP: 'NO'
SDKROOT: macosx
GCC_DYNAMIC_NO_PIC: 'NO'
ARCHS: $(ARCHS_STANDARD_64_BIT)
GCC_ENABLE_OBJC_EXCEPTIONS: 'YES'
CLANG_CXX_LIBRARY: libc++
GCC_WARN_UNUSED_VARIABLE: 'YES'
- Release:
Build Settings:
DEBUG_INFORMATION_FORMAT: dwarf-with-dsym
GCC_WARN_UNUSED_VARIABLE: 'YES'
GCC_C_LANGUAGE_STANDARD: gnu99
GCC_ENABLE_OBJC_EXCEPTIONS: 'YES'
GCC_WARN_UNINITIALIZED_AUTOS: 'YES'
MACOSX_DEPLOYMENT_TARGET: '10.8'
CLANG_WARN__DUPLICATE_METHOD_MATCH: 'YES'
CLANG_WARN_EMPTY_BODY: 'YES'
CLANG_CXX_LANGUAGE_STANDARD: gnu++0x
CLANG_WARN_INT_CONVERSION: 'YES'
CLANG_WARN_CONSTANT_CONVERSION: 'YES'
ARCHS: $(ARCHS_STANDARD_64_BIT)
ALWAYS_SEARCH_USER_PATHS: 'NO'
CLANG_WARN_ENUM_CONVERSION: 'YES'
GCC_WARN_64_TO_32_BIT_CONVERSION: 'YES'
GCC_WARN_ABOUT_RETURN_TYPE: 'YES'
SDKROOT: macosx
COPY_PHASE_STRIP: 'YES'
CLANG_CXX_LIBRARY: libc++
File References:
- SampleApp:
- CPAppDelegate.h
- CPAppDelegate.m
- MainMenu.xib:
- en
- Supporting Files:
- SampleApp-Info.plist
- InfoPlist.strings:
- en
- main.m
- SampleApp-Prefix.pch
- Credits.rtf:
- en
- Frameworks:
- Cocoa.framework
- Other Frameworks:
- AppKit.framework
- CoreData.framework
- Foundation.framework
- libPods-SampleApp_2.a
- Products:
- SampleApp.app
- Pods-SampleApp_2.xcconfig
Targets:
- SampleApp_2:
Build Phases:
- SourcesBuildPhase:
- main.m
- CPAppDelegate.m
- FrameworksBuildPhase:
- Cocoa.framework
- libPods-SampleApp_2.a
- ResourcesBuildPhase:
- InfoPlist.strings
- Credits.rtf
- MainMenu.xib
- Copy Pods Resources: []
- Copy Pods Resources: []
Build Configurations:
- Debug:
Build Settings:
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: SampleApp/SampleApp-Info.plist
COMBINE_HIDPI_IMAGES: 'YES'
GCC_PREFIX_HEADER: SampleApp/SampleApp-Prefix.pch
WRAPPER_EXTENSION: app
PRODUCT_NAME: $(TARGET_NAME)
Base Configuration: Pods-SampleApp_2.xcconfig
- Release:
Build Settings:
GCC_PRECOMPILE_PREFIX_HEADER: 'YES'
INFOPLIST_FILE: SampleApp/SampleApp-Info.plist
COMBINE_HIDPI_IMAGES: 'YES'
GCC_PREFIX_HEADER: SampleApp/SampleApp-Prefix.pch
WRAPPER_EXTENSION: app
PRODUCT_NAME: $(TARGET_NAME)
Base Configuration: Pods-SampleApp_2.xcconfig
Build Configurations:
- Debug:
Build Settings:
CLANG_WARN_ENUM_CONVERSION: 'YES'
GCC_WARN_ABOUT_RETURN_TYPE: 'YES'
GCC_PREPROCESSOR_DEFINITIONS:
- DEBUG=1
- $(inherited)
ONLY_ACTIVE_ARCH: 'YES'
GCC_SYMBOLS_PRIVATE_EXTERN: 'NO'
GCC_WARN_UNINITIALIZED_AUTOS: 'YES'
CLANG_CXX_LANGUAGE_STANDARD: gnu++0x
CLANG_WARN_INT_CONVERSION: 'YES'
MACOSX_DEPLOYMENT_TARGET: '10.8'
CLANG_WARN_CONSTANT_CONVERSION: 'YES'
GCC_OPTIMIZATION_LEVEL: '0'
GCC_C_LANGUAGE_STANDARD: gnu99
CLANG_WARN__DUPLICATE_METHOD_MATCH: 'YES'
GCC_WARN_64_TO_32_BIT_CONVERSION: 'YES'
CLANG_WARN_EMPTY_BODY: 'YES'
ALWAYS_SEARCH_USER_PATHS: 'NO'
COPY_PHASE_STRIP: 'NO'
SDKROOT: macosx
GCC_DYNAMIC_NO_PIC: 'NO'
ARCHS: $(ARCHS_STANDARD_64_BIT)
GCC_ENABLE_OBJC_EXCEPTIONS: 'YES'
CLANG_CXX_LIBRARY: libc++
GCC_WARN_UNUSED_VARIABLE: 'YES'
- Release:
Build Settings:
DEBUG_INFORMATION_FORMAT: dwarf-with-dsym
GCC_WARN_UNUSED_VARIABLE: 'YES'
GCC_C_LANGUAGE_STANDARD: gnu99
GCC_ENABLE_OBJC_EXCEPTIONS: 'YES'
GCC_WARN_UNINITIALIZED_AUTOS: 'YES'
MACOSX_DEPLOYMENT_TARGET: '10.8'
CLANG_WARN__DUPLICATE_METHOD_MATCH: 'YES'
CLANG_CXX_LANGUAGE_STANDARD: gnu++0x
CLANG_WARN_INT_CONVERSION: 'YES'
CLANG_WARN_EMPTY_BODY: 'YES'
ALWAYS_SEARCH_USER_PATHS: 'NO'
CLANG_WARN_CONSTANT_CONVERSION: 'YES'
ARCHS: $(ARCHS_STANDARD_64_BIT)
CLANG_WARN_ENUM_CONVERSION: 'YES'
GCC_WARN_64_TO_32_BIT_CONVERSION: 'YES'
GCC_WARN_ABOUT_RETURN_TYPE: 'YES'
SDKROOT: macosx
COPY_PHASE_STRIP: 'YES'
CLANG_CXX_LIBRARY: libc++
<?xml version='1.0' encoding='UTF-8'?><Workspace version='1.0'><FileRef location='group:SampleApp_1.xcodeproj'/><FileRef location='group:SampleApp_2.xcodeproj'/><FileRef location='group:Pods/Pods.xcodeproj'/></Workspace>
\ No newline at end of file
$ pod install --no-update --no-doc --verbose --no-color 2>&1
Analyzing dependencies
Resolving dependencies of `Podfile`
Resolving dependencies for target `Pods' (iOS 6.0)
Resolving dependencies for target `SampleApp_1' (iOS 6.0)
- Reachability (= 3.1.0)
Resolving dependencies for target `SampleApp_2' (iOS 6.0)
- Reachability
Comparing resolved specification to the sandbox manifest
A Reachability
Downloading dependencies
-> Installing Reachability (3.1.0)
> GitHub download
$ /usr/bin/git config core.bare
true
$ /usr/bin/git config core.bare
true
> Updating cache git repo (CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6)
$ /usr/bin/git remote update
Fetching origin
$ /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 fetch origin tags/v3.1.0 2>&1
From CACHES_DIR/GitHub/48f11286750afa2e2eb80564e288f42eed7cbab6
* tag v3.1.0 -> FETCH_HEAD
$ /usr/bin/git reset --hard FETCH_HEAD
HEAD is now at f7176f4 updated podspec
$ /usr/bin/git checkout -b activated-pod-commit 2>&1
Switched to a new branch 'activated-pod-commit'
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
- Installing targets
- Installing target `Pods-SampleApp_1` iOS 6.0
- Adding Build files
- Generating xcconfig file at `Pods/Pods-SampleApp_1.xcconfig`
- Generating target header at `Pods/Pods-SampleApp_1-header.h`
- Generating prefix header at `Pods/Pods-SampleApp_1-prefix.pch`
- Generating copy resources script at `Pods/Pods-SampleApp_1-resources.sh`
- Generating acknowledgements at `Pods/Pods-SampleApp_1-acknowledgements.plist`
- Generating acknowledgements at `Pods/Pods-SampleApp_1-acknowledgements.markdown`
- Generating dummy source file at `Pods/Pods-SampleApp_1-dummy.m`
- Installing target `Pods-SampleApp_2` iOS 6.0
- Adding Build files
- Generating xcconfig file at `Pods/Pods-SampleApp_2.xcconfig`
- Generating target header at `Pods/Pods-SampleApp_2-header.h`
- Generating prefix header at `Pods/Pods-SampleApp_2-prefix.pch`
- Generating copy resources script at `Pods/Pods-SampleApp_2-resources.sh`
- Generating acknowledgements at `Pods/Pods-SampleApp_2-acknowledgements.plist`
- Generating acknowledgements at `Pods/Pods-SampleApp_2-acknowledgements.markdown`
- Generating dummy source file at `Pods/Pods-SampleApp_2-dummy.m`
- Running post install hooks
- Writing Xcode project file to `Pods/Pods.xcodeproj`
- Writing Lockfile in `Podfile.lock`
- Writing Manifest in `Pods/Manifest.lock`
Integrating client projects
[!] From now on use `Workspace.xcworkspace`.
platform :ios, '6.0'
workspace 'Workspace.xcworkspace'
# TODO: remove
xcodeproj 'SampleApp_1.xcodeproj'
target 'SampleApp_1' do
xcodeproj 'SampleApp_1.xcodeproj'
pod "Reachability", "3.1.0"
end
target :'SampleApp_2' do
xcodeproj 'SampleApp_2.xcodeproj'
pod "Reachability"
end
PODS: PODS:
- PodTest (1.0): - PodTest (1.0):
- PodTest/subspec_1 (= 1.0) - PodTest/subspec_1
- PodTest/subspec_2 (= 1.0) - PodTest/subspec_2
- PodTest/subspec_1 (1.0) - PodTest/subspec_1 (1.0)
- PodTest/subspec_2 (1.0) - PodTest/subspec_2 (1.0)
...@@ -15,4 +15,4 @@ EXTERNAL SOURCES: ...@@ -15,4 +15,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
PODS: PODS:
- PodTest (1.0): - PodTest (1.0):
- PodTest/subspec_1 (= 1.0) - PodTest/subspec_1
- PodTest/subspec_2 (= 1.0) - PodTest/subspec_2
- PodTest/subspec_1 (1.0) - PodTest/subspec_1 (1.0)
- PodTest/subspec_2 (1.0) - PodTest/subspec_2 (1.0)
...@@ -15,4 +15,4 @@ EXTERNAL SOURCES: ...@@ -15,4 +15,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -11,8 +11,8 @@ Fetching external sources ...@@ -11,8 +11,8 @@ Fetching external sources
Resolving dependencies of `Podfile` Resolving dependencies of `Podfile`
Resolving dependencies for target `Pods' (iOS 4.3) Resolving dependencies for target `Pods' (iOS 4.3)
- PodTest (from `PodTest-hg-source`) - PodTest (from `PodTest-hg-source`)
- PodTest/subspec_1 (= 1.0) - PodTest/subspec_1
- PodTest/subspec_2 (= 1.0) - PodTest/subspec_2
Comparing resolved specification to the sandbox manifest Comparing resolved specification to the sandbox manifest
A PodTest A PodTest
......
...@@ -11,4 +11,4 @@ EXTERNAL SOURCES: ...@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -11,4 +11,4 @@ EXTERNAL SOURCES: ...@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -10,4 +10,4 @@ SPEC CHECKSUMS: ...@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601 JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -10,4 +10,4 @@ SPEC CHECKSUMS: ...@@ -10,4 +10,4 @@ SPEC CHECKSUMS:
JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601 JSONKit: 409734ab3407fce90ef7eaa95d7168f38d9a6601
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -25,8 +25,7 @@ Downloading dependencies ...@@ -25,8 +25,7 @@ Downloading dependencies
$ /usr/bin/git rev-list --max-count=1 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce $ /usr/bin/git rev-list --max-count=1 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce
0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce
> Cloning to Pods folder > Cloning to Pods folder
$ /usr/bin/git clone "CACHES_DIR/GitHub/de3e1c97c03ac13b29e7533beea2d2131589900f" $ /usr/bin/git clone "CACHES_DIR/GitHub/de3e1c97c03ac13b29e7533beea2d2131589900f" "ROOT/tmp/install_multiple_targets/Pods/JSONKit"
"ROOT/tmp/install_multiple_targets/Pods/JSONKit"
Cloning into 'ROOT/tmp/install_multiple_targets/Pods/JSONKit'... Cloning into 'ROOT/tmp/install_multiple_targets/Pods/JSONKit'...
done. done.
$ /usr/bin/git checkout -b activated-pod-commit 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce 2>&1 $ /usr/bin/git checkout -b activated-pod-commit 0aff3deb5e1bb2bbc88a83fd71c8ad5550185cce 2>&1
......
...@@ -7,4 +7,4 @@ DEPENDENCIES: ...@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -7,4 +7,4 @@ DEPENDENCIES: ...@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -7,4 +7,4 @@ DEPENDENCIES: ...@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -7,4 +7,4 @@ DEPENDENCIES: ...@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -11,4 +11,4 @@ EXTERNAL SOURCES: ...@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -11,4 +11,4 @@ EXTERNAL SOURCES: ...@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe Reachability: b14c20321fa00f7f4600d8c9856fc57e71ef2ffe
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -7,4 +7,4 @@ DEPENDENCIES: ...@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -7,4 +7,4 @@ DEPENDENCIES: ...@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -11,4 +11,4 @@ EXTERNAL SOURCES: ...@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: c1e48cc25f8e7cba878c83ad1981d334ef325522 Reachability: c1e48cc25f8e7cba878c83ad1981d334ef325522
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -11,4 +11,4 @@ EXTERNAL SOURCES: ...@@ -11,4 +11,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: c1e48cc25f8e7cba878c83ad1981d334ef325522 Reachability: c1e48cc25f8e7cba878c83ad1981d334ef325522
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -13,4 +13,4 @@ EXTERNAL SOURCES: ...@@ -13,4 +13,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -13,4 +13,4 @@ EXTERNAL SOURCES: ...@@ -13,4 +13,4 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f PodTest: 5049980a26c8960af5a42d1c7f086483c5b29d8f
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -7,4 +7,4 @@ DEPENDENCIES: ...@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -7,4 +7,4 @@ DEPENDENCIES: ...@@ -7,4 +7,4 @@ DEPENDENCIES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b Reachability: ba94ecd4eaa037be3d0588b38956672588530c5b
COCOAPODS: 0.17.0.rc7 COCOAPODS: 0.17.2
...@@ -337,6 +337,10 @@ describe "Integration take 2" do ...@@ -337,6 +337,10 @@ describe "Integration take 2" do
check "install --no-update --no-doc", "install_podspec" check "install --no-update --no-doc", "install_podspec"
end end
describe "Performs an installation using a custom workspace" do
check "install --no-update --no-doc", "install_custom_workspace"
end
# @todo add tests for all the hooks API # @todo add tests for all the hooks API
# #
describe "Runs the Podfile callbacks" do describe "Runs the Podfile callbacks" do
......
...@@ -71,9 +71,9 @@ module Pod ...@@ -71,9 +71,9 @@ module Pod
lockfile = installer.lockfile.to_hash lockfile = installer.lockfile.to_hash
lockfile['PODS'].should == [ lockfile['PODS'].should == [
{ "ASIHTTPRequest (1.8.1)" => { "ASIHTTPRequest (1.8.1)" =>
[ "ASIHTTPRequest/ASIWebPageRequest (= 1.8.1)", [ "ASIHTTPRequest/ASIWebPageRequest",
"ASIHTTPRequest/CloudFiles (= 1.8.1)", "ASIHTTPRequest/CloudFiles",
"ASIHTTPRequest/S3 (= 1.8.1)", "ASIHTTPRequest/S3",
"Reachability" "Reachability"
] ]
}, },
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
if ENV['CI'] || ENV['GENERATE_COVERAGE'] if ENV['CI'] || ENV['GENERATE_COVERAGE']
require 'simplecov' require 'simplecov'
require 'coveralls' # require 'coveralls'
if ENV['CI'] if ENV['CI']
SimpleCov.formatter = Coveralls::SimpleCov::Formatter SimpleCov.formatter = Coveralls::SimpleCov::Formatter
......
...@@ -25,7 +25,7 @@ module Pod ...@@ -25,7 +25,7 @@ module Pod
'--docset-desc', 'Chunky bananas!', '--docset-desc', 'Chunky bananas!',
'--project-company', 'Banana Corp and Monkey Boy', '--project-company', 'Banana Corp and Monkey Boy',
'--docset-copyright', 'Banana Corp and Monkey Boy', '--docset-copyright', 'Banana Corp and Monkey Boy',
'--company-id', 'org.cocoapods', '--company-id', 'org.cocoapods.bananalib',
'--ignore', '.m', '--ignore', '.m',
'--keep-undocumented-objects', '--keep-undocumented-objects',
'--keep-undocumented-members', '--keep-undocumented-members',
...@@ -47,7 +47,7 @@ module Pod ...@@ -47,7 +47,7 @@ module Pod
arguments.should.include?(" --docset-desc 'Chunky bananas!' ") arguments.should.include?(" --docset-desc 'Chunky bananas!' ")
arguments.should.include?(" --project-company 'Banana Corp and Monkey Boy' ") arguments.should.include?(" --project-company 'Banana Corp and Monkey Boy' ")
arguments.should.include?(" --docset-copyright 'Banana Corp and Monkey Boy' ") arguments.should.include?(" --docset-copyright 'Banana Corp and Monkey Boy' ")
arguments.should.include?(" --company-id org.cocoapods ") arguments.should.include?(" --company-id org.cocoapods.bananalib ")
arguments.should.include?(" --ignore .m ") arguments.should.include?(" --ignore .m ")
arguments.should.include?(" --keep-undocumented-objects ") arguments.should.include?(" --keep-undocumented-objects ")
arguments.should.include?(" --keep-undocumented-members ") arguments.should.include?(" --keep-undocumented-members ")
......
...@@ -91,6 +91,26 @@ module Pod ...@@ -91,6 +91,26 @@ module Pod
@xcconfig.to_hash['OTHER_LDFLAGS'].should.include('-weak_framework iAd') @xcconfig.to_hash['OTHER_LDFLAGS'].should.include('-weak_framework iAd')
end end
it "includes the developer frameworks search paths when SenTestingKit is detected" do
spec = fixture_spec('banana-lib/BananaLib.podspec')
consumer = spec.consumer(:ios)
generator = Generator::XCConfig.new(config.sandbox, [consumer], './Pods')
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')
consumer_1 = spec.consumer(:ios)
consumer_2 = spec.consumer(:ios)
generator = Generator::XCConfig.new(config.sandbox, [consumer_1, consumer_2], './Pods')
spec.frameworks = ['SenTestingKit']
xcconfig = generator.generate
xcconfig.to_hash['FRAMEWORK_SEARCH_PATHS'].should == '$(inherited) "$(SDKROOT)/Developer/Library/Frameworks" "$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
end
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
it 'returns the settings that the pods project needs to override' do it 'returns the settings that the pods project needs to override' do
......
...@@ -130,9 +130,9 @@ module Pod ...@@ -130,9 +130,9 @@ module Pod
@analyzer.send(:sandbox_pods).should == ['BananaLib'] @analyzer.send(:sandbox_pods).should == ['BananaLib']
end end
it "returns the name of the resolved specifications" do it "returns the name of the resolved specifications sorted by name" do
subspec = Spec.new(@spec, 'Subspec') subspec = Spec.new(@spec, 'Subspec')
@analyzer.stubs(:specs).returns([@spec, subspec]) @analyzer.stubs(:specs).returns([subspec, @spec])
@analyzer.send(:resolved_spec_names, 'BananaLib').should == ['BananaLib', 'BananaLib/Subspec'] @analyzer.send(:resolved_spec_names, 'BananaLib').should == ['BananaLib', 'BananaLib/Subspec']
end end
......
...@@ -81,6 +81,7 @@ module Pod ...@@ -81,6 +81,7 @@ module Pod
lib.support_files_root.should == config.sandbox.root lib.support_files_root.should == config.sandbox.root
lib.user_project_path.to_s.should.include 'SampleProject/SampleProject' lib.user_project_path.to_s.should.include 'SampleProject/SampleProject'
lib.client_root.to_s.should.include 'SampleProject'
lib.user_target_uuids.should == ["A346496C14F9BE9A0080D870"] lib.user_target_uuids.should == ["A346496C14F9BE9A0080D870"]
user_proj = Xcodeproj::Project.new(lib.user_project_path) user_proj = Xcodeproj::Project.new(lib.user_project_path)
user_proj.objects_by_uuid[lib.user_target_uuids.first].name.should == 'SampleProject' user_proj.objects_by_uuid[lib.user_target_uuids.first].name.should == 'SampleProject'
...@@ -92,7 +93,7 @@ module Pod ...@@ -92,7 +93,7 @@ module Pod
config.integrate_targets = false config.integrate_targets = false
lib = @analyzer.analyze.libraries.first lib = @analyzer.analyze.libraries.first
lib.user_project_path.should == config.installation_root lib.client_root.should == config.installation_root
lib.user_target_uuids.should == [] lib.user_target_uuids.should == []
lib.user_build_configurations.should == {} lib.user_build_configurations.should == {}
lib.platform.to_s.should == 'iOS 6.0' lib.platform.to_s.should == 'iOS 6.0'
...@@ -102,7 +103,7 @@ module Pod ...@@ -102,7 +103,7 @@ module Pod
it "locks the version of the dependencies which did not change in the Podfile" do it "locks the version of the dependencies which did not change in the Podfile" do
@analyzer.analyze @analyzer.analyze
@analyzer.send(:locked_dependencies).map(&:to_s).should == ["SVPullToRefresh"] @analyzer.send(:locked_dependencies).map(&:to_s).should == ["SVPullToRefresh (= 0.4)"]
end end
it "does not lock the dependencies in update mode" do it "does not lock the dependencies in update mode" do
......
...@@ -22,6 +22,7 @@ module Pod ...@@ -22,6 +22,7 @@ module Pod
@library = Library.new(@target_definition) @library = Library.new(@target_definition)
@library.platform = Platform.new(:ios, '6.0') @library.platform = Platform.new(:ios, '6.0')
@library.support_files_root = config.sandbox.root @library.support_files_root = config.sandbox.root
@library.client_root = config.sandbox.root.dirname
@library.user_project_path = config.sandbox.root + '../user_project.xcodeproj' @library.user_project_path = config.sandbox.root + '../user_project.xcodeproj'
@library.user_build_configurations = { 'Debug' => :debug, 'Release' => :release, 'AppStore' => :release, 'Test' => :debug } @library.user_build_configurations = { 'Debug' => :debug, 'Release' => :release, 'AppStore' => :release, 'Test' => :debug }
@library.specs = [@spec] @library.specs = [@spec]
......
...@@ -18,11 +18,11 @@ module Pod ...@@ -18,11 +18,11 @@ module Pod
target_definition.link_with_first_target = true target_definition.link_with_first_target = true
@lib = Library.new(target_definition) @lib = Library.new(target_definition)
@lib.user_project_path = sample_project_path @lib.user_project_path = sample_project_path
@lib.client_root = sample_project_path.dirname
pods_project = Project.new() pods_project = Project.new()
@lib.target = pods_project.new_target(:static_library, target_definition.label, :ios) @lib.target = pods_project.new_target(:static_library, target_definition.label, :ios)
@lib.user_target_uuids = [@target.uuid] @lib.user_target_uuids = [@target.uuid]
@lib.support_files_root = config.sandbox.root @lib.support_files_root = config.sandbox.root
@lib.user_project_path = sample_project_path
@target_integrator = TargetIntegrator.new(@lib) @target_integrator = TargetIntegrator.new(@lib)
end end
......
...@@ -18,6 +18,7 @@ module Pod ...@@ -18,6 +18,7 @@ module Pod
end end
config.sandbox.project = Project.new() config.sandbox.project = Project.new()
@library = Library.new(@podfile.target_definitions['Pods']) @library = Library.new(@podfile.target_definitions['Pods'])
@library.client_root = sample_project_path.dirname
@library.user_project_path = sample_project_path @library.user_project_path = sample_project_path
@library.user_target_uuids = ['A346496C14F9BE9A0080D870'] @library.user_target_uuids = ['A346496C14F9BE9A0080D870']
@library.support_files_root = config.sandbox.root @library.support_files_root = config.sandbox.root
...@@ -127,7 +128,10 @@ module Pod ...@@ -127,7 +128,10 @@ module Pod
it "uses the path of the workspace defined in the podfile" do it "uses the path of the workspace defined in the podfile" do
path = "a_path" path = "a_path"
@podfile.workspace(path) @podfile.workspace(path)
@integrator.send(:workspace_path).should == Pathname.new(path + ".xcworkspace") workspace_path = @integrator.send(:workspace_path)
workspace_path.to_s.should.end_with(path + ".xcworkspace")
workspace_path.should.be.absolute
workspace_path.class.should == Pathname
end end
it "names the workspace after the user project if needed" do it "names the workspace after the user project if needed" do
......
...@@ -174,7 +174,7 @@ module Pod ...@@ -174,7 +174,7 @@ module Pod
spec = fixture_spec('banana-lib/BananaLib.podspec') spec = fixture_spec('banana-lib/BananaLib.podspec')
library = Library.new(nil) library = Library.new(nil)
library.specs = [spec] library.specs = [spec]
@installer.stubs(:libraries).returns([library]) @installer.stubs(:libraries).returns([library, library])
@installer.instance_variable_set(:@installed_specs, []) @installer.instance_variable_set(:@installed_specs, [])
Installer::PodSourceInstaller.any_instance.stubs(:install!) Installer::PodSourceInstaller.any_instance.stubs(:install!)
@installer.send(:install_source_of_pod, 'BananaLib') @installer.send(:install_source_of_pod, 'BananaLib')
......
...@@ -33,7 +33,7 @@ module Pod ...@@ -33,7 +33,7 @@ module Pod
@target_definition.link_with_first_target = true @target_definition.link_with_first_target = true
@lib = Library.new(@target_definition) @lib = Library.new(@target_definition)
@lib.support_files_root = config.sandbox.root @lib.support_files_root = config.sandbox.root
@lib.user_project_path = config.sandbox.root + '../user_project.xcodeproj' @lib.client_root = config.sandbox.root.dirname
end end
it "returns the absolute path of the xcconfig file" do it "returns the absolute path of the xcconfig file" do
......
...@@ -106,6 +106,11 @@ module Pod ...@@ -106,6 +106,11 @@ module Pod
] ]
end end
it "allows to specify folders in the exclude patterns" do
paths = @path_list.relative_glob('Classes/*', { :exclude_patterns => 'Classes' }).map(&:to_s)
paths.sort.should.be.empty
end
it "can optionally include the directories in the results" do it "can optionally include the directories in the results" do
paths = @path_list.relative_glob('Resources/*', { :include_dirs => true }).map(&:to_s) paths = @path_list.relative_glob('Resources/*', { :include_dirs => true }).map(&:to_s)
paths.sort.should == %w[ paths.sort.should == %w[
......
...@@ -59,7 +59,7 @@ module Pod ...@@ -59,7 +59,7 @@ module Pod
end end
it "updates the search index before performing a search if it exits" do it "updates the search index before performing a search if it exits" do
FileUtils.touch(SourcesManager.search_index_path) File.open(SourcesManager.search_index_path, 'w') { |file| file.write("---\nBananaLib:\n version: 0.0.1") }
Source::Aggregate.any_instance.stubs(:all).returns([@test_source]) Source::Aggregate.any_instance.stubs(:all).returns([@test_source])
Source::Aggregate.any_instance.expects(:generate_search_index).never Source::Aggregate.any_instance.expects(:generate_search_index).never
Source::Aggregate.any_instance.expects(:update_search_index).returns({'BananaLib' => {}}) Source::Aggregate.any_instance.expects(:update_search_index).returns({'BananaLib' => {}})
......
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