cocoapods 0.15.0 → 0.15.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.
@@ -1,12 +1,32 @@
1
1
  ## Master
2
2
 
3
- [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.15.0...master)
3
+ [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.15.1...master)
4
+
5
+ ## 0.15.1
6
+
7
+ [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.15.0...0.15.1)
8
+
9
+ ###### Enhancements
10
+
11
+ - Show error if syntax error in Podfile or Podfile.lock.
12
+
13
+ ###### Bug fixes
14
+
15
+ - Fixed an issue that lead to empty directories for Pods.
16
+ [#519](https://github.com/CocoaPods/CocoaPods/issues/519)
17
+ [#568](https://github.com/CocoaPods/CocoaPods/issues/568)
18
+ - Fixed a crash related to the RubyGems version informative.
19
+ [#570](https://github.com/CocoaPods/CocoaPods/issues/570)
20
+ - Fixed a crash for `pod outdated`.
21
+ [#567](https://github.com/CocoaPods/CocoaPods/issues/567)
22
+ - Fixed an issue that lead to excessively slow sets computation.
4
23
 
5
24
  ## 0.15.0
6
25
 
7
26
  [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
27
 
9
28
  ###### Enhancements
29
+
10
30
  - Pod `install` will update the specs repo only if needed.
11
31
  [#533](https://github.com/CocoaPods/CocoaPods/issues/533)
12
32
  - CocoaPods now searches for the highest version of a Pod on all the repos.
@@ -29,6 +49,7 @@
29
49
 
30
50
 
31
51
  ###### Bug fixes
52
+
32
53
  - Subspecs namespacing has been restored.
33
54
  [#541](https://github.com/CocoaPods/CocoaPods/issues/541)
34
55
  - Improvements to the git cache that should be more robust.
data/LICENSE CHANGED
@@ -1,4 +1,5 @@
1
- Copyright (c) 2012 Eloy Durán <eloy.de.enige@gmail.com>
1
+ Copyright (c) 2011 - 2012 Eloy Durán <eloy.de.enige@gmail.com>
2
+ Copyright (c) 2012 Fabio Pelosin <fabiopelosin@gmail.com>
2
3
 
3
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
5
  of this software and associated documentation files (the "Software"), to deal
@@ -7,12 +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
- STDERR.puts "Your RubyGems version (#{Gem::VERSION}) is too old, please update with: `gem update --system`".red
10
+ STDERR.puts "\e[1;31m" + "Your RubyGems version (1.8.24) is too old, please update with: `gem update --system`" + "\e[0m"
11
11
  exit 1
12
12
  end
13
13
 
14
14
  module Pod
15
- VERSION = '0.15.0'
15
+ VERSION = '0.15.1'
16
16
 
17
17
  class PlainInformative < StandardError
18
18
  end
@@ -64,6 +64,6 @@ class Pathname
64
64
  end
65
65
 
66
66
  if ENV['COCOA_PODS_ENV'] == 'development'
67
- require 'pry'
67
+ require 'letters'
68
68
  require 'awesome_print'
69
69
  end
@@ -22,7 +22,6 @@ module Pod
22
22
  def run
23
23
  verify_podfile_exists!
24
24
  verify_lockfile_exists!
25
- update_spec_repos_if_necessary!
26
25
 
27
26
  sandbox = Sandbox.new(config.project_pods_root)
28
27
  resolver = Resolver.new(config.podfile, config.lockfile, sandbox)
@@ -30,6 +29,9 @@ module Pod
30
29
  resolver.update_external_specs = false
31
30
  resolver.resolve
32
31
 
32
+ #TODO: the command report new dependencies (added to by updated ones)
33
+ # as updates.
34
+
33
35
  names = resolver.pods_to_install - resolver.pods_from_external_sources
34
36
  specs = resolver.specs.select do |spec|
35
37
  names.include?(spec.name) && !spec.version.head?
@@ -163,12 +163,14 @@ module Pod
163
163
  #
164
164
  # @return [Array<Strings>] The paths that can be deleted.
165
165
  #
166
+ # @note The Paths are downcased to prevent issues. See #568.
167
+ #
166
168
  def clean_paths
167
- cached_used_paths = used_files
168
- files = Dir.glob(root + "**/*", File::FNM_DOTMATCH)
169
+ used = used_files.map(&:downcase)
170
+ files = Dir.glob(root + "**/*", File::FNM_DOTMATCH).map(&:downcase)
169
171
 
170
172
  files.reject! do |candidate|
171
- candidate.end_with?('.', '..') || cached_used_paths.any? do |path|
173
+ candidate.end_with?('.', '..') || used.any? do |path|
172
174
  path.include?(candidate) || candidate.include?(path)
173
175
  end
174
176
  end
@@ -8,7 +8,11 @@ module Pod
8
8
  #
9
9
  def self.from_file(path)
10
10
  return nil unless path.exist?
11
- hash = YAML.load(File.open(path))
11
+ begin
12
+ hash = YAML.load(File.open(path))
13
+ rescue Exception => e
14
+ raise Informative, "Podfile.lock syntax error: #{e.inspect}"
15
+ end
12
16
  lockfile = Lockfile.new(hash)
13
17
  lockfile.defined_in_file = path
14
18
  lockfile
@@ -177,7 +177,11 @@ module Pod
177
177
  string = File.open(path, 'r:utf-8') { |f| f.read }
178
178
  # TODO: work around for Rubinius incomplete encoding in 1.9 mode
179
179
  string.encode!('UTF-8') if string.respond_to?(:encoding) && string.encoding.name != "UTF-8"
180
- eval(string, nil, path.to_s)
180
+ begin
181
+ eval(string, nil, path.to_s)
182
+ rescue Exception => e
183
+ raise Informative, "Podfile syntax error: #{e.inspect}"
184
+ end
181
185
  end
182
186
  podfile.defined_in_file = path
183
187
  podfile.validate!
@@ -128,10 +128,22 @@ module Pod
128
128
 
129
129
  # @return [Array<Set>] The sets for all the pods available.
130
130
  #
131
+ # @note Implementation detail: The sources don't cache their values
132
+ # because they might change in response to an update. Therefore
133
+ # this method to prevent slowness caches the values before
134
+ # processing them.
135
+ #
131
136
  def all_sets
132
- all_pods.map do |pod|
133
- sources = all.select{ |s| s.pods.include?(pod) }.compact
134
- Specification::Set.new(pod, sources)
137
+ pods_by_source = {}
138
+ all.each do |source|
139
+ pods_by_source[source] = source.pods
140
+ end
141
+ sources = pods_by_source.keys
142
+ pods = pods_by_source.values.flatten.uniq
143
+
144
+ pods.map do |pod|
145
+ pod_sources = sources.select{ |s| pods_by_source[s].include?(pod) }.compact
146
+ Specification::Set.new(pod, pod_sources)
135
147
  end
136
148
  end
137
149
 
@@ -90,7 +90,7 @@ module Pod
90
90
  def github_stats_if_needed(set)
91
91
  return if get_value(set, :gh_date) && get_value(set, :gh_date) > Time.now - cache_expiration
92
92
  spec = set.specification
93
- url = spec.source.reject {|k,_| k == :commit || k == :tag }.values.first
93
+ url = spec.source[:git] || ''
94
94
  repo_id = url[/github.com\/([^\/\.]*\/[^\/\.]*)\.*/, 1]
95
95
  return unless repo_id
96
96
 
@@ -42,7 +42,7 @@ module Pod
42
42
  end
43
43
 
44
44
  def authors
45
- spec.authors.keys.to_sentence
45
+ spec.authors ? spec.authors.keys.to_sentence : ''
46
46
  end
47
47
 
48
48
  def homepage
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Eloy Duran
9
+ - Fabio Pelosin
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2012-10-02 00:00:00.000000000 Z
13
+ date: 2012-10-04 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: xcodeproj
@@ -181,7 +182,9 @@ description: ! 'CocoaPods manages library dependencies for your Xcode project.
181
182
 
182
183
  Ultimately, the goal is to improve discoverability of, and engagement in, third
183
184
  party open-source libraries, by creating a more centralized ecosystem.'
184
- email: eloy.de.enige@gmail.com
185
+ email:
186
+ - eloy.de.enige@gmail.com
187
+ - fabiopelosin@gmail.com
185
188
  executables:
186
189
  - pod
187
190
  extensions: []
@@ -253,7 +256,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
253
256
  version: '0'
254
257
  segments:
255
258
  - 0
256
- hash: -2489364705415265788
259
+ hash: -3399336200991652352
257
260
  required_rubygems_version: !ruby/object:Gem::Requirement
258
261
  none: false
259
262
  requirements: