cocoapods 0.28.0 → 0.29.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +125 -0
- data/LICENSE +2 -2
- data/README.md +5 -7
- data/lib/cocoapods/command.rb +0 -1
- data/lib/cocoapods/command/inter_process_communication.rb +3 -3
- data/lib/cocoapods/command/lib.rb +42 -28
- data/lib/cocoapods/command/push.rb +16 -0
- data/lib/cocoapods/command/search.rb +30 -4
- data/lib/cocoapods/command/spec.rb +18 -12
- data/lib/cocoapods/external_sources.rb +30 -0
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb +2 -0
- data/lib/cocoapods/generator/xcconfig/private_pod_xcconfig.rb +2 -2
- data/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb +2 -1
- data/lib/cocoapods/installer/analyzer.rb +2 -1
- data/lib/cocoapods/sandbox.rb +2 -2
- data/lib/cocoapods/sandbox/headers_store.rb +3 -2
- data/lib/cocoapods/sources_manager.rb +26 -13
- data/lib/cocoapods/user_interface.rb +6 -0
- data/lib/cocoapods/user_interface/error_report.rb +2 -1
- data/lib/cocoapods/validator.rb +61 -10
- metadata +94 -43
- data/lib/cocoapods/command/podfile_info.rb +0 -93
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f806cab8bc2752746de159e1e71a1831bf48c315
|
4
|
+
data.tar.gz: 5a5f8fea97afadf17f604a08788f89700337a76f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47c283374f24625f7d252dc4db3b7ccdac1e1152b27df9db6a89484dd93704c3bf45a4102de2faaefe1073a6299c22d3d6110c874e7642fc673f40765db89246
|
7
|
+
data.tar.gz: 285276f771120ecd53a774fd18fa3efd1a56afcb76f8583802df54174cc36829ab848a6055d4ce55f08bafe6e6ac0be0184bb524c88b2bd923eeb522ed758907
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,131 @@
|
|
2
2
|
|
3
3
|
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
|
4
4
|
|
5
|
+
## 0.29.0
|
6
|
+
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.28.0...0.29.0)
|
7
|
+
• [CocoaPods-core](https://github.com/CocoaPods/Core/compare/0.28.0...0.29.0)
|
8
|
+
• [cocoapods-downloader](https://github.com/CocoaPods/cocoapods-downloader/compare/0.2.0...0.3.0)
|
9
|
+
|
10
|
+
###### Breaking
|
11
|
+
|
12
|
+
* The command `podfile_info` is now a plugin offered by CocoaPods.
|
13
|
+
As a result, the command has been removed from CocoaPods.
|
14
|
+
[Joshua Kalpin](https://github.com/Kapin)
|
15
|
+
[#1589](https://github.com/CocoaPods/CocoaPods/issues/1589)
|
16
|
+
|
17
|
+
* JSON has been adopted as the format to store specifications. As a result
|
18
|
+
the `pod ipc spec` command returns a JSON representation and the YAML
|
19
|
+
specifications are not supported anymore. JSON specifications adopt the
|
20
|
+
`.podspec.json` extension.
|
21
|
+
[Fabio Pelosin](https://github.com/irrationalfab)
|
22
|
+
[#1568](https://github.com/CocoaPods/CocoaPods/pull/1568)
|
23
|
+
|
24
|
+
###### Enhancements
|
25
|
+
|
26
|
+
* Introduced `pod try` the easiest way to test the example project of a pod.
|
27
|
+
[Fabio Pelosin](https://github.com/irrationalfab)
|
28
|
+
[#1568](https://github.com/CocoaPods/CocoaPods/pull/1568)
|
29
|
+
|
30
|
+
* Pod headers are now provided to the user target as a system
|
31
|
+
header. This means that any warnings in a Pod's code will show
|
32
|
+
under its target in Xcode's build navigator, and never under the
|
33
|
+
user target.
|
34
|
+
[Swizzlr](https://github.com/swizzlr)
|
35
|
+
[#1596](https://github.com/CocoaPods/CocoaPods/pull/1596)
|
36
|
+
|
37
|
+
* Support LZMA2 compressed tarballs in the downloader.
|
38
|
+
[Kyle Fuller](https://github.com/kylef)
|
39
|
+
[cocoapods-downloader#5](https://github.com/CocoaPods/cocoapods-downloader/pull/5)
|
40
|
+
|
41
|
+
* Add Bazaar support for installing directly from a repo.
|
42
|
+
[Fred McCann](https://github.com/fmccann)
|
43
|
+
[#1632](https://github.com/CocoaPods/CocoaPods/pull/1632)
|
44
|
+
|
45
|
+
* The `pod search <query>` command now supports regular expressions
|
46
|
+
for the query parameter when searching using the option `--full`.
|
47
|
+
[Florian Hanke](https://github.com/floere)
|
48
|
+
[#1643](https://github.com/CocoaPods/CocoaPods/pull/1643)
|
49
|
+
|
50
|
+
* Pod lib lint now accepts multiple podspecs in the same folder.
|
51
|
+
[kra Larivain/OpenTable](https://github.com/opentable)
|
52
|
+
[#1635](https://github.com/CocoaPods/CocoaPods/pull/1635)
|
53
|
+
|
54
|
+
* The `pod push` command will now silently test the upcoming CocoaPods trunk
|
55
|
+
service. The service is only tested when pushing to the master repo and the
|
56
|
+
test doesn't affect the normal workflow.
|
57
|
+
[Fabio Pelosin](https://github.com/irrationalfab)
|
58
|
+
|
59
|
+
* The `pod search <query>` command now supports searching on cocoapods.org
|
60
|
+
when searching using the option `--web`. Options `--ios` and `--osx` are
|
61
|
+
fully supported.
|
62
|
+
[Florian Hanke](https://github.com/floere)
|
63
|
+
[#1643](https://github.com/CocoaPods/CocoaPods/pull/1682)
|
64
|
+
|
65
|
+
* The `pod search <query>` command now supports multiword queries when using
|
66
|
+
the `--web` option.
|
67
|
+
[Florian Hanke](https://github.com/floere)
|
68
|
+
[#1643](https://github.com/CocoaPods/CocoaPods/pull/1682)
|
69
|
+
|
70
|
+
###### Bug Fixes
|
71
|
+
|
72
|
+
* Fixed a bug which resulted in `pod lib lint` not being able to find the
|
73
|
+
headers.
|
74
|
+
[Fabio Pelosin](https://github.com/irrationalfab)
|
75
|
+
[#1566](https://github.com/CocoaPods/CocoaPods/issues/1566)
|
76
|
+
|
77
|
+
* Fixed the developer frameworks search paths so that
|
78
|
+
`$(SDKROOT)/Developer/Library/Frameworks` is used for iOS and
|
79
|
+
`$(DEVELOPER_LIBRARY_DIR)/Frameworks` is used for OS X.
|
80
|
+
[Kevin Wales](https://github.com/kwales)
|
81
|
+
[#1562](https://github.com/CocoaPods/CocoaPods/pull/1562)
|
82
|
+
|
83
|
+
* When updating the pod repos, repositories with unreachable remotes
|
84
|
+
are now ignored. This fixes an issue with certain private repositories.
|
85
|
+
[Joshua Kalpin](https://github.com/Kapin)
|
86
|
+
[#1595](https://github.com/CocoaPods/CocoaPods/pull/1595)
|
87
|
+
[#1571](https://github.com/CocoaPods/CocoaPods/issues/1571)
|
88
|
+
|
89
|
+
* The linter will now display an error if a Pod's name contains whitespace.
|
90
|
+
[Joshua Kalpin](https://github.com/Kapin)
|
91
|
+
[Core#39](https://github.com/CocoaPods/Core/pull/39)
|
92
|
+
[#1610](https://github.com/CocoaPods/CocoaPods/issues/1610)
|
93
|
+
|
94
|
+
* Having the silent flag enabled in the config will no longer cause issues
|
95
|
+
with `pod search`. In addition, the flag `--silent` is no longer supported
|
96
|
+
for the command.
|
97
|
+
[Joshua Kalpin](https://github.com/Kapin)
|
98
|
+
[#1627](https://github.com/CocoaPods/CocoaPods/pull/1627)
|
99
|
+
|
100
|
+
* The linter will now display an error if a framework ends with `.framework`
|
101
|
+
(i.e. `QuartzCore.framework`).
|
102
|
+
[Joshua Kalpin](https://github.com/Kapin)
|
103
|
+
[#1331](https://github.com/CocoaPods/CocoaPods/issues/1336)
|
104
|
+
[Core#45](https://github.com/CocoaPods/Core/pull/45)
|
105
|
+
|
106
|
+
* The linter will now display an error if a library ends with `.a` or `.dylib`
|
107
|
+
(i.e. `z.dylib`). It will also display an error if it begins with `lib`
|
108
|
+
(i.e. `libxml`).
|
109
|
+
[Joshua Kalpin](https://github.com/Kapin)
|
110
|
+
[Core#44](https://github.com/CocoaPods/Core/issues/44)
|
111
|
+
|
112
|
+
* The ARCHS build setting can come back as an array when more than one
|
113
|
+
architecture is specified.
|
114
|
+
[Carson McDonald](https://github.com/carsonmcdonald)
|
115
|
+
[#1628](https://github.com/CocoaPods/CocoaPods/issues/1628)
|
116
|
+
|
117
|
+
* Fixed all issues caused by `/tmp` being a symlink to `/private/tmp`.
|
118
|
+
This affected mostly `pod lib lint`, causing it to fail when the
|
119
|
+
Pod used `prefix_header_*` or when the pod headers imported headers
|
120
|
+
using the namespaced syntax (e.g. `#import <MyPod/Header.h>`).
|
121
|
+
[kra Larivain/OpenTable](https://github.com/opentable)
|
122
|
+
[#1514](https://github.com/CocoaPods/CocoaPods/pull/1514)
|
123
|
+
|
124
|
+
* Fixed an incorrect path being used in the example app Podfile generated by
|
125
|
+
`pod lib create`.
|
126
|
+
[Eloy Durán](https://github.com/alloy)
|
127
|
+
[cocoapods-try#5](https://github.com/CocoaPods/cocoapods-try/issues/5)
|
128
|
+
|
129
|
+
|
5
130
|
## 0.28.0
|
6
131
|
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.27.1...0.28.0)
|
7
132
|
• [CocoaPods-core](https://github.com/CocoaPods/Core/compare/0.27.1...0.28.0)
|
data/LICENSE
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
This project is licensed under the MIT license.
|
2
2
|
|
3
|
-
Copyright (c) 2011 -
|
4
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2011 - 2013 Eloy Durán <eloy.de.enige@gmail.com>
|
4
|
+
Copyright (c) 2012 - 2013 Fabio Pelosin <fabiopelosin@gmail.com>
|
5
5
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
|
1
|
+

|
2
2
|
|
3
|
-
###
|
3
|
+
### CocoaPods: The Objective-C dependency manager
|
4
4
|
|
5
5
|
[](https://travis-ci.org/CocoaPods/CocoaPods)
|
6
6
|
[](http://badge.fury.io/rb/cocoapods)
|
7
7
|
[](https://codeclimate.com/github/CocoaPods/CocoaPods)
|
8
8
|
|
9
|
-
CocoaPods manages dependencies for your Xcode
|
9
|
+
CocoaPods manages dependencies for your Xcode projects.
|
10
10
|
|
11
11
|
You specify the dependencies for your project in one easy text file. CocoaPods
|
12
12
|
resolves dependencies between libraries, fetches source code for the
|
@@ -17,10 +17,8 @@ Ultimately, the goal is to improve discoverability of, and engagement in, third
|
|
17
17
|
party open-source libraries, by creating a more centralized ecosystem.
|
18
18
|
|
19
19
|
Installing and updating CocoaPods is very easy. Don't miss the [Installation
|
20
|
-
guide](http://
|
21
|
-
[Getting started guide](http://
|
22
|
-
See the [NSScreencast](https://twitter.com/NSScreencast) episode about [using
|
23
|
-
CocoaPods](http://nsscreencast.com/episodes/5-cocoapods) for a quick overview.
|
20
|
+
guide](http://guides.cocoapods.org/using/getting-started.html#installation) and the
|
21
|
+
[Getting started guide](http://guides.cocoapods.org/using/getting-started.html).
|
24
22
|
|
25
23
|
|
26
24
|
## Sponsors
|
data/lib/cocoapods/command.rb
CHANGED
@@ -13,7 +13,6 @@ module Pod
|
|
13
13
|
require 'cocoapods/command/lib'
|
14
14
|
require 'cocoapods/command/list'
|
15
15
|
require 'cocoapods/command/outdated'
|
16
|
-
require 'cocoapods/command/podfile_info'
|
17
16
|
require 'cocoapods/command/project'
|
18
17
|
require 'cocoapods/command/push'
|
19
18
|
require 'cocoapods/command/repo'
|
@@ -13,8 +13,8 @@ module Pod
|
|
13
13
|
|
14
14
|
class Spec < IPC
|
15
15
|
|
16
|
-
self.summary = 'Converts a podspec to
|
17
|
-
self.description = 'Converts a podspec to
|
16
|
+
self.summary = 'Converts a podspec to JSON.'
|
17
|
+
self.description = 'Converts a podspec to JSON and prints it to STDOUT.'
|
18
18
|
self.arguments = 'PATH'
|
19
19
|
|
20
20
|
def initialize(argv)
|
@@ -29,7 +29,7 @@ module Pod
|
|
29
29
|
|
30
30
|
def run
|
31
31
|
spec = Specification.from_file(@path)
|
32
|
-
output_pipe.puts spec.
|
32
|
+
output_pipe.puts spec.to_json
|
33
33
|
end
|
34
34
|
|
35
35
|
end
|
@@ -44,6 +44,7 @@ module Pod
|
|
44
44
|
|
45
45
|
TEMPLATE_REPO = "https://github.com/CocoaPods/pod-template.git"
|
46
46
|
TEMPLATE_INFO_URL = "https://github.com/CocoaPods/pod-template"
|
47
|
+
CREATE_NEW_POD_INFO_URL = "http://guides.cocoapods.org/making/making-a-cocoapod"
|
47
48
|
|
48
49
|
# Clones the template from the remote in the working directory using
|
49
50
|
# the name of the Pod.
|
@@ -74,6 +75,7 @@ module Pod
|
|
74
75
|
#
|
75
76
|
def print_info
|
76
77
|
UI.puts "\nTo learn more about the template see `#{TEMPLATE_INFO_URL}`."
|
78
|
+
UI.puts "To learn more about creating a new pod, see `#{CREATE_NEW_POD_INFO_URL}`."
|
77
79
|
end
|
78
80
|
|
79
81
|
end
|
@@ -90,13 +92,18 @@ module Pod
|
|
90
92
|
def self.options
|
91
93
|
[ ["--quick", "Lint skips checks that would require to download and build the spec"],
|
92
94
|
["--only-errors", "Lint validates even if warnings are present"],
|
95
|
+
["--subspec=NAME","Lint validates only the given subspec"],
|
96
|
+
["--no-subspecs", "Lint skips validation of subspecs"],
|
93
97
|
["--no-clean", "Lint leaves the build directory intact for inspection"] ].concat(super)
|
94
98
|
end
|
95
99
|
|
96
100
|
def initialize(argv)
|
97
|
-
@quick
|
98
|
-
@only_errors
|
99
|
-
@clean
|
101
|
+
@quick = argv.flag?('quick')
|
102
|
+
@only_errors = argv.flag?('only-errors')
|
103
|
+
@clean = argv.flag?('clean', true)
|
104
|
+
@subspecs = argv.flag?('subspecs', true)
|
105
|
+
@only_subspec = argv.option('subspec')
|
106
|
+
@podspecs_paths = argv.arguments!
|
100
107
|
super
|
101
108
|
end
|
102
109
|
|
@@ -106,27 +113,31 @@ module Pod
|
|
106
113
|
|
107
114
|
def run
|
108
115
|
UI.puts
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
116
|
+
podspecs_to_lint.each do |podspec|
|
117
|
+
|
118
|
+
validator = Validator.new(podspec)
|
119
|
+
validator.local = true
|
120
|
+
validator.quick = @quick
|
121
|
+
validator.no_clean = !@clean
|
122
|
+
validator.only_errors = @only_errors
|
123
|
+
validator.no_subspecs = !@subspecs || @only_subspec
|
124
|
+
validator.only_subspec = @only_subspec
|
125
|
+
validator.validate
|
126
|
+
|
127
|
+
unless @clean
|
128
|
+
UI.puts "Pods project available at `#{validator.validation_dir}/Pods/Pods.xcodeproj` for inspection."
|
129
|
+
UI.puts
|
130
|
+
end
|
131
|
+
if validator.validated?
|
132
|
+
UI.puts "#{validator.spec.name} passed validation.".green
|
133
|
+
else
|
134
|
+
message = "#{validator.spec.name} did not pass validation."
|
135
|
+
if @clean
|
136
|
+
message << "\nYou can use the `--no-clean` option to inspect " \
|
137
|
+
"any issue."
|
138
|
+
end
|
139
|
+
raise Informative, message
|
128
140
|
end
|
129
|
-
raise Informative, message
|
130
141
|
end
|
131
142
|
end
|
132
143
|
|
@@ -142,11 +153,14 @@ module Pod
|
|
142
153
|
# @raise If no podspec is found.
|
143
154
|
# @raise If multiple podspecs are found.
|
144
155
|
#
|
145
|
-
def
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
156
|
+
def podspecs_to_lint
|
157
|
+
if !@podspecs_paths.empty? then
|
158
|
+
Array(@podspecs_paths)
|
159
|
+
else
|
160
|
+
podspecs = Pathname.glob(Pathname.pwd + '*.podspec{.yaml,}')
|
161
|
+
raise Informative, "Unable to find a podspec in the working directory" if podspecs.count.zero?
|
162
|
+
podspecs
|
163
|
+
end
|
150
164
|
end
|
151
165
|
|
152
166
|
end
|
@@ -42,6 +42,7 @@ module Pod
|
|
42
42
|
|
43
43
|
def run
|
44
44
|
validate_podspec_files
|
45
|
+
test_trunk
|
45
46
|
check_repo_status
|
46
47
|
update_repo
|
47
48
|
add_specs_to_repo
|
@@ -57,6 +58,21 @@ module Pod
|
|
57
58
|
extend Executable
|
58
59
|
executable :git
|
59
60
|
|
61
|
+
# @return [void] Silently test the CocoaPods trunk service.
|
62
|
+
#
|
63
|
+
def test_trunk
|
64
|
+
return unless @repo == "master"
|
65
|
+
require 'rest'
|
66
|
+
base_url = 'https://trunk.cocoapods.org/api/v1'
|
67
|
+
podspec_files.each do |spec_file|
|
68
|
+
spec = Pod::Specification.from_file(spec_file)
|
69
|
+
REST.post("#{base_url}/pods", spec.to_json, 'Content-Type' => 'application/json; charset=utf-8',
|
70
|
+
'Authorization' => "Token 9300632274827cd3e6dde24bf9c608c3")
|
71
|
+
end
|
72
|
+
rescue Exception
|
73
|
+
# Nothing
|
74
|
+
end
|
75
|
+
|
60
76
|
# Performs a full lint against the podspecs.
|
61
77
|
#
|
62
78
|
def validate_podspec_files
|
@@ -16,8 +16,9 @@ module Pod
|
|
16
16
|
["--full", "Search by name, summary, and description"],
|
17
17
|
["--stats", "Show additional stats (like GitHub watchers and forks)"],
|
18
18
|
["--ios", "Restricts the search to Pods supported on iOS"],
|
19
|
-
["--osx", "Restricts the search to Pods supported on OS X"]
|
20
|
-
|
19
|
+
["--osx", "Restricts the search to Pods supported on OS X"],
|
20
|
+
["--web", "Searches on cocoapods.org"]
|
21
|
+
].concat(super.reject { |option, _| option == '--silent' })
|
21
22
|
end
|
22
23
|
|
23
24
|
def initialize(argv)
|
@@ -25,7 +26,9 @@ module Pod
|
|
25
26
|
@stats = argv.flag?('stats')
|
26
27
|
@supported_on_ios = argv.flag?('ios')
|
27
28
|
@supported_on_osx = argv.flag?('osx')
|
28
|
-
@
|
29
|
+
@web = argv.flag?('web')
|
30
|
+
@query = argv.arguments! unless argv.arguments.empty?
|
31
|
+
config.silent = false
|
29
32
|
super
|
30
33
|
end
|
31
34
|
|
@@ -35,7 +38,29 @@ module Pod
|
|
35
38
|
end
|
36
39
|
|
37
40
|
def run
|
38
|
-
|
41
|
+
if @web
|
42
|
+
web_search
|
43
|
+
else
|
44
|
+
local_search
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
extend Executable
|
49
|
+
executable :open
|
50
|
+
|
51
|
+
def web_search
|
52
|
+
query_parameter = [
|
53
|
+
('on%3Aosx' if @supported_on_osx),
|
54
|
+
('on%3Aios' if @supported_on_ios),
|
55
|
+
@query
|
56
|
+
].compact.flatten.join('%20')
|
57
|
+
url = "http://cocoapods.org/?q=#{query_parameter}"
|
58
|
+
UI.puts("Opening #{url}")
|
59
|
+
open!(url)
|
60
|
+
end
|
61
|
+
|
62
|
+
def local_search
|
63
|
+
sets = SourcesManager.search_by_name(@query.join(' ').strip, @full_text_search)
|
39
64
|
if @supported_on_ios
|
40
65
|
sets.reject!{ |set| !set.specification.available_platforms.map(&:name).include?(:ios) }
|
41
66
|
end
|
@@ -56,6 +81,7 @@ module Pod
|
|
56
81
|
end
|
57
82
|
end
|
58
83
|
end
|
84
|
+
|
59
85
|
end
|
60
86
|
end
|
61
87
|
end
|
@@ -61,13 +61,17 @@ module Pod
|
|
61
61
|
def self.options
|
62
62
|
[ ["--quick", "Lint skips checks that would require to download and build the spec"],
|
63
63
|
["--only-errors", "Lint validates even if warnings are present"],
|
64
|
+
["--subspec=NAME","Lint validates only the given subspec"],
|
65
|
+
["--no-subspecs", "Lint skips validation of subspecs"],
|
64
66
|
["--no-clean", "Lint leaves the build directory intact for inspection"] ].concat(super)
|
65
67
|
end
|
66
68
|
|
67
69
|
def initialize(argv)
|
68
|
-
@quick
|
69
|
-
@only_errors
|
70
|
-
@clean
|
70
|
+
@quick = argv.flag?('quick')
|
71
|
+
@only_errors = argv.flag?('only-errors')
|
72
|
+
@clean = argv.flag?('clean', true)
|
73
|
+
@subspecs = argv.flag?('subspecs', true)
|
74
|
+
@only_subspec = argv.option('subspec')
|
71
75
|
@podspecs_paths = argv.arguments!
|
72
76
|
super
|
73
77
|
end
|
@@ -80,6 +84,8 @@ module Pod
|
|
80
84
|
validator.quick = @quick
|
81
85
|
validator.no_clean = !@clean
|
82
86
|
validator.only_errors = @only_errors
|
87
|
+
validator.no_subspecs = !@subspecs || @only_subspec
|
88
|
+
validator.only_subspec = @only_subspec
|
83
89
|
validator.validate
|
84
90
|
invalid_count += 1 unless validator.validated?
|
85
91
|
|
@@ -129,7 +135,7 @@ module Pod
|
|
129
135
|
end
|
130
136
|
|
131
137
|
def podspecs_tmp_dir
|
132
|
-
Pathname.new('/tmp/CocoaPods/Lint_podspec')
|
138
|
+
Pathname.new(File.join(Pathname.new('/tmp').realpath, '/CocoaPods/Lint_podspec'))
|
133
139
|
end
|
134
140
|
end
|
135
141
|
|
@@ -294,10 +300,10 @@ module Pod
|
|
294
300
|
UI.puts "#{ index + 1 }: #{ item }"
|
295
301
|
end
|
296
302
|
|
297
|
-
|
303
|
+
UI.puts message
|
298
304
|
|
299
|
-
index =
|
300
|
-
if index < 0 || index > array.count
|
305
|
+
index = UI.gets.chomp.to_i - 1
|
306
|
+
if index < 0 || index > array.count - 1
|
301
307
|
raise Informative, "#{ index + 1 } is invalid [1-#{ array.count }]"
|
302
308
|
else
|
303
309
|
index
|
@@ -490,10 +496,10 @@ Pod::Spec.new do |s|
|
|
490
496
|
# found CocoaPods accept just the names.
|
491
497
|
#
|
492
498
|
|
493
|
-
s.author
|
494
|
-
# s.authors
|
495
|
-
# s.author
|
496
|
-
|
499
|
+
s.author = { "#{data[:author_name]}" => "#{data[:author_email]}" }
|
500
|
+
# s.authors = { "#{data[:author_name]}" => "#{data[:author_email]}", "other author" => "email@address.com" }
|
501
|
+
# s.author = '#{data[:author_name]}', 'other author'
|
502
|
+
# s.social_media_url = "http://twitter.com/#{data[:author_name]}"
|
497
503
|
|
498
504
|
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
499
505
|
#
|
@@ -512,7 +518,7 @@ Pod::Spec.new do |s|
|
|
512
518
|
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
|
513
519
|
#
|
514
520
|
# Specify the location from where the source should be retrieved.
|
515
|
-
# Supports git, hg, svn and HTTP.
|
521
|
+
# Supports git, hg, bzr, svn and HTTP.
|
516
522
|
#
|
517
523
|
|
518
524
|
s.source = { :git => "#{data[:source_url]}", #{data[:ref_type]} => "#{data[:ref]}" }
|
@@ -16,6 +16,7 @@ module Pod
|
|
16
16
|
klass = if params.key?(:git) then GitSource
|
17
17
|
elsif params.key?(:svn) then SvnSource
|
18
18
|
elsif params.key?(:hg) then MercurialSource
|
19
|
+
elsif params.key?(:bzr) then BazaarSource
|
19
20
|
elsif params.key?(:podspec) then PodspecSource
|
20
21
|
elsif params.key?(:path) then PathSource
|
21
22
|
end
|
@@ -261,6 +262,35 @@ module Pod
|
|
261
262
|
|
262
263
|
#-------------------------------------------------------------------------#
|
263
264
|
|
265
|
+
# Provides support for fetching a specification file from a Bazaar
|
266
|
+
# source remote.
|
267
|
+
#
|
268
|
+
# Supports all the options of the downloader (is similar to the git key of
|
269
|
+
# `source` attribute of a specification).
|
270
|
+
#
|
271
|
+
# @note The podspec must be in the root of the repository and should have a
|
272
|
+
# name matching the one of the dependency.
|
273
|
+
#
|
274
|
+
class BazaarSource < AbstractExternalSource
|
275
|
+
|
276
|
+
# @see AbstractExternalSource#fetch
|
277
|
+
#
|
278
|
+
def fetch(sandbox)
|
279
|
+
pre_download(sandbox)
|
280
|
+
end
|
281
|
+
|
282
|
+
# @see AbstractExternalSource#description
|
283
|
+
#
|
284
|
+
def description
|
285
|
+
"from `#{params[:bzr]}`".tap do |description|
|
286
|
+
description << ", tag `#{params[:tag]}`" if params[:tag]
|
287
|
+
description << ", revision `#{params[:revision]}`" if params[:revision]
|
288
|
+
end
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
#-------------------------------------------------------------------------#
|
293
|
+
|
264
294
|
# Provides support for fetching a specification file from an URL. Can be
|
265
295
|
# http, file, etc.
|
266
296
|
#
|
@@ -44,11 +44,13 @@ module Pod
|
|
44
44
|
# @return [Xcodeproj::Config]
|
45
45
|
#
|
46
46
|
def generate
|
47
|
+
header_search_path_flags = target.sandbox.public_headers.search_paths.map {|path| '-isystem'+path}
|
47
48
|
@xcconfig = Xcodeproj::Config.new({
|
48
49
|
'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
|
49
50
|
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(target.sandbox.public_headers.search_paths),
|
50
51
|
'PODS_ROOT' => target.relative_pods_root,
|
51
52
|
'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1',
|
53
|
+
'OTHER_CFLAGS' => '$(inherited) ' + XCConfigHelper.quote(header_search_path_flags)
|
52
54
|
})
|
53
55
|
|
54
56
|
target.pod_targets.each do |pod_target|
|
@@ -47,11 +47,11 @@ module Pod
|
|
47
47
|
# @return [Xcodeproj::Config]
|
48
48
|
#
|
49
49
|
def generate
|
50
|
-
|
50
|
+
search_paths = target.build_headers.search_paths.concat(target.sandbox.public_headers.search_paths)
|
51
51
|
config = {
|
52
52
|
'OTHER_LDFLAGS' => XCConfigHelper.default_ld_flags(target),
|
53
53
|
'PODS_ROOT' => '${SRCROOT}',
|
54
|
-
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(
|
54
|
+
'HEADER_SEARCH_PATHS' => XCConfigHelper.quote(search_paths),
|
55
55
|
'GCC_PREPROCESSOR_DEFINITIONS' => 'COCOAPODS=1',
|
56
56
|
# 'USE_HEADERMAP' => 'NO'
|
57
57
|
}
|
@@ -103,9 +103,10 @@ module Pod
|
|
103
103
|
search_paths = xcconfig.attributes['FRAMEWORK_SEARCH_PATHS'] ||= ''
|
104
104
|
search_paths_to_add = []
|
105
105
|
search_paths_to_add << '$(inherited)'
|
106
|
-
search_paths_to_add << '"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
|
107
106
|
if platform == :ios
|
108
107
|
search_paths_to_add << '"$(SDKROOT)/Developer/Library/Frameworks"'
|
108
|
+
else
|
109
|
+
search_paths_to_add << '"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
|
109
110
|
end
|
110
111
|
search_paths_to_add.each do |search_path|
|
111
112
|
unless search_paths.include?(search_path)
|
@@ -461,7 +461,8 @@ module Pod
|
|
461
461
|
def compute_archs_for_target_definition(target_definition, user_targets)
|
462
462
|
archs = []
|
463
463
|
user_targets.each do |target|
|
464
|
-
|
464
|
+
target_archs = target.common_resolved_build_setting('ARCHS')
|
465
|
+
archs.concat(Array(target_archs))
|
465
466
|
end
|
466
467
|
|
467
468
|
archs = archs.compact.uniq.sort
|
data/lib/cocoapods/sandbox.rb
CHANGED
@@ -62,13 +62,13 @@ module Pod
|
|
62
62
|
# @param [String, Pathname] root @see root
|
63
63
|
#
|
64
64
|
def initialize(root)
|
65
|
-
|
65
|
+
FileUtils.mkdir_p(root)
|
66
|
+
@root = Pathname.new(root).realpath
|
66
67
|
@public_headers = HeadersStore.new(self, "Headers")
|
67
68
|
@predownloaded_pods = []
|
68
69
|
@head_pods = []
|
69
70
|
@checkout_sources = {}
|
70
71
|
@development_pods = {}
|
71
|
-
FileUtils.mkdir_p(@root)
|
72
72
|
end
|
73
73
|
|
74
74
|
# @return [Lockfile] the manifest which contains the information about the
|
@@ -9,7 +9,7 @@ module Pod
|
|
9
9
|
# @return [Pathname] the absolute path of this header directory.
|
10
10
|
#
|
11
11
|
def root
|
12
|
-
@sandbox.root + @relative_path
|
12
|
+
@root ||= @sandbox.root + @relative_path
|
13
13
|
end
|
14
14
|
|
15
15
|
# @return [Sandbox] the sandbox where this header directory is stored.
|
@@ -70,7 +70,8 @@ module Pod
|
|
70
70
|
namespaced_path.mkpath unless File.exist?(namespaced_path)
|
71
71
|
|
72
72
|
relative_header_paths.map do |relative_header_path|
|
73
|
-
|
73
|
+
absolute_source = (@sandbox.root + relative_header_path)
|
74
|
+
source = absolute_source.relative_path_from(namespaced_path)
|
74
75
|
Dir.chdir(namespaced_path) do
|
75
76
|
FileUtils.ln_sf(source, relative_header_path.basename)
|
76
77
|
end
|
@@ -61,16 +61,17 @@ module Pod
|
|
61
61
|
def search_by_name(query, full_text_search = false)
|
62
62
|
if full_text_search
|
63
63
|
set_names = []
|
64
|
+
query_regexp = /#{query}/i
|
64
65
|
updated_search_index.each do |name, set_data|
|
65
|
-
|
66
|
+
texts = [name]
|
66
67
|
if full_text_search
|
67
|
-
|
68
|
-
|
69
|
-
|
68
|
+
texts << set_data['authors'].to_s if set_data['authors']
|
69
|
+
texts << set_data['summary'] if set_data['summary']
|
70
|
+
texts << set_data['description'] if set_data['description']
|
70
71
|
end
|
71
|
-
set_names << name
|
72
|
+
set_names << name unless texts.grep(query_regexp).empty?
|
72
73
|
end
|
73
|
-
sets = set_names.sort.map { |name| aggregate.
|
74
|
+
sets = set_names.sort.map { |name| aggregate.representative_set(name) }
|
74
75
|
else
|
75
76
|
sets = aggregate.search_by_name(query, false)
|
76
77
|
end
|
@@ -142,33 +143,45 @@ module Pod
|
|
142
143
|
if source_name
|
143
144
|
specified_source = aggregate.all.find { |s| s.name == source_name }
|
144
145
|
raise Informative, "Unable to find the `#{source_name}` repo." unless specified_source
|
145
|
-
raise Informative, "The `#{source_name}` repo is not a git repo." unless git_repo?(specified_source.repo)
|
146
|
+
raise Informative, "The `#{source_name}` repo is not a git repo." unless git_repo?(specified_source.data_provider.repo)
|
146
147
|
sources = [specified_source]
|
147
148
|
else
|
148
|
-
sources = aggregate.all.select { |source| git_repo?(source.repo) }
|
149
|
+
sources = aggregate.all.select { |source| git_repo?(source.data_provider.repo) && git_remote_reachable?(source.data_provider.repo) }
|
149
150
|
end
|
150
151
|
|
151
152
|
sources.each do |source|
|
152
153
|
UI.section "Updating spec repo `#{source.name}`" do
|
153
|
-
Dir.chdir(source.repo) do
|
154
|
+
Dir.chdir(source.data_provider.repo) do
|
154
155
|
output = git!("pull")
|
155
156
|
UI.puts output if show_output && !config.verbose?
|
156
157
|
end
|
157
|
-
check_version_information(source.repo)
|
158
|
+
check_version_information(source.data_provider.repo)
|
158
159
|
end
|
159
160
|
end
|
160
161
|
end
|
161
162
|
|
163
|
+
# Returns whether a git repo's remote is reachable.
|
164
|
+
#
|
165
|
+
# @param [Pathname] dir
|
166
|
+
# The directory where the source is stored.
|
167
|
+
#
|
168
|
+
# @return [Bool] Whether the given source's remote is reachable.
|
169
|
+
#
|
170
|
+
def git_remote_reachable?(dir)
|
171
|
+
Dir.chdir(dir) { git('ls-remote') }
|
172
|
+
$?.success?
|
173
|
+
end
|
174
|
+
|
162
175
|
# Returns whether a source is a GIT repo.
|
163
176
|
#
|
164
177
|
# @param [Pathname] dir
|
165
178
|
# The directory where the source is stored.
|
166
179
|
#
|
167
|
-
# @return [Bool]
|
180
|
+
# @return [Bool] Whether the given source is a GIT repo.
|
168
181
|
#
|
169
182
|
def git_repo?(dir)
|
170
|
-
Dir.chdir(dir) {
|
171
|
-
$?.
|
183
|
+
Dir.chdir(dir) { git('rev-parse >/dev/null 2>&1') }
|
184
|
+
$?.success?
|
172
185
|
end
|
173
186
|
|
174
187
|
# Checks the version information of the source with the given directory.
|
@@ -240,6 +240,12 @@ module Pod
|
|
240
240
|
STDOUT.print(message) unless config.silent?
|
241
241
|
end
|
242
242
|
|
243
|
+
# gets input from $stdin
|
244
|
+
#
|
245
|
+
def gets
|
246
|
+
$stdin.gets
|
247
|
+
end
|
248
|
+
|
243
249
|
# Stores important warning to the user optionally followed by actions
|
244
250
|
# that the user should take. To print them use {#print_warnings}.
|
245
251
|
#
|
@@ -87,7 +87,8 @@ EOS
|
|
87
87
|
|
88
88
|
def repo_information
|
89
89
|
SourcesManager.all.map do |source|
|
90
|
-
|
90
|
+
next unless source.type == 'file system'
|
91
|
+
repo = source.data_provider.repo
|
91
92
|
Dir.chdir(repo) do
|
92
93
|
url = `git config --get remote.origin.url 2>&1`.strip
|
93
94
|
sha = `git rev-parse HEAD 2>&1`.strip
|
data/lib/cocoapods/validator.rb
CHANGED
@@ -46,7 +46,7 @@ module Pod
|
|
46
46
|
|
47
47
|
#-------------------------------------------------------------------------#
|
48
48
|
|
49
|
-
# Lints the specification adding a {
|
49
|
+
# Lints the specification adding a {Result} for any
|
50
50
|
# failed check to the {#results} list.
|
51
51
|
#
|
52
52
|
# @note This method shows immediately which pod is being processed and
|
@@ -56,13 +56,21 @@ module Pod
|
|
56
56
|
#
|
57
57
|
def validate
|
58
58
|
@results = []
|
59
|
-
|
59
|
+
|
60
|
+
# Replace default spec with a subspec if asked for
|
61
|
+
a_spec = spec
|
62
|
+
if spec && @only_subspec
|
63
|
+
a_spec = spec.subspec_by_name(@only_subspec)
|
64
|
+
@subspec_name = a_spec.name
|
65
|
+
end
|
66
|
+
|
67
|
+
UI.print " -> #{a_spec ? a_spec.name : file.basename}\r" unless config.silent?
|
60
68
|
$stdout.flush
|
61
69
|
|
62
70
|
perform_linting
|
63
|
-
perform_extensive_analysis if
|
71
|
+
perform_extensive_analysis(a_spec) if a_spec && !quick
|
64
72
|
|
65
|
-
UI.puts " -> ".send(result_color) << (
|
73
|
+
UI.puts " -> ".send(result_color) << (a_spec ? a_spec.to_s : file.basename.to_s)
|
66
74
|
print_results
|
67
75
|
validated?
|
68
76
|
end
|
@@ -79,12 +87,22 @@ module Pod
|
|
79
87
|
platform_message = "[OSX] "
|
80
88
|
end
|
81
89
|
|
90
|
+
subspecs_message = ""
|
91
|
+
if result.is_a?(Result)
|
92
|
+
subspecs = result.subspecs.uniq
|
93
|
+
if subspecs.count > 2
|
94
|
+
subspecs_message = "[" + subspecs[0..2].join(', ') + ", and more...] "
|
95
|
+
elsif subspecs.count > 0
|
96
|
+
subspecs_message = "[" + subspecs.join(',') + "] "
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
82
100
|
case result.type
|
83
101
|
when :error then type = "ERROR"
|
84
102
|
when :warning then type = "WARN"
|
85
103
|
when :note then type = "NOTE"
|
86
104
|
else raise "#{result.type}" end
|
87
|
-
UI.puts " - #{type.ljust(5)} | #{platform_message}#{result.message}"
|
105
|
+
UI.puts " - #{type.ljust(5)} | #{platform_message}#{subspecs_message}#{result.message}"
|
88
106
|
end
|
89
107
|
UI.puts
|
90
108
|
end
|
@@ -116,6 +134,14 @@ module Pod
|
|
116
134
|
#
|
117
135
|
attr_accessor :only_errors
|
118
136
|
|
137
|
+
# @return [String] name of the subspec to check, if nil all subspecs are checked.
|
138
|
+
#
|
139
|
+
attr_accessor :only_subspec
|
140
|
+
|
141
|
+
# @return [Bool] Whether the validator should validate all subspecs
|
142
|
+
#
|
143
|
+
attr_accessor :no_subspecs
|
144
|
+
|
119
145
|
#-------------------------------------------------------------------------#
|
120
146
|
|
121
147
|
# !@group Lint results
|
@@ -151,7 +177,7 @@ module Pod
|
|
151
177
|
# @return [Pathname] the temporary directory used by the linter.
|
152
178
|
#
|
153
179
|
def validation_dir
|
154
|
-
Pathname.new('/tmp
|
180
|
+
Pathname.new(File.join(Pathname.new('/tmp').realpath,'CocoaPods/Lint'))
|
155
181
|
end
|
156
182
|
|
157
183
|
#-------------------------------------------------------------------------#
|
@@ -167,9 +193,9 @@ module Pod
|
|
167
193
|
@results.concat(linter.results)
|
168
194
|
end
|
169
195
|
|
196
|
+
# Perform analysis for a given spec (or subspec)
|
170
197
|
#
|
171
|
-
|
172
|
-
def perform_extensive_analysis
|
198
|
+
def perform_extensive_analysis(spec)
|
173
199
|
spec.available_platforms.each do |platform|
|
174
200
|
UI.message "\n\n#{spec} - Analyzing on #{platform} platform.".green.reversed
|
175
201
|
@consumer = spec.consumer(platform)
|
@@ -179,9 +205,20 @@ module Pod
|
|
179
205
|
check_file_patterns
|
180
206
|
tear_down_validation_environment
|
181
207
|
end
|
208
|
+
perform_extensive_subspec_analysis(spec) unless @no_subspecs
|
209
|
+
end
|
210
|
+
|
211
|
+
# Recurively perform the extensive analysis on all subspecs
|
212
|
+
#
|
213
|
+
def perform_extensive_subspec_analysis(spec)
|
214
|
+
spec.subspecs.each do |subspec|
|
215
|
+
@subspec_name = subspec.name
|
216
|
+
perform_extensive_analysis(subspec)
|
217
|
+
end
|
182
218
|
end
|
183
219
|
|
184
220
|
attr_accessor :consumer
|
221
|
+
attr_accessor :subspec_name
|
185
222
|
|
186
223
|
def setup_validation_environment
|
187
224
|
validation_dir.rmtree if validation_dir.exist?
|
@@ -283,10 +320,24 @@ module Pod
|
|
283
320
|
def add_result(type, message)
|
284
321
|
result = results.find { |r| r.type == type && r.message == message }
|
285
322
|
unless result
|
286
|
-
result =
|
323
|
+
result = Result.new(type, message)
|
287
324
|
results << result
|
288
325
|
end
|
289
326
|
result.platforms << consumer.platform_name if consumer
|
327
|
+
result.subspecs << subspec_name if subspec_name && !result.subspecs.include?(subspec_name)
|
328
|
+
end
|
329
|
+
|
330
|
+
# Specialized Result to support subspecs aggregation
|
331
|
+
#
|
332
|
+
class Result < Specification::Linter::Result
|
333
|
+
|
334
|
+
def initialize(type, message)
|
335
|
+
super(type, message)
|
336
|
+
@subspecs = []
|
337
|
+
end
|
338
|
+
|
339
|
+
attr_reader :subspecs
|
340
|
+
|
290
341
|
end
|
291
342
|
|
292
343
|
#-------------------------------------------------------------------------#
|
@@ -302,7 +353,7 @@ module Pod
|
|
302
353
|
# in local mode.
|
303
354
|
#
|
304
355
|
def podfile_from_spec(platform_name, deployment_target)
|
305
|
-
name = spec.name
|
356
|
+
name = subspec_name ? subspec_name : spec.name
|
306
357
|
podspec = file.realpath
|
307
358
|
local = local?
|
308
359
|
podfile = Pod::Podfile.new do
|
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.29.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-
|
12
|
+
date: 2013-12-25 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.29.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.29.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: claide
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - ~>
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.
|
48
|
+
version: 0.3.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: 0.3.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: xcodeproj
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,6 +67,20 @@ dependencies:
|
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: 0.14.1
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: cocoapods-try-release-fix
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.1.1
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ~>
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 0.1.1
|
70
84
|
- !ruby/object:Gem::Dependency
|
71
85
|
name: colored
|
72
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,6 +157,20 @@ dependencies:
|
|
143
157
|
- - <
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: '4'
|
160
|
+
- !ruby/object:Gem::Dependency
|
161
|
+
name: nap
|
162
|
+
requirement: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ~>
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.5'
|
167
|
+
type: :runtime
|
168
|
+
prerelease: false
|
169
|
+
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ~>
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0.5'
|
146
174
|
- !ruby/object:Gem::Dependency
|
147
175
|
name: bacon
|
148
176
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,7 +206,6 @@ files:
|
|
178
206
|
- lib/cocoapods/command/lib.rb
|
179
207
|
- lib/cocoapods/command/list.rb
|
180
208
|
- lib/cocoapods/command/outdated.rb
|
181
|
-
- lib/cocoapods/command/podfile_info.rb
|
182
209
|
- lib/cocoapods/command/project.rb
|
183
210
|
- lib/cocoapods/command/push.rb
|
184
211
|
- lib/cocoapods/command/repo.rb
|
@@ -241,42 +268,66 @@ homepage: https://github.com/CocoaPods/CocoaPods
|
|
241
268
|
licenses:
|
242
269
|
- MIT
|
243
270
|
metadata: {}
|
244
|
-
post_install_message: "\nCHANGELOG:\n\n## 0.
|
245
|
-
[CocoaPods-core](https://github.com/CocoaPods/Core/compare/0.
|
246
|
-
|
247
|
-
|
248
|
-
\
|
249
|
-
as
|
250
|
-
|
251
|
-
|
252
|
-
\ [#
|
253
|
-
|
254
|
-
\
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
\
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
\ [
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
\ [#
|
277
|
-
|
278
|
-
|
279
|
-
\ [#
|
271
|
+
post_install_message: "\nCHANGELOG:\n\n## 0.29.0\n[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.28.0...0.29.0)\n•
|
272
|
+
[CocoaPods-core](https://github.com/CocoaPods/Core/compare/0.28.0...0.29.0)\n• [cocoapods-downloader](https://github.com/CocoaPods/cocoapods-downloader/compare/0.2.0...0.3.0)\n\n######
|
273
|
+
Breaking\n\n* The command `podfile_info` is now a plugin offered by CocoaPods.\n
|
274
|
+
\ As a result, the command has been removed from CocoaPods. \n [Joshua Kalpin](https://github.com/Kapin)\n
|
275
|
+
\ [#1589](https://github.com/CocoaPods/CocoaPods/issues/1589)\n\n* JSON has been
|
276
|
+
adopted as the format to store specifications. As a result\n the `pod ipc spec`
|
277
|
+
command returns a JSON representation and the YAML\n specifications are not supported
|
278
|
+
anymore. JSON specifications adopt the\n `.podspec.json` extension.\n [Fabio Pelosin](https://github.com/irrationalfab)\n
|
279
|
+
\ [#1568](https://github.com/CocoaPods/CocoaPods/pull/1568)\n\n###### Enhancements\n\n*
|
280
|
+
Introduced `pod try` the easiest way to test the example project of a pod. \n [Fabio
|
281
|
+
Pelosin](https://github.com/irrationalfab)\n [#1568](https://github.com/CocoaPods/CocoaPods/pull/1568)\n\n*
|
282
|
+
Pod headers are now provided to the user target as a system\n header. This means
|
283
|
+
that any warnings in a Pod's code will show\n under its target in Xcode's build
|
284
|
+
navigator, and never under the\n user target. \n [Swizzlr](https://github.com/swizzlr)\n
|
285
|
+
\ [#1596](https://github.com/CocoaPods/CocoaPods/pull/1596)\n\n* Support LZMA2 compressed
|
286
|
+
tarballs in the downloader. \n [Kyle Fuller](https://github.com/kylef)\n [cocoapods-downloader#5](https://github.com/CocoaPods/cocoapods-downloader/pull/5)\n\n*
|
287
|
+
Add Bazaar support for installing directly from a repo. \n [Fred McCann](https://github.com/fmccann)\n
|
288
|
+
\ [#1632](https://github.com/CocoaPods/CocoaPods/pull/1632)\n\n* The `pod search
|
289
|
+
<query>` command now supports regular expressions\n for the query parameter when
|
290
|
+
searching using the option `--full`. \n [Florian Hanke](https://github.com/floere)\n
|
291
|
+
\ [#1643](https://github.com/CocoaPods/CocoaPods/pull/1643)\n\n* Pod lib lint now
|
292
|
+
accepts multiple podspecs in the same folder. \n [kra Larivain/OpenTable](https://github.com/opentable)\n
|
293
|
+
\ [#1635](https://github.com/CocoaPods/CocoaPods/pull/1635)\n\n* The `pod push`
|
294
|
+
command will now silently test the upcoming CocoaPods trunk\n service. The service
|
295
|
+
is only tested when pushing to the master repo and the\n test doesn't affect the
|
296
|
+
normal workflow. \n [Fabio Pelosin](https://github.com/irrationalfab)\n\n* The
|
297
|
+
`pod search <query>` command now supports searching on cocoapods.org\n when searching
|
298
|
+
using the option `--web`. Options `--ios` and `--osx` are\n fully supported.\n
|
299
|
+
\ [Florian Hanke](https://github.com/floere)\n [#1643](https://github.com/CocoaPods/CocoaPods/pull/1682)\n\n*
|
300
|
+
The `pod search <query>` command now supports multiword queries when using\n the
|
301
|
+
`--web` option.\n [Florian Hanke](https://github.com/floere)\n [#1643](https://github.com/CocoaPods/CocoaPods/pull/1682)\n\n######
|
302
|
+
Bug Fixes\n\n* Fixed a bug which resulted in `pod lib lint` not being able to find
|
303
|
+
the\n headers. \n [Fabio Pelosin](https://github.com/irrationalfab)\n [#1566](https://github.com/CocoaPods/CocoaPods/issues/1566)\n\n*
|
304
|
+
Fixed the developer frameworks search paths so that\n `$(SDKROOT)/Developer/Library/Frameworks`
|
305
|
+
is used for iOS and\n `$(DEVELOPER_LIBRARY_DIR)/Frameworks` is used for OS X. \n
|
306
|
+
\ [Kevin Wales](https://github.com/kwales)\n [#1562](https://github.com/CocoaPods/CocoaPods/pull/1562)\n\n*
|
307
|
+
When updating the pod repos, repositories with unreachable remotes\n are now ignored.
|
308
|
+
This fixes an issue with certain private repositories. \n [Joshua Kalpin](https://github.com/Kapin)\n
|
309
|
+
\ [#1595](https://github.com/CocoaPods/CocoaPods/pull/1595)\n [#1571](https://github.com/CocoaPods/CocoaPods/issues/1571)\n\n*
|
310
|
+
The linter will now display an error if a Pod's name contains whitespace. \n [Joshua
|
311
|
+
Kalpin](https://github.com/Kapin)\n [Core#39](https://github.com/CocoaPods/Core/pull/39)\n
|
312
|
+
\ [#1610](https://github.com/CocoaPods/CocoaPods/issues/1610)\n \n* Having the
|
313
|
+
silent flag enabled in the config will no longer cause issues\n with `pod search`.
|
314
|
+
In addition, the flag `--silent` is no longer supported\n for the command. \n
|
315
|
+
\ [Joshua Kalpin](https://github.com/Kapin)\n [#1627](https://github.com/CocoaPods/CocoaPods/pull/1627)\n\n*
|
316
|
+
The linter will now display an error if a framework ends with `.framework`\n (i.e.
|
317
|
+
`QuartzCore.framework`). \n [Joshua Kalpin](https://github.com/Kapin)\n [#1331](https://github.com/CocoaPods/CocoaPods/issues/1336)\n
|
318
|
+
\ [Core#45](https://github.com/CocoaPods/Core/pull/45)\n\n* The linter will now
|
319
|
+
display an error if a library ends with `.a` or `.dylib`\n (i.e. `z.dylib`). It
|
320
|
+
will also display an error if it begins with `lib`\n (i.e. `libxml`). \n [Joshua
|
321
|
+
Kalpin](https://github.com/Kapin)\n [Core#44](https://github.com/CocoaPods/Core/issues/44)\n\n*
|
322
|
+
The ARCHS build setting can come back as an array when more than one\n architecture
|
323
|
+
is specified. \n [Carson McDonald](https://github.com/carsonmcdonald)\n [#1628](https://github.com/CocoaPods/CocoaPods/issues/1628)\n\n*
|
324
|
+
Fixed all issues caused by `/tmp` being a symlink to `/private/tmp`. \n This affected
|
325
|
+
mostly `pod lib lint`, causing it to fail when the \n Pod used `prefix_header_*`
|
326
|
+
or when the pod headers imported headers \n using the namespaced syntax (e.g. `#import
|
327
|
+
<MyPod/Header.h>`). \n [kra Larivain/OpenTable](https://github.com/opentable)\n
|
328
|
+
\ [#1514](https://github.com/CocoaPods/CocoaPods/pull/1514)\n\n* Fixed an incorrect
|
329
|
+
path being used in the example app Podfile generated by\n `pod lib create`.\n [Eloy
|
330
|
+
Durán](https://github.com/alloy)\n [cocoapods-try#5](https://github.com/CocoaPods/cocoapods-try/issues/5)\n\n\n"
|
280
331
|
rdoc_options: []
|
281
332
|
require_paths:
|
282
333
|
- lib
|
@@ -1,93 +0,0 @@
|
|
1
|
-
module Pod
|
2
|
-
class Command
|
3
|
-
|
4
|
-
class PodfileInfo < Command
|
5
|
-
|
6
|
-
self.summary = 'Shows information on installed Pods.'
|
7
|
-
self.description = <<-DESC
|
8
|
-
Shows information on installed Pods in current Project.
|
9
|
-
If optional `PODFILE_PATH` provided, the info will be shown for
|
10
|
-
that specific Podfile
|
11
|
-
DESC
|
12
|
-
self.arguments = '[PODFILE_PATH]'
|
13
|
-
|
14
|
-
def self.options
|
15
|
-
[
|
16
|
-
["--all", "Show information about all Pods with dependencies that are used in a project"],
|
17
|
-
["--md", "Output information in Markdown format"]
|
18
|
-
].concat(super)
|
19
|
-
end
|
20
|
-
|
21
|
-
def initialize(argv)
|
22
|
-
@info_all = argv.flag?('all')
|
23
|
-
@info_in_md = argv.flag?('md')
|
24
|
-
@info_license = argv.flag?('license')
|
25
|
-
@podfile_path = argv.shift_argument
|
26
|
-
super
|
27
|
-
end
|
28
|
-
|
29
|
-
def run
|
30
|
-
use_podfile = (@podfile_path || !config.lockfile)
|
31
|
-
|
32
|
-
if !use_podfile
|
33
|
-
UI.puts "Using lockfile" if config.verbose?
|
34
|
-
verify_lockfile_exists!
|
35
|
-
lockfile = config.lockfile
|
36
|
-
pods = lockfile.pod_names
|
37
|
-
if @info_all
|
38
|
-
deps = lockfile.dependencies.map{|d| d.name}
|
39
|
-
pods = (deps + pods).uniq
|
40
|
-
end
|
41
|
-
elsif @podfile_path
|
42
|
-
podfile = Pod::Podfile.from_file(@podfile_path)
|
43
|
-
pods = pods_from_podfile(podfile)
|
44
|
-
else
|
45
|
-
verify_podfile_exists!
|
46
|
-
podfile = config.podfile
|
47
|
-
pods = pods_from_podfile(podfile)
|
48
|
-
end
|
49
|
-
|
50
|
-
UI.puts "\nPods used:\n".yellow unless @info_in_md
|
51
|
-
pods_info(pods, @info_in_md)
|
52
|
-
end
|
53
|
-
|
54
|
-
def pods_from_podfile(podfile)
|
55
|
-
pods = []
|
56
|
-
podfile.root_target_definitions.each {|e| h = e.to_hash; pods << h['dependencies'] if h['dependencies']}
|
57
|
-
pods.flatten!
|
58
|
-
pods.collect! {|pod| (pod.is_a?(Hash)) ? pod.keys.first : pod}
|
59
|
-
end
|
60
|
-
|
61
|
-
def pods_info_hash(pods, keys=[:name, :homepage, :summary, :license])
|
62
|
-
pods_info = []
|
63
|
-
pods.each do |pod|
|
64
|
-
spec = (Pod::SourcesManager.search_by_name(pod).first rescue nil)
|
65
|
-
if spec
|
66
|
-
info = {}
|
67
|
-
keys.each { |k| info[k] = spec.specification.send(k) }
|
68
|
-
pods_info << info
|
69
|
-
else
|
70
|
-
|
71
|
-
end
|
72
|
-
|
73
|
-
end
|
74
|
-
pods_info
|
75
|
-
end
|
76
|
-
|
77
|
-
def pods_info(pods, in_md=false)
|
78
|
-
pods = pods_info_hash(pods, [:name, :homepage, :summary, :license])
|
79
|
-
|
80
|
-
pods.each do |pod|
|
81
|
-
if in_md
|
82
|
-
UI.puts "* [#{pod[:name]}](#{pod[:homepage]}) [#{pod[:license][:type]}] - #{pod[:summary]}"
|
83
|
-
else
|
84
|
-
UI.puts "- #{pod[:name]} [#{pod[:license][:type]}]".green
|
85
|
-
UI.puts " #{pod[:summary]}\n\n"
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
end
|
91
|
-
|
92
|
-
end
|
93
|
-
end
|