cocoapods-core 0.17.0.rc6 → 0.17.0.rc7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f16df566bf9d03c8f0e5026dbc78ed3d2b2224b
4
- data.tar.gz: 67af4c059d2f9ffc0cccf953e86b534027a18a43
3
+ metadata.gz: efc2bb9d0631f1b6892c062e5c66eeb9f8a876ef
4
+ data.tar.gz: 73fe2a60460bd2f95c0212bffa3d1d2dbe4f86c3
5
5
  SHA512:
6
- metadata.gz: e0ac43dc421675a3dc4f717251d150a3c981147acda279caa52f7e5f5bf3d13c0a4c19a81903f814fa221f364a3354b65583df777abc8369ffbdd19fadb70515
7
- data.tar.gz: adb5be37a6b3d9fea4f8b9b5be0c42af1432c9c3cc9f89e1a8792033616088a19a3b8f0e9c12b1cfcb27131229995658c587a6f9b266ce367775ac09fe52a2ba
6
+ metadata.gz: fdf7ab2b16c17c019275d916c18c81fbc1cc5b33f91c730b9c9100c8ea4cb70baf4efb9fbf7a6f37292abca9435cb6349dcf9627cc28276d0d652170f2bd2075
7
+ data.tar.gz: 3cf61b76148d7ea8e07026df2ab1d76f2e766dabfc6e81547571b42387555ccfd7b57a9e48c22d9a4e0b066f02d4e4a1872fb4436d6e37394fc9d3831a385d21
@@ -27,6 +27,11 @@ module Pod
27
27
  require 'cocoapods-core/specification'
28
28
  require 'cocoapods-core/standard_error'
29
29
  require 'cocoapods-core/yaml_converter'
30
+
31
+ # TODO: Temporary support for FileList
32
+ #
33
+ require 'rake'
34
+ FileList = Rake::FileList
30
35
  end
31
36
 
32
37
 
@@ -2,5 +2,5 @@ module Pod
2
2
 
3
3
  # The version of the cocoapods-core.
4
4
  #
5
- CORE_VERSION = '0.17.0.rc6' unless defined? Pod::CORE_VERSION
5
+ CORE_VERSION = '0.17.0.rc7' unless defined? Pod::CORE_VERSION
6
6
  end
@@ -56,10 +56,13 @@ module Pod
56
56
  # Checks whether the source of the proposed specification is different
57
57
  # from the one of the reference specification.
58
58
  #
59
+ # @note HTTP Sources are ignored as they change per version.
60
+ #
59
61
  # @return [void]
60
62
  #
61
63
  def check_spec_source_change(spec, errors)
62
64
  return unless spec
65
+ return if spec.source[:http]
63
66
  return unless reference_spec(spec)
64
67
  keys = Spec::DSL::SOURCE_KEYS.keys
65
68
  source = spec.source.values_at(*keys).compact.first
@@ -101,8 +104,8 @@ module Pod
101
104
  end
102
105
  end
103
106
 
104
- # Checks that there is a specification available for the dependencies of
105
- # the given specification.
107
+ # Checks that there is a specification available for each of the
108
+ # dependencies of the given specification.
106
109
  #
107
110
  # @return [void]
108
111
  #
@@ -17,12 +17,6 @@ module Pod
17
17
  @linter_results = {}
18
18
  end
19
19
 
20
- # @return [Bool] Whether the more strict validation of the master repo
21
- # should be used. Specifically The master repo treats certain
22
- # warnings as errors.
23
- #
24
- attr_accessor :master_repo_mode
25
-
26
20
  public
27
21
 
28
22
  # @!group Configuration
@@ -93,7 +87,6 @@ module Pod
93
87
  #
94
88
  def lint_spec(name, version, spec_path)
95
89
  linter = Specification::Linter.new(spec_path)
96
- linter.master_repo_mode = master_repo_mode
97
90
  linter.lint
98
91
  linter.results.each do |result|
99
92
  type = result.type == :error ? :error : :warning
@@ -117,8 +110,8 @@ module Pod
117
110
  # @return [void]
118
111
  #
119
112
  def check_spec_path(name, version, spec)
120
- unless spec.name == name && spec.version == version
121
- report.add_message(:error, "Incorrect path", name)
113
+ unless spec.name == name && spec.version.to_s == version.to_s
114
+ report.add_message(:error, "Incorrect path", name, spec.version)
122
115
  end
123
116
  end
124
117
 
@@ -35,12 +35,6 @@ module Pod
35
35
  end
36
36
  end
37
37
 
38
- # @return [Bool] Whether the more strict validation of the master repo
39
- # should be used. Specifically The master repo treats certain
40
- # warnings as errors.
41
- #
42
- attr_accessor :master_repo_mode
43
-
44
38
  # Lints the specification adding a {Result} for any failed check to the
45
39
  # {#results} list.
46
40
  #
@@ -98,7 +92,10 @@ module Pod
98
92
  text = @file.read
99
93
  error "`config.ios?` and `config.osx?` are deprecated." if text =~ /config\..?os.?/
100
94
  error "clean_paths are deprecated (use preserve_paths)." if text =~ /clean_paths/
