cocoapods 0.13.0 → 0.14.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +97 -16
- data/lib/cocoapods.rb +2 -1
- data/lib/cocoapods/command.rb +46 -19
- data/lib/cocoapods/command/install.rb +11 -12
- data/lib/cocoapods/command/linter.rb +3 -1
- data/lib/cocoapods/command/outdated.rb +51 -0
- data/lib/cocoapods/command/push.rb +6 -6
- data/lib/cocoapods/command/setup.rb +1 -1
- data/lib/cocoapods/command/spec.rb +1 -1
- data/lib/cocoapods/command/update.rb +21 -0
- data/lib/cocoapods/config.rb +14 -1
- data/lib/cocoapods/dependency.rb +56 -13
- data/lib/cocoapods/downloader/git.rb +1 -0
- data/lib/cocoapods/downloader/subversion.rb +6 -2
- data/lib/cocoapods/installer.rb +48 -64
- data/lib/cocoapods/local_pod.rb +50 -12
- data/lib/cocoapods/lockfile.rb +267 -0
- data/lib/cocoapods/podfile.rb +4 -0
- data/lib/cocoapods/project.rb +9 -4
- data/lib/cocoapods/resolver.rb +164 -20
- data/lib/cocoapods/specification.rb +11 -13
- data/lib/cocoapods/specification/set.rb +10 -13
- data/lib/cocoapods/version.rb +19 -2
- metadata +7 -4
data/CHANGELOG.md
CHANGED
@@ -1,17 +1,84 @@
|
|
1
|
+
## Master
|
2
|
+
|
3
|
+
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.13.0...0.14.0.rc1) • [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.3.1...0.3.2)
|
4
|
+
|
5
|
+
###### Enhancements
|
6
|
+
|
7
|
+
- Improve installation process by preserving the installed versions of Pods
|
8
|
+
across installations and machines. A Pod is reinstalled if:
|
9
|
+
- the version required in the Podfile changes and becomes incompatible with
|
10
|
+
the installed one.
|
11
|
+
[#191](https://github.com/CocoaPods/CocoaPods/issues/191)
|
12
|
+
- the external source changes.
|
13
|
+
- the head status changes (from disabled to enabled or vice-versa).
|
14
|
+
|
15
|
+
- Introduce `pod update` command that installs the dependencies of the Podfile
|
16
|
+
**ignoring** the lockfile `Podfile.lock`.
|
17
|
+
[#131](https://github.com/CocoaPods/CocoaPods/issues/131)
|
18
|
+
|
19
|
+
- Introduce `pod outdated` command that shows the pods with known updates.
|
20
|
+
|
21
|
+
- Add `:local` option for dependencies which will use the source files directly
|
22
|
+
from a local directory. This is usually used for libraries that are being
|
23
|
+
developed in parallel to the end product (application/library).
|
24
|
+
[#458](https://github.com/CocoaPods/CocoaPods/issues/458),
|
25
|
+
[#415](https://github.com/CocoaPods/CocoaPods/issues/415),
|
26
|
+
[#156](https://github.com/CocoaPods/CocoaPods/issues/156).
|
27
|
+
|
28
|
+
- Folders of Pods which are no longer required are removed during installation.
|
29
|
+
[#298](https://github.com/CocoaPods/CocoaPods/issues/298)
|
30
|
+
|
31
|
+
- Add meaningful error messages for when:
|
32
|
+
- a podspec can’t be found in the root of an external source.
|
33
|
+
[#385](https://github.com/CocoaPods/CocoaPods/issues/385),
|
34
|
+
[#338](https://github.com/CocoaPods/CocoaPods/issues/338),
|
35
|
+
[#337](https://github.com/CocoaPods/CocoaPods/issues/337).
|
36
|
+
- a subspec name is misspelled.
|
37
|
+
[#327](https://github.com/CocoaPods/CocoaPods/issues/327)
|
38
|
+
- an unrecognized command and/or argument is provided.
|
39
|
+
|
40
|
+
- The subversion downloader now does an export instead of a checkout, which
|
41
|
+
makes it play nicer with SCMs that store metadata in each directory.
|
42
|
+
[#245](https://github.com/CocoaPods/CocoaPods/issues/245)
|
43
|
+
|
44
|
+
###### Bug fixes
|
45
|
+
|
46
|
+
- The git cache now fetches the tags from the remote if it can’t find the
|
47
|
+
reference.
|
48
|
+
- Xcodeproj now builds on 10.6.8 and Travis CI without symlinking headers.
|
49
|
+
- Only try to install, add source files to the project, and clean a Pod once.
|
50
|
+
[#376](https://github.com/CocoaPods/CocoaPods/issues/376)
|
51
|
+
|
52
|
+
###### Notes
|
53
|
+
|
54
|
+
- External Pods might be reinstalled due to the migration to the new
|
55
|
+
`Podfile.lock`.
|
56
|
+
- The SCM reference of head Pods is not preserved across machines.
|
57
|
+
- Pods whose inline specification changed are not detected as modified. As a
|
58
|
+
workaround, remove their folder stored in `Pods`.
|
59
|
+
- Pods whose specification changed are not detected as modified. As a
|
60
|
+
workaround, remove their folder stored in `Pods`.
|
61
|
+
|
62
|
+
|
1
63
|
## 0.13.0
|
2
64
|
|
3
65
|
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.12.0...0.13.0)
|
4
66
|
|
5
67
|
###### Enhancements
|
6
68
|
|
7
|
-
- Add Podfile `podspec` which allows to use the dependencies of a podspec file.
|
8
|
-
|
69
|
+
- Add Podfile `podspec` which allows to use the dependencies of a podspec file.
|
70
|
+
[#162](https://github.com/CocoaPods/CocoaPods/issues/162)
|
71
|
+
- Check if any of the build settings defined in the xcconfig files is
|
72
|
+
overridden. [#92](https://github.com/CocoaPods/CocoaPods/issues/92)
|
9
73
|
- The Linter now checks that there are no compiler flags that disable warnings.
|
10
74
|
|
11
75
|
###### Bug fixes
|
12
76
|
|
13
|
-
- The final project isn’t affected anymore by the `inhibit_all_warnings!`
|
14
|
-
|
77
|
+
- The final project isn’t affected anymore by the `inhibit_all_warnings!`
|
78
|
+
option.
|
79
|
+
- Support for redirects while using podspec from an url.
|
80
|
+
[#462](https://github.com/CocoaPods/CocoaPods/issues/462)
|
81
|
+
|
15
82
|
|
16
83
|
## 0.12.0
|
17
84
|
|
@@ -19,14 +86,20 @@
|
|
19
86
|
|
20
87
|
###### Enhancements
|
21
88
|
|
22
|
-
- The documentation is generated using the public headers if they are
|
23
|
-
|
89
|
+
- The documentation is generated using the public headers if they are
|
90
|
+
specified.
|
91
|
+
- In case of a download failure the installation is aborted and the error
|
92
|
+
message is shown.
|
24
93
|
- Git submodules are initialized only if requested.
|
25
|
-
- Don’t impose a certain structure of the user’s project by raising if no
|
94
|
+
- Don’t impose a certain structure of the user’s project by raising if no
|
95
|
+
‘Frameworks’ group exists.
|
96
|
+
[#431](https://github.com/CocoaPods/CocoaPods/pull/431)
|
26
97
|
- Support for GitHub Gists in the linter.
|
27
98
|
- Allow specifying ARC settings in subspecs.
|
28
|
-
- Add Podfile `inhibit_all_warnings!` which will inhibit all warnings from the
|
29
|
-
|
99
|
+
- Add Podfile `inhibit_all_warnings!` which will inhibit all warnings from the
|
100
|
+
Pods library. [#209](https://github.com/CocoaPods/CocoaPods/issues/209)
|
101
|
+
- Make the Pods Xcode project prettier by namespacing subspecs in nested
|
102
|
+
groups. [#466](https://github.com/CocoaPods/CocoaPods/pull/466)
|
30
103
|
|
31
104
|
|
32
105
|
## 0.11.1
|
@@ -36,7 +109,8 @@
|
|
36
109
|
###### Bug fixes
|
37
110
|
|
38
111
|
- Fixed a crash related to subspecs without header files. [#449]
|
39
|
-
- Git submodules are loaded after the appropriate referenced is checked out and
|
112
|
+
- Git submodules are loaded after the appropriate referenced is checked out and
|
113
|
+
will be not loaded anymore in the cache. [#451]
|
40
114
|
- Fixed SVN support for the head version. [#432]
|
41
115
|
|
42
116
|
|
@@ -49,7 +123,9 @@
|
|
49
123
|
- Added support for public headers. [#440]
|
50
124
|
- Added `pod repo lint`. [#423]
|
51
125
|
- Improved support for `:head` option and SVN repositories.
|
52
|
-
- When integrating Pods with a project without "Frameworks" group in root of
|
126
|
+
- When integrating Pods with a project without "Frameworks" group in root of
|
127
|
+
the project, raise an informative message.
|
128
|
+
[#431](https://github.com/CocoaPods/CocoaPods/pull/431)
|
53
129
|
- Dropped support for legacy `config.ios?` and `config.osx?`
|
54
130
|
|
55
131
|
###### Bug fixes
|
@@ -64,16 +140,21 @@
|
|
64
140
|
|
65
141
|
###### Enhancements
|
66
142
|
|
67
|
-
- Added a `--local-only` option to `pod push` so that developers can push
|
68
|
-
|
69
|
-
-
|
143
|
+
- Added a `--local-only` option to `pod push` so that developers can push
|
144
|
+
locally and test before pushing to a remote. [#405](http://git.io/0ILJEw)
|
145
|
+
- Added line number information for errors generated in the Podfile.
|
146
|
+
[#408](http://git.io/fWQvMg)
|
147
|
+
- Pods stored in git repositories now initialize submodules.
|
148
|
+
[#406](http://git.io/L9ssSw)
|
70
149
|
|
71
150
|
###### Bug fixes
|
72
151
|
|
73
152
|
- Removed note about the post install hook form the linter.
|
74
153
|
- Improved xcodebuild error detection in the linter.
|
75
|
-
- Ensure the git cache exists, before updating it, when trying to install the
|
76
|
-
|
154
|
+
- Ensure the git cache exists, before updating it, when trying to install the
|
155
|
+
‘bleeding edge’ of a pod. [#426](http://git.io/d4eqRA)
|
156
|
+
- Clean downloaded external pods **after** resolving and activating (sub)specs.
|
157
|
+
[#414](http://git.io/i77q_w)
|
77
158
|
- Support `tar.gz` as filename in a HTTP source. [#428](http://git.io/qhwKkA)
|
78
159
|
|
79
160
|
|
data/lib/cocoapods.rb
CHANGED
@@ -13,7 +13,7 @@ unless Gem::Version::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(
|
|
13
13
|
end
|
14
14
|
|
15
15
|
module Pod
|
16
|
-
VERSION = '0.
|
16
|
+
VERSION = '0.14.0.rc1'
|
17
17
|
|
18
18
|
class PlainInformative < StandardError
|
19
19
|
end
|
@@ -32,6 +32,7 @@ module Pod
|
|
32
32
|
autoload :Executable, 'cocoapods/executable'
|
33
33
|
autoload :Installer, 'cocoapods/installer'
|
34
34
|
autoload :LocalPod, 'cocoapods/local_pod'
|
35
|
+
autoload :Lockfile, 'cocoapods/lockfile'
|
35
36
|
autoload :Platform, 'cocoapods/platform'
|
36
37
|
autoload :Podfile, 'cocoapods/podfile'
|
37
38
|
autoload :Project, 'cocoapods/project'
|
data/lib/cocoapods/command.rb
CHANGED
@@ -6,20 +6,22 @@ module Pod
|
|
6
6
|
autoload :Install, 'cocoapods/command/install'
|
7
7
|
autoload :List, 'cocoapods/command/list'
|
8
8
|
autoload :Linter, 'cocoapods/command/linter'
|
9
|
+
autoload :Outdated, 'cocoapods/command/outdated'
|
9
10
|
autoload :Presenter, 'cocoapods/command/presenter'
|
10
11
|
autoload :Push, 'cocoapods/command/push'
|
11
12
|
autoload :Repo, 'cocoapods/command/repo'
|
12
13
|
autoload :Search, 'cocoapods/command/search'
|
13
14
|
autoload :Setup, 'cocoapods/command/setup'
|
14
15
|
autoload :Spec, 'cocoapods/command/spec'
|
16
|
+
autoload :Update, 'cocoapods/command/update'
|
15
17
|
|
16
18
|
class Help < Informative
|
17
|
-
def initialize(command_class, argv)
|
18
|
-
@command_class, @argv = command_class, argv
|
19
|
+
def initialize(command_class, argv, unrecognized_command = nil)
|
20
|
+
@command_class, @argv, @unrecognized_command = command_class, argv, unrecognized_command
|
19
21
|
end
|
20
22
|
|
21
23
|
def message
|
22
|
-
[
|
24
|
+
message = [
|
23
25
|
'',
|
24
26
|
@command_class.banner.gsub(/\$ pod (.*)/, '$ pod \1'.green),
|
25
27
|
'',
|
@@ -28,6 +30,9 @@ module Pod
|
|
28
30
|
options,
|
29
31
|
"\n",
|
30
32
|
].join("\n")
|
33
|
+
message << "[!] Unrecognized command: `#{@unrecognized_command}'\n".red if @unrecognized_command
|
34
|
+
message << "[!] Unrecognized argument#{@argv.count > 1 ? 's' : ''}: `#{@argv.join(' - ')}'\n".red unless @argv.empty?
|
35
|
+
message
|
31
36
|
end
|
32
37
|
|
33
38
|
private
|
@@ -48,10 +53,9 @@ module Pod
|
|
48
53
|
end
|
49
54
|
|
50
55
|
def self.banner
|
51
|
-
commands = ['install', 'list', 'push', 'repo', 'search', 'setup', 'spec'].sort
|
52
|
-
banner = "
|
53
|
-
commands.
|
54
|
-
banner
|
56
|
+
commands = ['install', 'update', 'outdated', 'list', 'push', 'repo', 'search', 'setup', 'spec'].sort
|
57
|
+
banner = "To see help for the available commands run:\n\n"
|
58
|
+
banner + commands.map { |cmd| " * $ pod #{cmd.green} --help" }.join("\n")
|
55
59
|
end
|
56
60
|
|
57
61
|
def self.options
|
@@ -76,9 +80,9 @@ module Pod
|
|
76
80
|
Config.instance.verbose? ? raise : exit(1)
|
77
81
|
|
78
82
|
rescue Exception => e
|
79
|
-
if e.is_a?(PlainInformative) # also catches Informative
|
83
|
+
if e.is_a?(PlainInformative) || ENV['COCOA_PODS_ENV'] == 'development' # also catches Informative
|
80
84
|
puts e.message
|
81
|
-
puts *e.backtrace if Config.instance.verbose?
|
85
|
+
puts *e.backtrace if Config.instance.verbose? || ENV['COCOA_PODS_ENV'] == 'development'
|
82
86
|
else
|
83
87
|
puts ErrorReport.report(e)
|
84
88
|
end
|
@@ -98,18 +102,22 @@ module Pod
|
|
98
102
|
|
99
103
|
String.send(:define_method, :colorize) { |string , _| string } if argv.option( '--no-color' )
|
100
104
|
|
101
|
-
command_class = case argv.shift_argument
|
102
|
-
when 'install'
|
103
|
-
when '
|
104
|
-
when '
|
105
|
-
when '
|
106
|
-
when '
|
107
|
-
when '
|
108
|
-
when '
|
105
|
+
command_class = case command_argument = argv.shift_argument
|
106
|
+
when 'install' then Install
|
107
|
+
when 'list' then List
|
108
|
+
when 'outdated' then Outdated
|
109
|
+
when 'push' then Push
|
110
|
+
when 'repo' then Repo
|
111
|
+
when 'search' then Search
|
112
|
+
when 'setup' then Setup
|
113
|
+
when 'spec' then Spec
|
114
|
+
when 'update' then Update
|
109
115
|
end
|
110
116
|
|
111
|
-
if
|
112
|
-
raise Help.new(
|
117
|
+
if command_class.nil?
|
118
|
+
raise Help.new(self, argv, command_argument)
|
119
|
+
elsif show_help
|
120
|
+
raise Help.new(command_class, argv)
|
113
121
|
else
|
114
122
|
command_class.new(argv)
|
115
123
|
end
|
@@ -123,6 +131,25 @@ module Pod
|
|
123
131
|
|
124
132
|
private
|
125
133
|
|
134
|
+
def verify_podfile_exists!
|
135
|
+
unless config.podfile
|
136
|
+
raise Informative, "No `Podfile' found in the current working directory."
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
def verify_lockfile_exists!
|
141
|
+
unless config.lockfile
|
142
|
+
raise Informative, "No `Podfile.lock' found in the current working directory, run `pod install'."
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
def update_spec_repos_if_necessary!
|
147
|
+
if @update_repo
|
148
|
+
print_title 'Updating Spec Repositories', true
|
149
|
+
Repo.new(ARGV.new(["update"])).run
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
126
153
|
def print_title(title, only_verbose = true)
|
127
154
|
if config.verbose?
|
128
155
|
puts "\n" + title.yellow
|
@@ -19,8 +19,7 @@ module Pod
|
|
19
19
|
|
20
20
|
This will configure the project to reference the Pods static library,
|
21
21
|
add a build configuration file, and add a post build script to copy
|
22
|
-
Pod resources.
|
23
|
-
}
|
22
|
+
Pod resources.}
|
24
23
|
end
|
25
24
|
|
26
25
|
def self.options
|
@@ -40,17 +39,17 @@ module Pod
|
|
40
39
|
super unless argv.empty?
|
41
40
|
end
|
42
41
|
|
43
|
-
def
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
print_title 'Updating Spec Repositories', true
|
50
|
-
Repo.new(ARGV.new(["update"])).run
|
51
|
-
end
|
42
|
+
def run_install_with_update(update)
|
43
|
+
sandbox = Sandbox.new(config.project_pods_root)
|
44
|
+
resolver = Resolver.new(config.podfile, config.lockfile, sandbox)
|
45
|
+
resolver.update_mode = update
|
46
|
+
Installer.new(resolver).install!
|
47
|
+
end
|
52
48
|
|
53
|
-
|
49
|
+
def run
|
50
|
+
verify_podfile_exists!
|
51
|
+
update_spec_repos_if_necessary!
|
52
|
+
run_install_with_update(false)
|
54
53
|
end
|
55
54
|
end
|
56
55
|
end
|
@@ -103,7 +103,9 @@ module Pod
|
|
103
103
|
def install_pod
|
104
104
|
podfile = podfile_from_spec
|
105
105
|
config.verbose
|
106
|
-
|
106
|
+
sandbox = Sandbox.new(config.project_pods_root)
|
107
|
+
resolver = Resolver.new(podfile, nil, sandbox)
|
108
|
+
installer = Installer.new(resolver)
|
107
109
|
installer.install!
|
108
110
|
@pod = installer.pods.find { |pod| pod.top_specification == spec }
|
109
111
|
config.silent
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module Pod
|
2
|
+
class Command
|
3
|
+
class Outdated < Command
|
4
|
+
def self.banner
|
5
|
+
%{Show outdated pods:
|
6
|
+
|
7
|
+
$ pod outdated
|
8
|
+
|
9
|
+
Shows the outdated pods in the current Podfile.lock, but only those from
|
10
|
+
spec repos, not those from local/external sources or `:head' versions.}
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.options
|
14
|
+
[
|
15
|
+
["--no-update", "Skip running `pod repo update` before install"],
|
16
|
+
].concat(super)
|
17
|
+
end
|
18
|
+
|
19
|
+
def initialize(argv)
|
20
|
+
@update_repo = !argv.option('--no-update')
|
21
|
+
super unless argv.empty?
|
22
|
+
end
|
23
|
+
|
24
|
+
def run
|
25
|
+
verify_podfile_exists!
|
26
|
+
verify_lockfile_exists!
|
27
|
+
update_spec_repos_if_necessary!
|
28
|
+
|
29
|
+
sandbox = Sandbox.new(config.project_pods_root)
|
30
|
+
resolver = Resolver.new(config.podfile, config.lockfile, sandbox)
|
31
|
+
resolver.update_mode = true
|
32
|
+
resolver.update_external_specs = false
|
33
|
+
resolver.resolve
|
34
|
+
|
35
|
+
names = resolver.pods_to_install - resolver.pods_from_external_sources
|
36
|
+
specs = resolver.specs.select do |spec|
|
37
|
+
names.include?(spec.name) && !spec.version.head?
|
38
|
+
end
|
39
|
+
|
40
|
+
if specs.empty?
|
41
|
+
puts "No updates are available.".yellow
|
42
|
+
else
|
43
|
+
puts "The following updates are available:".green
|
44
|
+
puts " - " << specs.join("\n - ") << "\n"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
|
@@ -4,14 +4,14 @@ module Pod
|
|
4
4
|
class Command
|
5
5
|
class Push < Command
|
6
6
|
def self.banner
|
7
|
-
|
7
|
+
%{Pushing new specifications to a spec-repo:
|
8
8
|
|
9
|
-
|
9
|
+
$ pod push REPO [NAME.podspec]
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
Validates NAME.podspec or `*.podspec' in the current working dir, creates
|
12
|
+
a directory and version folder for the pod in the local copy of
|
13
|
+
REPO (~/.cocoapods/[REPO]), copies the podspec file into the version directory,
|
14
|
+
and finally it pushes REPO to its remote.}
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.options
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Pod
|
2
|
+
class Command
|
3
|
+
class Update < Install
|
4
|
+
def self.banner
|
5
|
+
%{Updating dependencies of a project:
|
6
|
+
|
7
|
+
$ pod update
|
8
|
+
|
9
|
+
Updates all dependencies.}
|
10
|
+
end
|
11
|
+
|
12
|
+
def run
|
13
|
+
verify_podfile_exists!
|
14
|
+
verify_lockfile_exists!
|
15
|
+
update_spec_repos_if_necessary!
|
16
|
+
run_install_with_update(true)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|