motion-cocoapods 1.6.0 → 1.7.0

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: c080d5b0ed0340f6aef99a31c114007c1680963d
4
- data.tar.gz: 3474078ff4ad74cf0acd84dce6c9e6c0ab218f7a
3
+ metadata.gz: f654cd843c3fb327bc7e79e077f4baf50c832689
4
+ data.tar.gz: c85e57fad5afed873f20d4129674e552c8849e6c
5
5
  SHA512:
6
- metadata.gz: 01f8d63b9a7bf46edc207e225a408d3c327a641bd8225025ddd3873fd62793fc8d8426522c76ca95fffe0abdd4854682d94c6629ea0c09938cc3e8cf28563a5d
7
- data.tar.gz: b98d5b10ec810c59a8b93746d0d3cc7b1ef19801f1038bfa6a97b30cc44162f8d43a7057a3ce92d226169577898a3cdcd8a49fc437e0693dd6823037a5d2f9b3
6
+ metadata.gz: 8ef83e2d367daf17a544b04224f0efa1788c94fda4382abe1ed2a79e404bfbefb387dfad96442f01b7858e6d6691a1e909e9ccc5333b5844743e8f11d33dbcea
7
+ data.tar.gz: 884168eb5c190f7e3649119883b5c10d538bdca586abf2a3de91013fe13c8213616a95d0f6c03a2f5a6a052737eb3cdf1c1b7e203e7f651e8c3fa5a4358e69b8
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2012-2013, Laurent Sansonetti <lrz@hipbyte.com>
1
+ # Copyright (c) 2012-2014, Laurent Sansonetti <lrz@hipbyte.com>
2
2
  # All rights reserved.
3
3
  #
4
4
  # Redistribution and use in source and binary forms, with or without
@@ -113,17 +113,11 @@ module Motion::Project
113
113
  }.compact)
114
114
  @config.libs.uniq!
115
115
 
116
- @config.vendor_project(PODS_ROOT, :xcode, {
117
- :target => 'Pods',
118
- :headers_dir => 'Headers/Public',
119
- :products => pods_libs.map { |lib_name| "lib#{lib_name}.a" }
120
- }.merge(@vendor_options))
121
-
122
116
  framework_search_paths = []
123
117
  if search_paths = xcconfig['FRAMEWORK_SEARCH_PATHS']
124
118
  search_paths = search_paths.strip
125
119
  unless search_paths.empty?
126
- search_paths.scan(/\"([^\"]+)\"/) do |search_path|
120
+ search_paths.scan(/"([^"]+)"/) do |search_path|
127
121
  path = search_path.first.gsub!(/(\$\(PODS_ROOT\))|(\$\{PODS_ROOT\})/, "#{@config.project_dir}/#{PODS_ROOT}")
128
122
  framework_search_paths << path if path
129
123
  end
@@ -135,14 +129,14 @@ module Motion::Project
135
129
  end
136
130
  end
137
131
  end
138
- frameworks = ldflags.scan(/-framework\s+([^\s]+)/).map { |m| m[0] }
132
+
133
+ header_dirs = ['Headers/Public']
134
+ frameworks = ldflags.scan(/-framework\s+"?([^\s"]+)"?/).map { |m| m[0] }
139
135
 
140
136
  case @config.deploy_platform
141
137
  when 'MacOSX'
142
138
  @config.framework_search_paths.concat(framework_search_paths)
143
- @config.frameworks.concat(frameworks)
144
- @config.frameworks.uniq!
145
-
139
+ @config.framework_search_paths.uniq!
146
140
  framework_search_paths.each do |framework_search_path|
147
141
  frameworks.reject! do |framework|
148
142
  path = File.join(framework_search_path, "#{framework}.framework")
@@ -155,6 +149,7 @@ module Motion::Project
155
149
  end
156
150
  end
157
151
  when 'iPhoneOS'