101
- master_repo_error "Comments must be deleted." if text.scan(/^\s*#\s+/).length > 24
95
+ all_lines_count = text.lines.count
96
+ comments_lines_count = text.scan(/^\s*#\s+/).length
97
+ comments_ratio = comments_lines_count.fdiv(all_lines_count)
98
+ warning "Comments must be deleted." if comments_lines_count > 20 && comments_ratio > 0.2
102
99
  end
103
100
 
104
101
  # Checks that every root only attribute which is required has a value.
@@ -204,18 +201,18 @@ module Pod
204
201
  # Performs validations related to the `summary` attribute.
205
202
  #
206
203
  def _validate_summary(s)
207
- master_repo_error "The summary should be short use `description` (max 140 characters)." if s.length > 140
208
- master_repo_error "The summary is not meaningful." if s =~ /A short description of/
204
+ warning "The summary should be short use `description` (max 140 characters)." if s.length > 140
205
+ warning "The summary is not meaningful." if s =~ /A short description of/
209
206
  warning "The summary should end with proper punctuation." if s !~ /(\.|\?|!)$/
210
207
  end
211
208
 
212
209
  # Performs validations related to the `description` attribute.
213
210
  #
214
211
  def _validate_description(d)
215
- master_repo_error "The description is not meaningful." if d =~ /An optional longer description of/
216
- master_repo_error "The description should end with proper punctuation." if d !~ /(\.|\?|!)$/
217
- master_repo_error "The description is equal to the summary." if d == spec.summary
218
- master_repo_error "The description is shorter than the summary." if d.length < spec.summary.length
212
+ warning "The description is not meaningful." if d =~ /An optional longer description of/
213
+ warning "The description should end with proper punctuation." if d !~ /(\.|\?|!)$/
214
+ warning "The description is equal to the summary." if d == spec.summary
215
+ warning "The description is shorter than the summary." if d.length < spec.summary.length
219
216
  end
220
217
 
221
218
  # Performs validations related to the `license` attribute.
@@ -223,7 +220,7 @@ module Pod
223
220
  def _validate_license(l)
224
221
  type = l[:type]
225
222
  warning "Missing license type." if type.nil?
226
- master_repo_error "Invalid license type." if type && type.gsub(' ', '').gsub("\n", '').empty?
223
+ warning "Invalid license type." if type && type.gsub(' ', '').gsub("\n", '').empty?
227
224
  error "Sample license type." if type && type =~ /\(example\)/
228
225
  end
229
226
 
@@ -237,14 +234,14 @@ module Pod
237
234
 
238
235
  error "Example source." if git =~ /http:\/\/EXAMPLE/
239
236
  error 'The commit of a Git source cannot be `HEAD`.' if commit && commit.downcase =~ /head/
240
- master_repo_error 'The version should be included in the Git tag.' if tag && !tag.include?(version)
241
- master_repo_error "Github repositories should end in `.git`." if github && !git.end_with?('.git')
242
- master_repo_error "Github repositories should use `https` link." if github && !git.start_with?('https://github.com') && !git.start_with?('git://gist.github.com')
237
+ warning 'The version should be included in the Git tag.' if tag && !tag.include?(version)
238
+ warning "Github repositories should end in `.git`." if github && !git.end_with?('.git')
239
+ warning "Github repositories should use `https` link." if github && !git.start_with?('https://github.com') && !git.start_with?('git://gist.github.com')
243
240
 
244
241
  if version == '0.0.1'
245
242
  error 'Git sources should specify either a commit or a tag.' if commit.nil? && tag.nil?
246
243
  else
247
- master_repo_error 'Git sources should specify a tag.' if tag.nil?
244
+ warning 'Git sources should specify a tag.' if tag.nil?
248
245
  end
249
246
  end
250
247
  end
@@ -277,9 +274,7 @@ module Pod
277
274
  patterns.each do |pattern|
278
275
  if pattern.is_a?(Rake::FileList)
279
276
  # TODO: enable for the 0.17 release
280
- unless master_repo_mode
281
- warning "Rake::FileList is deprecated, use `exclude_files` (#{attrb.name})."
282
- end
277
+ # warning "Rake::FileList is deprecated, use `exclude_files` (#{attrb.name})."
283
278
  else
284
279
  if pattern.start_with?('/')
285
280
  error "File patterns must be relative and cannot start with a slash (#{attrb.name})."
@@ -336,22 +331,6 @@ module Pod
336
331
  add_result(:warning, message)
337
332
  end
338
333
 
339
- # Adds an error if the master repo mode is enabled, otherwise logs a
340
- # warning.
341
- #
342
- # @param [String] message
343
- # The message of the result.
344
- #
345
- # @return [void]
346
- #
347
- def master_repo_error(message)
348
- if master_repo_mode
349
- error(message)
350
- else
351
- warning(message)
352
- end
353
- end
354
-
355
334
  # Adds a result of the given type with the given message. If there is a
356
335
  # current platform it is added to the result. If a result with the same
357
336
  # type and the same message is already available the current platform is
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.17.0.rc6
4
+ version: 0.17.0.rc7
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-03-20 00:00:00.000000000 Z
12
+ date: 2013-03-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: 3.2.6
20
+ version: 3.2.13
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: 3.2.6
27
+ version: 3.2.13
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: faraday
30
30
  requirement: !ruby/object:Gem::Requirement