cocoapods 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +47 -0
- data/lib/cocoapods.rb +0 -19
- data/lib/cocoapods/command.rb +4 -3
- data/lib/cocoapods/command/lib.rb +152 -0
- data/lib/cocoapods/command/list.rb +1 -1
- data/lib/cocoapods/command/search.rb +2 -2
- data/lib/cocoapods/command/spec.rb +0 -3
- data/lib/cocoapods/config.rb +61 -2
- data/lib/cocoapods/external_sources.rb +1 -4
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/copy_resources_script.rb +5 -2
- data/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb +0 -1
- data/lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb +0 -1
- data/lib/cocoapods/hooks/installer_representation.rb +2 -2
- data/lib/cocoapods/hooks/library_representation.rb +1 -0
- data/lib/cocoapods/installer.rb +44 -4
- data/lib/cocoapods/installer/analyzer/sandbox_analyzer.rb +8 -0
- data/lib/cocoapods/installer/pod_source_installer.rb +1 -6
- data/lib/cocoapods/installer/target_installer/aggregate_target_installer.rb +0 -3
- data/lib/cocoapods/installer/target_installer/pod_target_installer.rb +0 -3
- data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +2 -0
- data/lib/cocoapods/sources_manager.rb +1 -1
- data/lib/cocoapods/target.rb +1 -1
- data/lib/cocoapods/target/aggregate_target.rb +9 -2
- data/lib/cocoapods/target/pod_target.rb +9 -0
- data/lib/cocoapods/validator.rb +1 -1
- metadata +49 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1f552882d2489715f3154877683645345841303
|
4
|
+
data.tar.gz: f16fc98973864b454debaa5ed50d8272b075377b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e16713b34307e47f67d139a3e7de88a2e00dd9f72bed30bc2e33535a2940fbd05f321b0a8e9f2cab934b22aea5132cb679d6805e59f42e17dddbc9ed3b0623b9
|
7
|
+
data.tar.gz: eca230d41a659af15dc15966008a1004b6502398a3a14529463c4c8ba3afca0f83470f8972533873d0efa3cca25e7f449535e521ff0f6d5e49a75dc48b4be817
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,53 @@
|
|
2
2
|
|
3
3
|
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
|
4
4
|
|
5
|
+
## 0.22.0
|
6
|
+
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.21.0...0.22.0)
|
7
|
+
• [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.21.0...0.22.0)
|
8
|
+
• [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.7.1...0.8.0)
|
9
|
+
|
10
|
+
###### Enhancements
|
11
|
+
|
12
|
+
* Added the `pod lib create` subcommand which allows to create a new Pod
|
13
|
+
adhering to the best practices. The template is still a bit primitive
|
14
|
+
and we encourage users to provide feedback by submitting patches and issues
|
15
|
+
to https://github.com/CocoaPods/CocoaPods.
|
16
|
+
[#850](https://github.com/CocoaPods/CocoaPods/issues/850)
|
17
|
+
|
18
|
+
* Added the `pod lib lint` subcommand which allows to lint the Pod stored
|
19
|
+
in the working directory (a pod spec in the root is needed).
|
20
|
+
[#850](https://github.com/CocoaPods/CocoaPods/issues/850)
|
21
|
+
|
22
|
+
* The dependencies of the targets of the Pods project are now made explicit.
|
23
|
+
[#1165](https://github.com/CocoaPods/CocoaPods/issues/1165)
|
24
|
+
|
25
|
+
* The size of the cache used for the git repos is now configurable. For more
|
26
|
+
details see
|
27
|
+
https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/config.rb#L7-L25
|
28
|
+
[#1159](https://github.com/CocoaPods/CocoaPods/issues/1159)
|
29
|
+
|
30
|
+
* The copy resources shell script now aborts if any error occurs.
|
31
|
+
[#1098](https://github.com/CocoaPods/CocoaPods/issues/1098)
|
32
|
+
|
33
|
+
* The output of shell script build phases no longer includes environment
|
34
|
+
variables to reduce noise.
|
35
|
+
[#1122](https://github.com/CocoaPods/CocoaPods/issues/1122)
|
36
|
+
|
37
|
+
* CocoaPods no longer sets the deprecated `ALWAYS_SEARCH_USER_PATHS` build
|
38
|
+
setting.
|
39
|
+
|
40
|
+
###### Bug fixes
|
41
|
+
|
42
|
+
* Pods whose head state changes now are correctly detected and reinstalled.
|
43
|
+
[#1160](https://github.com/CocoaPods/CocoaPods/issues/1160)
|
44
|
+
|
45
|
+
* Fixed the library reppresentation of the hooks which caused issues with the
|
46
|
+
`#copy_resources_script_path` method.
|
47
|
+
[#1157](https://github.com/CocoaPods/CocoaPods/issues/1157)
|
48
|
+
|
49
|
+
* Frameworks symlinks are not properly preserved by the copy resources script.
|
50
|
+
Thanks to Thomas Dohmke (ashtom) for the fix.
|
51
|
+
[#1063](https://github.com/CocoaPods/CocoaPods/issues/1063)
|
5
52
|
|
6
53
|
## 0.21.0
|
7
54
|
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.21.0.rc1...0.21.0)
|
data/lib/cocoapods.rb
CHANGED
@@ -18,25 +18,6 @@ module Pod
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
# @return [Pathname] The directory where CocoaPods caches the downloads.
|
22
|
-
#
|
23
|
-
# @todo The {Installer::PodSourceInstaller} and the #{ExternalSources}
|
24
|
-
# classes build and configure the downloader from scratch.
|
25
|
-
#
|
26
|
-
CACHE_ROOT = Pathname.new(File.join(ENV['HOME'], 'Library/Caches/CocoaPods'))
|
27
|
-
CACHE_ROOT.mkpath unless CACHE_ROOT.exist?
|
28
|
-
|
29
|
-
# @return [Fixnum] The maximum size for the cache expressed in Mb.
|
30
|
-
#
|
31
|
-
# @todo The {Installer::PodSourceInstaller} and the #{ExternalSources}
|
32
|
-
# classes build and configure the downloader from scratch.
|
33
|
-
#
|
34
|
-
MAX_CACHE_SIZE = 500
|
35
|
-
|
36
|
-
# @return [Pathname] The file to use a cache of the statistics provider.
|
37
|
-
#
|
38
|
-
STATISTICS_CACHE_FILE = CACHE_ROOT + 'statistics.yml'
|
39
|
-
|
40
21
|
autoload :Command, 'cocoapods/command'
|
41
22
|
autoload :Executable, 'cocoapods/executable'
|
42
23
|
autoload :ExternalSources, 'cocoapods/external_sources'
|
data/lib/cocoapods/command.rb
CHANGED
@@ -8,17 +8,18 @@ module Pod
|
|
8
8
|
|
9
9
|
class Command < CLAide::Command
|
10
10
|
|
11
|
+
require 'cocoapods/command/help'
|
12
|
+
require 'cocoapods/command/inter_process_communication'
|
13
|
+
require 'cocoapods/command/lib'
|
11
14
|
require 'cocoapods/command/list'
|
12
15
|
require 'cocoapods/command/outdated'
|
16
|
+
require 'cocoapods/command/podfile_info'
|
13
17
|
require 'cocoapods/command/project'
|
14
18
|
require 'cocoapods/command/push'
|
15
19
|
require 'cocoapods/command/repo'
|
16
20
|
require 'cocoapods/command/search'
|
17
21
|
require 'cocoapods/command/setup'
|
18
22
|
require 'cocoapods/command/spec'
|
19
|
-
require 'cocoapods/command/help'
|
20
|
-
require 'cocoapods/command/inter_process_communication'
|
21
|
-
require 'cocoapods/command/podfile_info'
|
22
23
|
|
23
24
|
self.abstract_command = true
|
24
25
|
self.default_subcommand = 'install'
|
@@ -0,0 +1,152 @@
|
|
1
|
+
module Pod
|
2
|
+
class Command
|
3
|
+
class Lib < Command
|
4
|
+
self.abstract_command = true
|
5
|
+
self.summary = 'Develop pods'
|
6
|
+
|
7
|
+
#-----------------------------------------------------------------------#
|
8
|
+
|
9
|
+
class Create < Lib
|
10
|
+
self.summary = 'Creates a new Pod'
|
11
|
+
|
12
|
+
self.description = <<-DESC
|
13
|
+
Creates a new Pod with the given name from the template in the working directory.
|
14
|
+
DESC
|
15
|
+
|
16
|
+
self.arguments = '[NAME]'
|
17
|
+
|
18
|
+
def initialize(argv)
|
19
|
+
@name = argv.shift_argument
|
20
|
+
super
|
21
|
+
end
|
22
|
+
|
23
|
+
def validate!
|
24
|
+
super
|
25
|
+
help! "A name for the Pod is required." unless @name
|
26
|
+
end
|
27
|
+
|
28
|
+
def run
|
29
|
+
clone_template
|
30
|
+
configure_template
|
31
|
+
print_info
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
#----------------------------------------#
|
37
|
+
|
38
|
+
# !@group Private helpers
|
39
|
+
|
40
|
+
extend Executable
|
41
|
+
executable :git
|
42
|
+
executable :ruby
|
43
|
+
|
44
|
+
TEMPLATE_REPO = "https://github.com/CocoaPods/CocoaPods.git"
|
45
|
+
TEMPLATE_INFO_URL = "https://github.com/CocoaPods/CocoaPods"
|
46
|
+
|
47
|
+
# Clones the template from the remote in the working directory using
|
48
|
+
# the name of the Pod.
|
49
|
+
#
|
50
|
+
# @return [void]
|
51
|
+
#
|
52
|
+
def clone_template
|
53
|
+
UI.section("Creating `#{@name}` Pod") do
|
54
|
+
git!"clone '#{TEMPLATE_REPO}' #{@name}"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Runs the template configuration utilities.
|
59
|
+
#
|
60
|
+
# @return [void]
|
61
|
+
#
|
62
|
+
def configure_template
|
63
|
+
UI.section("Configuring template") do
|
64
|
+
Dir.chdir(@name) do
|
65
|
+
ruby! "_CONFIGURE.rb #{@name}"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Runs the template configuration utilities.
|
71
|
+
#
|
72
|
+
# @return [void]
|
73
|
+
#
|
74
|
+
def print_info
|
75
|
+
UI.puts "\nTo learn more about the template see `#{TEMPLATE_INFO_URL}`."
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
|
80
|
+
#-----------------------------------------------------------------------#
|
81
|
+
|
82
|
+
class Lint < Lib
|
83
|
+
self.summary = 'Validates a Pod'
|
84
|
+
|
85
|
+
self.description = <<-DESC
|
86
|
+
Validates the Pod using the files in the working directory.
|
87
|
+
DESC
|
88
|
+
|
89
|
+
def self.options
|
90
|
+
[ ["--quick", "Lint skips checks that would require to download and build the spec"],
|
91
|
+
["--only-errors", "Lint validates even if warnings are present"],
|
92
|
+
["--no-clean", "Lint leaves the build directory intact for inspection"] ].concat(super)
|
93
|
+
end
|
94
|
+
|
95
|
+
def initialize(argv)
|
96
|
+
@quick = argv.flag?('quick')
|
97
|
+
@only_errors = argv.flag?('only-errors')
|
98
|
+
@clean = argv.flag?('clean', true)
|
99
|
+
super
|
100
|
+
end
|
101
|
+
|
102
|
+
def validate!
|
103
|
+
super
|
104
|
+
end
|
105
|
+
|
106
|
+
def run
|
107
|
+
UI.puts
|
108
|
+
validator = Validator.new(podspec_to_lint)
|
109
|
+
validator.local = true
|
110
|
+
validator.quick = @quick
|
111
|
+
validator.no_clean = !@clean
|
112
|
+
validator.only_errors = @only_errors
|
113
|
+
validator.validate
|
114
|
+
|
115
|
+
if validator.validated?
|
116
|
+
UI.puts "#{validator.spec.name} passed validation.".green
|
117
|
+
else
|
118
|
+
raise Informative, "#{validator.spec.name} did not pass validation."
|
119
|
+
end
|
120
|
+
|
121
|
+
unless @clean
|
122
|
+
UI.puts "Pods project available at `#{validator.validation_dir}/Pods/Pods.xcodeproj` for inspection."
|
123
|
+
UI.puts
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
private
|
128
|
+
|
129
|
+
#----------------------------------------#
|
130
|
+
|
131
|
+
# !@group Private helpers
|
132
|
+
|
133
|
+
# @return [Pathname] The path of the podspec found in the current
|
134
|
+
# working directory.
|
135
|
+
#
|
136
|
+
# @raise If no podspec is found.
|
137
|
+
# @raise If multiple podspecs are found.
|
138
|
+
#
|
139
|
+
def podspec_to_lint
|
140
|
+
podspecs = Pathname.glob(Pathname.pwd + '*.podspec{.yaml,}')
|
141
|
+
raise Informative, "Unable to find a podspec in the working directory" if podspecs.count.zero?
|
142
|
+
raise Informative, "Multiple podspecs detected in the working directory" if podspecs.count > 1
|
143
|
+
podspecs.first
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
|
148
|
+
#-----------------------------------------------------------------------#
|
149
|
+
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
@@ -48,7 +48,7 @@ module Pod
|
|
48
48
|
dates, groups = {}, {}
|
49
49
|
days.each {|d| dates[d] = Time.now - 60 * 60 * 24 * d}
|
50
50
|
sets = SourcesManager.all_sets
|
51
|
-
statistics_provider =
|
51
|
+
statistics_provider = Config.instance.spec_statistics_provider
|
52
52
|
creation_dates = statistics_provider.creation_dates(sets)
|
53
53
|
|
54
54
|
sets.each do |set|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Pod
|
2
2
|
class Command
|
3
3
|
class Search < Command
|
4
|
-
self.summary = '
|
4
|
+
self.summary = 'Searches for pods'
|
5
5
|
|
6
6
|
self.description = <<-DESC
|
7
7
|
Searches for pods, ignoring case, whose name matches `QUERY'. If the
|
@@ -43,7 +43,7 @@ module Pod
|
|
43
43
|
sets.reject!{ |set| !set.specification.available_platforms.map(&:name).include?(:osx) }
|
44
44
|
end
|
45
45
|
|
46
|
-
statistics_provider =
|
46
|
+
statistics_provider = Config.instance.spec_statistics_provider
|
47
47
|
sets.each do |set|
|
48
48
|
begin
|
49
49
|
if @stats
|
@@ -60,14 +60,12 @@ module Pod
|
|
60
60
|
|
61
61
|
def self.options
|
62
62
|
[ ["--quick", "Lint skips checks that would require to download and build the spec"],
|
63
|
-
["--local", "Lint a podspec against the local files contained in its directory"],
|
64
63
|
["--only-errors", "Lint validates even if warnings are present"],
|
65
64
|
["--no-clean", "Lint leaves the build directory intact for inspection"] ].concat(super)
|
66
65
|
end
|
67
66
|
|
68
67
|
def initialize(argv)
|
69
68
|
@quick = argv.flag?('quick')
|
70
|
-
@local = argv.flag?('local')
|
71
69
|
@only_errors = argv.flag?('only-errors')
|
72
70
|
@clean = argv.flag?('clean', true)
|
73
71
|
@podspecs_paths = argv.arguments!
|
@@ -80,7 +78,6 @@ module Pod
|
|
80
78
|
podspecs_to_lint.each do |podspec|
|
81
79
|
validator = Validator.new(podspec)
|
82
80
|
validator.quick = @quick
|
83
|
-
validator.local = @local
|
84
81
|
validator.no_clean = !@clean
|
85
82
|
validator.only_errors = @only_errors
|
86
83
|
validator.validate
|
data/lib/cocoapods/config.rb
CHANGED
@@ -17,11 +17,14 @@ module Pod
|
|
17
17
|
:verbose => false,
|
18
18
|
:silent => false,
|
19
19
|
:skip_repo_update => false,
|
20
|
-
:aggressive_cache => false,
|
21
20
|
|
22
21
|
:clean => true,
|
23
22
|
:integrate_targets => true,
|
24
23
|
:new_version_message => true,
|
24
|
+
|
25
|
+
:cache_root => Pathname.new(File.join(ENV['HOME'], 'Library/Caches/CocoaPods')),
|
26
|
+
:max_cache_size => 500,
|
27
|
+
:aggressive_cache => false,
|
25
28
|
}
|
26
29
|
|
27
30
|
public
|
@@ -68,6 +71,26 @@ module Pod
|
|
68
71
|
attr_accessor :skip_repo_update
|
69
72
|
alias_method :skip_repo_update?, :skip_repo_update
|
70
73
|
|
74
|
+
public
|
75
|
+
|
76
|
+
#-------------------------------------------------------------------------#
|
77
|
+
|
78
|
+
# @!group Cache
|
79
|
+
|
80
|
+
# @return [Fixnum] The maximum size for the cache expressed in Mb.
|
81
|
+
#
|
82
|
+
attr_accessor :max_cache_size
|
83
|
+
|
84
|
+
# @return [Pathname] The directory where CocoaPods should cache remote data
|
85
|
+
# and other expensive to compute information.
|
86
|
+
#
|
87
|
+
attr_accessor :cache_root
|
88
|
+
|
89
|
+
def cache_root
|
90
|
+
@cache_root.mkpath unless @cache_root.exist?
|
91
|
+
@cache_root
|
92
|
+
end
|
93
|
+
|
71
94
|
# Allows to set whether the downloader should use more aggressive caching
|
72
95
|
# options.
|
73
96
|
#
|
@@ -80,7 +103,7 @@ module Pod
|
|
80
103
|
# options.
|
81
104
|
#
|
82
105
|
def aggressive_cache?
|
83
|
-
@aggressive_cache || (ENV['CP_AGGRESSIVE_CACHE']
|
106
|
+
@aggressive_cache || (ENV['CP_AGGRESSIVE_CACHE'] == 'TRUE')
|
84
107
|
end
|
85
108
|
|
86
109
|
public
|
@@ -193,6 +216,42 @@ module Pod
|
|
193
216
|
@lockfile_path ||= installation_root + 'Podfile.lock'
|
194
217
|
end
|
195
218
|
|
219
|
+
# @return [Pathname] The file to use a cache of the statistics provider.
|
220
|
+
#
|
221
|
+
def statistics_cache_file
|
222
|
+
cache_root + 'statistics.yml'
|
223
|
+
end
|
224
|
+
|
225
|
+
# @return [Pathname] The file to use to cache the search data.
|
226
|
+
#
|
227
|
+
def search_index_file
|
228
|
+
cache_root + 'search_index.yaml'
|
229
|
+
end
|
230
|
+
|
231
|
+
public
|
232
|
+
|
233
|
+
#-------------------------------------------------------------------------#
|
234
|
+
|
235
|
+
# @!group Dependency Injection
|
236
|
+
|
237
|
+
# @return [Downloader] The downloader to use for the retrieving remote
|
238
|
+
# source.
|
239
|
+
#
|
240
|
+
def downloader(target_path, options)
|
241
|
+
downloader = Downloader.for_target(target_path, options)
|
242
|
+
downloader.cache_root = cache_root
|
243
|
+
downloader.max_cache_size = max_cache_size
|
244
|
+
downloader.aggressive_cache = aggressive_cache?
|
245
|
+
downloader
|
246
|
+
end
|
247
|
+
|
248
|
+
# @return [Specification::Set::Statistics] The statistic provider to use
|
249
|
+
# for specifications.
|
250
|
+
#
|
251
|
+
def spec_statistics_provider
|
252
|
+
Specification::Set::Statistics.new(statistics_cache_file)
|
253
|
+
end
|
254
|
+
|
196
255
|
private
|
197
256
|
|
198
257
|
#-------------------------------------------------------------------------#
|
@@ -136,10 +136,7 @@ module Pod
|
|
136
136
|
UI.titled_section("Pre-downloading: `#{name}` #{description}", { :verbose_prefix => "-> " }) do
|
137
137
|
target = sandbox.root + name
|
138
138
|
target.rmtree if target.exist?
|
139
|
-
downloader =
|
140
|
-
downloader.cache_root = CACHE_ROOT.to_s
|
141
|
-
downloader.max_cache_size = MAX_CACHE_SIZE
|
142
|
-
downloader.aggressive_cache = false
|
139
|
+
downloader = Config.instance.downloader(target, params)
|
143
140
|
downloader.download
|
144
141
|
store_podspec(sandbox, target + "#{name}.podspec")
|
145
142
|
sandbox.store_pre_downloaded_pod(name)
|
@@ -79,6 +79,7 @@ module Pod
|
|
79
79
|
|
80
80
|
INSTALL_RESOURCES_FUCTION = <<EOS
|
81
81
|
#!/bin/sh
|
82
|
+
set -e
|
82
83
|
|
83
84
|
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
|
84
85
|
> "$RESOURCES_TO_COPY"
|
@@ -95,8 +96,10 @@ install_resource()
|
|
95
96
|
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}"
|
96
97
|
;;
|
97
98
|
*.framework)
|
98
|
-
echo "
|
99
|
-
|
99
|
+
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
100
|
+
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
101
|
+
echo "cp -fpR ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
102
|
+
cp -fpR "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
100
103
|
;;
|
101
104
|
*.xcdatamodeld)
|
102
105
|
echo "xcrun momc ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd"
|
@@ -15,7 +15,6 @@ module Pod
|
|
15
15
|
#
|
16
16
|
def generate
|
17
17
|
config = {
|
18
|
-
'ALWAYS_SEARCH_USER_PATHS' => 'YES',
|
19
18
|
'OTHER_LDFLAGS' => default_ld_flags,
|
20
19
|
'PODS_ROOT' => '${SRCROOT}',
|
21
20
|
'HEADER_SEARCH_PATHS' => quote(target.build_headers.search_paths) + ' ' + quote(sandbox.public_headers.search_paths),
|
@@ -59,8 +59,8 @@ module Pod
|
|
59
59
|
#
|
60
60
|
def specs_by_lib
|
61
61
|
result = {}
|
62
|
-
installer.
|
63
|
-
result[installer.library_rep(
|
62
|
+
installer.aggregate_targets.each do |aggregate_target|
|
63
|
+
result[installer.library_rep(aggregate_target)] = aggregate_target.specs
|
64
64
|
end
|
65
65
|
result
|
66
66
|
end
|
data/lib/cocoapods/installer.rb
CHANGED
@@ -111,6 +111,7 @@ module Pod
|
|
111
111
|
prepare_pods_project
|
112
112
|
install_file_references
|
113
113
|
install_libraries
|
114
|
+
set_target_dependencies
|
114
115
|
link_aggregate_target
|
115
116
|
run_post_install_hooks
|
116
117
|
write_pod_project
|
@@ -332,6 +333,43 @@ module Pod
|
|
332
333
|
end
|
333
334
|
end
|
334
335
|
|
336
|
+
def set_target_dependencies
|
337
|
+
aggregate_targets.each do |aggregate_target|
|
338
|
+
aggregate_target.pod_targets.each do |pod_target|
|
339
|
+
add_dependency(aggregate_target, pod_target)
|
340
|
+
pod_target.dependencies.each do |dep|
|
341
|
+
|
342
|
+
pod_dependency_target = aggregate_target.pod_targets.find { |target| target.root_spec.name == dep }
|
343
|
+
add_dependency(pod_target, pod_dependency_target)
|
344
|
+
end
|
345
|
+
end
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
# TODO: tmp - move
|
350
|
+
#
|
351
|
+
def add_dependency(dependent_target, dependency_target)
|
352
|
+
container_proxy = pods_project.new(Xcodeproj::Project::PBXContainerItemProxy)
|
353
|
+
# container_proxy.container_portal = '224D2C1BCDE44D8F9B674AD5'
|
354
|
+
container_proxy.proxy_type = '1'
|
355
|
+
# container_proxy.remote_global_id_string = 'F8D3306CA0564CA3861B2D4E'
|
356
|
+
# container_proxy.remote_info = 'Pods-AFHTTPRequestOperationLogger'
|
357
|
+
|
358
|
+
|
359
|
+
# reference_proxy = pods_project.new(Xcodeproj::Project::PBXReferenceProxy)
|
360
|
+
# reference_proxy.path =
|
361
|
+
# reference_proxy.file_type =
|
362
|
+
# reference_proxy.remote_ref = container_proxy
|
363
|
+
# reference_proxy.source_tree = BUILT_PRODUCTS_DIR
|
364
|
+
|
365
|
+
dependency = pods_project.new(Xcodeproj::Project::PBXTargetDependency)
|
366
|
+
dependency.target = dependency_target.target
|
367
|
+
# dependency.targetProxy = container_proxy
|
368
|
+
|
369
|
+
dependent_target.target.dependencies << dependency
|
370
|
+
end
|
371
|
+
|
372
|
+
|
335
373
|
# Links the aggregate targets with all the dependent libraries.
|
336
374
|
#
|
337
375
|
# @note This is run in the integration step to ensure that targets
|
@@ -547,14 +585,14 @@ module Pod
|
|
547
585
|
|
548
586
|
# @return [LibraryRepresentation]
|
549
587
|
#
|
550
|
-
def library_rep(
|
551
|
-
Hooks::LibraryRepresentation.new(sandbox,
|
588
|
+
def library_rep(aggregate_target)
|
589
|
+
Hooks::LibraryRepresentation.new(sandbox, aggregate_target)
|
552
590
|
end
|
553
591
|
|
554
592
|
# @return [Array<LibraryRepresentation>]
|
555
593
|
#
|
556
594
|
def library_reps
|
557
|
-
@library_reps ||=
|
595
|
+
@library_reps ||= aggregate_targets.map { |lib| library_rep(lib) }
|
558
596
|
end
|
559
597
|
|
560
598
|
# @return [Array<PodRepresentation>]
|
@@ -571,7 +609,9 @@ module Pod
|
|
571
609
|
# @return [Array<Library>] The library.
|
572
610
|
#
|
573
611
|
def libraries_using_spec(spec)
|
574
|
-
|
612
|
+
aggregate_targets.select do |aggregate_target|
|
613
|
+
aggregate_target.pod_targets.any? { |pod_target| pod_target.specs.include?(spec) }
|
614
|
+
end
|
575
615
|
end
|
576
616
|
|
577
617
|
# @return [Array<Library>] The libraries generated by the installation
|
@@ -150,6 +150,7 @@ module Pod
|
|
150
150
|
return true if resolved_spec_names(pod) != sandbox_spec_names(pod)
|
151
151
|
return true if sandbox.predownloaded?(pod)
|
152
152
|
return true if folder_empty?(pod)
|
153
|
+
return true if sandbox.head_pod?(pod) != sandbox_head_version?(pod)
|
153
154
|
if update_mode
|
154
155
|
return true if sandbox.head_pod?(pod)
|
155
156
|
end
|
@@ -235,6 +236,13 @@ module Pod
|
|
235
236
|
sandbox_manifest.checksum(pod)
|
236
237
|
end
|
237
238
|
|
239
|
+
# @return [Bool] Wether the Pod is installed in the sandbox is in head
|
240
|
+
# mode.
|
241
|
+
#
|
242
|
+
def sandbox_head_version?(pod)
|
243
|
+
sandbox_version(pod).head? == true
|
244
|
+
end
|
245
|
+
|
238
246
|
#--------------------------------------#
|
239
247
|
|
240
248
|
def folder_exist?(pod)
|
@@ -125,12 +125,7 @@ module Pod
|
|
125
125
|
# source.
|
126
126
|
#
|
127
127
|
def downloader
|
128
|
-
|
129
|
-
@downloader = Downloader.for_target(root, root_spec.source.dup)
|
130
|
-
@downloader.cache_root = CACHE_ROOT.to_s
|
131
|
-
@downloader.max_cache_size = MAX_CACHE_SIZE
|
132
|
-
@downloader.aggressive_cache = aggressive_cache?
|
133
|
-
@downloader
|
128
|
+
@downloader ||= Config.instance.downloader(root, root_spec.source.dup)
|
134
129
|
end
|
135
130
|
|
136
131
|
#-----------------------------------------------------------------------#
|
@@ -149,6 +149,7 @@ module Pod
|
|
149
149
|
native_target.new_shell_script_build_phase(phase_name)
|
150
150
|
path = target.copy_resources_script_relative_path
|
151
151
|
phase.shell_script = %{"#{path}"\n}
|
152
|
+
phase.show_env_vars_in_log = '0'
|
152
153
|
end
|
153
154
|
end
|
154
155
|
|
@@ -177,6 +178,7 @@ module Pod
|
|
177
178
|
exit 1
|
178
179
|
fi
|
179
180
|
EOS
|
181
|
+
phase.show_env_vars_in_log = '0'
|
180
182
|
end
|
181
183
|
end
|
182
184
|
|
data/lib/cocoapods/target.rb
CHANGED
@@ -38,7 +38,7 @@ module Pod
|
|
38
38
|
# @return [String] A string suitable for debugging.
|
39
39
|
#
|
40
40
|
def inspect
|
41
|
-
"<#{self.class} name=#{name}
|
41
|
+
"<#{self.class} name=#{name} >"
|
42
42
|
end
|
43
43
|
|
44
44
|
#-------------------------------------------------------------------------#
|
@@ -56,9 +56,16 @@ module Pod
|
|
56
56
|
#
|
57
57
|
attr_accessor :pod_targets
|
58
58
|
|
59
|
-
# @return [Array<
|
59
|
+
# @return [Array<Specification>] The specifications used by this aggregate target.
|
60
|
+
#
|
61
|
+
def specs
|
62
|
+
pod_targets.map(&:specs).flatten
|
63
|
+
end
|
64
|
+
|
65
|
+
# @return [Array<Specification::Consumer>] The consumers of the Pod.
|
66
|
+
#
|
60
67
|
def spec_consumers
|
61
|
-
|
68
|
+
specs.map { |spec| spec.consumer(platform) }
|
62
69
|
end
|
63
70
|
|
64
71
|
# @return [Pathname] The absolute path of acknowledgements file.
|
@@ -49,5 +49,14 @@ module Pod
|
|
49
49
|
specs.first.root
|
50
50
|
end
|
51
51
|
|
52
|
+
# @return [Array<String>] The names of the Pods on which this target
|
53
|
+
# depends.
|
54
|
+
#
|
55
|
+
def dependencies
|
56
|
+
specs.map do |spec|
|
57
|
+
spec.consumer(platform).dependencies.map { |dep| dep.name }
|
58
|
+
end.flatten
|
59
|
+
end
|
60
|
+
|
52
61
|
end
|
53
62
|
end
|
data/lib/cocoapods/validator.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cocoapods-core
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
20
|
+
version: 0.22.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.
|
27
|
+
version: 0.22.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: claide
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - ~>
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
62
|
+
version: 0.8.0
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
69
|
+
version: 0.8.0
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: colored
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,6 +168,7 @@ extra_rdoc_files: []
|
|
168
168
|
files:
|
169
169
|
- lib/cocoapods/command/help.rb
|
170
170
|
- lib/cocoapods/command/inter_process_communication.rb
|
171
|
+
- lib/cocoapods/command/lib.rb
|
171
172
|
- lib/cocoapods/command/list.rb
|
172
173
|
- lib/cocoapods/command/outdated.rb
|
173
174
|
- lib/cocoapods/command/podfile_info.rb
|
@@ -236,20 +237,53 @@ post_install_message: |2+
|
|
236
237
|
|
237
238
|
CHANGELOG:
|
238
239
|
|
239
|
-
## 0.
|
240
|
-
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.21.0
|
241
|
-
• [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.21.0
|
242
|
-
• [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.7.
|
240
|
+
## 0.22.0
|
241
|
+
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.21.0...0.22.0)
|
242
|
+
• [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.21.0...0.22.0)
|
243
|
+
• [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.7.1...0.8.0)
|
243
244
|
|
244
|
-
######
|
245
|
+
###### Enhancements
|
246
|
+
|
247
|
+
* Added the `pod lib create` subcommand which allows to create a new Pod
|
248
|
+
adhering to the best practices. The template is still a bit primitive
|
249
|
+
and we encourage users to provide feedback by submitting patches and issues
|
250
|
+
to https://github.com/CocoaPods/CocoaPods.
|
251
|
+
[#850](https://github.com/CocoaPods/CocoaPods/issues/850)
|
252
|
+
|
253
|
+
* Added the `pod lib lint` subcommand which allows to lint the Pod stored
|
254
|
+
in the working directory (a pod spec in the root is needed).
|
255
|
+
[#850](https://github.com/CocoaPods/CocoaPods/issues/850)
|
256
|
+
|
257
|
+
* The dependencies of the targets of the Pods project are now made explicit.
|
258
|
+
[#1165](https://github.com/CocoaPods/CocoaPods/issues/1165)
|
259
|
+
|
260
|
+
* The size of the cache used for the git repos is now configurable. For more
|
261
|
+
details see
|
262
|
+
https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/config.rb#L7-L25
|
263
|
+
[#1159](https://github.com/CocoaPods/CocoaPods/issues/1159)
|
245
264
|
|
246
|
-
*
|
247
|
-
[#
|
265
|
+
* The copy resources shell script now aborts if any error occurs.
|
266
|
+
[#1098](https://github.com/CocoaPods/CocoaPods/issues/1098)
|
267
|
+
|
268
|
+
* The output of shell script build phases no longer includes environment
|
269
|
+
variables to reduce noise.
|
270
|
+
[#1122](https://github.com/CocoaPods/CocoaPods/issues/1122)
|
271
|
+
|
272
|
+
* CocoaPods no longer sets the deprecated `ALWAYS_SEARCH_USER_PATHS` build
|
273
|
+
setting.
|
274
|
+
|
275
|
+
###### Bug fixes
|
248
276
|
|
249
|
-
*
|
250
|
-
[#
|
277
|
+
* Pods whose head state changes now are correctly detected and reinstalled.
|
278
|
+
[#1160](https://github.com/CocoaPods/CocoaPods/issues/1160)
|
251
279
|
|
280
|
+
* Fixed the library reppresentation of the hooks which caused issues with the
|
281
|
+
`#copy_resources_script_path` method.
|
282
|
+
[#1157](https://github.com/CocoaPods/CocoaPods/issues/1157)
|
252
283
|
|
284
|
+
* Frameworks symlinks are not properly preserved by the copy resources script.
|
285
|
+
Thanks to Thomas Dohmke (ashtom) for the fix.
|
286
|
+
[#1063](https://github.com/CocoaPods/CocoaPods/issues/1063)
|
253
287
|
|
254
288
|
rdoc_options: []
|
255
289
|
require_paths:
|