152
+ pods_root = cp_config.installation_root + 'Pods'
158
153
  # If we would really specify these as ‘frameworks’ then the linker
159
154
  # would not link the archive into the application, because it does not
160
155
  # see any references to any of the symbols in the archive. Treating it
@@ -165,6 +160,13 @@ module Motion::Project
165
160
  path = File.join(framework_search_path, "#{framework}.framework")
166
161
  if File.exist?(path)
167
162
  @config.libs << "-force_load '#{File.join(path, framework)}'"
163
+ # This is needed until (and if) CocoaPods links framework
164
+ # headers into `Headers/Public` by default:
165
+ #
166
+ # https://github.com/CocoaPods/CocoaPods/pull/2722
167
+ #
168
+ header_dir = Pathname.new(path) + 'Headers'
169
+ header_dirs << header_dir.realpath.relative_path_from(pods_root).to_s
168
170
  true
169
171
  else
170
172
  false
@@ -178,6 +180,12 @@ module Motion::Project
178
180
 
179
181
  @config.weak_frameworks.concat(ldflags.scan(/-weak_framework\s+([^\s]+)/).map { |m| m[0] })
180
182
  @config.weak_frameworks.uniq!
183
+
184
+ @config.vendor_project(PODS_ROOT, :xcode, {
185
+ :target => 'Pods',
186
+ :headers_dir => "{#{header_dirs.join(',')}}",
187
+ :products => pods_libs.map { |lib_name| "lib#{lib_name}.a" }
188
+ }.merge(@vendor_options))
181
189
  end
182
190
  end
183
191
 
@@ -238,17 +246,17 @@ module Motion::Project
238
246
  end
239
247
  end
240
248
 
241
- HEADERS_ROOT = File.join(PODS_ROOT, 'Headers')
249
+ PUBLIC_HEADERS_ROOT = File.join(PODS_ROOT, 'Headers/Public')
242
250
 
243
251
  def copy_cocoapods_env_and_prefix_headers
244
- headers = Dir.glob(["#{PODS_ROOT}/*.h", "#{PODS_ROOT}/*.pch"])
252
+ headers = Dir.glob(["#{PODS_ROOT}/*.h", "#{PODS_ROOT}/*.pch", "#{PODS_ROOT}/Target Support Files/**/*.h", "#{PODS_ROOT}/Target Support Files/**/*.pch"])
245
253
  headers.each do |header|
246
254
  src = File.basename(header)
247
255
  dst = src.sub(/\.pch$/, '.h')
248
- dst_path = File.join(HEADERS_ROOT, "____#{dst}")
256
+ dst_path = File.join(PUBLIC_HEADERS_ROOT, "____#{dst}")
249
257
  unless File.exist?(dst_path)
250
- FileUtils.mkdir_p(HEADERS_ROOT)
251
- FileUtils.cp(File.join(PODS_ROOT, src), dst_path)
258
+ FileUtils.mkdir_p(PUBLIC_HEADERS_ROOT)
259
+ FileUtils.cp(header, dst_path)
252
260
  end
253
261
  end
254
262
  end
@@ -256,6 +264,15 @@ module Motion::Project
256
264
  # Helpers
257
265
  #-------------------------------------------------------------------------#
258
266
 
267
+ # This is the output that gets shown in `rake config`, so it should be
268
+ # short and sweet.
269
+ #
270
+ def inspect
271
+ cp_config.lockfile.to_hash['PODS'].map do |pod|
272
+ pod.is_a?(Hash) ? pod.keys.first : pod
273
+ end.inspect
274
+ end
275
+
259
276
  def cp_config
260
277
  Pod::Config.instance
261
278
  end
@@ -24,6 +24,6 @@
24
24
 
25
25
  module Motion::Project
26
26
  class CocoaPods
27
- VERSION = '1.6.0'
27
+ VERSION = '1.7.0'
28
28
  end
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-cocoapods
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurent Sansonetti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-26 00:00:00.000000000 Z
11
+ date: 2014-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods