cocoapods-packager 0.3.0 → 0.4.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/builder.rb +4 -4
- data/lib/cocoapods_packager.rb +1 -1
- data/lib/pod/command/package.rb +2 -1
- data/lib/spec_builder.rb +1 -1
- data/spec/command/package_spec.rb +28 -0
- data/spec/fixtures/NikeKit.podspec +19 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15b721f9ad9493eb807bfebfa9c505a3dbb0d27c
|
4
|
+
data.tar.gz: f6a90ea5358918fafde09f6e2fbdc1b6f794d91c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21a49fc9e21c0764850a9c01cf08b251c1a047ca9aed6320d52120433f7be46693f8648f5bf2d277418980b71a94181907487dc82f8ccdbed1dd670a918179ac
|
7
|
+
data.tar.gz: 3b94df361e45e15c39e33e1e7c0c1edd79424577664a3d1035ed6ffb20822c75216fbf9d06c504445a4d5acff22c665b9c66d55fa4ff922967190cceded55e70
|
data/Gemfile.lock
CHANGED
data/lib/builder.rb
CHANGED
@@ -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 =
|
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/
|
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}
|
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')
|
data/lib/cocoapods_packager.rb
CHANGED
data/lib/pod/command/package.rb
CHANGED
@@ -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
|
-
|
62
|
+
FileUtils.rm_f('Podfile.lock')
|
62
63
|
end
|
63
64
|
|
64
65
|
def build_package
|
data/lib/spec_builder.rb
CHANGED
@@ -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.
|
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:
|