Commit de5b15a7 authored by Fabio Pelosin's avatar Fabio Pelosin

[Specification] Add support for resource bundles

parent 3b752904
......@@ -17,7 +17,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: 8400134c1299d9cdb5c233d84513a7eec0f9f37b
revision: 254fbb313e7219c9c99d0b31facb510c065aa906
branch: master
specs:
xcodeproj (0.8.1)
......@@ -26,7 +26,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/cocoapods-downloader.git
revision: 2cc10348d9eb35862d900d79c72cd967388962b9
revision: 951ebcc7f6b10874ff09796b0add04d7b3ce34d1
branch: master
specs:
cocoapods-downloader (0.1.1)
......
......@@ -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
......@@ -109,6 +109,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -37,7 +37,7 @@ module Pod
add_source_files_references
add_frameworks_bundles
add_library_files
add_resources_bundles
add_resources
link_headers
end
......@@ -77,7 +77,7 @@ module Pod
end
end
# Adds the frameworks bundles to the Pods project
# Adds the bundled frameworks to the Pods project
#
# @return [void]
#
......@@ -87,7 +87,9 @@ module Pod
end
end
# TODO
# Adds the bundled libraries to the Pods project
#
# @return [void]
#
def add_library_files
UI.message "- Adding frameworks to Pods project" do
......@@ -102,9 +104,10 @@ module Pod
#
# @return [void]
#
def add_resources_bundles
def add_resources
UI.message "- Adding resources to Pods project" do
add_file_acessors_paths_to_pods_group(:resources, :resources)
add_file_acessors_paths_to_pods_group(:resource_bundle_files, :resources)
end
end
......@@ -145,13 +148,24 @@ module Pod
@file_accessors ||= libraries.map(&:file_accessors).flatten.compact
end
def add_file_acessors_paths_to_pods_group(paths_method, group_name)
# 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(paths_method)
paths = file_accessor.send(file_accessor_key)
paths.each do |path|
group = pods_project.group_for_spec(file_accessor.spec.name, group_name)
group = pods_project.group_for_spec(file_accessor.spec.name, group_key)
pods_project.add_file_reference(path, group)
# group.new_file(pods_project.relativize(path))
end
end
end
......
......@@ -231,6 +231,7 @@ module Pod
files = [
file_accessors.map(&:framework_bundles),
file_accessors.map(&:library_files),
file_accessors.map(&:resource_bundle_files),
file_accessors.map(&:license),
file_accessors.map(&:prefix_header),
file_accessors.map(&:preserve_paths),
......
......@@ -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
......@@ -49,6 +50,29 @@ 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]
......
......@@ -113,13 +113,33 @@ module Pod
paths_for_attribute(:framework_bundles, true)
end
# @return [Array<Pathname>] The paths of the framework bundles that come
# @return [Array<Pathname>] The paths of the library bundles that come
# shipped with the Pod.
#
def library_files
paths_for_attribute(:library_files)
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
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -38,17 +38,20 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -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
......@@ -37,17 +37,20 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -26,11 +26,13 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -20,11 +20,13 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -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
......@@ -55,29 +55,34 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -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
......@@ -34,11 +34,13 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -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
......@@ -35,11 +35,13 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -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
......@@ -37,11 +37,13 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -24,11 +24,13 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -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
......@@ -38,11 +38,13 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -32,17 +32,20 @@ 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`
......
......@@ -29,6 +29,10 @@ install_resource()
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"
echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
......
......@@ -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
......@@ -37,11 +37,13 @@ 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`
......
......@@ -39,7 +39,9 @@ module Pod
end
xit "adds the file references of the libraries of the project"
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!
......@@ -72,6 +74,7 @@ module Pod
describe "Private Helpers" do
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')]
......@@ -88,7 +91,15 @@ module Pod
installer = Installer::FileReferencesInstaller.new(config.sandbox, [pod_target_1], @project)
roots = installer.send(:file_accessors).should == []
end
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
end
end
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')]
......@@ -120,6 +131,7 @@ module Pod
(headers_sandbox + 'dir_2') => [header_2],
}
end
end
end
......
......@@ -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.root + 'Pods-acknowledgements.markdown'
......
......@@ -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
......
......@@ -111,6 +111,24 @@ module Pod
@accessor.library_files.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
......
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