cocoapods 0.35.0.rc2 → 0.35.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 +68 -0
- data/README.md +5 -5
- data/bin/pod +6 -13
- data/lib/cocoapods/command/init.rb +0 -2
- data/lib/cocoapods/command/lib.rb +16 -16
- data/lib/cocoapods/command/repo/push.rb +1 -1
- data/lib/cocoapods/command/search.rb +7 -2
- data/lib/cocoapods/command/spec.rb +84 -59
- data/lib/cocoapods/external_sources.rb +4 -2
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/copy_resources_script.rb +4 -0
- data/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb +1 -1
- data/lib/cocoapods/installer.rb +4 -3
- data/lib/cocoapods/installer/analyzer.rb +65 -16
- data/lib/cocoapods/installer/target_installer/pod_target_installer.rb +18 -9
- data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +1 -1
- data/lib/cocoapods/open_uri.rb +1 -1
- data/lib/cocoapods/resolver.rb +51 -12
- data/lib/cocoapods/sandbox.rb +5 -1
- data/lib/cocoapods/sandbox/file_accessor.rb +21 -0
- data/lib/cocoapods/sources_manager.rb +1 -1
- data/lib/cocoapods/target.rb +1 -1
- data/lib/cocoapods/user_interface.rb +12 -7
- data/lib/cocoapods/validator.rb +3 -4
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddc8b79f35ff52c1e7bea24f5f20c7f2e1c9008c
|
4
|
+
data.tar.gz: 935b3efb59e8d0bfbc7b0e1fcd8b391e2d1dfb54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da671838317175baf103a1cc34467b2ee641f8d4fae9ce7a7e7fd59696854bd1023e7b6cd19f9c1695fd25a0d6a0f1944775454ed2c6fcceffcc43715fa569e4
|
7
|
+
data.tar.gz: 5b80c94fdee8e54e23989e44fd39f56c24eec9275d81a9dadae523e8388eb544417ad579bf6037ffeb66579fbc07d2d3490965bc043da0598c3f44c829456325
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,74 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
|
|
4
4
|
|
5
5
|
To install release candidates run `[sudo] gem install cocoapods --pre`
|
6
6
|
|
7
|
+
## 0.35.0
|
8
|
+
|
9
|
+
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.34.4...0.35.0)
|
10
|
+
• [CocoaPods-Core](https://github.com/CocoaPods/Core/compare/0.34.4...0.35.0)
|
11
|
+
• [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.19.4...0.20.2)
|
12
|
+
• [cocoapods-downloader](https://github.com/CocoaPods/cocoapods-downloader/compare/0.7.2...0.8.0)
|
13
|
+
|
14
|
+
##### Enhancements
|
15
|
+
|
16
|
+
* Allow the specification of file patterns for the Podspec's `requires_arc`
|
17
|
+
attribute.
|
18
|
+
[Kyle Fuller](https://github.com/kylef)
|
19
|
+
[Samuel Giddins](https://github.com/segiddins)
|
20
|
+
[#532](https://github.com/CocoaPods/CocoaPods/issues/532)
|
21
|
+
|
22
|
+
* From now on, pods installed directly from their repositories will be recorded
|
23
|
+
in the `Podfile.lock` file and will be guaranteed to be checked-out using the
|
24
|
+
same revision on subsequent installations. Examples of this are when using
|
25
|
+
the `:git`, `:svn`, or `:hg` options in your `Podfile`.
|
26
|
+
[Samuel Giddins](https://github.com/segiddins)
|
27
|
+
[#1058](https://github.com/CocoaPods/CocoaPods/issues/1058)
|
28
|
+
|
29
|
+
##### Bug Fixes
|
30
|
+
|
31
|
+
* Fix an output formatting issue with various commands like `pod search`
|
32
|
+
and `pod trunk`.
|
33
|
+
[Olivier Halligon](https://github.com/AliSoftware)
|
34
|
+
[#2603](https://github.com/CocoaPods/CocoaPods/issues/2603)
|
35
|
+
|
36
|
+
* Show a helpful error message if the old resolver incorrectly activated a
|
37
|
+
pre-release version that now leads to a version conflict.
|
38
|
+
[Samuel Giddins](https://github.com/segiddins)
|
39
|
+
|
40
|
+
* Provides a user friendly message when using `pod spec create` with a
|
41
|
+
repository that doesn't yet have any commits.
|
42
|
+
[Kyle Fuller](https://github.com/kylef)
|
43
|
+
[#2803](https://github.com/CocoaPods/CocoaPods/issues/2803)
|
44
|
+
|
45
|
+
* Fixes an issue with integrating into projects where there is a slash in the
|
46
|
+
build configuration name.
|
47
|
+
[Kyle Fuller](https://github.com/kylef)
|
48
|
+
[#2767](https://github.com/CocoaPods/CocoaPods/issues/2767)
|
49
|
+
|
50
|
+
* Pods will use `CLANG_ENABLE_OBJC_ARC = 'YES'` instead of
|
51
|
+
`CLANG_ENABLE_OBJC_ARC = 'NO'`. For pods with `requires_arc = false` the
|
52
|
+
`-fno-objc-arc` flag will be specified for the all source files.
|
53
|
+
[Hugo Tunius](https://github.com/K0nserv)
|
54
|
+
[#2262](https://github.com/CocoaPods/CocoaPods/issues/2262)
|
55
|
+
|
56
|
+
* Fixed an issue that Core Data mapping models where not compiled when
|
57
|
+
copying resources to main application bundle.
|
58
|
+
[Yan Rabovik](https://github.com/rabovik)
|
59
|
+
|
60
|
+
##### Enhancements
|
61
|
+
|
62
|
+
* `pod search`, `pod spec which`, `pod spec cat` and `pod spec edit`
|
63
|
+
now use plain text search by default instead of a regex. Especially
|
64
|
+
`pod search UIView+UI` now searches for pods containing exactly `UIView+UI`
|
65
|
+
in their name, not trying to interpret the `+` as a regular expression.
|
66
|
+
_Note: You can still use a regular expression with the new `--regex` flag that has
|
67
|
+
been added to these commands, e.g. `pod search --regex "(NS|UI)Color"`._
|
68
|
+
[Olivier Halligon](https://github.com/AliSoftware)
|
69
|
+
[Core#188](https://github.com/CocoaPods/Core/issues/188)
|
70
|
+
|
71
|
+
* Use `--allow-warnings` rather than `--error-only` for pod spec validation
|
72
|
+
[Daniel Tomlinson](https://github.com/DanielTomlinson)
|
73
|
+
[#2820](https://github.com/CocoaPods/CocoaPods/issues/2820)
|
74
|
+
|
7
75
|
## 0.35.0.rc2
|
8
76
|
|
9
77
|
##### Enhancements
|
data/README.md
CHANGED
@@ -28,8 +28,8 @@ Lovingly sponsored by [Fingertips](http://www.fngtps.com),
|
|
28
28
|
|
29
29
|
## Collaborate
|
30
30
|
|
31
|
-
All CocoaPods development happens on GitHub
|
32
|
-
we welcome with joy
|
31
|
+
All CocoaPods development happens on GitHub. Contributions make for good karma and
|
32
|
+
we welcome new contributors with joy.
|
33
33
|
|
34
34
|
## Links
|
35
35
|
|
@@ -39,7 +39,7 @@ we welcome with joy new contributors.
|
|
39
39
|
[@CocoaPods](http://twitter.com/CocoaPods) | Follow CocoaPods on Twitter to stay up to date.
|
40
40
|
[Blog](http://blog.cocoapods.org) | The CocoaPods blog.
|
41
41
|
[Mailing List](http://groups.google.com/group/cocoapods) | Feel free to ask any kind of question.
|
42
|
-
[
|
42
|
+
[Guides](http://guides.cocoapods.org) | Everything you want to know about CocoaPods.
|
43
43
|
[Changelog](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md) | See the changes introduced in each CocoaPods version.
|
44
44
|
[New Pods RSS](http://feeds.cocoapods.org/new-pods.rss) | Don't miss any new Pods.
|
45
45
|
|
@@ -49,10 +49,10 @@ CocoaPods is composed of the following projects:
|
|
49
49
|
|
50
50
|
| Status | Project | Description | Info |
|
51
51
|
| :----- | :------ | :--- | :--- |
|
52
|
-
| [](http://travis-ci.org/CocoaPods/CocoaPods) | [CocoaPods](https://github.com/CocoaPods/CocoaPods) | The CocoaPods command line tool. | [
|
52
|
+
| [](http://travis-ci.org/CocoaPods/CocoaPods) | [CocoaPods](https://github.com/CocoaPods/CocoaPods) | The CocoaPods command line tool. | [guides](http://guides.cocoapods.org)
|
53
53
|
| [](http://travis-ci.org/CocoaPods/Core) | [CocoaPods Core](https://github.com/CocoaPods/Core) | Support for working with specifications and podfiles. | [docs](http://docs.cocoapods.org/cocoapods_core)
|
54
54
|
| [](http://travis-ci.org/CocoaPods/cocoapods-downloader) |[CocoaPods Downloader](https://github.com/CocoaPods/cocoapods-downloader) | Downloaders for various source types. | [docs](http://docs.cocoapods.org/cocoapods_downloader/index.html)
|
55
55
|
| [](https://travis-ci.org/CocoaPods/Xcodeproj) | [Xcodeproj](https://github.com/CocoaPods/Xcodeproj) | Create and modify Xcode projects from Ruby. | [docs](http://docs.cocoapods.org/xcodeproj/index.html)
|
56
56
|
| [](https://travis-ci.org/CocoaPods/CLAide) | [CLAide](https://github.com/CocoaPods/CLAide) | A small command-line interface framework. | [docs](http://docs.cocoapods.org/claide/index.html)
|
57
|
+
| [](https://travis-ci.org/CocoaPods/Molinillo) | [Molinillo](https://github.com/CocoaPods/Molinillo) | A powerful generic dependency resolver. | [docs](http://www.rubydoc.info/gems/molinillo)
|
57
58
|
| | [Master Repo ](https://github.com/CocoaPods/Specs) | Master repository of specifications. | [guide](http://docs.cocoapods.org/guides/contributing_to_the_master_repo.html)
|
58
|
-
|
data/bin/pod
CHANGED
@@ -1,20 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
if Encoding.default_external != Encoding::UTF_8
|
4
|
-
puts
|
5
|
-
|
6
|
-
|
7
|
-
Consider adding the following settings to .travis.yml
|
4
|
+
puts <<-DOC
|
5
|
+
\e[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
|
6
|
+
Consider adding the following to ~/.profile:
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
else
|
13
|
-
puts <<-DOC
|
14
|
-
See https://github.com/CocoaPods/guides.cocoapods.org/issues/26 for
|
15
|
-
possible solutions.\e[0m\n
|
16
|
-
DOC
|
17
|
-
end
|
8
|
+
export LANG=en_US.UTF-8
|
9
|
+
\e[0m
|
10
|
+
DOC
|
18
11
|
end
|
19
12
|
|
20
13
|
if $PROGRAM_NAME == __FILE__ && !ENV['COCOAPODS_NO_BUNDLER']
|
@@ -109,23 +109,23 @@ module Pod
|
|
109
109
|
|
110
110
|
def self.options
|
111
111
|
[['--quick', 'Lint skips checks that would require to download and build the spec'],
|
112
|
-
['--
|
112
|
+
['--allow-warnings', 'Lint validates even if warnings are present'],
|
113
113
|
['--subspec=NAME', 'Lint validates only the given subspec'],
|
114
114
|
['--no-subspecs', 'Lint skips validation of subspecs'],
|
115
|
-
['--no-clean',
|
115
|
+
['--no-clean', 'Lint leaves the build directory intact for inspection'],
|
116
116
|
['--sources=https://github.com/artsy/Specs', 'The sources from which to pull dependant pods ' \
|
117
117
|
'(defaults to https://github.com/CocoaPods/Specs.git). '\
|
118
118
|
'Multiple sources must be comma-delimited.']].concat(super)
|
119
119
|
end
|
120
120
|
|
121
121
|
def initialize(argv)
|
122
|
-
@quick
|
123
|
-
@
|
124
|
-
@clean
|
125
|
-
@subspecs
|
126
|
-
@only_subspec
|
127
|
-
@source_urls
|
128
|
-
@podspecs_paths
|
122
|
+
@quick = argv.flag?('quick')
|
123
|
+
@allow_warnings = argv.flag?('allow-warnings')
|
124
|
+
@clean = argv.flag?('clean', true)
|
125
|
+
@subspecs = argv.flag?('subspecs', true)
|
126
|
+
@only_subspec = argv.option('subspec')
|
127
|
+
@source_urls = argv.option('sources', 'https://github.com/CocoaPods/Specs.git').split(',')
|
128
|
+
@podspecs_paths = argv.arguments!
|
129
129
|
super
|
130
130
|
end
|
131
131
|
|
@@ -137,13 +137,13 @@ module Pod
|
|
137
137
|
UI.puts
|
138
138
|
podspecs_to_lint.each do |podspec|
|
139
139
|
|
140
|
-
validator
|
141
|
-
validator.local
|
142
|
-
validator.quick
|
143
|
-
validator.no_clean
|
144
|
-
validator.
|
145
|
-
validator.no_subspecs
|
146
|
-
validator.only_subspec
|
140
|
+
validator = Validator.new(podspec, @source_urls)
|
141
|
+
validator.local = true
|
142
|
+
validator.quick = @quick
|
143
|
+
validator.no_clean = !@clean
|
144
|
+
validator.allow_warnings = @allow_warnings
|
145
|
+
validator.no_subspecs = !@subspecs || @only_subspec
|
146
|
+
validator.only_subspec = @only_subspec
|
147
147
|
validator.validate
|
148
148
|
|
149
149
|
unless @clean
|
@@ -83,7 +83,7 @@ module Pod
|
|
83
83
|
UI.puts "\nValidating #{'spec'.pluralize(count)}".yellow
|
84
84
|
podspec_files.each do |podspec|
|
85
85
|
validator = Validator.new(podspec, SourcesManager.all.map(&:url))
|
86
|
-
validator.
|
86
|
+
validator.allow_warnings = @allow_warnings
|
87
87
|
begin
|
88
88
|
validator.validate
|
89
89
|
rescue
|
@@ -15,6 +15,7 @@ module Pod
|
|
15
15
|
|
16
16
|
def self.options
|
17
17
|
[
|
18
|
+
['--regex', 'Interpret the `QUERY` as a regular expression'],
|
18
19
|
['--full', 'Search by name, summary, and description'],
|
19
20
|
['--stats', 'Show additional stats (like GitHub watchers and forks)'],
|
20
21
|
['--ios', 'Restricts the search to Pods supported on iOS'],
|
@@ -24,6 +25,7 @@ module Pod
|
|
24
25
|
end
|
25
26
|
|
26
27
|
def initialize(argv)
|
28
|
+
@use_regex = argv.flag?('regex')
|
27
29
|
@full_text_search = argv.flag?('full')
|
28
30
|
@stats = argv.flag?('stats')
|
29
31
|
@supported_on_ios = argv.flag?('ios')
|
@@ -38,7 +40,7 @@ module Pod
|
|
38
40
|
super
|
39
41
|
help! 'A search query is required.' unless @query
|
40
42
|
|
41
|
-
unless @web
|
43
|
+
unless @web || !@use_regex
|
42
44
|
begin
|
43
45
|
/#{@query.join(' ').strip}/
|
44
46
|
rescue RegexpError
|
@@ -71,7 +73,10 @@ module Pod
|
|
71
73
|
end
|
72
74
|
|
73
75
|
def local_search
|
74
|
-
|
76
|
+
query_regex = @query.join(' ').strip
|
77
|
+
query_regex = Regexp.escape(query_regex) unless @use_regex
|
78
|
+
|
79
|
+
sets = SourcesManager.search_by_name(query_regex, @full_text_search)
|
75
80
|
if @supported_on_ios
|
76
81
|
sets.reject! { |set| !set.specification.available_platforms.map(&:name).include?(:ios) }
|
77
82
|
end
|
@@ -63,23 +63,23 @@ module Pod
|
|
63
63
|
]
|
64
64
|
|
65
65
|
def self.options
|
66
|
-
[['--quick',
|
67
|
-
['--
|
66
|
+
[['--quick', 'Lint skips checks that would require to download and build the spec'],
|
67
|
+
['--allow-warnings', 'Lint validates even if warnings are present'],
|
68
68
|
['--subspec=NAME', 'Lint validates only the given subspec'],
|
69
69
|
['--no-subspecs', 'Lint skips validation of subspecs'],
|
70
|
-
['--no-clean',
|
70
|
+
['--no-clean', 'Lint leaves the build directory intact for inspection'],
|
71
71
|
['--sources=https://github.com/artsy/Specs', 'The sources from which to pull dependant pods ' \
|
72
72
|
'(defaults to https://github.com/CocoaPods/Specs.git). '\
|
73
73
|
'Multiple sources must be comma-delimited.']].concat(super)
|
74
74
|
end
|
75
75
|
|
76
76
|
def initialize(argv)
|
77
|
-
@quick
|
78
|
-
@
|
79
|
-
@clean
|
80
|
-
@subspecs
|
81
|
-
@only_subspec
|
82
|
-
@source_urls
|
77
|
+
@quick = argv.flag?('quick')
|
78
|
+
@allow_warnings = argv.flag?('allow-warnings')
|
79
|
+
@clean = argv.flag?('clean', true)
|
80
|
+
@subspecs = argv.flag?('subspecs', true)
|
81
|
+
@only_subspec = argv.option('subspec')
|
82
|
+
@source_urls = argv.option('sources', 'https://github.com/CocoaPods/Specs.git').split(',')
|
83
83
|
@podspecs_paths = argv.arguments!
|
84
84
|
super
|
85
85
|
end
|
@@ -88,12 +88,12 @@ module Pod
|
|
88
88
|
UI.puts
|
89
89
|
invalid_count = 0
|
90
90
|
podspecs_to_lint.each do |podspec|
|
91
|
-
validator
|
92
|
-
validator.quick
|
93
|
-
validator.no_clean
|
94
|
-
validator.
|
95
|
-
validator.no_subspecs
|
96
|
-
validator.only_subspec
|
91
|
+
validator = Validator.new(podspec, @source_urls)
|
92
|
+
validator.quick = @quick
|
93
|
+
validator.no_clean = !@clean
|
94
|
+
validator.allow_warnings = @allow_warnings
|
95
|
+
validator.no_subspecs = !@subspecs || @only_subspec
|
96
|
+
validator.only_subspec = @only_subspec
|
97
97
|
validator.validate
|
98
98
|
invalid_count += 1 unless validator.validated?
|
99
99
|
|
@@ -118,29 +118,28 @@ module Pod
|
|
118
118
|
|
119
119
|
def podspecs_to_lint
|
120
120
|
@podspecs_to_lint ||= begin
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
121
|
+
files = []
|
122
|
+
@podspecs_paths << '.' if @podspecs_paths.empty?
|
123
|
+
@podspecs_paths.each do |path|
|
124
|
+
if path =~ /https?:\/\//
|
125
|
+
require 'open-uri'
|
126
|
+
output_path = podspecs_tmp_dir + File.basename(path)
|
127
|
+
output_path.dirname.mkpath
|
128
|
+
open(path) do |io|
|
129
|
+
output_path.open('w') { |f| f << io.read }
|
130
|
+
end
|
131
|
+
files << output_path
|
132
|
+
elsif (pathname = Pathname.new(path)).directory?
|
133
|
+
files += Pathname.glob(pathname + '**/*.podspec{.json,}')
|
134
|
+
raise Informative, 'No specs found in the current directory.' if files.empty?
|
135
|
+
else
|
136
|
+
files << (pathname = Pathname.new(path))
|
137
|
+
raise Informative, "Unable to find a spec named `#{path}'." unless pathname.exist? && path.include?('.podspec')
|
130
138
|
end
|
131
|
-
files << output_path
|
132
|
-
else if (pathname = Pathname.new(path)).directory?
|
133
|
-
files += Pathname.glob(pathname + '**/*.podspec{.json,}')
|
134
|
-
raise Informative, 'No specs found in the current directory.' if files.empty?
|
135
|
-
else
|
136
|
-
files << (pathname = Pathname.new(path))
|
137
|
-
raise Informative, "Unable to find a spec named `#{path}'." unless pathname.exist? && path.include?('.podspec')
|
138
139
|
end
|
140
|
+
files
|
139
141
|
end
|
140
|
-
end
|
141
|
-
files
|
142
142
|
end
|
143
|
-
end
|
144
143
|
|
145
144
|
def podspecs_tmp_dir
|
146
145
|
Pathname(File.join(Pathname.new('/tmp').realpath, '/CocoaPods/Lint_podspec'))
|
@@ -153,33 +152,37 @@ module Pod
|
|
153
152
|
self.summary = 'Prints the path of the given spec.'
|
154
153
|
|
155
154
|
self.description = <<-DESC
|
156
|
-
Prints the path of
|
155
|
+
Prints the path of the .podspec file(s) whose name matches `QUERY`
|
157
156
|
DESC
|
158
157
|
|
159
158
|
self.arguments = [
|
160
|
-
CLAide::Argument.new('
|
159
|
+
CLAide::Argument.new('QUERY', false),
|
161
160
|
]
|
162
161
|
|
163
162
|
def self.options
|
164
163
|
[
|
164
|
+
['--regex', 'Interpret the `QUERY` as a regular expression'],
|
165
165
|
['--show-all', 'Print all versions of the given podspec'],
|
166
166
|
].concat(super)
|
167
167
|
end
|
168
168
|
|
169
169
|
def initialize(argv)
|
170
|
+
@use_regex = argv.flag?('regex')
|
170
171
|
@show_all = argv.flag?('show-all')
|
171
|
-
@
|
172
|
-
@
|
172
|
+
@query = argv.shift_argument
|
173
|
+
@query = @query.gsub('.podspec', '') unless @query.nil?
|
173
174
|
super
|
174
175
|
end
|
175
176
|
|
176
177
|
def validate!
|
177
178
|
super
|
178
|
-
help! 'A podspec name is required.' unless @
|
179
|
+
help! 'A podspec name is required.' unless @query
|
180
|
+
validate_regex!(@query) if @use_regex
|
179
181
|
end
|
180
182
|
|
181
183
|
def run
|
182
|
-
|
184
|
+
query = @use_regex ? @query : Regexp.escape(@query)
|
185
|
+
UI.puts get_path_of_spec(query, @show_all)
|
183
186
|
end
|
184
187
|
end
|
185
188
|
|
@@ -189,37 +192,43 @@ module Pod
|
|
189
192
|
self.summary = 'Prints a spec file.'
|
190
193
|
|
191
194
|
self.description = <<-DESC
|
192
|
-
Prints
|
195
|
+
Prints the content of the podspec(s) whose name matches `QUERY` to standard output.
|
193
196
|
DESC
|
194
197
|
|
195
198
|
self.arguments = [
|
196
|
-
CLAide::Argument.new('
|
199
|
+
CLAide::Argument.new('QUERY', false),
|
197
200
|
]
|
198
201
|
|
199
202
|
def self.options
|
200
|
-
[
|
203
|
+
[
|
204
|
+
['--regex', 'Interpret the `QUERY` as a regular expression'],
|
205
|
+
['--show-all', 'Pick from all versions of the given podspec']
|
206
|
+
].concat(super)
|
201
207
|
end
|
202
208
|
|
203
209
|
def initialize(argv)
|
210
|
+
@use_regex = argv.flag?('regex')
|
204
211
|
@show_all = argv.flag?('show-all')
|
205
|
-
@
|
206
|
-
@
|
212
|
+
@query = argv.shift_argument
|
213
|
+
@query = @query.gsub('.podspec', '') unless @query.nil?
|
207
214
|
super
|
208
215
|
end
|
209
216
|
|
210
217
|
def validate!
|
211
218
|
super
|
212
|
-
help! 'A podspec name is required.' unless @
|
219
|
+
help! 'A podspec name is required.' unless @query
|
220
|
+
validate_regex!(@query) if @use_regex
|
213
221
|
end
|
214
222
|
|
215
223
|
def run
|
224
|
+
query = @use_regex ? @query : Regexp.escape(@query)
|
216
225
|
filepath = if @show_all
|
217
|
-
specs = get_path_of_spec(
|
226
|
+
specs = get_path_of_spec(query, @show_all).split(/\n/)
|
218
227
|
index = choose_from_array(specs, "Which spec would you like to print [1-#{ specs.count }]? ")
|
219
228
|
specs[index]
|
220
|
-
|
221
|
-
|
222
|
-
|
229
|
+
else
|
230
|
+
get_path_of_spec(query)
|
231
|
+
end
|
223
232
|
|
224
233
|
UI.puts File.read(filepath)
|
225
234
|
end
|
@@ -231,38 +240,43 @@ module Pod
|
|
231
240
|
self.summary = 'Edit a spec file.'
|
232
241
|
|
233
242
|
self.description = <<-DESC
|
234
|
-
Opens
|
243
|
+
Opens the podspec matching `QUERY` to be edited.
|
235
244
|
DESC
|
236
245
|
|
237
246
|
self.arguments = [
|
238
|
-
CLAide::Argument.new('
|
247
|
+
CLAide::Argument.new('QUERY', false),
|
239
248
|
]
|
240
249
|
|
241
250
|
def self.options
|
242
|
-
[
|
243
|
-
'
|
251
|
+
[
|
252
|
+
['--regex', 'Interpret the `QUERY` as a regular expression'],
|
253
|
+
['--show-all', 'Pick from all versions of the given podspec']
|
254
|
+
].concat(super)
|
244
255
|
end
|
245
256
|
|
246
257
|
def initialize(argv)
|
258
|
+
@use_regex = argv.flag?('regex')
|
247
259
|
@show_all = argv.flag?('show-all')
|
248
|
-
@
|
249
|
-
@
|
260
|
+
@query = argv.shift_argument
|
261
|
+
@query = @query.gsub('.podspec', '') unless @query.nil?
|
250
262
|
super
|
251
263
|
end
|
252
264
|
|
253
265
|
def validate!
|
254
266
|
super
|
255
|
-
help! 'A podspec name is required.' unless @
|
267
|
+
help! 'A podspec name is required.' unless @query
|
268
|
+
validate_regex!(@query) if @use_regex
|
256
269
|
end
|
257
270
|
|
258
271
|
def run
|
272
|
+
query = @use_regex ? @query : Regexp.escape(@query)
|
259
273
|
if @show_all
|
260
|
-
specs = get_path_of_spec(
|
274
|
+
specs = get_path_of_spec(query, @show_all).split(/\n/)
|
261
275
|
message = "Which spec would you like to edit [1-#{specs.count}]? "
|
262
276
|
index = choose_from_array(specs, message)
|
263
277
|
filepath = specs[index]
|
264
278
|
else
|
265
|
-
filepath = get_path_of_spec(
|
279
|
+
filepath = get_path_of_spec(query)
|
266
280
|
end
|
267
281
|
|
268
282
|
exec_editor(filepath.to_s) if File.exist? filepath
|
@@ -311,6 +325,16 @@ module Pod
|
|
311
325
|
|
312
326
|
private
|
313
327
|
|
328
|
+
# @param [String] query the regular expression string to validate
|
329
|
+
#
|
330
|
+
# @raise if the query is not a valid regular expression
|
331
|
+
#
|
332
|
+
def validate_regex!(query)
|
333
|
+
/#{query}/
|
334
|
+
rescue RegexpError
|
335
|
+
help! 'A valid regular expression is required.'
|
336
|
+
end
|
337
|
+
|
314
338
|
# @return [Fixnum] the index of the chosen array item
|
315
339
|
#
|
316
340
|
def choose_from_array(array, message)
|
@@ -458,6 +482,7 @@ module Pod
|
|
458
482
|
branches = GitHub.branches(repo['html_url'])
|
459
483
|
master_name = repo['master_branch'] || 'master'
|
460
484
|
master = branches.find { |branch| branch['name'] == master_name }
|
485
|
+
raise Informative, "Unable to find any commits on the master branch for the repository `#{repo['html_url']}`" unless master
|
461
486
|
data[:ref_type] = ':commit'
|
462
487
|
data[:ref] = master['commit']['sha']
|
463
488
|
else
|
@@ -13,9 +13,11 @@ module Pod
|
|
13
13
|
# hash.
|
14
14
|
#
|
15
15
|
def self.from_dependency(dependency, podfile_path)
|
16
|
-
|
17
|
-
|
16
|
+
from_params(dependency.external_source, dependency, podfile_path)
|
17
|
+
end
|
18
18
|
|
19
|
+
def self.from_params(params, dependency, podfile_path)
|
20
|
+
name = dependency.root_name
|
19
21
|
if klass = concrete_class_from_params(params)
|
20
22
|
klass.new(name, params, podfile_path)
|
21
23
|
else
|
@@ -110,6 +110,10 @@ install_resource()
|
|
110
110
|
echo "xcrun momc \\"${PODS_ROOT}/$1\\" \\"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\\""
|
111
111
|
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
|
112
112
|
;;
|
113
|
+
*.xcmappingmodel)
|
114
|
+
echo "xcrun mapc \\"${PODS_ROOT}/$1\\" \\"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\\""
|
115
|
+
xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm"
|
116
|
+
;;
|
113
117
|
*.xcassets)
|
114
118
|
;;
|
115
119
|
/*)
|
@@ -27,7 +27,7 @@ module Pod
|
|
27
27
|
def self.default_ld_flags(target)
|
28
28
|
ld_flags = '-ObjC'
|
29
29
|
if target.target_definition.podfile.set_arc_compatibility_flag? &&
|
30
|
-
|
30
|
+
target.spec_consumers.any?(&:requires_arc?)
|
31
31
|
ld_flags << ' -fobjc-arc'
|
32
32
|
end
|
33
33
|
ld_flags
|
data/lib/cocoapods/installer.rb
CHANGED
@@ -378,7 +378,7 @@ module Pod
|
|
378
378
|
build_configuration.build_settings['MACOSX_DEPLOYMENT_TARGET'] = osx_deployment_target.to_s if osx_deployment_target
|
379
379
|
build_configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = ios_deployment_target.to_s if ios_deployment_target
|
380
380
|
build_configuration.build_settings['STRIP_INSTALLED_PRODUCT'] = 'NO'
|
381
|
-
build_configuration.build_settings['CLANG_ENABLE_OBJC_ARC'] = '
|
381
|
+
build_configuration.build_settings['CLANG_ENABLE_OBJC_ARC'] = 'YES'
|
382
382
|
end
|
383
383
|
end
|
384
384
|
end
|
@@ -465,8 +465,9 @@ module Pod
|
|
465
465
|
# @return [void]
|
466
466
|
#
|
467
467
|
def write_lockfiles
|
468
|
-
|
469
|
-
|
468
|
+
external_source_pods = podfile.dependencies.select(&:external_source).map(&:root_name).uniq
|
469
|
+
checkout_options = sandbox.checkout_sources.select { |root_name, _| external_source_pods.include? root_name }
|
470
|
+
@lockfile = Lockfile.generate(podfile, analysis_result.specifications, checkout_options)
|
470
471
|
|
471
472
|
UI.message "- Writing Lockfile in #{UI.path config.lockfile_path}" do
|
472
473
|
@lockfile.write_to_disk(config.lockfile_path)
|
@@ -53,6 +53,7 @@ module Pod
|
|
53
53
|
@result.podfile_state = generate_podfile_state
|
54
54
|
@locked_dependencies = generate_version_locking_dependencies
|
55
55
|
|
56
|
+
store_existing_checkout_options
|
56
57
|
fetch_external_sources if allow_fetches
|
57
58
|
@result.specs_by_target = resolve_dependencies
|
58
59
|
@result.specifications = generate_specifications
|
@@ -264,33 +265,81 @@ module Pod
|
|
264
265
|
#
|
265
266
|
def fetch_external_sources
|
266
267
|
return unless allow_pre_downloads?
|
267
|
-
deps_to_fetch = []
|
268
|
-
deps_to_fetch_if_needed = []
|
269
|
-
deps_with_external_source = podfile.dependencies.select(&:external_source)
|
270
268
|
|
271
|
-
|
269
|
+
verify_no_pods_with_different_sources!
|
270
|
+
unless dependencies_to_fetch.empty?
|
271
|
+
UI.section 'Fetching external sources' do
|
272
|
+
dependencies_to_fetch.sort.each do |dependency|
|
273
|
+
fetch_external_source(dependency, !pods_to_fetch.include?(dependency.name))
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
279
|
+
def verify_no_pods_with_different_sources!
|
280
|
+
deps_with_different_sources = podfile.dependencies.group_by(&:root_name).
|
281
|
+
select { |_root_name, dependencies| dependencies.map(&:external_source).uniq.count > 1 }
|
272
282
|
deps_with_different_sources.each do |root_name, dependencies|
|
273
|
-
raise Informative, "There are multiple dependencies with different
|
283
|
+
raise Informative, "There are multiple dependencies with different " \
|
284
|
+
"sources for `#{root_name}` in #{UI.path podfile.defined_in_file}:" \
|
285
|
+
"\n\n- #{dependencies.map(&:to_s).join("\n- ")}"
|
274
286
|
end
|
287
|
+
end
|
275
288
|
|
276
|
-
|
277
|
-
|
289
|
+
def fetch_external_source(dependency, use_lockfile_options)
|
290
|
+
checkout_options = lockfile.checkout_options_for_pod_named(dependency.root_name) if lockfile
|
291
|
+
if checkout_options && use_lockfile_options
|
292
|
+
source = ExternalSources.from_params(checkout_options, dependency, podfile.defined_in_file)
|
278
293
|
else
|
294
|
+
source = ExternalSources.from_dependency(dependency, podfile.defined_in_file)
|
295
|
+
end
|
296
|
+
source.fetch(sandbox)
|
297
|
+
end
|
298
|
+
|
299
|
+
def dependencies_to_fetch
|
300
|
+
@deps_to_fetch ||= begin
|
301
|
+
deps_to_fetch = []
|
302
|
+
deps_to_fetch_if_needed = []
|
303
|
+
deps_with_external_source = podfile.dependencies.select(&:external_source)
|
304
|
+
|
305
|
+
if update_mode == :all
|
306
|
+
deps_to_fetch = deps_with_external_source
|
307
|
+
else
|
308
|
+
deps_to_fetch = deps_with_external_source.select { |dep| pods_to_fetch.include?(dep.name) }
|
309
|
+
deps_to_fetch_if_needed = deps_with_external_source.select { |dep| result.podfile_state.unchanged.include?(dep.name) }
|
310
|
+
deps_to_fetch += deps_to_fetch_if_needed.select do |dep|
|
311
|
+
sandbox.specification(dep.name).nil? ||
|
312
|
+
!dep.external_source[:local].nil? ||
|
313
|
+
!dep.external_source[:path].nil? ||
|
314
|
+
!sandbox.pod_dir(dep.root_name).directory? ||
|
315
|
+
checkout_requires_update?(dep)
|
316
|
+
end
|
317
|
+
end
|
318
|
+
deps_to_fetch.uniq(&:root_name)
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
322
|
+
def checkout_requires_update?(dependency)
|
323
|
+
return true unless lockfile && sandbox.manifest
|
324
|
+
locked_checkout_options = lockfile.checkout_options_for_pod_named(dependency.root_name)
|
325
|
+
sandbox_checkout_options = sandbox.manifest.checkout_options_for_pod_named(dependency.root_name)
|
326
|
+
locked_checkout_options != sandbox_checkout_options
|
327
|
+
end
|
328
|
+
|
329
|
+
def pods_to_fetch
|
330
|
+
@pods_to_fetch ||= begin
|
279
331
|
pods_to_fetch = result.podfile_state.added + result.podfile_state.changed
|
280
332
|
if update_mode == :selected
|
281
333
|
pods_to_fetch += update[:pods]
|
282
334
|
end
|
283
|
-
|
284
|
-
deps_to_fetch_if_needed = deps_with_external_source.select { |dep| result.podfile_state.unchanged.include?(dep.name) }
|
285
|
-
deps_to_fetch += deps_to_fetch_if_needed.select { |dep| sandbox.specification(dep.name).nil? || !dep.external_source[:local].nil? || !dep.external_source[:path].nil? || !sandbox.pod_dir(dep.name).directory? }
|
335
|
+
pods_to_fetch
|
286
336
|
end
|
337
|
+
end
|
287
338
|
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
source.fetch(sandbox)
|
293
|
-
end
|
339
|
+
def store_existing_checkout_options
|
340
|
+
podfile.dependencies.select(&:external_source).each do |dep|
|
341
|
+
if checkout_options = lockfile && lockfile.checkout_options_for_pod_named(dep.root_name)
|
342
|
+
sandbox.store_checkout_source(dep.root_name, checkout_options)
|
294
343
|
end
|
295
344
|
end
|
296
345
|
end
|
@@ -35,12 +35,20 @@ module Pod
|
|
35
35
|
def add_files_to_build_phases
|
36
36
|
target.file_accessors.each do |file_accessor|
|
37
37
|
consumer = file_accessor.spec_consumer
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
38
|
+
|
39
|
+
other_source_files = file_accessor.source_files.select { |sf| sf.extname == '.d' }
|
40
|
+
|
41
|
+
{
|
42
|
+
true => file_accessor.arc_source_files,
|
43
|
+
false => file_accessor.non_arc_source_files,
|
44
|
+
}.each do |arc, files|
|
45
|
+
files = files - other_source_files
|
46
|
+
flags = compiler_flags_for_consumer(consumer, arc)
|
47
|
+
regular_file_refs = files.map { |sf| project.reference_for_path(sf) }
|
48
|
+
native_target.add_file_references(regular_file_refs, flags)
|
49
|
+
end
|
50
|
+
|
51
|
+
other_file_refs = other_source_files.map { |sf| project.reference_for_path(sf) }
|
44
52
|
native_target.add_file_references(other_file_refs, nil)
|
45
53
|
end
|
46
54
|
end
|
@@ -152,10 +160,11 @@ module Pod
|
|
152
160
|
#
|
153
161
|
# @return [String] The compiler flags.
|
154
162
|
#
|
155
|
-
def compiler_flags_for_consumer(consumer)
|
163
|
+
def compiler_flags_for_consumer(consumer, arc)
|
156
164
|
flags = consumer.compiler_flags.dup
|
157
|
-
if
|
158
|
-
flags << '-
|
165
|
+
if !arc
|
166
|
+
flags << '-fno-objc-arc'
|
167
|
+
else
|
159
168
|
platform_name = consumer.platform_name
|
160
169
|
spec_deployment_target = consumer.spec.deployment_target(platform_name)
|
161
170
|
if spec_deployment_target.nil? || Version.new(spec_deployment_target) < ENABLE_OBJECT_USE_OBJC_FROM[platform_name]
|
@@ -102,7 +102,7 @@ module Pod
|
|
102
102
|
frameworks = user_project.frameworks_group
|
103
103
|
native_targets_to_integrate.each do |native_target|
|
104
104
|
library = frameworks.files.select { |f| f.path == target.product_name }.first ||
|
105
|
-
|
105
|
+
frameworks.new_product_ref_for_target(target.name, :static_library)
|
106
106
|
unless native_target.frameworks_build_phase.files_references.include?(library)
|
107
107
|
native_target.frameworks_build_phase.add_file_reference(library)
|
108
108
|
end
|
data/lib/cocoapods/open_uri.rb
CHANGED
@@ -18,6 +18,6 @@ module OpenURI
|
|
18
18
|
#
|
19
19
|
def self.redirectable?(uri1, uri2)
|
20
20
|
uri1.scheme.downcase == uri2.scheme.downcase ||
|
21
|
-
|
21
|
+
(/\A(?:http|ftp)\z/i =~ uri1.scheme && /\A(?:https?|ftp)\z/i =~ uri2.scheme)
|
22
22
|
end
|
23
23
|
end
|
data/lib/cocoapods/resolver.rb
CHANGED
@@ -55,7 +55,7 @@ module Pod
|
|
55
55
|
@activated = Molinillo::Resolver.new(self, self).resolve(dependencies, locked_dependencies)
|
56
56
|
specs_by_target
|
57
57
|
rescue Molinillo::ResolverError => e
|
58
|
-
|
58
|
+
handle_resolver_error(e)
|
59
59
|
end
|
60
60
|
|
61
61
|
# @return [Hash{Podfile::TargetDefinition => Array<Specification>}]
|
@@ -221,8 +221,6 @@ module Pod
|
|
221
221
|
|
222
222
|
include Molinillo::UI
|
223
223
|
|
224
|
-
include Config::Mixin
|
225
|
-
|
226
224
|
# The UI object the resolver should use for displaying user-facing output.
|
227
225
|
#
|
228
226
|
# @return [UserInterface] the normal CocoaPods UI object.
|
@@ -231,32 +229,43 @@ module Pod
|
|
231
229
|
UI
|
232
230
|
end
|
233
231
|
|
234
|
-
# Called before resolution starts.
|
235
|
-
#
|
236
|
-
# mode
|
232
|
+
# Called before resolution starts.
|
233
|
+
#
|
234
|
+
# Completely silence this, as we show nothing in normal mode and debug
|
235
|
+
# information in verbose mode.
|
237
236
|
#
|
238
237
|
# @return [Void]
|
239
238
|
#
|
240
239
|
def before_resolution
|
241
|
-
UI.print '.' if config.verbose
|
242
240
|
end
|
243
241
|
|
244
|
-
# Called after resolution ends.
|
245
|
-
#
|
242
|
+
# Called after resolution ends.
|
243
|
+
#
|
244
|
+
# Completely silence this, as we show nothing in normal mode and debug
|
245
|
+
# information in verbose mode.
|
246
246
|
#
|
247
247
|
# @return [Void]
|
248
248
|
#
|
249
249
|
def after_resolution
|
250
|
-
super if config.verbose
|
251
250
|
end
|
252
251
|
|
253
252
|
# Called during resolution to indicate progress.
|
254
|
-
#
|
253
|
+
#
|
254
|
+
# Completely silence this, as we show nothing in normal mode and debug
|
255
|
+
# information in verbose mode.
|
255
256
|
#
|
256
257
|
# @return [Void]
|
257
258
|
#
|
258
259
|
def indicate_progress
|
259
|
-
|
260
|
+
end
|
261
|
+
|
262
|
+
# Conveys debug information to the user.
|
263
|
+
# By default, prints to `STDERR` instead of {#output}.
|
264
|
+
#
|
265
|
+
# @param [Integer] depth the current depth of the resolution process.
|
266
|
+
# @return [void]
|
267
|
+
def debug?
|
268
|
+
Config.instance.verbose?
|
260
269
|
end
|
261
270
|
|
262
271
|
#-------------------------------------------------------------------------#
|
@@ -360,6 +369,36 @@ module Pod
|
|
360
369
|
end
|
361
370
|
end
|
362
371
|
|
372
|
+
# Handles errors that come out of a {Molinillo::Resolver}.
|
373
|
+
#
|
374
|
+
# @todo The check for version conflicts coming from the {Lockfile}
|
375
|
+
# requiring a pre-release version can be deleted for version 1.0,
|
376
|
+
# as it is a migration step for Lockfiles coming from CocoaPods
|
377
|
+
# versions before `0.35.0`.
|
378
|
+
#
|
379
|
+
# @return [void]
|
380
|
+
#
|
381
|
+
# @param [Molinillo::ResolverError] error
|
382
|
+
#
|
383
|
+
def handle_resolver_error(error)
|
384
|
+
case error
|
385
|
+
when Molinillo::VersionConflict
|
386
|
+
error.conflicts.each do |name, conflict|
|
387
|
+
lockfile_reqs = conflict.requirements[name_for_locking_dependency_source]
|
388
|
+
if lockfile_reqs && lockfile_reqs.last && lockfile_reqs.last.prerelease? && !conflict.existing
|
389
|
+
raise Informative, 'Due to the previous naïve CocoaPods resolver, ' \
|
390
|
+
"you were using a pre-release version of `#{name}`, " \
|
391
|
+
'without explicitly asking for a pre-release version, which now leads to a conflict. ' \
|
392
|
+
'Please decide to either use that pre-release version by adding the ' \
|
393
|
+
'version requirement to your Podfile ' \
|
394
|
+
"(e.g. `pod '#{name}', '#{lockfile_reqs.map(&:requirement).join("', '")}'`) " \
|
395
|
+
"or revert to a stable version by running `pod update #{name}`."
|
396
|
+
end
|
397
|
+
end
|
398
|
+
end
|
399
|
+
raise Informative, error.message
|
400
|
+
end
|
401
|
+
|
363
402
|
# Returns the target-appropriate nodes that are `successors` of `node`,
|
364
403
|
# rejecting those that are scoped by target platform and have incompatible
|
365
404
|
# targets.
|
data/lib/cocoapods/sandbox.rb
CHANGED
@@ -64,8 +64,12 @@ module Pod
|
|
64
64
|
# @return [Lockfile] the manifest which contains the information about the
|
65
65
|
# installed pods.
|
66
66
|
#
|
67
|
+
attr_accessor :manifest
|
68
|
+
|
67
69
|
def manifest
|
68
|
-
|
70
|
+
@manifest ||= begin
|
71
|
+
Lockfile.from_file(manifest_path) if manifest_path.exist?
|
72
|
+
end
|
69
73
|
end
|
70
74
|
|
71
75
|
# @return [Project] the Pods project.
|
@@ -78,6 +78,27 @@ module Pod
|
|
78
78
|
paths_for_attribute(:source_files)
|
79
79
|
end
|
80
80
|
|
81
|
+
# @return [Array<Pathname>] the source files of the specification that
|
82
|
+
# use ARC.
|
83
|
+
#
|
84
|
+
def arc_source_files
|
85
|
+
case spec_consumer.requires_arc
|
86
|
+
when TrueClass
|
87
|
+
source_files
|
88
|
+
when FalseClass
|
89
|
+
[]
|
90
|
+
else
|
91
|
+
paths_for_attribute(:requires_arc) & source_files
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# @return [Array<Pathname>] the source files of the specification that
|
96
|
+
# do not use ARC.
|
97
|
+
#
|
98
|
+
def non_arc_source_files
|
99
|
+
source_files - arc_source_files
|
100
|
+
end
|
101
|
+
|
81
102
|
# @return [Array<Pathname>] the headers of the specification.
|
82
103
|
#
|
83
104
|
def headers
|
@@ -237,7 +237,7 @@ module Pod
|
|
237
237
|
version_msg = (min == max) ? min : "#{min} - #{max}"
|
238
238
|
raise Informative, "The `#{dir.basename}` repo requires " \
|
239
239
|
"CocoaPods #{version_msg} (currently using #{Pod::VERSION})\n".red +
|
240
|
-
|
240
|
+
'Update CocoaPods, or checkout the appropriate tag in the repo.'
|
241
241
|
end
|
242
242
|
|
243
243
|
needs_sudo = path_writable?(__FILE__)
|
data/lib/cocoapods/target.rb
CHANGED
@@ -83,7 +83,7 @@ module Pod
|
|
83
83
|
#
|
84
84
|
def xcconfig_path(variant = nil)
|
85
85
|
if variant
|
86
|
-
support_files_dir + "#{label}.#{variant.downcase}.xcconfig"
|
86
|
+
support_files_dir + "#{label}.#{variant.gsub(File::SEPARATOR, '-').downcase}.xcconfig"
|
87
87
|
else
|
88
88
|
support_files_dir + "#{label}.xcconfig"
|
89
89
|
end
|
@@ -191,17 +191,22 @@ module Pod
|
|
191
191
|
|
192
192
|
# Prints a message with a label.
|
193
193
|
#
|
194
|
-
def labeled(label, value, justification =
|
194
|
+
def labeled(label, value, justification = 12)
|
195
195
|
if value
|
196
|
-
|
197
|
-
|
196
|
+
title = "- #{label}:".ljust(justification)
|
197
|
+
output = begin
|
198
198
|
if value.is_a?(Array)
|
199
|
-
|
200
|
-
|
199
|
+
lines = [wrap_string(title, self.indentation_level)]
|
200
|
+
value.each do |v|
|
201
|
+
lines << wrap_string("- #{v}", self.indentation_level + 2)
|
202
|
+
end
|
203
|
+
lines.join("\n")
|
201
204
|
else
|
202
|
-
|
203
|
-
end
|
205
|
+
wrap_string(title + "#{value}", self.indentation_level)
|
206
|
+
end + "\n"
|
204
207
|
end
|
208
|
+
puts output
|
209
|
+
output
|
205
210
|
end
|
206
211
|
end
|
207
212
|
|
data/lib/cocoapods/validator.rb
CHANGED
@@ -131,10 +131,9 @@ module Pod
|
|
131
131
|
attr_accessor :local
|
132
132
|
alias_method :local?, :local
|
133
133
|
|
134
|
-
# @return [Bool] Whether the validator should fail only on errors
|
135
|
-
# on warnings.
|
134
|
+
# @return [Bool] Whether the validator should fail on warnings, or only on errors.
|
136
135
|
#
|
137
|
-
attr_accessor :
|
136
|
+
attr_accessor :allow_warnings
|
138
137
|
|
139
138
|
# @return [String] name of the subspec to check, if nil all subspecs are checked.
|
140
139
|
#
|
@@ -155,7 +154,7 @@ module Pod
|
|
155
154
|
# @return [Boolean]
|
156
155
|
#
|
157
156
|
def validated?
|
158
|
-
result_type != :error && (result_type != :warning ||
|
157
|
+
result_type != :error && (result_type != :warning || allow_warnings)
|
159
158
|
end
|
160
159
|
|
161
160
|
# @return [Symbol]
|
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.35.0
|
4
|
+
version: 0.35.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: 2014-11-
|
12
|
+
date: 2014-11-19 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.35.0
|
20
|
+
version: 0.35.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.35.0
|
27
|
+
version: 0.35.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: claide
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,28 +45,28 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - ~>
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.20.
|
48
|
+
version: 0.20.2
|
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.20.
|
55
|
+
version: 0.20.2
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: cocoapods-downloader
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - ~>
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
62
|
+
version: 0.8.0
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
69
|
+
version: 0.8.0
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: cocoapods-plugins
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,28 +101,28 @@ dependencies:
|
|
101
101
|
requirements:
|
102
102
|
- - ~>
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: 0.4.
|
104
|
+
version: 0.4.1
|
105
105
|
type: :runtime
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - ~>
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: 0.4.
|
111
|
+
version: 0.4.1
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: molinillo
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - ~>
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: 0.1.
|
118
|
+
version: 0.1.2
|
119
119
|
type: :runtime
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - ~>
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.1.
|
125
|
+
version: 0.1.2
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: colored
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|