cocoapods-packager 0.9.0 → 1.0.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 +1 -1
- data/Gemfile.lock +1 -1
- data/cocoapods-packager.gemspec +1 -1
- data/lib/cocoapods-packager/builder.rb +2 -2
- data/lib/cocoapods-packager/pod_utils.rb +24 -10
- data/lib/cocoapods-packager/spec_builder.rb +0 -1
- data/lib/cocoapods_packager.rb +1 -1
- data/lib/pod/command/package.rb +6 -5
- data/spec/command/error_spec.rb +8 -0
- data/spec/command/subspecs_spec.rb +29 -0
- data/spec/fixtures/layer-client-messaging-schema.podspec +13 -0
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daf6373e6fe4b564fcdb89c3f9088932c5ee5089
|
4
|
+
data.tar.gz: 98179203644200ea7ae4c527b2407da266923a92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c6efb257cf86a34176576abfe91f4500c2545f670f3ce0fa95806a49e9eb166490e07325801d12e7be8ed8a07cb5fba0f0d8d5f4f68aa7f6bb7e33779a5e0df
|
7
|
+
data.tar.gz: 2ef8bfcaf3570cd43e6c559ef369790702d1871fc83ef0bf5e14d9f1094bb0b1606637b7cc2f8eb83b1627d7676ea74588b24f51499460ea6cfe96803332a252
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/cocoapods-packager.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = 'cocoapods-packager'
|
8
8
|
spec.version = Pod::Packager::VERSION
|
9
9
|
spec.authors = ['Kyle Fuller']
|
10
|
-
spec.summary = ''
|
10
|
+
spec.summary = 'CocoaPods plugin which allows you to generate a framework or static library from a podspec.'
|
11
11
|
spec.homepage = 'https://github.com/CocoaPods/cocoapods-packager'
|
12
12
|
spec.license = 'MIT'
|
13
13
|
spec.files = `git ls-files`.split($/)
|
@@ -78,7 +78,7 @@ module Pod
|
|
78
78
|
defines = Symbols.mangle_for_pod_dependencies(@spec.name, @sandbox_root)
|
79
79
|
UI.puts 'Building mangled framework'
|
80
80
|
xcodebuild(defines)
|
81
|
-
|
81
|
+
defines
|
82
82
|
end
|
83
83
|
|
84
84
|
def compile
|
@@ -136,7 +136,7 @@ module Pod
|
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
139
|
-
def static_libs_in_sandbox(build_dir='build')
|
139
|
+
def static_libs_in_sandbox(build_dir = 'build')
|
140
140
|
Dir.glob("#{@sandbox_root}/#{build_dir}/libPods-*.a")
|
141
141
|
end
|
142
142
|
|
@@ -8,7 +8,8 @@ module Pod
|
|
8
8
|
File.basename(@path),
|
9
9
|
@spec.name,
|
10
10
|
platform_name,
|
11
|
-
@spec.deployment_target(platform_name)
|
11
|
+
@spec.deployment_target(platform_name),
|
12
|
+
@subspecs)
|
12
13
|
|
13
14
|
sandbox = Sandbox.new(config.sandbox_root)
|
14
15
|
installer = Installer.new(sandbox, podfile)
|
@@ -17,28 +18,41 @@ module Pod
|
|
17
18
|
sandbox
|
18
19
|
end
|
19
20
|
|
20
|
-
def podfile_from_spec(path, spec_name, platform_name, deployment_target)
|
21
|
+
def podfile_from_spec(path, spec_name, platform_name, deployment_target, subspecs)
|
21
22
|
Pod::Podfile.new do
|
22
23
|
platform(platform_name, deployment_target)
|
23
24
|
if path
|
24
|
-
|
25
|
+
if subspecs
|
26
|
+
subspecs.each do |subspec|
|
27
|
+
pod spec_name + '/' + subspec, :podspec => path
|
28
|
+
end
|
29
|
+
else
|
30
|
+
pod spec_name, :podspec => path
|
31
|
+
end
|
25
32
|
else
|
26
|
-
|
33
|
+
if subspecs
|
34
|
+
subspecs.each do |subspec|
|
35
|
+
pod spec_name + '/' + subspec, :path => '.'
|
36
|
+
end
|
37
|
+
else
|
38
|
+
pod spec_name, :path => '.'
|
39
|
+
end
|
27
40
|
end
|
28
41
|
end
|
29
42
|
end
|
30
43
|
|
31
|
-
def
|
44
|
+
def binary_only?(spec)
|
32
45
|
deps = spec.dependencies.map { |dep| spec_with_name(dep.name) }
|
33
46
|
|
34
47
|
[spec, *deps].each do |specification|
|
35
|
-
|
36
|
-
|
37
|
-
|
48
|
+
%w(vendored_frameworks vendored_libraries).each do |attrib|
|
49
|
+
if specification.attributes_hash[attrib]
|
50
|
+
return true
|
51
|
+
end
|
38
52
|
end
|
39
53
|
end
|
40
54
|
|
41
|
-
|
55
|
+
false
|
42
56
|
end
|
43
57
|
|
44
58
|
def spec_with_name(name)
|
@@ -60,7 +74,7 @@ module Pod
|
|
60
74
|
return
|
61
75
|
end
|
62
76
|
|
63
|
-
|
77
|
+
unless ['.podspec', '.json'].include? Pathname.new(path).extname
|
64
78
|
help! path + ': is not a podspec.'
|
65
79
|
return
|
66
80
|
end
|
data/lib/cocoapods_packager.rb
CHANGED
data/lib/pod/command/package.rb
CHANGED
@@ -11,7 +11,8 @@ module Pod
|
|
11
11
|
['--force', 'Overwrite existing files.'],
|
12
12
|
['--no-mangle', 'Do not mangle symbols of depedendant Pods.'],
|
13
13
|
['--embedded', 'Generate embedded frameworks.'],
|
14
|
-
['--library',
|
14
|
+
['--library', 'Generate static libraries.'],
|
15
|
+
['--subspecs', 'Only include the given subspecs']
|
15
16
|
]
|
16
17
|
end
|
17
18
|
|
@@ -23,6 +24,9 @@ module Pod
|
|
23
24
|
@name = argv.shift_argument
|
24
25
|
@source = argv.shift_argument
|
25
26
|
|
27
|
+
subspecs = argv.option('subspecs')
|
28
|
+
@subspecs = subspecs.split(',') unless subspecs.nil?
|
29
|
+
|
26
30
|
@source_dir = Dir.pwd
|
27
31
|
@spec = spec_with_path(@name)
|
28
32
|
@spec = spec_with_name(@name) unless @spec
|
@@ -32,10 +36,7 @@ module Pod
|
|
32
36
|
def validate!
|
33
37
|
super
|
34
38
|
help! 'A podspec name or path is required.' unless @spec
|
35
|
-
|
36
|
-
if !source_files_available? @spec
|
37
|
-
help! 'podspec has binary-only depedencies, mangling not possible.'
|
38
|
-
end
|
39
|
+
help! 'podspec has binary-only depedencies, mangling not possible.' if binary_only? @spec
|
39
40
|
end
|
40
41
|
|
41
42
|
def run
|
data/spec/command/error_spec.rb
CHANGED
@@ -4,6 +4,7 @@ module Pod
|
|
4
4
|
describe 'Packager' do
|
5
5
|
after do
|
6
6
|
Dir.glob("CPDColors-*").each { |dir| Pathname.new(dir).rmtree }
|
7
|
+
Dir.glob("layer-client-messaging-schema-*").each { |dir| Pathname.new(dir).rmtree }
|
7
8
|
end
|
8
9
|
|
9
10
|
it 'presents the help if a directory is provided' do
|
@@ -25,6 +26,13 @@ module Pod
|
|
25
26
|
end.message.should.match /binary-only/
|
26
27
|
end
|
27
28
|
|
29
|
+
it 'can package a podspec with only resources' do
|
30
|
+
command = Command.parse(%w{ package spec/fixtures/layer-client-messaging-schema.podspec --no-mangle })
|
31
|
+
command.run
|
32
|
+
|
33
|
+
true.should == true # To make the test pass without any shoulds
|
34
|
+
end
|
35
|
+
|
28
36
|
it 'can package a podspec with binary-only dependencies if --no-mangle is specified' do
|
29
37
|
command = Command.parse(%w{ package spec/fixtures/CPDColors.podspec --no-mangle })
|
30
38
|
command.run
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
describe Command::Spec::Package do
|
5
|
+
describe 'Subspecs' do
|
6
|
+
after do
|
7
|
+
Dir.glob("KFData-*").each { |dir| Pathname.new(dir).rmtree }
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'can package a single subspec' do
|
11
|
+
SourcesManager.stubs(:search).returns(nil)
|
12
|
+
|
13
|
+
command = Command.parse(%w{ package spec/fixtures/KFData.podspec --subspecs=Core})
|
14
|
+
command.run
|
15
|
+
|
16
|
+
true.should == true # To make the test pass without any shoulds
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'can package a list of subspecs' do
|
20
|
+
SourcesManager.stubs(:search).returns(nil)
|
21
|
+
|
22
|
+
command = Command.parse(%w{ package spec/fixtures/KFData.podspec --subspecs=Core,Compatibility})
|
23
|
+
command.run
|
24
|
+
|
25
|
+
true.should == true # To make the test pass without any shoulds
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Pod::Spec.new do |s|
|
2
|
+
s.name = "layer-client-messaging-schema"
|
3
|
+
s.version = "20140715104949748"
|
4
|
+
s.summary = "Packages the database schema and migrations for layer-client-messaging-schema"
|
5
|
+
s.homepage = "http://github.com/layerhq"
|
6
|
+
s.author = { "Steven Jones" => "steven@layer.com" }
|
7
|
+
s.source = { :git => "https://github.com/neonichu/CPDColors.git",
|
8
|
+
:tag => "0.1.0" }
|
9
|
+
s.license = 'Commercial'
|
10
|
+
s.requires_arc = true
|
11
|
+
|
12
|
+
s.resource_bundles = { 'layer-client-messaging-schema' => ['Code/**/*.h'] }
|
13
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-packager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Fuller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- scripts/lstsym.sh
|
69
69
|
- spec/command/error_spec.rb
|
70
70
|
- spec/command/package_spec.rb
|
71
|
+
- spec/command/subspecs_spec.rb
|
71
72
|
- spec/fixtures/Builder.podspec
|
72
73
|
- spec/fixtures/CPDColors.podspec
|
73
74
|
- spec/fixtures/KFData.podspec
|
@@ -90,6 +91,7 @@ files:
|
|
90
91
|
- spec/fixtures/PackagerTest/Podfile
|
91
92
|
- spec/fixtures/PackagerTest/Podfile.lock
|
92
93
|
- spec/fixtures/foo-bar.podspec
|
94
|
+
- spec/fixtures/layer-client-messaging-schema.podspec
|
93
95
|
- spec/integration/project_spec.rb
|
94
96
|
- spec/spec_helper.rb
|
95
97
|
- spec/specification/builder_spec.rb
|
@@ -116,10 +118,12 @@ rubyforge_project:
|
|
116
118
|
rubygems_version: 2.0.14
|
117
119
|
signing_key:
|
118
120
|
specification_version: 4
|
119
|
-
summary:
|
121
|
+
summary: CocoaPods plugin which allows you to generate a framework or static library
|
122
|
+
from a podspec.
|
120
123
|
test_files:
|
121
124
|
- spec/command/error_spec.rb
|
122
125
|
- spec/command/package_spec.rb
|
126
|
+
- spec/command/subspecs_spec.rb
|
123
127
|
- spec/fixtures/Builder.podspec
|
124
128
|
- spec/fixtures/CPDColors.podspec
|
125
129
|
- spec/fixtures/KFData.podspec
|
@@ -142,6 +146,7 @@ test_files:
|
|
142
146
|
- spec/fixtures/PackagerTest/Podfile
|
143
147
|
- spec/fixtures/PackagerTest/Podfile.lock
|
144
148
|
- spec/fixtures/foo-bar.podspec
|
149
|
+
- spec/fixtures/layer-client-messaging-schema.podspec
|
145
150
|
- spec/integration/project_spec.rb
|
146
151
|
- spec/spec_helper.rb
|
147
152
|
- spec/specification/builder_spec.rb
|