cocoapods-core 0.39.0.beta.5 → 0.39.0.rc.1
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/lib/cocoapods-core/dependency.rb +1 -1
- data/lib/cocoapods-core/gem_version.rb +1 -1
- data/lib/cocoapods-core/lockfile.rb +1 -1
- data/lib/cocoapods-core/platform.rb +2 -1
- data/lib/cocoapods-core/podfile.rb +21 -6
- data/lib/cocoapods-core/source/health_reporter.rb +1 -5
- data/lib/cocoapods-core/specification.rb +2 -2
- data/lib/cocoapods-core/specification/consumer.rb +1 -1
- data/lib/cocoapods-core/specification/dsl/platform_proxy.rb +2 -1
- data/lib/cocoapods-core/specification/linter.rb +3 -3
- data/lib/cocoapods-core/specification/linter/result.rb +1 -1
- data/lib/cocoapods-core/standard_error.rb +4 -4
- data/lib/cocoapods-core/version.rb +2 -1
- data/lib/cocoapods-core/yaml_helper.rb +21 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b5811fb8da66a24c3eec196ba8e7c03d5e10d15
|
4
|
+
data.tar.gz: 72861dbb796f441a58371a120baf8f92110d8b04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0ffeff25cfbf0a2c888c04babb2806f2c269c924e93219c242b40a2f0a14e0a7a3b2ed4edfb3f2fdcd7255522b540005ca9ec58e9257dcee00cb19a193f0e3b
|
7
|
+
data.tar.gz: b13968326dbe8279f8c6b2126e0a7ef163a1ee16d00d5221548c9a0fd1cc7105eb106d1b410fc717dc0c5118f499ce7b2154b2523d75965bb01f90ddfdce06e3
|
@@ -259,7 +259,7 @@ module Pod
|
|
259
259
|
installed_deps = dependencies.map do |dep|
|
260
260
|
dependencies_to_lock_pod_named(dep.root_name)
|
261
261
|
end.flatten
|
262
|
-
all_dep_names
|
262
|
+
all_dep_names = (dependencies + podfile.dependencies).map(&:name).uniq
|
263
263
|
all_dep_names.each do |name|
|
264
264
|
installed_dep = installed_deps.find { |d| d.name == name }
|
265
265
|
podfile_dep = podfile.dependencies.find { |d| d.name == name }
|
@@ -183,12 +183,12 @@ module Pod
|
|
183
183
|
# @return [Array] The keys used by the hash representation of the Podfile.
|
184
184
|
#
|
185
185
|
HASH_KEYS = %w(
|
186
|
-
target_definitions
|
187
186
|
workspace
|
188
187
|
sources
|
189
|
-
generate_bridge_support
|
190
|
-
set_arc_compatibility_flag
|
191
188
|
plugins
|
189
|
+
set_arc_compatibility_flag
|
190
|
+
generate_bridge_support
|
191
|
+
target_definitions
|
192
192
|
).freeze
|
193
193
|
|
194
194
|
# @return [Hash] The hash representation of the Podfile.
|
@@ -203,7 +203,22 @@ module Pod
|
|
203
203
|
# @return [String] The YAML representation of the Podfile.
|
204
204
|
#
|
205
205
|
def to_yaml
|
206
|
-
|
206
|
+
require 'cocoapods-core/yaml_helper'
|
207
|
+
"---\n" << YAMLHelper.convert_hash(to_hash, HASH_KEYS)
|
208
|
+
end
|
209
|
+
|
210
|
+
# @return [String] The SHA1 digest of the file in which the Podfile
|
211
|
+
# is defined.
|
212
|
+
#
|
213
|
+
# @return [Nil] If the podfile is not defined in a file.
|
214
|
+
#
|
215
|
+
def checksum
|
216
|
+
unless defined_in_file.nil?
|
217
|
+
require 'digest'
|
218
|
+
checksum = Digest::SHA1.hexdigest(File.read(defined_in_file))
|
219
|
+
checksum = checksum.encode('UTF-8') if checksum.respond_to?(:encode)
|
220
|
+
checksum
|
221
|
+
end
|
207
222
|
end
|
208
223
|
|
209
224
|
# @!group Class methods
|
@@ -243,7 +258,7 @@ module Pod
|
|
243
258
|
# @return [Podfile] the new Podfile
|
244
259
|
#
|
245
260
|
def self.from_ruby(path, contents = nil)
|
246
|
-
contents ||= File.open(path, 'r:utf-8'
|
261
|
+
contents ||= File.open(path, 'r:utf-8', &:read)
|
247
262
|
|
248
263
|
# Work around for Rubinius incomplete encoding in 1.9 mode
|
249
264
|
if contents.respond_to?(:encoding) && contents.encoding.name != 'UTF-8'
|
@@ -285,7 +300,7 @@ module Pod
|
|
285
300
|
# @return [Podfile] the new Podfile
|
286
301
|
#
|
287
302
|
def self.from_yaml(path)
|
288
|
-
string = File.open(path, 'r:utf-8'
|
303
|
+
string = File.open(path, 'r:utf-8', &:read)
|
289
304
|
# Work around for Rubinius incomplete encoding in 1.9 mode
|
290
305
|
if string.respond_to?(:encoding) && string.encoding.name != 'UTF-8'
|
291
306
|
string.encode!('UTF-8')
|
@@ -20,8 +20,6 @@ module Pod
|
|
20
20
|
# @!group Configuration
|
21
21
|
#-----------------------------------------------------------------------#
|
22
22
|
|
23
|
-
# rubocop:disable Style/TrivialAccessors
|
24
|
-
|
25
23
|
# Allows to specify an optional callback which is called before
|
26
24
|
# analysing every spec. Suitable for UI.
|
27
25
|
#
|
@@ -35,8 +33,6 @@ module Pod
|
|
35
33
|
@pre_check_callback = block
|
36
34
|
end
|
37
35
|
|
38
|
-
# rubocop:enable Style/TrivialAccessors
|
39
|
-
|
40
36
|
public
|
41
37
|
|
42
38
|
# @!group Actions
|
@@ -113,7 +109,7 @@ module Pod
|
|
113
109
|
#
|
114
110
|
def check_spec_path(name, version, spec)
|
115
111
|
unless spec.name == name && spec.version.to_s == version.to_s
|
116
|
-
message = "Incorrect path #{
|
112
|
+
message = "Incorrect path #{spec.defined_in_file}"
|
117
113
|
report.add_message(:error, message, name, spec.version)
|
118
114
|
end
|
119
115
|
end
|
@@ -495,8 +495,8 @@ module Pod
|
|
495
495
|
# @return [Nil] If the specification is not defined in a file.
|
496
496
|
#
|
497
497
|
def checksum
|
498
|
-
require 'digest'
|
499
498
|
unless defined_in_file.nil?
|
499
|
+
require 'digest'
|
500
500
|
checksum = Digest::SHA1.hexdigest(File.read(defined_in_file))
|
501
501
|
checksum = checksum.encode('UTF-8') if checksum.respond_to?(:encode)
|
502
502
|
checksum
|
@@ -530,7 +530,7 @@ module Pod
|
|
530
530
|
raise Informative, "No podspec exists at path `#{path}`."
|
531
531
|
end
|
532
532
|
|
533
|
-
string = File.open(path, 'r:utf-8'
|
533
|
+
string = File.open(path, 'r:utf-8', &:read)
|
534
534
|
# Work around for Rubinius incomplete encoding in 1.9 mode
|
535
535
|
if string.respond_to?(:encoding) && string.encoding.name != 'UTF-8'
|
536
536
|
string.encode!('UTF-8')
|
@@ -185,7 +185,7 @@ module Pod
|
|
185
185
|
# Performs validations related to the `name` attribute.
|
186
186
|
#
|
187
187
|
def _validate_name(name)
|
188
|
-
if name =~
|
188
|
+
if name =~ %r{/}
|
189
189
|
results.add_error('name', 'The name of a spec should not contain ' \
|
190
190
|
'a slash.')
|
191
191
|
end
|
@@ -316,7 +316,7 @@ module Pod
|
|
316
316
|
if type.nil?
|
317
317
|
results.add_warning('license', 'Missing license type.')
|
318
318
|
end
|
319
|
-
if type && type.
|
319
|
+
if type && type.delete(' ').delete("\n").empty?
|
320
320
|
results.add_warning('license', 'Invalid license type.')
|
321
321
|
end
|
322
322
|
if type && type =~ /\(example\)/
|
@@ -397,7 +397,7 @@ module Pod
|
|
397
397
|
#
|
398
398
|
def check_git_ssh_source(s)
|
399
399
|
if git = s[:git]
|
400
|
-
if git =~
|
400
|
+
if git =~ %r{\w+\@(\w|\.)+\:(/\w+)*}
|
401
401
|
results.add_warning('source', 'Git SSH URLs will NOT work for ' \
|
402
402
|
'people behind firewalls configured to only allow HTTP, ' \
|
403
403
|
'therefore HTTPS is preferred.', true)
|
@@ -77,16 +77,16 @@ module Pod
|
|
77
77
|
|
78
78
|
lines = contents.lines
|
79
79
|
indent = ' # '
|
80
|
-
indicator = indent.
|
80
|
+
indicator = indent.tr('#', '>')
|
81
81
|
first_line = (line_numer.zero?)
|
82
82
|
last_line = (line_numer == (lines.count - 1))
|
83
83
|
|
84
84
|
m << "\n"
|
85
85
|
m << "#{indent}from #{trace_line.gsub(/:in.*$/, '')}\n"
|
86
86
|
m << "#{indent}-------------------------------------------\n"
|
87
|
-
m << "#{indent}#{
|
88
|
-
m << "#{indicator}#{
|
89
|
-
m << "#{indent}#{
|
87
|
+
m << "#{indent}#{lines[line_numer - 1]}" unless first_line
|
88
|
+
m << "#{indicator}#{lines[line_numer]}"
|
89
|
+
m << "#{indent}#{lines[line_numer + 1]}" unless last_line
|
90
90
|
m << "\n" unless m.end_with?("\n")
|
91
91
|
m << "#{indent}-------------------------------------------\n"
|
92
92
|
end
|
@@ -158,7 +158,8 @@ module Pod
|
|
158
158
|
limit = [segments.size, other_segments.size].max
|
159
159
|
|
160
160
|
(0..limit).each do |i|
|
161
|
-
lhs
|
161
|
+
lhs = segments[i] || 0
|
162
|
+
rhs = other_segments[i] || 0
|
162
163
|
|
163
164
|
next if lhs == rhs
|
164
165
|
return lhs <=> rhs if lhs <=> rhs
|
@@ -55,12 +55,12 @@ module Pod
|
|
55
55
|
#
|
56
56
|
def load_string(yaml_string, file_path = nil)
|
57
57
|
YAML.load(yaml_string)
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
rescue
|
59
|
+
if yaml_has_merge_error?(yaml_string)
|
60
|
+
raise Informative, yaml_merge_conflict_msg(yaml_string, file_path)
|
61
|
+
else
|
62
|
+
raise Informative, yaml_parsing_error_msg(yaml_string, file_path)
|
63
|
+
end
|
64
64
|
end
|
65
65
|
|
66
66
|
# Loads a YAML file and leans on the #load_string imp
|
@@ -109,9 +109,21 @@ module Pod
|
|
109
109
|
#
|
110
110
|
def process_array(array)
|
111
111
|
result = sorted_array(array).map do |array_value|
|
112
|
-
process_according_to_class(array_value)
|
112
|
+
processed = process_according_to_class(array_value)
|
113
|
+
case array_value
|
114
|
+
when Array, Hash
|
115
|
+
if array_value.size > 1
|
116
|
+
processed = processed.gsub(/^.*/).to_a
|
117
|
+
head = processed.shift
|
118
|
+
processed.map { |s| " #{s}" }.prepend(head).join("\n")
|
119
|
+
else
|
120
|
+
processed
|
121
|
+
end
|
122
|
+
else
|
123
|
+
processed
|
124
|
+
end
|
113
125
|
end
|
114
|
-
"- #{result
|
126
|
+
"- #{result.join("\n- ").strip}"
|
115
127
|
end
|
116
128
|
|
117
129
|
# Converts a hash to YAML after sorting its keys. Optionally accepts a
|
@@ -136,7 +148,7 @@ module Pod
|
|
136
148
|
processed = process_according_to_class(key_value)
|
137
149
|
processed_key = process_according_to_class(key)
|
138
150
|
case key_value
|
139
|
-
when
|
151
|
+
when Hash, Array
|
140
152
|
key_partial_yaml = processed.lines.map { |line| " #{line}" } * ''
|
141
153
|
"#{processed_key}:\n#{key_partial_yaml}"
|
142
154
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.39.0.
|
4
|
+
version: 0.39.0.rc.1
|
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: 2015-10-
|
12
|
+
date: 2015-10-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|