my-cocoapods-packager 1.5.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 +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +3 -0
- data/.rubocop-cocoapods.yml +71 -0
- data/.rubocop.yml +38 -0
- data/.travis.yml +9 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +121 -0
- data/LICENSE +22 -0
- data/README.md +42 -0
- data/Rakefile +12 -0
- data/cocoapods-packager.gemspec +22 -0
- data/lib/cocoapods-packager/builder.rb +340 -0
- data/lib/cocoapods-packager/framework.rb +66 -0
- data/lib/cocoapods-packager/mangle.rb +32 -0
- data/lib/cocoapods-packager/pod_utils.rb +252 -0
- data/lib/cocoapods-packager/spec_builder.rb +63 -0
- data/lib/cocoapods-packager/symbols.rb +35 -0
- data/lib/cocoapods-packager/user_interface/build_failed_report.rb +15 -0
- data/lib/cocoapods_packager.rb +5 -0
- data/lib/cocoapods_plugin.rb +8 -0
- data/lib/pod/command/package.rb +163 -0
- data/scripts/lstconst.sh +9 -0
- data/scripts/lstsym.sh +8 -0
- data/spec/command/error_spec.rb +74 -0
- data/spec/command/package_spec.rb +359 -0
- data/spec/command/subspecs_spec.rb +30 -0
- data/spec/fixtures/Builder.podspec +25 -0
- data/spec/fixtures/CPDColors.podspec +19 -0
- data/spec/fixtures/FH.podspec +18 -0
- data/spec/fixtures/KFData.podspec +73 -0
- data/spec/fixtures/LibraryConsumerDemo/.gitignore +22 -0
- data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer/AppDelegate.h +17 -0
- data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer/AppDelegate.m +27 -0
- data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer/Info.plist +40 -0
- data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer/main.m +16 -0
- data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer.xcodeproj/project.pbxproj +340 -0
- data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer.xcodeproj/xcshareddata/xcschemes/LibraryConsumer.xcscheme +100 -0
- data/spec/fixtures/LibraryConsumerDemo/LibraryConsumer.xcworkspace/contents.xcworkspacedata +10 -0
- data/spec/fixtures/LibraryConsumerDemo/Podfile +5 -0
- data/spec/fixtures/LibraryDemo.podspec +14 -0
- data/spec/fixtures/NikeKit.podspec +19 -0
- data/spec/fixtures/OpenSans.podspec +18 -0
- data/spec/fixtures/PackagerTest/.gitignore +21 -0
- data/spec/fixtures/PackagerTest/PackagerTest/CPDAppDelegate.h +15 -0
- data/spec/fixtures/PackagerTest/PackagerTest/CPDAppDelegate.m +49 -0
- data/spec/fixtures/PackagerTest/PackagerTest/Images.xcassets/AppIcon.appiconset/Contents.json +23 -0
- data/spec/fixtures/PackagerTest/PackagerTest/Images.xcassets/LaunchImage.launchimage/Contents.json +23 -0
- data/spec/fixtures/PackagerTest/PackagerTest/PackagerTest-Info.plist +38 -0
- data/spec/fixtures/PackagerTest/PackagerTest/PackagerTest-Prefix.pch +16 -0
- data/spec/fixtures/PackagerTest/PackagerTest/en.lproj/InfoPlist.strings +2 -0
- data/spec/fixtures/PackagerTest/PackagerTest/main.m +18 -0
- data/spec/fixtures/PackagerTest/PackagerTest.xcodeproj/project.pbxproj +536 -0
- data/spec/fixtures/PackagerTest/PackagerTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/spec/fixtures/PackagerTest/PackagerTest.xcodeproj/xcshareddata/xcschemes/PackagerTest.xcscheme +110 -0
- data/spec/fixtures/PackagerTest/PackagerTest.xcworkspace/contents.xcworkspacedata +1 -0
- data/spec/fixtures/PackagerTest/PackagerTestTests/PackagerTestTests-Info.plist +22 -0
- data/spec/fixtures/PackagerTest/PackagerTestTests/PackagerTestTests.m +34 -0
- data/spec/fixtures/PackagerTest/PackagerTestTests/en.lproj/InfoPlist.strings +2 -0
- data/spec/fixtures/PackagerTest/Podfile +10 -0
- data/spec/fixtures/PackagerTest/Podfile.lock +32 -0
- data/spec/fixtures/Weakly.podspec +13 -0
- data/spec/fixtures/a.podspec +19 -0
- data/spec/fixtures/foo-bar.podspec +19 -0
- data/spec/fixtures/layer-client-messaging-schema.podspec +13 -0
- data/spec/integration/project_spec.rb +70 -0
- data/spec/pod/utils_spec.rb +58 -0
- data/spec/spec_helper.rb +50 -0
- data/spec/specification/builder_spec.rb +40 -0
- data/spec/specification/spec_builder_spec.rb +61 -0
- data/spec/user_interface/build_failed_report_spec.rb +11 -0
- metadata +212 -0
@@ -0,0 +1,359 @@
|
|
1
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
2
|
+
|
3
|
+
module Pod
|
4
|
+
|
5
|
+
DONT_CODESIGN = true
|
6
|
+
|
7
|
+
describe Command::Spec::Package do
|
8
|
+
describe 'CLAide' do
|
9
|
+
after do
|
10
|
+
Dir.glob("KFData-*").each { |dir| Pathname.new(dir).rmtree }
|
11
|
+
Dir.glob("NikeKit-*").each { |dir| Pathname.new(dir).rmtree }
|
12
|
+
Dir.glob("foo-bar-*").each { |dir| Pathname.new(dir).rmtree }
|
13
|
+
Dir.glob("a-*").each { |dir| Pathname.new(dir).rmtree }
|
14
|
+
Dir.glob("FH-*").each { |dir| Pathname.new(dir).rmtree }
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'registers itself' do
|
18
|
+
Command.parse(%w{ package }).should.be.instance_of Command::Package
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'presents the help if no spec is provided' do
|
22
|
+
command = Command.parse(%w{ package })
|
23
|
+
should.raise CLAide::Help do
|
24
|
+
command.validate!
|
25
|
+
end.message.should.match /required/
|
26
|
+
end
|
27
|
+
|
28
|
+
it "errors if it cannot find a spec" do
|
29
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
30
|
+
|
31
|
+
command = Command.parse(%w{ package KFData })
|
32
|
+
should.raise CLAide::Help do
|
33
|
+
command.run
|
34
|
+
end.message.should.match /Unable to find/
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
it "should produce a dynamic library when dynamic is specified" do
|
39
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
40
|
+
|
41
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --dynamic })
|
42
|
+
command.run
|
43
|
+
|
44
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
45
|
+
file_command = "file #{lib}"
|
46
|
+
output = `#{file_command}`.lines.to_a
|
47
|
+
|
48
|
+
output[0].should.match /Mach-O universal binary with 5 architectures/
|
49
|
+
output[1].should.match /Mach-O dynamically linked shared library i386/
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should produce a dSYM when dynamic is specified" do
|
53
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
54
|
+
|
55
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --dynamic })
|
56
|
+
command.run
|
57
|
+
|
58
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework.dSYM/Contents/Resources/DWARF/NikeKit").first
|
59
|
+
file_command = "file #{lib}"
|
60
|
+
output = `#{file_command}`.lines.to_a
|
61
|
+
|
62
|
+
output[0].should.match /Mach-O universal binary with 3 architectures/
|
63
|
+
output[1].should.match /Mach-O dSYM companion file arm/
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should link category symbols when dynamic is specified" do
|
67
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
68
|
+
|
69
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --dynamic })
|
70
|
+
command.run
|
71
|
+
|
72
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
73
|
+
file_command = "nm #{lib}"
|
74
|
+
output = `#{file_command}`.lines.to_a
|
75
|
+
|
76
|
+
match = output.detect { |line| line =~ /UIButton\(AFNetworking\)/ }
|
77
|
+
match.should.not.be.empty
|
78
|
+
end
|
79
|
+
|
80
|
+
it "should produce a dynamic library for OSX when dynamic is specified" do
|
81
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
82
|
+
|
83
|
+
command = Command.parse(%w{ package spec/fixtures/KFData.podspec --dynamic })
|
84
|
+
command.run
|
85
|
+
|
86
|
+
lib = Dir.glob("KFData-*/osx/KFData.framework/KFData").first
|
87
|
+
file_command = "file #{lib}"
|
88
|
+
output = `#{file_command}`.lines.to_a
|
89
|
+
|
90
|
+
output[0].should.match /Mach-O 64-bit dynamically linked shared library x86_64/
|
91
|
+
end
|
92
|
+
|
93
|
+
it "should produce a dSYM for OSX when dynamic is specified" do
|
94
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
95
|
+
|
96
|
+
command = Command.parse(%w{ package spec/fixtures/KFData.podspec --dynamic })
|
97
|
+
command.run
|
98
|
+
|
99
|
+
lib = Dir.glob("KFData-*/osx/KFData.framework.dSYM/Contents/Resources/DWARF/KFData").first
|
100
|
+
file_command = "file #{lib}"
|
101
|
+
output = `#{file_command}`.lines.to_a
|
102
|
+
|
103
|
+
output[0].should.match /Mach-O 64-bit dSYM companion file x86_64/
|
104
|
+
end
|
105
|
+
|
106
|
+
it "should produce the default plist for iOS and OSX when --dynamic is specified but --bundle-identifier is not" do
|
107
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
108
|
+
|
109
|
+
command = Command.parse(%w{ package spec/fixtures/KFData.podspec --dynamic})
|
110
|
+
command.run
|
111
|
+
|
112
|
+
ios_plist = File.expand_path(Dir.glob("KFData-*/ios/KFData.framework/Info.plist").first)
|
113
|
+
osx_plist = File.expand_path(Dir.glob("KFData-*/osx/KFData.framework/Resources/Info.plist").first)
|
114
|
+
|
115
|
+
ios_bundle_id = `defaults read #{ios_plist} CFBundleIdentifier`
|
116
|
+
osx_bundle_id = `defaults read #{osx_plist} CFBundleIdentifier`
|
117
|
+
|
118
|
+
ios_bundle_id.should.match /org.cocoapods.KFData/
|
119
|
+
osx_bundle_id.should.match /org.cocoapods.KFData/
|
120
|
+
end
|
121
|
+
|
122
|
+
it "should produce the correct plist for iOS and OSX when --dynamic and --bundle-identifier are specified" do
|
123
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
124
|
+
|
125
|
+
command = Command.parse(%w{ package spec/fixtures/KFData.podspec --dynamic --bundle-identifier=com.example.KFData})
|
126
|
+
command.run
|
127
|
+
|
128
|
+
ios_plist = File.expand_path(Dir.glob("KFData-*/ios/KFData.framework/Info.plist").first)
|
129
|
+
osx_plist = File.expand_path(Dir.glob("KFData-*/osx/KFData.framework/Resources/Info.plist").first)
|
130
|
+
|
131
|
+
ios_bundle_id = `defaults read #{ios_plist} CFBundleIdentifier`
|
132
|
+
osx_bundle_id = `defaults read #{osx_plist} CFBundleIdentifier`
|
133
|
+
|
134
|
+
ios_bundle_id.should.match /com.example.KFData/
|
135
|
+
osx_bundle_id.should.match /com.example.KFData/
|
136
|
+
end
|
137
|
+
|
138
|
+
it "should produce a static library when dynamic is not specified" do
|
139
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
140
|
+
|
141
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec })
|
142
|
+
command.run
|
143
|
+
|
144
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
145
|
+
file_command = "file #{lib}"
|
146
|
+
output = `#{file_command}`.lines.to_a
|
147
|
+
|
148
|
+
output[0].should.match /Mach-O universal binary with 5 architectures/
|
149
|
+
output[1].should.match /current ar archive/
|
150
|
+
end
|
151
|
+
|
152
|
+
it "mangles symbols if the Pod has dependencies" do
|
153
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
154
|
+
|
155
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec })
|
156
|
+
command.run
|
157
|
+
|
158
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
159
|
+
symbols = Symbols.symbols_from_library(lib).uniq.sort.reject { |e| e =~ /PodNikeKit/ }
|
160
|
+
|
161
|
+
symbols.should == %w{ BBUNikePlusActivity BBUNikePlusSessionManager
|
162
|
+
BBUNikePlusTag }
|
163
|
+
end
|
164
|
+
|
165
|
+
it "mangles symbols if the Pod has dependencies and framework is dynamic" do
|
166
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
167
|
+
|
168
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --dynamic })
|
169
|
+
command.run
|
170
|
+
|
171
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
172
|
+
symbols = Symbols.symbols_from_library(lib).uniq.sort.reject { |e| e =~ /PodNikeKit/ }
|
173
|
+
|
174
|
+
symbols.should == %w{ BBUNikePlusActivity BBUNikePlusSessionManager
|
175
|
+
BBUNikePlusTag NikeKitVersionNumber NikeKitVersionString }
|
176
|
+
end
|
177
|
+
|
178
|
+
it "mangles symbols if the Pod has dependencies regardless of name" do
|
179
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
180
|
+
|
181
|
+
command = Command.parse(%w{ package spec/fixtures/a.podspec })
|
182
|
+
command.run
|
183
|
+
|
184
|
+
lib = Dir.glob("a-*/ios/a.framework/a").first
|
185
|
+
symbols = Symbols.symbols_from_library(lib).uniq.sort.reject { |e| e =~ /Poda/ }
|
186
|
+
symbols.should == %w{ BBUNikePlusActivity BBUNikePlusSessionManager
|
187
|
+
BBUNikePlusTag }
|
188
|
+
end
|
189
|
+
|
190
|
+
it "does not mangle symbols if option --no-mangle is specified" do
|
191
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
192
|
+
|
193
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --no-mangle })
|
194
|
+
command.run
|
195
|
+
|
196
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
197
|
+
symbols = Symbols.symbols_from_library(lib).uniq.sort.select { |e| e =~ /PodNikeKit/ }
|
198
|
+
symbols.should == []
|
199
|
+
end
|
200
|
+
|
201
|
+
it "does not mangle symbols if option --no-mangle and --dynamic are specified" do
|
202
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
203
|
+
|
204
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --no-mangle --dynamic })
|
205
|
+
command.run
|
206
|
+
|
207
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
208
|
+
symbols = Symbols.symbols_from_library(lib).uniq.sort.select { |e| e =~ /PodNikeKit/ }
|
209
|
+
symbols.should == []
|
210
|
+
end
|
211
|
+
|
212
|
+
it "does not include symbols from dependencies if option --exclude-deps is specified" do
|
213
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
214
|
+
|
215
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --exclude-deps })
|
216
|
+
command.run
|
217
|
+
|
218
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
219
|
+
symbols = Symbols.symbols_from_library(lib).uniq.sort.select { |e| e =~ /AFNetworking|ISO8601DateFormatter|KZPropertyMapper/ }
|
220
|
+
symbols.should == []
|
221
|
+
end
|
222
|
+
|
223
|
+
it "includes the correct architectures when packaging an iOS Pod" do
|
224
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
225
|
+
|
226
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec })
|
227
|
+
command.run
|
228
|
+
|
229
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
230
|
+
`lipo #{lib} -verify_arch x86_64 i386 armv7 armv7s arm64`
|
231
|
+
$?.success?.should == true
|
232
|
+
end
|
233
|
+
|
234
|
+
it "includes the correct architectures when packaging an iOS Pod as --dynamic" do
|
235
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
236
|
+
|
237
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --dynamic })
|
238
|
+
command.run
|
239
|
+
|
240
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
241
|
+
`lipo #{lib} -verify_arch armv7 armv7s arm64`
|
242
|
+
$?.success?.should == true
|
243
|
+
end
|
244
|
+
|
245
|
+
it "includes Bitcode for device arch slices when packaging an iOS Pod" do
|
246
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
247
|
+
|
248
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec })
|
249
|
+
command.run
|
250
|
+
|
251
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
252
|
+
|
253
|
+
#Check for __LLVM segment in each device architecture
|
254
|
+
`lipo -extract armv7 #{lib} -o armv7.a && otool -l armv7.a`.should.match /__LLVM/
|
255
|
+
`lipo -extract armv7s #{lib} -o armv7s.a && otool -l armv7s.a`.should.match /__LLVM/
|
256
|
+
`lipo -extract arm64 #{lib} -o arm64.a && otool -l arm64.a`.should.match /__LLVM/
|
257
|
+
`rm armv7.a armv7s.a arm64.a`
|
258
|
+
end
|
259
|
+
|
260
|
+
it "includes Bitcode for device arch slices when packaging an dynamic iOS Pod" do
|
261
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
262
|
+
|
263
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --dynamic })
|
264
|
+
command.run
|
265
|
+
|
266
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
267
|
+
|
268
|
+
#Check for __LLVM segment in each device architecture
|
269
|
+
`lipo -extract armv7 #{lib} -o armv7.a && otool -l armv7.a`.should.match /__LLVM/
|
270
|
+
`lipo -extract armv7s #{lib} -o armv7s.a && otool -l armv7s.a`.should.match /__LLVM/
|
271
|
+
`lipo -extract arm64 #{lib} -o arm64.a && otool -l arm64.a`.should.match /__LLVM/
|
272
|
+
`rm armv7.a armv7s.a arm64.a`
|
273
|
+
end
|
274
|
+
|
275
|
+
it "does not include Bitcode for simulator arch slices when packaging an iOS Pod" do
|
276
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
277
|
+
|
278
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec })
|
279
|
+
command.run
|
280
|
+
|
281
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
282
|
+
|
283
|
+
#Check for __LLVM segment in each simulator architecture
|
284
|
+
`lipo -extract i386 #{lib} -o i386.a && otool -l i386.a`.should.not.match /__LLVM/
|
285
|
+
`lipo -extract x86_64 #{lib} -o x86_64.a && otool -l x86_64.a`.should.not.match /__LLVM/
|
286
|
+
`rm i386.a x86_64.a`
|
287
|
+
end
|
288
|
+
|
289
|
+
it "does not include Bitcode for simulator arch slices when packaging an dynamic iOS Pod" do
|
290
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
291
|
+
|
292
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec --dynamic })
|
293
|
+
command.run
|
294
|
+
|
295
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
296
|
+
|
297
|
+
#Check for __LLVM segment in each simulator architecture
|
298
|
+
`lipo -extract i386 #{lib} -o i386.a && otool -l i386.a`.should.not.match /__LLVM/
|
299
|
+
`lipo -extract x86_64 #{lib} -o x86_64.a && otool -l x86_64.a`.should.not.match /__LLVM/
|
300
|
+
`rm i386.a x86_64.a`
|
301
|
+
end
|
302
|
+
|
303
|
+
it "does not include local ModuleCache references" do
|
304
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
305
|
+
|
306
|
+
command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec })
|
307
|
+
command.run
|
308
|
+
|
309
|
+
lib = Dir.glob("NikeKit-*/ios/NikeKit.framework/NikeKit").first
|
310
|
+
|
311
|
+
#Check for ModuleCache references
|
312
|
+
`strings #{lib}`.should.not.match /ModuleCache/
|
313
|
+
end
|
314
|
+
|
315
|
+
it "does not fail when the pod name contains a dash" do
|
316
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
317
|
+
|
318
|
+
command = Command.parse(%w{ package spec/fixtures/foo-bar.podspec })
|
319
|
+
command.run
|
320
|
+
|
321
|
+
true.should == true # To make the test pass without any shoulds
|
322
|
+
end
|
323
|
+
|
324
|
+
it "runs with a path to a spec" do
|
325
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
326
|
+
|
327
|
+
command = Command.parse(%w{ package spec/fixtures/KFData.podspec })
|
328
|
+
command.run
|
329
|
+
|
330
|
+
true.should == true # To make the test pass without any shoulds
|
331
|
+
end
|
332
|
+
|
333
|
+
it "it respects module_map directive" do
|
334
|
+
Pod::Config.instance.sources_manager.stubs(:search).returns(nil)
|
335
|
+
|
336
|
+
command = Command.parse(%w{ package spec/fixtures/FH.podspec })
|
337
|
+
command.run
|
338
|
+
|
339
|
+
modulemap_contents = File.read(Dir.glob("FH-*/ios/FH.framework/Modules/module.modulemap").first)
|
340
|
+
module_map = <<MAP
|
341
|
+
framework module FH {
|
342
|
+
umbrella header "FeedHenry.h"
|
343
|
+
|
344
|
+
export *
|
345
|
+
module * { export * }
|
346
|
+
}
|
347
|
+
MAP
|
348
|
+
modulemap_contents.should == module_map
|
349
|
+
end
|
350
|
+
|
351
|
+
# it "runs with a spec in the master repository" do
|
352
|
+
# command = Command.parse(%w{ package KFData })
|
353
|
+
# command.run
|
354
|
+
#
|
355
|
+
# true.should == true # To make the test pass without any shoulds
|
356
|
+
# end
|
357
|
+
end
|
358
|
+
end
|
359
|
+
end
|
@@ -0,0 +1,30 @@
|
|
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
|
+
Pod::Config.instance.sources_manager.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
|
+
Pod::Config.instance.sources_manager.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
|
30
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Pod::Spec.new do |s|
|
2
|
+
s.name = 'Builder'
|
3
|
+
s.version = '0.0.1'
|
4
|
+
s.summary = 'Yo'
|
5
|
+
s.homepage = 'https://github.com/CocoaPods/cocoapods-packager'
|
6
|
+
s.license = {:type => 'MIT'}
|
7
|
+
s.authors = { 'Boris Bügling' => 'http://buegling.com' }
|
8
|
+
s.source = { :git => 'https://github.com/CocoaPods/cocoapods-packager.git',
|
9
|
+
:tag => s.version.to_s }
|
10
|
+
|
11
|
+
s.libraries = 'xml2'
|
12
|
+
s.requires_arc = true
|
13
|
+
s.xcconfig = { 'OTHER_LDFLAGS' => '-lObjC' }
|
14
|
+
s.compiler_flag = "-DBASE_FLAG"
|
15
|
+
|
16
|
+
s.ios.frameworks = 'Foundation'
|
17
|
+
s.ios.deployment_target = '8.0'
|
18
|
+
s.ios.compiler_flag = "-DIOS_FLAG"
|
19
|
+
|
20
|
+
s.osx.frameworks = 'AppKit'
|
21
|
+
s.osx.deployment_target = "10.8"
|
22
|
+
s.osx.requires_arc = false
|
23
|
+
s.osx.xcconfig = { 'CFLAGS' => '-I.' }
|
24
|
+
s.osx.compiler_flag = "-DOSX_FLAG"
|
25
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Pod::Spec.new do |s|
|
2
|
+
s.name = "CPDColors"
|
3
|
+
s.version = "0.1.0"
|
4
|
+
s.summary = "Stay true to the brand with these orta-sanctioned colors."
|
5
|
+
s.homepage = "https://github.com/neonichu/CPDColors"
|
6
|
+
s.screenshots = "https://raw.githubusercontent.com/neonichu/CPDColors/master/screenshot.png"
|
7
|
+
s.license = 'MIT'
|
8
|
+
s.author = { "Boris Bügling" => "boris@icculus.org" }
|
9
|
+
s.source = { :git => "https://github.com/neonichu/CPDColors.git", :tag => s.version.to_s }
|
10
|
+
s.social_media_url = 'https://twitter.com/NeoNacho'
|
11
|
+
|
12
|
+
s.platform = :ios, '6.0'
|
13
|
+
|
14
|
+
s.requires_arc = true
|
15
|
+
s.source_files = 'Code'
|
16
|
+
s.public_header_files = 'Code/**/*.h'
|
17
|
+
|
18
|
+
s.dependency 'Parse-iOS-SDK'
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Pod::Spec.new do |s|
|
2
|
+
s.name = 'FH'
|
3
|
+
s.version = '2.2.8'
|
4
|
+
s.summary = 'FeedHenry iOS Software Development Kit'
|
5
|
+
s.homepage = 'https://www.feedhenry.com'
|
6
|
+
s.social_media_url = 'https://twitter.com/feedhenry'
|
7
|
+
s.license = 'FeedHenry'
|
8
|
+
s.author = 'Red Hat, Inc.'
|
9
|
+
s.source = { :git => 'https://github.com/cvasilak/fh-ios-sdk.git', :branch => 'module_map' }
|
10
|
+
s.platform = :ios, 7.0
|
11
|
+
s.source_files = 'fh-ios-sdk/**/*.{h,m}'
|
12
|
+
s.public_header_files = 'fh-ios-sdk/FeedHenry.h', 'fh-ios-sdk/FH.h', 'fh-ios-sdk/FHAct.h', 'fh-ios-sdk/FHActRequest.h', 'fh-ios-sdk/FHAuthRequest.h', 'fh-ios-sdk/FHCloudProps.h', 'fh-ios-sdk/FHCloudRequest.h', 'fh-ios-sdk/FHConfig.h', 'fh-ios-sdk/FHResponse.h', 'fh-ios-sdk/FHResponseDelegate.h', 'fh-ios-sdk/Sync/FHSyncClient.h', 'fh-ios-sdk/Sync/FHSyncConfig.h', 'fh-ios-sdk/Sync/FHSyncNotificationMessage.h', 'fh-ios-sdk/Sync/FHSyncDelegate.h', 'fh-ios-sdk/Categories/JSON/FHJSON.h', 'fh-ios-sdk/FHDataManager.h'
|
13
|
+
s.module_map = 'fh-ios-sdk/module.modulemap'
|
14
|
+
s.requires_arc = true
|
15
|
+
s.libraries = 'xml2', 'z'
|
16
|
+
s.dependency 'ASIHTTPRequest/Core', '1.8.2'
|
17
|
+
s.dependency 'Reachability', '3.2'
|
18
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
Pod::Spec.new do |s|
|
2
|
+
s.name = 'KFData'
|
3
|
+
s.version = '1.0.5'
|
4
|
+
s.license = 'BSD'
|
5
|
+
s.summary = 'Lightweight Core Data wrapper.'
|
6
|
+
s.homepage = 'https://github.com/kylef/KFData'
|
7
|
+
s.authors = { 'Kyle Fuller' => 'inbox@kylefuller.co.uk' }
|
8
|
+
s.social_media_url = 'https://twitter.com/kylefuller'
|
9
|
+
s.source = { :git => 'https://github.com/neonichu/KFData.git', :commit => '68ee9d94fbfa4e12db9401dd0dea205c18ad1c01' }
|
10
|
+
|
11
|
+
s.requires_arc = true
|
12
|
+
|
13
|
+
s.osx.deployment_target = '10.7'
|
14
|
+
s.ios.deployment_target = '6.0'
|
15
|
+
|
16
|
+
s.default_subspec = 'Essentials'
|
17
|
+
s.header_dir = 'KFData'
|
18
|
+
|
19
|
+
s.subspec 'Attribute' do |attribute_spec|
|
20
|
+
attribute_spec.dependency 'QueryKit', '~> 0.8.3'
|
21
|
+
attribute_spec.ios.source_files = 'KFData/Attribute/*.{h,m}'
|
22
|
+
attribute_spec.osx.source_files = 'KFData/Attribute/*.{h,m}'
|
23
|
+
end
|
24
|
+
|
25
|
+
s.subspec 'Manager' do |manager_spec|
|
26
|
+
manager_spec.dependency 'QueryKit', '~> 0.8.3'
|
27
|
+
manager_spec.ios.source_files = 'KFData/Manager/*.{h,m}'
|
28
|
+
manager_spec.osx.source_files = 'KFData/Manager/*.{h,m}'
|
29
|
+
end
|
30
|
+
|
31
|
+
s.subspec 'Core' do |corespec|
|
32
|
+
corespec.ios.frameworks = 'CoreData'
|
33
|
+
corespec.ios.source_files = 'KFData/KFData.h', 'KFData/Core/*.{h,m}'
|
34
|
+
|
35
|
+
corespec.osx.frameworks = 'CoreData'
|
36
|
+
corespec.osx.source_files = 'KFData/Core/*.{h,m}'
|
37
|
+
end
|
38
|
+
|
39
|
+
s.subspec 'Store' do |storespec|
|
40
|
+
storespec.ios.frameworks = 'CoreData'
|
41
|
+
storespec.ios.source_files = 'KFData/Store/*.{h,m}'
|
42
|
+
storespec.ios.public_header_files = 'KFData/Store/KFDataStore.h'
|
43
|
+
storespec.ios.private_header_files = 'KFData/Store/KFDataStoreInternal.h'
|
44
|
+
|
45
|
+
storespec.osx.frameworks = 'CoreData'
|
46
|
+
storespec.osx.source_files = 'KFData/Store/*.{h,m}'
|
47
|
+
storespec.osx.public_header_files = 'KFData/Store/KFDataStore.h'
|
48
|
+
storespec.osx.private_header_files = 'KFData/Store/KFDataStoreInternal.h'
|
49
|
+
end
|
50
|
+
|
51
|
+
s.subspec 'UI' do |uispec|
|
52
|
+
uispec.dependency 'KFData/Manager'
|
53
|
+
uispec.platform = :ios
|
54
|
+
uispec.ios.frameworks = 'UIKit'
|
55
|
+
uispec.ios.source_files = 'KFData/UI/*.{h,m}'
|
56
|
+
end
|
57
|
+
|
58
|
+
s.subspec 'Essentials' do |essentialsspec|
|
59
|
+
essentialsspec.dependency 'KFData/Core'
|
60
|
+
essentialsspec.dependency 'KFData/Store'
|
61
|
+
essentialsspec.dependency 'KFData/Attribute'
|
62
|
+
essentialsspec.dependency 'KFData/Manager'
|
63
|
+
essentialsspec.ios.dependency 'KFData/UI'
|
64
|
+
end
|
65
|
+
|
66
|
+
s.subspec 'Compatibility' do |cspec|
|
67
|
+
cspec.dependency 'KFData/Core'
|
68
|
+
cspec.dependency 'KFData/Manager'
|
69
|
+
cspec.header_dir = 'KFData/Compatibility'
|
70
|
+
cspec.source_files = 'KFData/Compatibility/*.{h,m}'
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
//
|
2
|
+
// AppDelegate.h
|
3
|
+
// LibraryConsumer
|
4
|
+
//
|
5
|
+
// Created by Ole Gammelgaard Poulsen on 16/10/14.
|
6
|
+
// Copyright (c) 2014 Shape A/S. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <UIKit/UIKit.h>
|
10
|
+
|
11
|
+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
12
|
+
|
13
|
+
@property (strong, nonatomic) UIWindow *window;
|
14
|
+
|
15
|
+
|
16
|
+
@end
|
17
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
//
|
2
|
+
// AppDelegate.m
|
3
|
+
// LibraryConsumer
|
4
|
+
//
|
5
|
+
// Created by Ole Gammelgaard Poulsen on 16/10/14.
|
6
|
+
// Copyright (c) 2014 Shape A/S. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <LibraryDemo/MyDemoClass.h>
|
10
|
+
|
11
|
+
#import "AppDelegate.h"
|
12
|
+
|
13
|
+
@interface AppDelegate ()
|
14
|
+
|
15
|
+
@end
|
16
|
+
|
17
|
+
@implementation AppDelegate
|
18
|
+
|
19
|
+
|
20
|
+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
21
|
+
|
22
|
+
NSLog(@"%@", [MyDemoClass welcomeMessage]);
|
23
|
+
|
24
|
+
return YES;
|
25
|
+
}
|
26
|
+
|
27
|
+
@end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleExecutable</key>
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
9
|
+
<key>CFBundleIdentifier</key>
|
10
|
+
<string>dk.shape.$(PRODUCT_NAME:rfc1034identifier)</string>
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
12
|
+
<string>6.0</string>
|
13
|
+
<key>CFBundleName</key>
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
15
|
+
<key>CFBundlePackageType</key>
|
16
|
+
<string>APPL</string>
|
17
|
+
<key>CFBundleShortVersionString</key>
|
18
|
+
<string>1.0</string>
|
19
|
+
<key>CFBundleSignature</key>
|
20
|
+
<string>????</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>1</string>
|
23
|
+
<key>LSRequiresIPhoneOS</key>
|
24
|
+
<true/>
|
25
|
+
<key>UILaunchStoryboardName</key>
|
26
|
+
<string>LaunchScreen</string>
|
27
|
+
<key>UIMainStoryboardFile</key>
|
28
|
+
<string>Main</string>
|
29
|
+
<key>UIRequiredDeviceCapabilities</key>
|
30
|
+
<array>
|
31
|
+
<string>armv7</string>
|
32
|
+
</array>
|
33
|
+
<key>UISupportedInterfaceOrientations</key>
|
34
|
+
<array>
|
35
|
+
<string>UIInterfaceOrientationPortrait</string>
|
36
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
37
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
38
|
+
</array>
|
39
|
+
</dict>
|
40
|
+
</plist>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
//
|
2
|
+
// main.m
|
3
|
+
// LibraryConsumer
|
4
|
+
//
|
5
|
+
// Created by Ole Gammelgaard Poulsen on 16/10/14.
|
6
|
+
// Copyright (c) 2014 Shape A/S. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <UIKit/UIKit.h>
|
10
|
+
#import "AppDelegate.h"
|
11
|
+
|
12
|
+
int main(int argc, char * argv[]) {
|
13
|
+
@autoreleasepool {
|
14
|
+
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
15
|
+
}
|
16
|
+
}
|