cocoapods 0.9.1 → 0.9.2

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,3 +1,22 @@
1
+ ## 0.9.2
2
+
3
+ [CocoaPods](http://git.io/AVlRKg) • [Xcodeproj](http://git.io/xHbc0w)
4
+
5
+ ###### Bug fixes
6
+
7
+ - When generating the PodsDummy class, make that class unique to each target. [#402](http://git.io/NntYiQ)
8
+ - Raise an informative error message when the platform in the `Podfile` is omitted or incorrect. [#403](http://git.io/k5EcUQ)
9
+
10
+
11
+ ## 0.9.1
12
+
13
+ [CocoaPods](http://git.io/_kqAbw)
14
+
15
+ ###### Bug fixes
16
+
17
+ - CocoaPods 0.9.x needs Xcodeproj 0.3.0.
18
+
19
+
1
20
  ## 0.9.0
2
21
 
3
22
  [CocoaPods](http://git.io/kucJQw) • [Xcodeproj](http://git.io/5eLL8g)
@@ -13,7 +13,7 @@ unless Gem::Version::Requirement.new('>= 1.4.0').satisfied_by?(Gem::Version.new(
13
13
  end
14
14
 
15
15
  module Pod
16
- VERSION = '0.9.1'
16
+ VERSION = '0.9.2'
17
17
 
18
18
  class PlainInformative < StandardError
19
19
  end
@@ -257,7 +257,7 @@ module Pod
257
257
  podspec = file.realpath.to_s
258
258
  platform = @platform
259
259
  podfile = Pod::Podfile.new do
260
- platform(platform)
260
+ platform(platform.to_sym, platform.deployment_target)
261
261
  pod name, :podspec => podspec
262
262
  end
263
263
  podfile
@@ -1,11 +1,18 @@
1
1
  module Pod
2
2
  module Generator
3
3
  class DummySource
4
+ attr_reader :class_name
5
+
6
+ def initialize(class_name_identifier)
7
+ validated_class_name_identifier = class_name_identifier.gsub(/[^0-9a-z_]/i, '_')
8
+ @class_name = "PodsDummy_#{validated_class_name_identifier}"
9
+ end
10
+
4
11
  def save_as(pathname)
5
12
  pathname.open('w') do |source|
6
- source.puts "@interface PodsDummy : NSObject"
13
+ source.puts "@interface #{class_name} : NSObject"
7
14
  source.puts "@end"
8
- source.puts "@implementation PodsDummy"
15
+ source.puts "@implementation #{class_name}"
9
16
  source.puts "@end"
10
17
  end
11
18
  end
@@ -107,10 +107,10 @@ module Pod
107
107
  acknowledgements_path = target_installer.target_definition.acknowledgements_path
108
108
  Generator::Acknowledgements.new(target_installer.target_definition,
109
109
  pods_for_target).save_as(acknowledgements_path)
110
+ generate_dummy_source(target_installer)
110
111
  end
111
112
 
112
113
  generate_lock_file!(specifications)
113
- generate_dummy_source
114
114
 
115
115
  puts "- Running post install hooks" if config.verbose?
116
116
  # Post install hooks run _before_ saving of project, so that they can alter it before saving.
@@ -172,17 +172,17 @@ module Pod
172
172
  end
173
173
  end
174
174
 
175
- def generate_dummy_source
176
- filename = "PodsDummy.m"
175
+ def generate_dummy_source(target_installer)
176
+ class_name_identifier = target_installer.target_definition.label
177
+ dummy_source = Generator::DummySource.new(class_name_identifier)
178
+ filename = "#{dummy_source.class_name}.m"
177
179
  pathname = Pathname.new(sandbox.root + filename)
178
- Generator::DummySource.new.save_as(pathname)
180
+ dummy_source.save_as(pathname)
179
181
 
180
182
  project_file = project.files.new('path' => filename)
181
183
  project.group("Targets Support Files") << project_file
182
184
 
183
- target_installers.each do |target_installer|
184
- target_installer.target.source_build_phases.first << project_file
185
- end
185
+ target_installer.target.source_build_phases.first << project_file
186
186
  end
187
187
 
188
188
  def specs_by_target
@@ -199,6 +199,8 @@ module Pod
199
199
  target = '4.3'
200
200
  when :osx
201
201
  target = '10.6'
202
+ else
203
+ raise Informative, "Unsupported platform: platform must be one of [:ios, :osx]"
202
204
  end
203
205
  end
204
206
  @target_definition.platform = Platform.new(name, target)
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.9.1
4
+ version: 0.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-14 00:00:00.000000000 Z
12
+ date: 2012-07-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday