cocoapods-packager 0.3.0 → 0.4.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: e8df03ad86ad928333cc4578359f12d6c612fd87
4
- data.tar.gz: 5f4c6f64a84f37bd46b0d040c39a5a296a451e40
3
+ metadata.gz: 15b721f9ad9493eb807bfebfa9c505a3dbb0d27c
4
+ data.tar.gz: f6a90ea5358918fafde09f6e2fbdc1b6f794d91c
5
5
  SHA512:
6
- metadata.gz: 1ed207f02e0bbb29cb420425f8ac495f1a0c2f90eab3ddccbc7c5a3b35bc87c7d6caeef4d00215265c66da4503f691fc307bf65c4111fd901601f0baf74d29c6
7
- data.tar.gz: 9169c857cca5088618398fb56f0a7004eb685ac2792ecc0b84b887948d8906e7dc864f6e4e98b38ed147a34daf1f45ec0168334e4908794d6312021c4b78a608
6
+ metadata.gz: 21a49fc9e21c0764850a9c01cf08b251c1a047ca9aed6320d52120433f7be46693f8648f5bf2d277418980b71a94181907487dc82f8ccdbed1dd670a918179ac
7
+ data.tar.gz: 3b94df361e45e15c39e33e1e7c0c1edd79424577664a3d1035ed6ffb20822c75216fbf9d06c504445a4d5acff22c665b9c66d55fa4ff922967190cceded55e70
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- cocoapods-packager (0.2.0)
12
+ cocoapods-packager (0.3.0)
13
13
 
14
14
  GEM
15
15
  remote: https://rubygems.org/
@@ -63,10 +63,10 @@ module Pod
63
63
  `libtool -static -o #{@sandbox_root}/build/package.a #{static_libs.join(' ')}`
64
64
 
65
65
  xcodebuild(defines, '-sdk iphonesimulator', 'build-sim')
66
- sim_libs = static_libs.map { |path| "#{@sandbox_root}/build-sim/#{File.basename(path)}" }
66
+ sim_libs = static_libs_in_sandbox('build-sim')
67
67
  `libtool -static -o #{@sandbox_root}/build-sim/package.a #{sim_libs.join(' ')}`
68
68
 
69
- `lipo #{@sandbox_root}/build/package.a #{@sandbox_root}/build-sim/libPods.a -create -output #{output}`
69
+ `lipo #{@sandbox_root}/build/package.a #{@sandbox_root}/build-sim/package.a -create -output #{output}`
70
70
  end
71
71
 
72
72
  def build_static_lib_for_mac(static_libs, output)
@@ -123,8 +123,8 @@ module Pod
123
123
  end
124
124
  end
125
125
 
126
- def static_libs_in_sandbox
127
- Dir.glob("#{@sandbox_root}/build/*.a").reject { |e| e =~ /libPods\.a$/ }
126
+ def static_libs_in_sandbox(build_dir='build')
127
+ Dir.glob("#{@sandbox_root}/#{build_dir}/*.a").reject { |e| e =~ /libPods\.a$/ }
128
128
  end
129
129
 
130
130
  def xcodebuild(defines = '', args = '', build_dir = 'build')
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  module Packager
3
- VERSION = '0.3.0'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -44,6 +44,7 @@ module Pod
44
44
  return if target_dir.nil?
45
45
  build_package
46
46
  `mv #{work_dir} #{target_dir}`
47
+ Dir.chdir(@source_dir)
47
48
  end
48
49
 
49
50
  :private
@@ -58,7 +59,7 @@ module Pod
58
59
  perform_build(platform, sandbox)
59
60
 
60
61
  Pathname.new(config.sandbox_root).rmtree
61
- Pathname.new('Podfile.lock').delete
62
+ FileUtils.rm_f('Podfile.lock')
62
63
  end
63
64
 
64
65
  def build_package
@@ -40,7 +40,7 @@ SPEC
40
40
  spec += " s.#{attribute} = #{value}\n"
41
41
  end
42
42
 
43
- spec + " s.source = '#{@source}'\n\n"
43
+ spec + " s.source = #{@source}\n\n"
44
44
  end
45
45
 
46
46
  def spec_single_platform_fix
@@ -3,6 +3,11 @@ require File.expand_path('../../spec_helper', __FILE__)
3
3
  module Pod
4
4
  describe Command::Spec::Package do
5
5
  describe 'CLAide' do
6
+ after do
7
+ Dir.glob("KFData-*").each { |dir| Pathname.new(dir).rmtree }
8
+ Dir.glob("NikeKit-*").each { |dir| Pathname.new(dir).rmtree }
9
+ end
10
+
6
11
  it 'registers itself' do
7
12
  Command.parse(%w{ package }).should.be.instance_of Command::Package
8
13
  end
@@ -23,6 +28,29 @@ module Pod
23
28
  end.message.should.match /Unable to find/
24
29
  end
25
30
 
31
+ it "mangles symbols if the Pod has dependencies" do
32
+ SourcesManager.stubs(:search).returns(nil)
33
+
34
+ command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec })
35
+ command.run
36
+
37
+ lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
38
+ symbols = Symbols.symbols_from_library(lib).uniq.sort.reject { |e| e =~ /PodNikeKit/ }
39
+ symbols.should == %w{ BBUNikePlusActivity BBUNikePlusSessionManager
40
+ BBUNikePlusTag PodsDummy_Pods_NikeKit }
41
+ end
42
+
43
+ it "does not mangle symbols if option --no-mangle is specified" do
44
+ SourcesManager.stubs(:search).returns(nil)
45
+
46
+ command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --no-mangle })
47
+ command.run
48
+
49
+ lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
50
+ symbols = Symbols.symbols_from_library(lib).uniq.sort.select { |e| e =~ /PodNikeKit/ }
51
+ symbols.should == []
52
+ end
53
+
26
54
  it "runs with a path to a spec" do
27
55
  SourcesManager.stubs(:search).returns(nil)
28
56
 
@@ -0,0 +1,19 @@
1
+ Pod::Spec.new do |s|
2
+ s.name = 'NikeKit'
3
+ s.version = '0.0.1'
4
+ s.summary = 'Objective-C implementation of the Nike+ API.'
5
+ s.homepage = 'https://github.com/neonichu/NikeKit'
6
+ s.license = {:type => 'MIT', :file => 'LICENSE'}
7
+ s.authors = { 'Boris Bügling' => 'http://buegling.com' }
8
+ s.source = { :git => 'https://github.com/neonichu/NikeKit.git', :tag => s.version.to_s }
9
+ s.platform = :ios, '6.0'
10
+
11
+ s.public_header_files = '*.h'
12
+ s.source_files = '*.{h,m}'
13
+ s.frameworks = 'Foundation'
14
+ s.requires_arc = true
15
+
16
+ s.dependency 'AFNetworking'
17
+ s.dependency 'ISO8601DateFormatter'
18
+ s.dependency 'KZPropertyMapper'
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-packager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Fuller
@@ -67,6 +67,7 @@ files:
67
67
  - scripts/lstsym.sh
68
68
  - spec/command/package_spec.rb
69
69
  - spec/fixtures/KFData.podspec
70
+ - spec/fixtures/NikeKit.podspec
70
71
  - spec/spec_helper.rb
71
72
  homepage: https://github.com/CocoaPods/cocoapods-packager
72
73
  licenses:
@@ -95,5 +96,6 @@ summary: ''
95
96
  test_files:
96
97
  - spec/command/package_spec.rb
97
98
  - spec/fixtures/KFData.podspec
99
+ - spec/fixtures/NikeKit.podspec
98
100
  - spec/spec_helper.rb
99
101
  has_rdoc: