cocoapods 0.34.4 → 0.35.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +108 -1
- data/bin/pod +20 -2
- data/lib/cocoapods.rb +1 -0
- data/lib/cocoapods/command.rb +17 -11
- data/lib/cocoapods/command/repo/push.rb +1 -1
- data/lib/cocoapods/command/search.rb +1 -0
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/acknowledgements/plist.rb +4 -10
- data/lib/cocoapods/generator/header.rb +75 -0
- data/lib/cocoapods/generator/prefix_header.rb +15 -34
- data/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb +2 -2
- data/lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb +4 -1
- data/lib/cocoapods/hooks/library_representation.rb +1 -1
- data/lib/cocoapods/installer.rb +3 -3
- data/lib/cocoapods/installer/analyzer.rb +35 -37
- data/lib/cocoapods/installer/analyzer/locking_dependency_analyzer.rb +72 -0
- data/lib/cocoapods/installer/file_references_installer.rb +10 -9
- data/lib/cocoapods/installer/target_installer.rb +21 -21
- data/lib/cocoapods/installer/target_installer/aggregate_target_installer.rb +17 -17
- data/lib/cocoapods/installer/target_installer/pod_target_installer.rb +19 -19
- data/lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb +7 -3
- data/lib/cocoapods/project.rb +1 -1
- data/lib/cocoapods/resolver.rb +235 -98
- data/lib/cocoapods/resolver/lazy_specification.rb +60 -0
- data/lib/cocoapods/sandbox.rb +2 -1
- data/lib/cocoapods/sandbox/file_accessor.rb +26 -19
- data/lib/cocoapods/sandbox/headers_store.rb +12 -7
- data/lib/cocoapods/sources_manager.rb +6 -6
- data/lib/cocoapods/target.rb +1 -1
- data/lib/cocoapods/target/pod_target.rb +2 -2
- data/lib/cocoapods/user_interface.rb +1 -1
- data/lib/cocoapods/user_interface/error_report.rb +3 -0
- data/lib/cocoapods/validator.rb +2 -2
- metadata +21 -26
- data/lib/cocoapods/command/push.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f722fd7a025af675271c7e2e190028e95dfe302
|
4
|
+
data.tar.gz: 147981dc0fd9fd643e8de728c51a046e40e8f3e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f669a688c5aecf46ffc90979c34ef0d1fbd52be0c0b474d950955b8d3aa47180d930e208ca316e30d2bde568fe68dbf470f54c6de939c4c1deac5c4be00d113c
|
7
|
+
data.tar.gz: eea96ff3d30d6e05006d5fd31e7e705875b6914a541663b201b3094c333dd297f2a157f8ab853cba61b808570041e35c0ec07a3f3fac4b209559c61d0f32cd10
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,113 @@
|
|
2
2
|
|
3
3
|
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
|
4
4
|
|
5
|
+
## 0.35.0.rc1
|
6
|
+
|
7
|
+
##### Highlighted Enhancements That Need Testing
|
8
|
+
|
9
|
+
* The `Resolver` has been completely rewritten to use
|
10
|
+
[Molinillo](https://github.com/CocoaPods/Molinillo), an iterative dependency
|
11
|
+
resolution algorithm that automatically resolves version conflicts.
|
12
|
+
The order in which dependencies are declared in the `Podfile` no longer has
|
13
|
+
any effect on the resolution process.
|
14
|
+
|
15
|
+
You should ensure that `pod install`, `pod update` and `pod update [NAME]`
|
16
|
+
work as expected and install the correct versions of your pods during
|
17
|
+
this RC1 release.
|
18
|
+
[Samuel Giddins](https://github.com/segiddins)
|
19
|
+
[#978](https://github.com/CocoaPods/CocoaPods/issues/978)
|
20
|
+
[#2002](https://github.com/CocoaPods/CocoaPods/issues/2002)
|
21
|
+
|
22
|
+
##### Breaking
|
23
|
+
|
24
|
+
* Support for older versions of Ruby has been dropped and CocoaPods now depends
|
25
|
+
on Ruby 2.0.0 or greater. This is due to the release of Xcode 6.0 which has
|
26
|
+
dropped support for OS X 10.8, which results in the minimum version of
|
27
|
+
Ruby pre-installed on OS X now being 2.0.0.
|
28
|
+
|
29
|
+
If you are using a custom installation of Ruby older than 2.0.0, you
|
30
|
+
will need to update. Or even better, migrate to system Ruby.
|
31
|
+
[Kyle Fuller](https://github.com/kylef)
|
32
|
+
|
33
|
+
* Attempts to resolve circular dependencies will now raise an exception.
|
34
|
+
[Samuel Giddins](https://github.com/segiddins)
|
35
|
+
[Molinillo#6](https://github.com/CocoaPods/Molinillo/issues/6)
|
36
|
+
|
37
|
+
##### Enhancements
|
38
|
+
|
39
|
+
* The use of implicit sources has been un-deprecated. By default, all available
|
40
|
+
spec-repos will be used. There should only be a need to specify explicit
|
41
|
+
sources if you want to specifically _exclude_ certain spec-repos, such as the
|
42
|
+
`master` spec-repo, if you want to declare the order of spec look-up
|
43
|
+
precedence, or if you want other users of a Podfile to automatically have a
|
44
|
+
spec-repo cloned on `pod install`.
|
45
|
+
[Eloy Durán](https://github.com/alloy)
|
46
|
+
|
47
|
+
* The `pod push` command has been removed as it has been deprecated in favour of
|
48
|
+
`pod repo push` in CocoaPods 0.33.
|
49
|
+
[Fabio Pelosin](https://github.com/fabiopelosin)
|
50
|
+
|
51
|
+
* Refactorings in preparation to framework support, which could break usage
|
52
|
+
of the Hooks API.
|
53
|
+
[Marius Rackwitz](https://github.com/mrackwitz)
|
54
|
+
[#2461](https://github.com/CocoaPods/CocoaPods/issues/2461)
|
55
|
+
|
56
|
+
* Implicit dependencies are now locked, so simply running `pod install` will not
|
57
|
+
cause them to be updated when they shouldn't be.
|
58
|
+
[Samuel Giddins](https://github.com/segiddins)
|
59
|
+
[#2318](https://github.com/CocoaPods/CocoaPods/issues/2318)
|
60
|
+
[#2506](https://github.com/CocoaPods/CocoaPods/issues/2506)
|
61
|
+
|
62
|
+
* Pre-release versions are only considered in the resolution process when there
|
63
|
+
are dependencies that explicitly reference pre-release requirements.
|
64
|
+
[Samuel Giddins](https://github.com/segiddins)
|
65
|
+
[#1489](https://github.com/CocoaPods/CocoaPods/issues/1489)
|
66
|
+
|
67
|
+
* Only setup the master specs repo if required.
|
68
|
+
[Daniel Tomlinson](https://github.com/DanielTomlinson)
|
69
|
+
[#2562](https://github.com/CocoaPods/CocoaPods/issues/2562)
|
70
|
+
|
71
|
+
* `Sandbox::FileAccessor` now optionally includes expanded paths of headers of
|
72
|
+
vendored frameworks in `public_headers`.
|
73
|
+
[Eloy Durán](https://github.com/alloy)
|
74
|
+
[#2722](https://github.com/CocoaPods/CocoaPods/pull/2722)
|
75
|
+
|
76
|
+
* Analysis is now halted and the user informed when there are multiple different
|
77
|
+
external sources for dependencies with the same root name.
|
78
|
+
The user is also now warned when there are duplicate dependencies in the
|
79
|
+
Podfile.
|
80
|
+
[Samuel Giddins](https://github.com/segiddins)
|
81
|
+
[#2738](https://github.com/CocoaPods/CocoaPods/issues/2738)
|
82
|
+
|
83
|
+
* Multiple subspecs that point to the same external dependency will now only
|
84
|
+
cause that external source to be fetched once.
|
85
|
+
[Samuel Giddins](https://github.com/segiddins)
|
86
|
+
[#2743](https://github.com/CocoaPods/CocoaPods/issues/2743)
|
87
|
+
|
88
|
+
##### Bug Fixes
|
89
|
+
|
90
|
+
* Fixes an issue in the `XCConfigIntegrator` where not all targets that need
|
91
|
+
integration were being integrated, but were getting incorrect warnings about
|
92
|
+
the user having specified a custom base configuration.
|
93
|
+
[Eloy Durán](https://github.com/alloy)
|
94
|
+
[2752](https://github.com/CocoaPods/CocoaPods/issues/2752)
|
95
|
+
|
96
|
+
* Do not try to clone spec-repos in `/`.
|
97
|
+
[Eloy Durán](https://github.com/alloy)
|
98
|
+
[#2723](https://github.com/CocoaPods/CocoaPods/issues/2723)
|
99
|
+
|
100
|
+
* Improved sanitizing of configuration names which have a numeric prefix.
|
101
|
+
[Steffen Matthischke](https://github.com/HeEAaD)
|
102
|
+
[#2700](https://github.com/CocoaPods/CocoaPods/pull/2700)
|
103
|
+
|
104
|
+
* Fixes an issues where headers from a podspec with one platform are exposed to
|
105
|
+
targets with a different platform. The headers are now only exposed to the
|
106
|
+
targets with the same platform.
|
107
|
+
[Michael Melanson](https://github.com/michaelmelanson)
|
108
|
+
[Kyle Fuller](https://github.com/kylef)
|
109
|
+
[#1249](https://github.com/CocoaPods/CocoaPods/issues/1249)
|
110
|
+
|
111
|
+
|
5
112
|
## 0.34.4
|
6
113
|
|
7
114
|
##### Bug Fixes
|
@@ -80,7 +187,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
|
|
80
187
|
|
81
188
|
* Allow the `Validator` to only use specific sources.
|
82
189
|
Allows customizable source for `pod spec lint` and `pod lib lint`,
|
83
|
-
with both defaulting to `master`.
|
190
|
+
with both defaulting to `master`.
|
84
191
|
[Samuel Giddins](https://github.com/segiddins)
|
85
192
|
[#2543](https://github.com/CocoaPods/CocoaPods/issues/2543)
|
86
193
|
[cocoapods-trunk#28](https://github.com/CocoaPods/cocoapods-trunk/issues/28)
|
data/bin/pod
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
if
|
3
|
+
if Encoding.default_external != Encoding::UTF_8
|
4
4
|
puts "\e[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding."
|
5
5
|
if ENV['TRAVIS']
|
6
6
|
puts <<-DOC
|
@@ -30,4 +30,22 @@ end
|
|
30
30
|
STDOUT.sync = true if ENV['CP_STDOUT_SYNC'] == 'TRUE'
|
31
31
|
|
32
32
|
require 'cocoapods'
|
33
|
-
|
33
|
+
|
34
|
+
if profile_filename = ENV['PROFILE']
|
35
|
+
require 'ruby-prof'
|
36
|
+
reporter = case (profile_extname = File.extname(profile_filename))
|
37
|
+
when '.txt'
|
38
|
+
RubyProf::FlatPrinterWithLineNumbers
|
39
|
+
when '.html'
|
40
|
+
RubyProf::GraphHtmlPrinter
|
41
|
+
when '.callgrind'
|
42
|
+
RubyProf::CallTreePrinter
|
43
|
+
else
|
44
|
+
raise "Unknown profiler format indicated by extension: #{profile_extname}"
|
45
|
+
end
|
46
|
+
File.open(profile_filename, 'w') do |io|
|
47
|
+
reporter.new(RubyProf.profile { Pod::Command.run(ARGV) }).print(io)
|
48
|
+
end
|
49
|
+
else
|
50
|
+
Pod::Command.run(ARGV)
|
51
|
+
end
|
data/lib/cocoapods.rb
CHANGED
@@ -56,6 +56,7 @@ module Pod
|
|
56
56
|
autoload :BridgeSupport, 'cocoapods/generator/bridge_support'
|
57
57
|
autoload :CopyResourcesScript, 'cocoapods/generator/copy_resources_script'
|
58
58
|
autoload :DummySource, 'cocoapods/generator/dummy_source'
|
59
|
+
autoload :Header, 'cocoapods/generator/header'
|
59
60
|
autoload :PrefixHeader, 'cocoapods/generator/prefix_header'
|
60
61
|
autoload :TargetEnvironmentHeader, 'cocoapods/generator/target_environment_header'
|
61
62
|
autoload :XCConfig, 'cocoapods/generator/xcconfig'
|
data/lib/cocoapods/command.rb
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
require 'colored'
|
2
2
|
require 'claide'
|
3
|
+
require 'molinillo/errors'
|
4
|
+
|
5
|
+
module Molinillo
|
6
|
+
class ResolverError
|
7
|
+
include CLAide::InformativeError
|
8
|
+
end
|
9
|
+
end
|
3
10
|
|
4
11
|
module Pod
|
5
12
|
class PlainInformative
|
@@ -18,9 +25,6 @@ module Pod
|
|
18
25
|
require 'cocoapods/command/spec'
|
19
26
|
require 'cocoapods/command/init'
|
20
27
|
|
21
|
-
# TODO: remove
|
22
|
-
require 'cocoapods/command/push'
|
23
|
-
|
24
28
|
self.abstract_command = true
|
25
29
|
self.command = 'pod'
|
26
30
|
self.version = VERSION
|
@@ -35,14 +39,6 @@ module Pod
|
|
35
39
|
].concat(super)
|
36
40
|
end
|
37
41
|
|
38
|
-
def self.parse(argv)
|
39
|
-
command = super
|
40
|
-
unless SourcesManager.master_repo_functional? || command.is_a?(Setup) || command.is_a?(Repo::Add) || ENV['SKIP_SETUP']
|
41
|
-
Setup.new(CLAide::ARGV.new([])).run
|
42
|
-
end
|
43
|
-
command
|
44
|
-
end
|
45
|
-
|
46
42
|
def self.run(argv)
|
47
43
|
help! 'You cannot run CocoaPods as root.' if Process.uid == 0
|
48
44
|
verify_git_version!
|
@@ -87,6 +83,16 @@ module Pod
|
|
87
83
|
end
|
88
84
|
end
|
89
85
|
|
86
|
+
# Ensure that the master spec repo exists
|
87
|
+
#
|
88
|
+
# @return [void]
|
89
|
+
#
|
90
|
+
def ensure_master_spec_repo_exists!
|
91
|
+
unless SourcesManager.master_repo_functional?
|
92
|
+
Setup.new(CLAide::ARGV.new([])).run
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
90
96
|
#-------------------------------------------------------------------------#
|
91
97
|
|
92
98
|
include Config::Mixin
|
@@ -106,7 +106,7 @@ module Pod
|
|
106
106
|
#
|
107
107
|
def check_repo_status
|
108
108
|
clean = Dir.chdir(repo_dir) { `git status --porcelain 2>&1` } == ''
|
109
|
-
raise Informative, "The repo `#{@repo}` is not clean" unless clean
|
109
|
+
raise Informative, "The repo `#{@repo}` at #{UI.path repo_dir} is not clean" unless clean
|
110
110
|
end
|
111
111
|
|
112
112
|
# Updates the git repo against the remote.
|
@@ -6,8 +6,7 @@ module Pod
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def save_as(path)
|
9
|
-
|
10
|
-
Xcodeproj.write_plist(plist, path)
|
9
|
+
Xcodeproj::PlistHelper.write(plist, path)
|
11
10
|
end
|
12
11
|
|
13
12
|
def plist
|
@@ -64,20 +63,15 @@ module Pod
|
|
64
63
|
|
65
64
|
# !@group Private methods
|
66
65
|
|
67
|
-
# Returns the sanitized text with UTF-8
|
68
|
-
# Ruby version >=1.9 else will return the text.
|
66
|
+
# Returns the sanitized text with UTF-8 invalid characters eliminated.
|
69
67
|
#
|
70
68
|
# @param [String] text
|
71
69
|
# the text we want to sanitize.
|
72
70
|
#
|
73
|
-
# @return [String] The sanitized
|
71
|
+
# @return [String] The sanitized UTF-8 text.
|
74
72
|
#
|
75
73
|
def sanitize_encoding(text)
|
76
|
-
|
77
|
-
text.encode('UTF-8', :invalid => :replace, :undef => :replace, :replace => '')
|
78
|
-
else
|
79
|
-
text
|
80
|
-
end
|
74
|
+
text.encode('UTF-8', :invalid => :replace, :undef => :replace, :replace => '')
|
81
75
|
end
|
82
76
|
|
83
77
|
#-----------------------------------------------------------------------#
|
@@ -0,0 +1,75 @@
|
|
1
|
+
module Pod
|
2
|
+
module Generator
|
3
|
+
# Generates a header file.
|
4
|
+
#
|
5
|
+
# According to the platform the header imports `UIKit/UIKit.h` or
|
6
|
+
# `Cocoa/Cocoa.h`.
|
7
|
+
#
|
8
|
+
class Header
|
9
|
+
# @return [Symbol] the platform for which the prefix header will be
|
10
|
+
# generated.
|
11
|
+
#
|
12
|
+
attr_reader :platform
|
13
|
+
|
14
|
+
# @return [Array<String>] The list of the headers to import.
|
15
|
+
#
|
16
|
+
attr_reader :imports
|
17
|
+
|
18
|
+
# @param [Symbol] platform
|
19
|
+
# @see platform
|
20
|
+
#
|
21
|
+
def initialize(platform)
|
22
|
+
@platform = platform
|
23
|
+
@imports = []
|
24
|
+
end
|
25
|
+
|
26
|
+
# Generates the contents of the header according to the platform.
|
27
|
+
#
|
28
|
+
# @note If the platform is iOS an import call to `UIKit/UIKit.h` is
|
29
|
+
# added to the top of the prefix header. For OS X `Cocoa/Cocoa.h`
|
30
|
+
# is imported.
|
31
|
+
#
|
32
|
+
# @return [String]
|
33
|
+
#
|
34
|
+
def generate
|
35
|
+
result = ""
|
36
|
+
result << generate_platform_import_header
|
37
|
+
|
38
|
+
result << "\n"
|
39
|
+
|
40
|
+
imports.each do |import|
|
41
|
+
result << %|#import "#{import}"\n|
|
42
|
+
end
|
43
|
+
|
44
|
+
result
|
45
|
+
end
|
46
|
+
|
47
|
+
# Generates and saves the header to the given path.
|
48
|
+
#
|
49
|
+
# @param [Pathname] path
|
50
|
+
# The path where the header should be stored.
|
51
|
+
#
|
52
|
+
# @return [void]
|
53
|
+
#
|
54
|
+
def save_as(path)
|
55
|
+
path.open('w') { |header| header.write(generate) }
|
56
|
+
end
|
57
|
+
|
58
|
+
#-----------------------------------------------------------------------#
|
59
|
+
|
60
|
+
protected
|
61
|
+
|
62
|
+
# Generates the contents of the header according to the platform.
|
63
|
+
#
|
64
|
+
# @note If the platform is iOS an import call to `UIKit/UIKit.h` is
|
65
|
+
# added to the top of the header. For OS X `Cocoa/Cocoa.h` is
|
66
|
+
# imported.
|
67
|
+
#
|
68
|
+
# @return [String]
|
69
|
+
#
|
70
|
+
def generate_platform_import_header
|
71
|
+
"#import #{platform == :ios ? '<UIKit/UIKit.h>' : '<Cocoa/Cocoa.h>'}\n"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -6,38 +6,26 @@ module Pod
|
|
6
6
|
# According to the platform the prefix header imports `UIKit/UIKit.h` or
|
7
7
|
# `Cocoa/Cocoa.h`.
|
8
8
|
#
|
9
|
-
class PrefixHeader
|
9
|
+
class PrefixHeader < Header
|
10
10
|
# @return [Array<FileAccessor>] The file accessors for which to generate
|
11
11
|
# the prefix header.
|
12
12
|
#
|
13
13
|
attr_reader :file_accessors
|
14
14
|
|
15
|
-
# @
|
16
|
-
#
|
15
|
+
# @param [Array<FileAccessor>] file_accessors
|
16
|
+
# @see file_accessors
|
17
17
|
#
|
18
|
-
|
19
|
-
|
20
|
-
# @return [Array<String>] The list of the headers to import (with
|
21
|
-
# quotes).
|
22
|
-
#
|
23
|
-
attr_reader :imports
|
24
|
-
|
25
|
-
# @param [Platform] platform @see platform
|
26
|
-
# @param [Array<LocalPod>] consumers @see consumers
|
18
|
+
# @param [Platform] platform
|
19
|
+
# @see platform
|
27
20
|
#
|
28
21
|
def initialize(file_accessors, platform)
|
29
22
|
@file_accessors = file_accessors
|
30
|
-
|
31
|
-
@imports = []
|
23
|
+
super platform
|
32
24
|
end
|
33
25
|
|
34
26
|
# Generates the contents of the prefix header according to the platform
|
35
27
|
# and the pods.
|
36
28
|
#
|
37
|
-
# @note If the platform is iOS an import call to `UIKit/UIKit.h` is
|
38
|
-
# added to the top of the prefix header. For OS X `Cocoa/Cocoa.h`
|
39
|
-
# is imported.
|
40
|
-
#
|
41
29
|
# @note Only unique prefix_header_contents are added to the prefix
|
42
30
|
# header.
|
43
31
|
#
|
@@ -48,20 +36,12 @@ module Pod
|
|
48
36
|
# file_accessor.prefix_header.
|
49
37
|
#
|
50
38
|
def generate
|
51
|
-
result =
|
52
|
-
result << "#import #{platform == :ios ? '<UIKit/UIKit.h>' : '<Cocoa/Cocoa.h>'}\n"
|
53
|
-
result << "#endif\n"
|
54
|
-
|
55
|
-
imports.each do |import|
|
56
|
-
result << %(\n#import "#{import}")
|
57
|
-
end
|
39
|
+
result = super
|
58
40
|
|
59
41
|
unique_prefix_header_contents = file_accessors.map do |file_accessor|
|
60
42
|
file_accessor.spec_consumer.prefix_header_contents
|
61
43
|
end.compact.uniq
|
62
44
|
|
63
|
-
result << "\n"
|
64
|
-
|
65
45
|
unique_prefix_header_contents.each do |prefix_header_contents|
|
66
46
|
result << prefix_header_contents
|
67
47
|
result << "\n"
|
@@ -75,15 +55,16 @@ module Pod
|
|
75
55
|
result
|
76
56
|
end
|
77
57
|
|
78
|
-
|
79
|
-
|
80
|
-
#
|
81
|
-
# the path where the prefix header should be stored.
|
58
|
+
protected
|
59
|
+
|
60
|
+
# Generates the contents of the header according to the platform.
|
82
61
|
#
|
83
|
-
# @return [
|
62
|
+
# @return [String]
|
84
63
|
#
|
85
|
-
def
|
86
|
-
|
64
|
+
def generate_platform_import_header
|
65
|
+
result = "#ifdef __OBJC__\n"
|
66
|
+
result << super
|
67
|
+
result << "#endif\n"
|
87
68
|
end
|
88
69
|
end
|
89
70
|
end
|