cocoapods 0.14.0 → 0.15.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.
- data/CHANGELOG.md +42 -9
- data/bin/pod +4 -0
- data/lib/cocoapods.rb +2 -2
- data/lib/cocoapods/command.rb +2 -25
- data/lib/cocoapods/command/install.rb +1 -2
- data/lib/cocoapods/command/linter.rb +24 -4
- data/lib/cocoapods/command/list.rb +16 -11
- data/lib/cocoapods/command/outdated.rb +2 -4
- data/lib/cocoapods/command/push.rb +10 -10
- data/lib/cocoapods/command/repo.rb +22 -20
- data/lib/cocoapods/command/search.rb +6 -4
- data/lib/cocoapods/command/setup.rb +15 -14
- data/lib/cocoapods/command/spec.rb +17 -14
- data/lib/cocoapods/command/update.rb +9 -1
- data/lib/cocoapods/config.rb +12 -4
- data/lib/cocoapods/dependency.rb +18 -15
- data/lib/cocoapods/downloader/git.rb +41 -28
- data/lib/cocoapods/downloader/http.rb +10 -3
- data/lib/cocoapods/downloader/mercurial.rb +6 -4
- data/lib/cocoapods/downloader/subversion.rb +6 -2
- data/lib/cocoapods/executable.rb +6 -6
- data/lib/cocoapods/generator/acknowledgements/markdown.rb +1 -0
- data/lib/cocoapods/installer.rb +73 -57
- data/lib/cocoapods/installer/target_installer.rb +15 -11
- data/lib/cocoapods/installer/user_project_integrator.rb +25 -16
- data/lib/cocoapods/local_pod.rb +34 -12
- data/lib/cocoapods/podfile.rb +15 -0
- data/lib/cocoapods/resolver.rb +33 -39
- data/lib/cocoapods/source.rb +172 -48
- data/lib/cocoapods/specification.rb +48 -32
- data/lib/cocoapods/specification/set.rb +102 -34
- data/lib/cocoapods/specification/statistics.rb +1 -1
- data/lib/cocoapods/user_interface.rb +215 -0
- data/lib/cocoapods/user_interface/ui_pod.rb +130 -0
- metadata +7 -7
- data/lib/cocoapods/command/presenter.rb +0 -61
- data/lib/cocoapods/command/presenter/cocoa_pod.rb +0 -118
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,45 @@
|
|
1
1
|
## Master
|
2
2
|
|
3
|
-
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.
|
3
|
+
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.15.0...master)
|
4
|
+
|
5
|
+
## 0.15.0
|
6
|
+
|
7
|
+
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.14.0...0.15.0) • [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.3.3...0.3.4)
|
8
|
+
|
9
|
+
###### Enhancements
|
10
|
+
- Pod `install` will update the specs repo only if needed.
|
11
|
+
[#533](https://github.com/CocoaPods/CocoaPods/issues/533)
|
12
|
+
- CocoaPods now searches for the highest version of a Pod on all the repos.
|
13
|
+
[#85](https://github.com/CocoaPods/CocoaPods/issues/85)
|
14
|
+
- Added a pre install hook to the Podfile and to root specifications.
|
15
|
+
[#486](https://github.com/CocoaPods/CocoaPods/issues/486)
|
16
|
+
- Support for `header_mappings_dir` attribute in subspecs.
|
17
|
+
- Added support for linting a Podspec using the files from its folder `pod spec
|
18
|
+
lint --local`
|
19
|
+
- Refactored UI.
|
20
|
+
- Added support for Podfiles named `CocoaPods.podfile` which allows to
|
21
|
+
associate an editor application in Mac OS X.
|
22
|
+
[#528](https://github.com/CocoaPods/CocoaPods/issues/528)
|
23
|
+
- Added config option to disable the new version available message.
|
24
|
+
[#448](https://github.com/CocoaPods/CocoaPods/issues/448)
|
25
|
+
- Added support for extracting `.tar.bz2` files
|
26
|
+
[#522](https://github.com/CocoaPods/CocoaPods/issues/522)
|
27
|
+
- Improved feedback for errors of repo subcommands.
|
28
|
+
[#505](https://github.com/CocoaPods/CocoaPods/issues/505)
|
29
|
+
|
30
|
+
|
31
|
+
###### Bug fixes
|
32
|
+
- Subspecs namespacing has been restored.
|
33
|
+
[#541](https://github.com/CocoaPods/CocoaPods/issues/541)
|
34
|
+
- Improvements to the git cache that should be more robust.
|
35
|
+
[#517](https://github.com/CocoaPods/CocoaPods/issues/517)
|
36
|
+
- In certain conditions pod setup would execute twice.
|
37
|
+
- The git cache now is updated if a branch is not found
|
38
|
+
[#514](https://github.com/CocoaPods/CocoaPods/issues/514)
|
39
|
+
- Forcing UTF-8 encoding on licenses generation in Ruby 1.9.
|
40
|
+
[#530](https://github.com/CocoaPods/CocoaPods/issues/530)
|
41
|
+
- Added support for `.hpp` headers.
|
42
|
+
[#244](https://github.com/CocoaPods/CocoaPods/issues/244)
|
4
43
|
|
5
44
|
## 0.14.0
|
6
45
|
|
@@ -45,32 +84,26 @@
|
|
45
84
|
[#191](https://github.com/CocoaPods/CocoaPods/issues/191)
|
46
85
|
- the external source changes.
|
47
86
|
- the head status changes (from disabled to enabled or vice-versa).
|
48
|
-
|
49
87
|
- Introduce `pod update` command that installs the dependencies of the Podfile
|
50
88
|
**ignoring** the lockfile `Podfile.lock`.
|
51
89
|
[#131](https://github.com/CocoaPods/CocoaPods/issues/131)
|
52
|
-
|
53
90
|
- Introduce `pod outdated` command that shows the pods with known updates.
|
54
|
-
|
55
91
|
- Add `:local` option for dependencies which will use the source files directly
|
56
92
|
from a local directory. This is usually used for libraries that are being
|
57
93
|
developed in parallel to the end product (application/library).
|
58
94
|
[#458](https://github.com/CocoaPods/CocoaPods/issues/458),
|
59
95
|
[#415](https://github.com/CocoaPods/CocoaPods/issues/415),
|
60
96
|
[#156](https://github.com/CocoaPods/CocoaPods/issues/156).
|
61
|
-
|
62
97
|
- Folders of Pods which are no longer required are removed during installation.
|
63
98
|
[#298](https://github.com/CocoaPods/CocoaPods/issues/298)
|
64
|
-
|
65
|
-
-
|
66
|
-
- a podspec can’t be found in the root of an external source.
|
99
|
+
- Add meaningful error messages
|
100
|
+
- ia podspec can’t be found in the root of an external source.
|
67
101
|
[#385](https://github.com/CocoaPods/CocoaPods/issues/385),
|
68
102
|
[#338](https://github.com/CocoaPods/CocoaPods/issues/338),
|
69
103
|
[#337](https://github.com/CocoaPods/CocoaPods/issues/337).
|
70
104
|
- a subspec name is misspelled.
|
71
105
|
[#327](https://github.com/CocoaPods/CocoaPods/issues/327)
|
72
106
|
- an unrecognized command and/or argument is provided.
|
73
|
-
|
74
107
|
- The subversion downloader now does an export instead of a checkout, which
|
75
108
|
makes it play nicer with SCMs that store metadata in each directory.
|
76
109
|
[#245](https://github.com/CocoaPods/CocoaPods/issues/245)
|
data/bin/pod
CHANGED
data/lib/cocoapods.rb
CHANGED
@@ -7,13 +7,12 @@ require 'rubygems'
|
|
7
7
|
#
|
8
8
|
# E.g. https://github.com/CocoaPods/CocoaPods/issues/398
|
9
9
|
unless Gem::Version::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(Gem::VERSION))
|
10
|
-
require 'colored'
|
11
10
|
STDERR.puts "Your RubyGems version (#{Gem::VERSION}) is too old, please update with: `gem update --system`".red
|
12
11
|
exit 1
|
13
12
|
end
|
14
13
|
|
15
14
|
module Pod
|
16
|
-
VERSION = '0.
|
15
|
+
VERSION = '0.15.0'
|
17
16
|
|
18
17
|
class PlainInformative < StandardError
|
19
18
|
end
|
@@ -41,6 +40,7 @@ module Pod
|
|
41
40
|
autoload :Source, 'cocoapods/source'
|
42
41
|
autoload :Spec, 'cocoapods/specification'
|
43
42
|
autoload :Specification, 'cocoapods/specification'
|
43
|
+
autoload :UI, 'cocoapods/user_interface'
|
44
44
|
autoload :Version, 'cocoapods/version'
|
45
45
|
|
46
46
|
autoload :Pathname, 'pathname'
|
data/lib/cocoapods/command.rb
CHANGED
@@ -7,7 +7,6 @@ module Pod
|
|
7
7
|
autoload :List, 'cocoapods/command/list'
|
8
8
|
autoload :Linter, 'cocoapods/command/linter'
|
9
9
|
autoload :Outdated, 'cocoapods/command/outdated'
|
10
|
-
autoload :Presenter, 'cocoapods/command/presenter'
|
11
10
|
autoload :Push, 'cocoapods/command/push'
|
12
11
|
autoload :Repo, 'cocoapods/command/repo'
|
13
12
|
autoload :Search, 'cocoapods/command/search'
|
@@ -70,10 +69,11 @@ module Pod
|
|
70
69
|
|
71
70
|
def self.run(*argv)
|
72
71
|
sub_command = parse(*argv)
|
73
|
-
unless ENV['SKIP_SETUP']
|
72
|
+
unless sub_command.is_a?(Setup) || ENV['SKIP_SETUP']
|
74
73
|
Setup.new(ARGV.new).run_if_needed
|
75
74
|
end
|
76
75
|
sub_command.run
|
76
|
+
UI.puts
|
77
77
|
|
78
78
|
rescue Interrupt
|
79
79
|
puts "[!] Cancelled".red
|
@@ -142,29 +142,6 @@ module Pod
|
|
142
142
|
raise Informative, "No `Podfile.lock' found in the current working directory, run `pod install'."
|
143
143
|
end
|
144
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
|
-
|
153
|
-
def print_title(title, only_verbose = true)
|
154
|
-
if config.verbose?
|
155
|
-
puts "\n" + title.yellow
|
156
|
-
elsif !config.silent? && !only_verbose
|
157
|
-
puts title
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
|
-
def print_subtitle(title, only_verbose = false)
|
162
|
-
if config.verbose?
|
163
|
-
puts "\n" + title.green
|
164
|
-
elsif !config.silent? && !only_verbose
|
165
|
-
puts title
|
166
|
-
end
|
167
|
-
end
|
168
145
|
end
|
169
146
|
end
|
170
147
|
|
@@ -35,7 +35,7 @@ module Pod
|
|
35
35
|
config.clean = !argv.option('--no-clean')
|
36
36
|
config.generate_docs = !argv.option('--no-doc')
|
37
37
|
config.integrate_targets = !argv.option('--no-integrate')
|
38
|
-
|
38
|
+
config.skip_repo_update = argv.option('--no-update')
|
39
39
|
super unless argv.empty?
|
40
40
|
end
|
41
41
|
|
@@ -48,7 +48,6 @@ module Pod
|
|
48
48
|
|
49
49
|
def run
|
50
50
|
verify_podfile_exists!
|
51
|
-
update_spec_repos_if_necessary!
|
52
51
|
run_install_with_update(false)
|
53
52
|
end
|
54
53
|
end
|
@@ -6,6 +6,14 @@ module Pod
|
|
6
6
|
# TODO: Add check to ensure that attributes inherited by subspecs are not duplicated ?
|
7
7
|
|
8
8
|
attr_accessor :quick, :no_clean, :repo_path
|
9
|
+
|
10
|
+
# @return [Bool] Wether the lint should be performed against the root of
|
11
|
+
# the podspec instead to its original source. Uses the `:local` option
|
12
|
+
# of the Podfile.
|
13
|
+
#
|
14
|
+
attr_accessor :local
|
15
|
+
alias :local? :local
|
16
|
+
|
9
17
|
attr_reader :spec, :file
|
10
18
|
attr_reader :errors, :warnings, :notes
|
11
19
|
|
@@ -91,7 +99,7 @@ module Pod
|
|
91
99
|
if `which xcodebuild`.strip.empty?
|
92
100
|
puts "Skipping compilation with `xcodebuild' because it can't be found.\n".yellow if config.verbose?
|
93
101
|
else
|
94
|
-
puts "
|
102
|
+
puts "\nBuilding with xcodebuild.\n".yellow if config.verbose?
|
95
103
|
# treat xcodebuild warnings as notes because the spec maintainer might not be the author of the library
|
96
104
|
xcodebuild_output.each { |msg| ( msg.include?('error: ') ? @platform_errors[@platform] : @platform_notes[@platform] ) << msg }
|
97
105
|
end
|
@@ -103,6 +111,7 @@ module Pod
|
|
103
111
|
def install_pod
|
104
112
|
podfile = podfile_from_spec
|
105
113
|
config.verbose
|
114
|
+
config.skip_repo_update = true
|
106
115
|
sandbox = Sandbox.new(config.project_pods_root)
|
107
116
|
resolver = Resolver.new(podfile, nil, sandbox)
|
108
117
|
installer = Installer.new(resolver)
|
@@ -113,11 +122,16 @@ module Pod
|
|
113
122
|
|
114
123
|
def podfile_from_spec
|
115
124
|
name = spec.name
|
116
|
-
podspec = file.realpath
|
125
|
+
podspec = file.realpath
|
117
126
|
platform = @platform
|
127
|
+
local = local?
|
118
128
|
podfile = Pod::Podfile.new do
|
119
129
|
platform(platform.to_sym, platform.deployment_target)
|
120
|
-
|
130
|
+
if (local)
|
131
|
+
pod name, :local => podspec.dirname.to_s
|
132
|
+
else
|
133
|
+
pod name, :podspec => podspec.to_s
|
134
|
+
end
|
121
135
|
end
|
122
136
|
podfile
|
123
137
|
end
|
@@ -166,10 +180,11 @@ module Pod
|
|
166
180
|
messages << "Unrecognized platfrom" unless platform_valid?
|
167
181
|
messages << "Missing name" unless spec.name
|
168
182
|
messages << "Missing version" unless spec.version
|
169
|
-
messages << "Missing summary"
|
183
|
+
messages << "Missing summary" if !spec.summary || spec.summary.empty?
|
170
184
|
messages << "Missing homepage" unless spec.homepage
|
171
185
|
messages << "Missing author(s)" unless spec.authors
|
172
186
|
messages << "Missing or invalid source: #{spec.source}" unless source_valid?
|
187
|
+
messages << "The summary should be short use `description` (max 140 characters)." if spec.summary && spec.summary.length > 140
|
173
188
|
|
174
189
|
# attributes with multiplatform values
|
175
190
|
return messages unless platform_valid?
|
@@ -227,11 +242,16 @@ module Pod
|
|
227
242
|
messages << "The description is not meaningful" if spec.description && spec.description =~ /An optional longer description of/
|
228
243
|
messages << "The summary should end with a dot" if spec.summary !~ /.*\./
|
229
244
|
messages << "The description should end with a dot" if spec.description !~ /.*\./ && spec.description != spec.summary
|
245
|
+
messages << "The summary should end with a dot" if spec.summary !~ /.*\./
|
230
246
|
messages << "Comments must be deleted" if text.scan(/^\s*#/).length > 24
|
231
247
|
messages << "Warnings must not be disabled (`-Wno' compiler flags)" if spec.compiler_flags.split(' ').any? {|flag| flag.start_with?('-Wno') }
|
232
248
|
|
233
249
|
if (git_source = source[:git])
|
234
250
|
messages << "Git sources should specify either a tag or a commit" unless source[:commit] || source[:tag]
|
251
|
+
if spec.version.to_s != '0.0.1'
|
252
|
+
messages << "The version of the spec should be part of the git tag (not always applicable)" if source[:tag] && !source[:tag].include?(spec.version.to_s)
|
253
|
+
messages << "Git sources without tag should be marked as 0.0.1 (not always applicable)" if !source[:tag]
|
254
|
+
end
|
235
255
|
if git_source.include?('github.com')
|
236
256
|
messages << "Github repositories should end in `.git'" unless git_source.end_with?('.git')
|
237
257
|
messages << "Github repositories should use `https' link" unless git_source.start_with?('https://github.com') || git_source.start_with?('git://gist.github.com')
|
@@ -14,23 +14,26 @@ module Pod
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.options
|
17
|
-
[[
|
17
|
+
[[
|
18
|
+
"--update", "Run `pod repo update` before listing",
|
19
|
+
"--stats", "Show additional stats (like GitHub watchers and forks)"
|
20
|
+
]].concat(super)
|
18
21
|
end
|
19
22
|
|
20
23
|
extend Executable
|
21
24
|
executable :git
|
22
25
|
|
23
26
|
def initialize(argv)
|
24
|
-
@update
|
25
|
-
@
|
26
|
-
@
|
27
|
+
@update = argv.option('--update')
|
28
|
+
@stats = argv.option('--stats')
|
29
|
+
@new = argv.option('new')
|
27
30
|
super unless argv.empty?
|
28
31
|
end
|
29
32
|
|
30
33
|
def list_all
|
31
34
|
sets = Source.all_sets
|
32
|
-
sets.each {|
|
33
|
-
puts "\n#{sets.count} pods were found"
|
35
|
+
sets.each { |set| UI.pod(set, :name) }
|
36
|
+
UI.puts "\n#{sets.count} pods were found"
|
34
37
|
end
|
35
38
|
|
36
39
|
def list_new
|
@@ -53,16 +56,18 @@ module Pod
|
|
53
56
|
days.reverse.each do |d|
|
54
57
|
sets = groups[d]
|
55
58
|
next unless sets
|
56
|
-
|
57
|
-
|
59
|
+
UI.section("\nPods added in the last #{"day".pluralize(d)}".yellow) do
|
60
|
+
sorted = sets.sort_by {|s| creation_dates[s.name]}
|
61
|
+
sorted.each { |set| UI.pod(set, (@stats ? :stats : :name)) }
|
62
|
+
end
|
58
63
|
end
|
59
64
|
end
|
60
65
|
|
61
66
|
def run
|
62
|
-
|
63
|
-
|
67
|
+
UI.section("\nUpdating Spec Repositories\n".yellow) do
|
68
|
+
Repo.new(ARGV.new(["update"])).run
|
69
|
+
end if @update && config.verbose?
|
64
70
|
@new ? list_new : list_all
|
65
|
-
puts
|
66
71
|
end
|
67
72
|
end
|
68
73
|
end
|
@@ -11,13 +11,11 @@ module Pod
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.options
|
14
|
-
[
|
15
|
-
["--no-update", "Skip running `pod repo update` before install"],
|
16
|
-
].concat(super)
|
14
|
+
[["--no-update", "Skip running `pod repo update` before install"]].concat(super)
|
17
15
|
end
|
18
16
|
|
19
17
|
def initialize(argv)
|
20
|
-
|
18
|
+
config.skip_repo_update = argv.option('--no-update')
|
21
19
|
super unless argv.empty?
|
22
20
|
end
|
23
21
|
|
@@ -36,20 +36,20 @@ module Pod
|
|
36
36
|
update_repo
|
37
37
|
add_specs_to_repo
|
38
38
|
push_repo unless @local_only
|
39
|
-
puts
|
40
39
|
end
|
41
40
|
|
42
41
|
private
|
43
42
|
|
44
43
|
def update_repo
|
45
|
-
puts "Updating the `#{@repo}' repo\n".yellow unless config.silent
|
44
|
+
UI.puts "Updating the `#{@repo}' repo\n".yellow unless config.silent
|
46
45
|
# show the output of git even if not verbose
|
47
|
-
|
46
|
+
# TODO: use the `git!' and find a way to show the output in realtime.
|
47
|
+
Dir.chdir(repo_dir) { UI.puts `git pull 2>&1` }
|
48
48
|
end
|
49
49
|
|
50
50
|
def push_repo
|
51
|
-
puts "\nPushing the `#{@repo}' repo\n".yellow unless config.silent
|
52
|
-
Dir.chdir(repo_dir) { puts `git push 2>&1` }
|
51
|
+
UI.puts "\nPushing the `#{@repo}' repo\n".yellow unless config.silent
|
52
|
+
Dir.chdir(repo_dir) { UI.puts `git push 2>&1` }
|
53
53
|
end
|
54
54
|
|
55
55
|
def repo_dir
|
@@ -71,7 +71,7 @@ module Pod
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def validate_podspec_files
|
74
|
-
puts "\nValidating specs".yellow unless config.silent
|
74
|
+
UI.puts "\nValidating specs".yellow unless config.silent
|
75
75
|
lint_argv = ["lint"]
|
76
76
|
lint_argv << "--only-errors" if @allow_warnings
|
77
77
|
lint_argv << "--silent" if config.silent
|
@@ -82,7 +82,7 @@ module Pod
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def add_specs_to_repo
|
85
|
-
puts "\nAdding the specs to the #{@repo} repo\n".yellow unless config.silent
|
85
|
+
UI.puts "\nAdding the specs to the #{@repo} repo\n".yellow unless config.silent
|
86
86
|
podspec_files.each do |spec_file|
|
87
87
|
spec = Pod::Specification.from_file(spec_file)
|
88
88
|
output_path = File.join(repo_dir, spec.name, spec.version.to_s)
|
@@ -93,14 +93,14 @@ module Pod
|
|
93
93
|
else
|
94
94
|
message = "[Add] #{spec}"
|
95
95
|
end
|
96
|
-
puts " - #{message}" unless config.silent
|
96
|
+
UI.puts " - #{message}" unless config.silent
|
97
97
|
|
98
98
|
FileUtils.mkdir_p(output_path)
|
99
99
|
FileUtils.cp(Pathname.new(spec.name+'.podspec'), output_path)
|
100
100
|
Dir.chdir(repo_dir) do
|
101
|
-
git("add #{spec.name}")
|
101
|
+
git!("add #{spec.name}")
|
102
102
|
# Bypass the pre-commit hook because we already performed validation
|
103
|
-
git("commit --no-verify -m '#{message}'")
|
103
|
+
git!("commit --no-verify -m '#{message}'")
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
@@ -16,7 +16,7 @@ module Pod
|
|
16
16
|
Updates the local clone of the spec-repo `NAME'. If `NAME' is omitted
|
17
17
|
this will update all spec-repos in `~/.cocoapods'.
|
18
18
|
|
19
|
-
$ pod repo
|
19
|
+
$ pod repo lint [NAME | DIRECTORY]
|
20
20
|
|
21
21
|
Lints the spec-repo `NAME'. If a directory is provided it is assumed
|
22
22
|
to be the root of a repo. Finally, if NAME is not provided this will
|
@@ -56,23 +56,25 @@ module Pod
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def add
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
59
|
+
UI.section("Cloning spec repo `#{@name}' from `#{@url}'#{" (branch `#{@branch}')" if @branch}") do
|
60
|
+
config.repos_dir.mkpath
|
61
|
+
Dir.chdir(config.repos_dir) { git!("clone '#{@url}' #{@name}") }
|
62
|
+
Dir.chdir(dir) { git!("checkout #{@branch}") } if @branch
|
63
|
+
check_versions(dir)
|
64
|
+
end
|
64
65
|
end
|
65
66
|
|
66
67
|
def update
|
67
68
|
dirs = @name ? [dir] : config.repos_dir.children.select {|c| c.directory?}
|
68
69
|
dirs.each do |dir|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
70
|
+
UI.section "Updating spec repo `#{dir.basename}'" do
|
71
|
+
Dir.chdir(dir) do
|
72
|
+
`git rev-parse >/dev/null 2>&1`
|
73
|
+
if $?.exitstatus.zero?
|
74
|
+
git!("pull")
|
75
|
+
else
|
76
|
+
UI.message "Not a git repository"
|
77
|
+
end
|
76
78
|
end
|
77
79
|
end
|
78
80
|
check_versions(dir)
|
@@ -87,7 +89,7 @@ module Pod
|
|
87
89
|
end
|
88
90
|
dirs.each do |dir|
|
89
91
|
check_versions(dir)
|
90
|
-
puts "\nLinting spec repo `#{dir.realpath.basename}'\n".yellow
|
92
|
+
UI.puts "\nLinting spec repo `#{dir.realpath.basename}'\n".yellow
|
91
93
|
podspecs = dir.glob('**/*.podspec')
|
92
94
|
invalid_count = 0
|
93
95
|
|
@@ -109,19 +111,19 @@ module Pod
|
|
109
111
|
end
|
110
112
|
|
111
113
|
if should_display
|
112
|
-
puts " -> ".send(color) << linter.spec_name
|
114
|
+
UI.puts " -> ".send(color) << linter.spec_name
|
113
115
|
print_messages('ERROR', linter.errors)
|
114
116
|
unless @only_errors
|
115
117
|
print_messages('WARN', linter.warnings)
|
116
118
|
print_messages('NOTE', linter.notes)
|
117
119
|
end
|
118
|
-
puts unless config.silent?
|
120
|
+
UI.puts unless config.silent?
|
119
121
|
end
|
120
122
|
end
|
121
|
-
puts "Analyzed #{podspecs.count} podspecs files.\n\n" unless config.silent?
|
123
|
+
UI.puts "Analyzed #{podspecs.count} podspecs files.\n\n" unless config.silent?
|
122
124
|
|
123
125
|
if invalid_count == 0
|
124
|
-
puts "All the specs passed validation.".green << "\n\n" unless config.silent?
|
126
|
+
UI.puts "All the specs passed validation.".green << "\n\n" unless config.silent?
|
125
127
|
else
|
126
128
|
raise Informative, "#{invalid_count} podspecs failed validation."
|
127
129
|
end
|
@@ -130,7 +132,7 @@ module Pod
|
|
130
132
|
|
131
133
|
def print_messages(type, messages)
|
132
134
|
return if config.silent?
|
133
|
-
messages.each {|msg| puts " - #{type.ljust(5)} | #{msg}"}
|
135
|
+
messages.each {|msg| UI.puts " - #{type.ljust(5)} | #{msg}"}
|
134
136
|
end
|
135
137
|
|
136
138
|
def check_versions(dir)
|
@@ -142,7 +144,7 @@ module Pod
|
|
142
144
|
"\n[!] The `#{dir.basename.to_s}' repo requires CocoaPods #{version_msg}\n".red +
|
143
145
|
"Update Cocoapods, or checkout the appropriate tag in the repo.\n\n"
|
144
146
|
end
|
145
|
-
puts "\nCocoapods #{versions['last']} is available.\n".green if has_update(versions)
|
147
|
+
UI.puts "\nCocoapods #{versions['last']} is available.\n".green if has_update(versions) && config.new_version_message?
|
146
148
|
end
|
147
149
|
|
148
150
|
def self.compatible?(name)
|