ovaltine 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/bin/ovaltine +4 -0
- data/features/fixtures/Sample/Sample.xcodeproj/project.pbxproj +418 -472
- data/lib/ovaltine/objc/storyboard_formatter.rb +18 -8
- data/lib/ovaltine/objc/storyboard_templates.rb +4 -2
- data/lib/ovaltine/version.rb +1 -1
- data/lib/ovaltine.rb +1 -1
- data/specs/storyboard_formatter_spec.rb +21 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 213bd97ab892736e429217aa84196d8408c44dda
|
4
|
+
data.tar.gz: d201009cf77d752a80599d6a30de475c849a72fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5461efcc299462e77d59c86326a352b4ff9a61a61ba3be3b87a6bd8ede24edc284fb14555d3bd2ef2f9007b24059644fd08a956d5294fb08bf75cac33c950591
|
7
|
+
data.tar.gz: 5fbf7025a93be8bb3590f88a4a3f557dbaa059988d2e85b912db71331e1773825491567a59867a79ee022d4adac38e2446071fbee8440df52bee360de8746da1
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/bin/ovaltine
CHANGED
@@ -12,6 +12,7 @@ require 'ovaltine'
|
|
12
12
|
require 'optparse'
|
13
13
|
|
14
14
|
parser_options = {
|
15
|
+
:copy => '',
|
15
16
|
:prefix => '',
|
16
17
|
:language => 'objc'
|
17
18
|
}
|
@@ -32,6 +33,9 @@ OptionParser.new do |opts|
|
|
32
33
|
opts.on('--prefix PREFIX', 'Specify class prefix for generated files') do |prefix|
|
33
34
|
parser_options[:prefix] = prefix
|
34
35
|
end
|
36
|
+
opts.on('--copyright COPY', 'Specify copyright info for file headers') do |copy|
|
37
|
+
parser_options[:copy] = copy
|
38
|
+
end
|
35
39
|
opts.on('--auto-add', 'Automatically add generated files to the Xcode project') do
|
36
40
|
parser_options[:auto_add] = true
|
37
41
|
end
|
@@ -1,472 +1,418 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
WRAPPER_EXTENSION = xctest;
|
420
|
-
};
|
421
|
-
name = Debug;
|
422
|
-
};
|
423
|
-
8AB8CD62198D6B6500CEA0CD /* Release */ = {
|
424
|
-
isa = XCBuildConfiguration;
|
425
|
-
buildSettings = {
|
426
|
-
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample";
|
427
|
-
FRAMEWORK_SEARCH_PATHS = (
|
428
|
-
"$(SDKROOT)/Developer/Library/Frameworks",
|
429
|
-
"$(inherited)",
|
430
|
-
"$(DEVELOPER_FRAMEWORKS_DIR)",
|
431
|
-
);
|
432
|
-
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
433
|
-
GCC_PREFIX_HEADER = "Sample/Sample-Prefix.pch";
|
434
|
-
INFOPLIST_FILE = "SampleTests/SampleTests-Info.plist";
|
435
|
-
PRODUCT_NAME = "$(TARGET_NAME)";
|
436
|
-
TEST_HOST = "$(BUNDLE_LOADER)";
|
437
|
-
WRAPPER_EXTENSION = xctest;
|
438
|
-
};
|
439
|
-
name = Release;
|
440
|
-
};
|
441
|
-
/* End XCBuildConfiguration section */
|
442
|
-
|
443
|
-
/* Begin XCConfigurationList section */
|
444
|
-
8AB8CD26198D6B6400CEA0CD /* Build configuration list for PBXProject "Sample" */ = {
|
445
|
-
isa = XCConfigurationList;
|
446
|
-
buildConfigurations = (
|
447
|
-
8AB8CD5B198D6B6500CEA0CD /* Debug */,
|
448
|
-
8AB8CD5C198D6B6500CEA0CD /* Release */,
|
449
|
-
);
|
450
|
-
defaultConfigurationIsVisible = 0;
|
451
|
-
defaultConfigurationName = Release;
|
452
|
-
};
|
453
|
-
8AB8CD5D198D6B6500CEA0CD /* Build configuration list for PBXNativeTarget "Sample" */ = {
|
454
|
-
isa = XCConfigurationList;
|
455
|
-
buildConfigurations = (
|
456
|
-
8AB8CD5E198D6B6500CEA0CD /* Debug */,
|
457
|
-
8AB8CD5F198D6B6500CEA0CD /* Release */,
|
458
|
-
);
|
459
|
-
defaultConfigurationIsVisible = 0;
|
460
|
-
};
|
461
|
-
8AB8CD60198D6B6500CEA0CD /* Build configuration list for PBXNativeTarget "SampleTests" */ = {
|
462
|
-
isa = XCConfigurationList;
|
463
|
-
buildConfigurations = (
|
464
|
-
8AB8CD61198D6B6500CEA0CD /* Debug */,
|
465
|
-
8AB8CD62198D6B6500CEA0CD /* Release */,
|
466
|
-
);
|
467
|
-
defaultConfigurationIsVisible = 0;
|
468
|
-
};
|
469
|
-
/* End XCConfigurationList section */
|
470
|
-
};
|
471
|
-
rootObject = 8AB8CD23198D6B6400CEA0CD /* Project object */;
|
472
|
-
}
|
1
|
+
{ "classes" = { };
|
2
|
+
"objectVersion" = "46";
|
3
|
+
"archiveVersion" = "1";
|
4
|
+
"objects" = { "8AB8CD48198D6B6500CEA0CD" = { "isa" = "PBXSourcesBuildPhase";
|
5
|
+
"buildActionMask" = "2147483647";
|
6
|
+
"files" = ( "8AB8CD5A198D6B6500CEA0CD" );
|
7
|
+
"runOnlyForDeploymentPostprocessing" = "0";
|
8
|
+
};
|
9
|
+
"8AB8CD2F198D6B6400CEA0CD" = { "isa" = "PBXBuildFile";
|
10
|
+
"fileRef" = "8AB8CD2E198D6B6400CEA0CD";
|
11
|
+
};
|
12
|
+
"8AB8CD58198D6B6500CEA0CD" = { "isa" = "PBXBuildFile";
|
13
|
+
"fileRef" = "8AB8CD56198D6B6500CEA0CD";
|
14
|
+
};
|
15
|
+
"8AB8CD3F198D6B6400CEA0CD" = { "isa" = "PBXBuildFile";
|
16
|
+
"fileRef" = "8AB8CD3E198D6B6400CEA0CD";
|
17
|
+
};
|
18
|
+
"8AB8CD22198D6B6400CEA0CD" = { "isa" = "PBXGroup";
|
19
|
+
"sourceTree" = "<group>";
|
20
|
+
"children" = ( "8AB8CD34198D6B6400CEA0CD","8AB8CD53198D6B6500CEA0CD","8AB8CD2D198D6B6400CEA0CD","8AB8CD2C198D6B6400CEA0CD" );
|
21
|
+
};
|
22
|
+
"8AB8CD32198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
23
|
+
"path" = "System/Library/Frameworks/UIKit.framework";
|
24
|
+
"name" = "UIKit.framework";
|
25
|
+
"lastKnownFileType" = "wrapper.framework";
|
26
|
+
"sourceTree" = "SDKROOT";
|
27
|
+
};
|
28
|
+
"8AB8CD5B198D6B6500CEA0CD" = { "isa" = "XCBuildConfiguration";
|
29
|
+
"buildSettings" = { "CLANG_WARN_ENUM_CONVERSION" = "YES";
|
30
|
+
"GCC_WARN_UNUSED_VARIABLE" = "YES";
|
31
|
+
"GCC_WARN_ABOUT_RETURN_TYPE" = "YES_ERROR";
|
32
|
+
"GCC_PREPROCESSOR_DEFINITIONS" = ( "DEBUG=1","$(inherited)" );
|
33
|
+
"ONLY_ACTIVE_ARCH" = "YES";
|
34
|
+
"CLANG_ENABLE_MODULES" = "YES";
|
35
|
+
"CLANG_CXX_LANGUAGE_STANDARD" = "gnu++0x";
|
36
|
+
"GCC_SYMBOLS_PRIVATE_EXTERN" = "NO";
|
37
|
+
"GCC_WARN_UNINITIALIZED_AUTOS" = "YES_AGGRESSIVE";
|
38
|
+
"CLANG_WARN_INT_CONVERSION" = "YES";
|
39
|
+
"CLANG_WARN_CONSTANT_CONVERSION" = "YES";
|
40
|
+
"GCC_OPTIMIZATION_LEVEL" = "0";
|
41
|
+
"GCC_C_LANGUAGE_STANDARD" = "gnu99";
|
42
|
+
"CLANG_WARN__DUPLICATE_METHOD_MATCH" = "YES";
|
43
|
+
"CLANG_WARN_EMPTY_BODY" = "YES";
|
44
|
+
"GCC_WARN_64_TO_32_BIT_CONVERSION" = "YES";
|
45
|
+
"ALWAYS_SEARCH_USER_PATHS" = "NO";
|
46
|
+
"COPY_PHASE_STRIP" = "NO";
|
47
|
+
"CLANG_ENABLE_OBJC_ARC" = "YES";
|
48
|
+
"CLANG_WARN_BOOL_CONVERSION" = "YES";
|
49
|
+
"CLANG_WARN_DIRECT_OBJC_ISA_USAGE" = "YES_ERROR";
|
50
|
+
"GCC_WARN_UNUSED_FUNCTION" = "YES";
|
51
|
+
"CLANG_WARN_OBJC_ROOT_CLASS" = "YES_ERROR";
|
52
|
+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
53
|
+
"GCC_DYNAMIC_NO_PIC" = "NO";
|
54
|
+
"IPHONEOS_DEPLOYMENT_TARGET" = "7.1";
|
55
|
+
"SDKROOT" = "iphoneos";
|
56
|
+
"CLANG_CXX_LIBRARY" = "libc++";
|
57
|
+
"GCC_WARN_UNDECLARED_SELECTOR" = "YES";
|
58
|
+
};
|
59
|
+
"name" = "Debug";
|
60
|
+
};
|
61
|
+
"8AB8CD42198D6B6400CEA0CD" = { "isa" = "PBXBuildFile";
|
62
|
+
"fileRef" = "8AB8CD40198D6B6400CEA0CD";
|
63
|
+
};
|
64
|
+
"8AB8CD29198D6B6400CEA0CD" = { "isa" = "PBXResourcesBuildPhase";
|
65
|
+
"buildActionMask" = "2147483647";
|
66
|
+
"files" = ( "8AB8CD47198D6B6400CEA0CD","8AB8CD39198D6B6400CEA0CD","8AB8CD42198D6B6400CEA0CD" );
|
67
|
+
"runOnlyForDeploymentPostprocessing" = "0";
|
68
|
+
};
|
69
|
+
"8AB8CD55198D6B6500CEA0CD" = { "isa" = "PBXFileReference";
|
70
|
+
"path" = "SampleTests-Info.plist";
|
71
|
+
"lastKnownFileType" = "text.plist.xml";
|
72
|
+
"sourceTree" = "<group>";
|
73
|
+
};
|
74
|
+
"8AB8CD2C198D6B6400CEA0CD" = { "isa" = "PBXGroup";
|
75
|
+
"name" = "Products";
|
76
|
+
"children" = ( "8AB8CD2B198D6B6400CEA0CD","8AB8CD4C198D6B6500CEA0CD" );
|
77
|
+
"sourceTree" = "<group>";
|
78
|
+
};
|
79
|
+
"8AB8CD3C198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
80
|
+
"path" = "Sample-Prefix.pch";
|
81
|
+
"lastKnownFileType" = "sourcecode.c.h";
|
82
|
+
"sourceTree" = "<group>";
|
83
|
+
};
|
84
|
+
"8AB8CD39198D6B6400CEA0CD" = { "isa" = "PBXBuildFile";
|
85
|
+
"fileRef" = "8AB8CD37198D6B6400CEA0CD";
|
86
|
+
};
|
87
|
+
"8AB8CD4F198D6B6500CEA0CD" = { "isa" = "PBXBuildFile";
|
88
|
+
"fileRef" = "8AB8CD2E198D6B6400CEA0CD";
|
89
|
+
};
|
90
|
+
"8AB8CD52198D6B6500CEA0CD" = { "isa" = "PBXTargetDependency";
|
91
|
+
"target" = "8AB8CD2A198D6B6400CEA0CD";
|
92
|
+
"targetProxy" = "8AB8CD51198D6B6500CEA0CD";
|
93
|
+
};
|
94
|
+
"8AB8CD5F198D6B6500CEA0CD" = { "isa" = "XCBuildConfiguration";
|
95
|
+
"buildSettings" = { "PRODUCT_NAME" = "$(TARGET_NAME)";
|
96
|
+
"WRAPPER_EXTENSION" = "app";
|
97
|
+
"GCC_PRECOMPILE_PREFIX_HEADER" = "YES";
|
98
|
+
"INFOPLIST_FILE" = "Sample/Sample-Info.plist";
|
99
|
+
"ASSETCATALOG_COMPILER_APPICON_NAME" = "AppIcon";
|
100
|
+
"ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME" = "LaunchImage";
|
101
|
+
"GCC_PREFIX_HEADER" = "Sample/Sample-Prefix.pch";
|
102
|
+
};
|
103
|
+
"name" = "Release";
|
104
|
+
};
|
105
|
+
"8AB8CD62198D6B6500CEA0CD" = { "isa" = "XCBuildConfiguration";
|
106
|
+
"buildSettings" = { "WRAPPER_EXTENSION" = "xctest";
|
107
|
+
"FRAMEWORK_SEARCH_PATHS" = ( "$(SDKROOT)/Developer/Library/Frameworks","$(inherited)","$(DEVELOPER_FRAMEWORKS_DIR)" );
|
108
|
+
"TEST_HOST" = "$(BUNDLE_LOADER)";
|
109
|
+
"GCC_PRECOMPILE_PREFIX_HEADER" = "YES";
|
110
|
+
"INFOPLIST_FILE" = "SampleTests/SampleTests-Info.plist";
|
111
|
+
"BUNDLE_LOADER" = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample";
|
112
|
+
"GCC_PREFIX_HEADER" = "Sample/Sample-Prefix.pch";
|
113
|
+
"PRODUCT_NAME" = "$(TARGET_NAME)";
|
114
|
+
};
|
115
|
+
"name" = "Release";
|
116
|
+
};
|
117
|
+
"8AB8CD26198D6B6400CEA0CD" = { "isa" = "XCConfigurationList";
|
118
|
+
"defaultConfigurationIsVisible" = "0";
|
119
|
+
"defaultConfigurationName" = "Release";
|
120
|
+
"buildConfigurations" = ( "8AB8CD5B198D6B6500CEA0CD","8AB8CD5C198D6B6500CEA0CD" );
|
121
|
+
};
|
122
|
+
"8AB8CD36198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
123
|
+
"path" = "Sample-Info.plist";
|
124
|
+
"lastKnownFileType" = "text.plist.xml";
|
125
|
+
"sourceTree" = "<group>";
|
126
|
+
};
|
127
|
+
"8AB8CD46198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
128
|
+
"path" = "Images.xcassets";
|
129
|
+
"lastKnownFileType" = "folder.assetcatalog";
|
130
|
+
"sourceTree" = "<group>";
|
131
|
+
};
|
132
|
+
"8AB8CD4C198D6B6500CEA0CD" = { "isa" = "PBXFileReference";
|
133
|
+
"path" = "SampleTests.xctest";
|
134
|
+
"includeInIndex" = "0";
|
135
|
+
"explicitFileType" = "wrapper.cfbundle";
|
136
|
+
"sourceTree" = "BUILT_PRODUCTS_DIR";
|
137
|
+
};
|
138
|
+
"8AB8CD49198D6B6500CEA0CD" = { "isa" = "PBXFrameworksBuildPhase";
|
139
|
+
"buildActionMask" = "2147483647";
|
140
|
+
"files" = ( "8AB8CD4E198D6B6500CEA0CD","8AB8CD50198D6B6500CEA0CD","8AB8CD4F198D6B6500CEA0CD" );
|
141
|
+
"runOnlyForDeploymentPostprocessing" = "0";
|
142
|
+
};
|
143
|
+
"8AB8CD5C198D6B6500CEA0CD" = { "isa" = "XCBuildConfiguration";
|
144
|
+
"buildSettings" = { "CLANG_WARN_ENUM_CONVERSION" = "YES";
|
145
|
+
"GCC_WARN_UNUSED_VARIABLE" = "YES";
|
146
|
+
"VALIDATE_PRODUCT" = "YES";
|
147
|
+
"GCC_WARN_ABOUT_RETURN_TYPE" = "YES_ERROR";
|
148
|
+
"CLANG_ENABLE_MODULES" = "YES";
|
149
|
+
"CLANG_CXX_LANGUAGE_STANDARD" = "gnu++0x";
|
150
|
+
"GCC_WARN_UNINITIALIZED_AUTOS" = "YES_AGGRESSIVE";
|
151
|
+
"CLANG_WARN_INT_CONVERSION" = "YES";
|
152
|
+
"CLANG_WARN_CONSTANT_CONVERSION" = "YES";
|
153
|
+
"GCC_C_LANGUAGE_STANDARD" = "gnu99";
|
154
|
+
"CLANG_WARN__DUPLICATE_METHOD_MATCH" = "YES";
|
155
|
+
"GCC_WARN_64_TO_32_BIT_CONVERSION" = "YES";
|
156
|
+
"CLANG_WARN_EMPTY_BODY" = "YES";
|
157
|
+
"ALWAYS_SEARCH_USER_PATHS" = "NO";
|
158
|
+
"COPY_PHASE_STRIP" = "YES";
|
159
|
+
"CLANG_ENABLE_OBJC_ARC" = "YES";
|
160
|
+
"CLANG_WARN_BOOL_CONVERSION" = "YES";
|
161
|
+
"CLANG_WARN_DIRECT_OBJC_ISA_USAGE" = "YES_ERROR";
|
162
|
+
"GCC_WARN_UNUSED_FUNCTION" = "YES";
|
163
|
+
"CLANG_WARN_OBJC_ROOT_CLASS" = "YES_ERROR";
|
164
|
+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
165
|
+
"ENABLE_NS_ASSERTIONS" = "NO";
|
166
|
+
"IPHONEOS_DEPLOYMENT_TARGET" = "7.1";
|
167
|
+
"SDKROOT" = "iphoneos";
|
168
|
+
"CLANG_CXX_LIBRARY" = "libc++";
|
169
|
+
"GCC_WARN_UNDECLARED_SELECTOR" = "YES";
|
170
|
+
};
|
171
|
+
"name" = "Release";
|
172
|
+
};
|
173
|
+
"8AB8CD59198D6B6500CEA0CD" = { "isa" = "PBXFileReference";
|
174
|
+
"path" = "SampleTests.m";
|
175
|
+
"lastKnownFileType" = "sourcecode.c.objc";
|
176
|
+
"sourceTree" = "<group>";
|
177
|
+
};
|
178
|
+
"8AB8CD23198D6B6400CEA0CD" = { "isa" = "PBXProject";
|
179
|
+
"buildConfigurationList" = "8AB8CD26198D6B6400CEA0CD";
|
180
|
+
"targets" = ( "8AB8CD2A198D6B6400CEA0CD","8AB8CD4B198D6B6500CEA0CD" );
|
181
|
+
"developmentRegion" = "English";
|
182
|
+
"knownRegions" = ( "en","Base" );
|
183
|
+
"compatibilityVersion" = "Xcode 3.2";
|
184
|
+
"productRefGroup" = "8AB8CD2C198D6B6400CEA0CD";
|
185
|
+
"projectDirPath" = "";
|
186
|
+
"attributes" = { "LastUpgradeCheck" = "0510";
|
187
|
+
"ORGANIZATIONNAME" = "Delisa Mason";
|
188
|
+
"TargetAttributes" = { "8AB8CD4B198D6B6500CEA0CD" = { "TestTargetID" = "8AB8CD2A198D6B6400CEA0CD";
|
189
|
+
};
|
190
|
+
};
|
191
|
+
"CLASSPREFIX" = "DMM";
|
192
|
+
};
|
193
|
+
"hasScannedForEncodings" = "0";
|
194
|
+
"projectRoot" = "";
|
195
|
+
"mainGroup" = "8AB8CD22198D6B6400CEA0CD";
|
196
|
+
};
|
197
|
+
"8AB8CD33198D6B6400CEA0CD" = { "isa" = "PBXBuildFile";
|
198
|
+
"fileRef" = "8AB8CD32198D6B6400CEA0CD";
|
199
|
+
};
|
200
|
+
"8AB8CD43198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
201
|
+
"path" = "DMMViewController.h";
|
202
|
+
"lastKnownFileType" = "sourcecode.c.h";
|
203
|
+
"sourceTree" = "<group>";
|
204
|
+
};
|
205
|
+
"8AB8CD2D198D6B6400CEA0CD" = { "isa" = "PBXGroup";
|
206
|
+
"name" = "Frameworks";
|
207
|
+
"children" = ( "8AB8CD2E198D6B6400CEA0CD","8AB8CD30198D6B6400CEA0CD","8AB8CD32198D6B6400CEA0CD","8AB8CD4D198D6B6500CEA0CD" );
|
208
|
+
"sourceTree" = "<group>";
|
209
|
+
};
|
210
|
+
"8AB8CD56198D6B6500CEA0CD" = { "isa" = "PBXVariantGroup";
|
211
|
+
"name" = "InfoPlist.strings";
|
212
|
+
"children" = ( "8AB8CD57198D6B6500CEA0CD" );
|
213
|
+
"sourceTree" = "<group>";
|
214
|
+
};
|
215
|
+
"8AB8CD3D198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
216
|
+
"path" = "DMMAppDelegate.h";
|
217
|
+
"lastKnownFileType" = "sourcecode.c.h";
|
218
|
+
"sourceTree" = "<group>";
|
219
|
+
};
|
220
|
+
"8AB8CD30198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
221
|
+
"path" = "System/Library/Frameworks/CoreGraphics.framework";
|
222
|
+
"name" = "CoreGraphics.framework";
|
223
|
+
"lastKnownFileType" = "wrapper.framework";
|
224
|
+
"sourceTree" = "SDKROOT";
|
225
|
+
};
|
226
|
+
"8AB8CD40198D6B6400CEA0CD" = { "isa" = "PBXVariantGroup";
|
227
|
+
"name" = "Main.storyboard";
|
228
|
+
"children" = ( "8AB8CD41198D6B6400CEA0CD" );
|
229
|
+
"sourceTree" = "<group>";
|
230
|
+
};
|
231
|
+
"8AB8CD27198D6B6400CEA0CD" = { "isa" = "PBXSourcesBuildPhase";
|
232
|
+
"buildActionMask" = "2147483647";
|
233
|
+
"files" = ( "8AB8CD45198D6B6400CEA0CD","8AB8CD3B198D6B6400CEA0CD","8AB8CD3F198D6B6400CEA0CD" );
|
234
|
+
"runOnlyForDeploymentPostprocessing" = "0";
|
235
|
+
};
|
236
|
+
"8AB8CD2A198D6B6400CEA0CD" = { "isa" = "PBXNativeTarget";
|
237
|
+
"buildConfigurationList" = "8AB8CD5D198D6B6500CEA0CD";
|
238
|
+
"productReference" = "8AB8CD2B198D6B6400CEA0CD";
|
239
|
+
"productType" = "com.apple.product-type.application";
|
240
|
+
"productName" = "Sample";
|
241
|
+
"buildPhases" = ( "8AB8CD27198D6B6400CEA0CD","8AB8CD28198D6B6400CEA0CD","8AB8CD29198D6B6400CEA0CD" );
|
242
|
+
"dependencies" = ( );
|
243
|
+
"name" = "Sample";
|
244
|
+
"buildRules" = ( );
|
245
|
+
};
|
246
|
+
"8AB8CD37198D6B6400CEA0CD" = { "isa" = "PBXVariantGroup";
|
247
|
+
"name" = "InfoPlist.strings";
|
248
|
+
"children" = ( "8AB8CD38198D6B6400CEA0CD" );
|
249
|
+
"sourceTree" = "<group>";
|
250
|
+
};
|
251
|
+
"8AB8CD3A198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
252
|
+
"path" = "main.m";
|
253
|
+
"lastKnownFileType" = "sourcecode.c.objc";
|
254
|
+
"sourceTree" = "<group>";
|
255
|
+
};
|
256
|
+
"8AB8CD47198D6B6400CEA0CD" = { "isa" = "PBXBuildFile";
|
257
|
+
"fileRef" = "8AB8CD46198D6B6400CEA0CD";
|
258
|
+
};
|
259
|
+
"8AB8CD53198D6B6500CEA0CD" = { "isa" = "PBXGroup";
|
260
|
+
"path" = "SampleTests";
|
261
|
+
"children" = ( "8AB8CD59198D6B6500CEA0CD","8AB8CD54198D6B6500CEA0CD" );
|
262
|
+
"sourceTree" = "<group>";
|
263
|
+
};
|
264
|
+
"8AB8CD4D198D6B6500CEA0CD" = { "isa" = "PBXFileReference";
|
265
|
+
"path" = "Library/Frameworks/XCTest.framework";
|
266
|
+
"name" = "XCTest.framework";
|
267
|
+
"lastKnownFileType" = "wrapper.framework";
|
268
|
+
"sourceTree" = "DEVELOPER_DIR";
|
269
|
+
};
|
270
|
+
"8AB8CD50198D6B6500CEA0CD" = { "isa" = "PBXBuildFile";
|
271
|
+
"fileRef" = "8AB8CD32198D6B6400CEA0CD";
|
272
|
+
};
|
273
|
+
"8AB8CD5D198D6B6500CEA0CD" = { "isa" = "XCConfigurationList";
|
274
|
+
"buildConfigurations" = ( "8AB8CD5E198D6B6500CEA0CD","8AB8CD5F198D6B6500CEA0CD" );
|
275
|
+
"defaultConfigurationIsVisible" = "0";
|
276
|
+
};
|
277
|
+
"8AB8CD60198D6B6500CEA0CD" = { "isa" = "XCConfigurationList";
|
278
|
+
"buildConfigurations" = ( "8AB8CD61198D6B6500CEA0CD","8AB8CD62198D6B6500CEA0CD" );
|
279
|
+
"defaultConfigurationIsVisible" = "0";
|
280
|
+
};
|
281
|
+
"8AB8CD34198D6B6400CEA0CD" = { "isa" = "PBXGroup";
|
282
|
+
"path" = "Sample";
|
283
|
+
"children" = ( "8AB8CD3D198D6B6400CEA0CD","8AB8CD3E198D6B6400CEA0CD","8AB8CD40198D6B6400CEA0CD","8AB8CD43198D6B6400CEA0CD","8AB8CD44198D6B6400CEA0CD","8AB8CD46198D6B6400CEA0CD","8AB8CD35198D6B6400CEA0CD","97276648429E62ACCC97F345" );
|
284
|
+
"sourceTree" = "<group>";
|
285
|
+
};
|
286
|
+
"8AB8CD44198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
287
|
+
"path" = "DMMViewController.m";
|
288
|
+
"lastKnownFileType" = "sourcecode.c.objc";
|
289
|
+
"sourceTree" = "<group>";
|
290
|
+
};
|
291
|
+
"8AB8CD4A198D6B6500CEA0CD" = { "isa" = "PBXResourcesBuildPhase";
|
292
|
+
"buildActionMask" = "2147483647";
|
293
|
+
"files" = ( "8AB8CD58198D6B6500CEA0CD" );
|
294
|
+
"runOnlyForDeploymentPostprocessing" = "0";
|
295
|
+
};
|
296
|
+
"8AB8CD5A198D6B6500CEA0CD" = { "isa" = "PBXBuildFile";
|
297
|
+
"fileRef" = "8AB8CD59198D6B6500CEA0CD";
|
298
|
+
};
|
299
|
+
"8AB8CD57198D6B6500CEA0CD" = { "isa" = "PBXFileReference";
|
300
|
+
"path" = "en.lproj/InfoPlist.strings";
|
301
|
+
"name" = "en";
|
302
|
+
"lastKnownFileType" = "text.plist.strings";
|
303
|
+
"sourceTree" = "<group>";
|
304
|
+
};
|
305
|
+
"8AB8CD2E198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
306
|
+
"path" = "System/Library/Frameworks/Foundation.framework";
|
307
|
+
"name" = "Foundation.framework";
|
308
|
+
"lastKnownFileType" = "wrapper.framework";
|
309
|
+
"sourceTree" = "SDKROOT";
|
310
|
+
};
|
311
|
+
"8AB8CD3E198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
312
|
+
"path" = "DMMAppDelegate.m";
|
313
|
+
"lastKnownFileType" = "sourcecode.c.objc";
|
314
|
+
"sourceTree" = "<group>";
|
315
|
+
};
|
316
|
+
"8AB8CD31198D6B6400CEA0CD" = { "isa" = "PBXBuildFile";
|
317
|
+
"fileRef" = "8AB8CD30198D6B6400CEA0CD";
|
318
|
+
};
|
319
|
+
"8AB8CD41198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
320
|
+
"path" = "Base.lproj/Main.storyboard";
|
321
|
+
"name" = "Base";
|
322
|
+
"lastKnownFileType" = "file.storyboard";
|
323
|
+
"sourceTree" = "<group>";
|
324
|
+
};
|
325
|
+
"8AB8CD54198D6B6500CEA0CD" = { "isa" = "PBXGroup";
|
326
|
+
"name" = "Supporting Files";
|
327
|
+
"children" = ( "8AB8CD55198D6B6500CEA0CD","8AB8CD56198D6B6500CEA0CD" );
|
328
|
+
"sourceTree" = "<group>";
|
329
|
+
};
|
330
|
+
"8AB8CD2B198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
331
|
+
"path" = "Sample.app";
|
332
|
+
"includeInIndex" = "0";
|
333
|
+
"explicitFileType" = "wrapper.application";
|
334
|
+
"sourceTree" = "BUILT_PRODUCTS_DIR";
|
335
|
+
};
|
336
|
+
"8AB8CD28198D6B6400CEA0CD" = { "isa" = "PBXFrameworksBuildPhase";
|
337
|
+
"buildActionMask" = "2147483647";
|
338
|
+
"files" = ( "8AB8CD31198D6B6400CEA0CD","8AB8CD33198D6B6400CEA0CD","8AB8CD2F198D6B6400CEA0CD" );
|
339
|
+
"runOnlyForDeploymentPostprocessing" = "0";
|
340
|
+
};
|
341
|
+
"8AB8CD3B198D6B6400CEA0CD" = { "isa" = "PBXBuildFile";
|
342
|
+
"fileRef" = "8AB8CD3A198D6B6400CEA0CD";
|
343
|
+
};
|
344
|
+
"8AB8CD38198D6B6400CEA0CD" = { "isa" = "PBXFileReference";
|
345
|
+
"path" = "en.lproj/InfoPlist.strings";
|
346
|
+
"name" = "en";
|
347
|
+
"lastKnownFileType" = "text.plist.strings";
|
348
|
+
"sourceTree" = "<group>";
|
349
|
+
};
|
350
|
+
"8AB8CD4E198D6B6500CEA0CD" = { "isa" = "PBXBuildFile";
|
351
|
+
"fileRef" = "8AB8CD4D198D6B6500CEA0CD";
|
352
|
+
};
|
353
|
+
"8AB8CD5E198D6B6500CEA0CD" = { "isa" = "XCBuildConfiguration";
|
354
|
+
"buildSettings" = { "PRODUCT_NAME" = "$(TARGET_NAME)";
|
355
|
+
"WRAPPER_EXTENSION" = "app";
|
356
|
+
"GCC_PRECOMPILE_PREFIX_HEADER" = "YES";
|
357
|
+
"INFOPLIST_FILE" = "Sample/Sample-Info.plist";
|
358
|
+
"ASSETCATALOG_COMPILER_APPICON_NAME" = "AppIcon";
|
359
|
+
"ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME" = "LaunchImage";
|
360
|
+
"GCC_PREFIX_HEADER" = "Sample/Sample-Prefix.pch";
|
361
|
+
};
|
362
|
+
"name" = "Debug";
|
363
|
+
};
|
364
|
+
"8AB8CD51198D6B6500CEA0CD" = { "isa" = "PBXContainerItemProxy";
|
365
|
+
"containerPortal" = "8AB8CD23198D6B6400CEA0CD";
|
366
|
+
"remoteGlobalIDString" = "8AB8CD2A198D6B6400CEA0CD";
|
367
|
+
"remoteInfo" = "Sample";
|
368
|
+
"proxyType" = "1";
|
369
|
+
};
|
370
|
+
"8AB8CD35198D6B6400CEA0CD" = { "isa" = "PBXGroup";
|
371
|
+
"name" = "Supporting Files";
|
372
|
+
"children" = ( "8AB8CD36198D6B6400CEA0CD","8AB8CD37198D6B6400CEA0CD","8AB8CD3A198D6B6400CEA0CD","8AB8CD3C198D6B6400CEA0CD" );
|
373
|
+
"sourceTree" = "<group>";
|
374
|
+
};
|
375
|
+
"8AB8CD61198D6B6500CEA0CD" = { "isa" = "XCBuildConfiguration";
|
376
|
+
"buildSettings" = { "PRODUCT_NAME" = "$(TARGET_NAME)";
|
377
|
+
"WRAPPER_EXTENSION" = "xctest";
|
378
|
+
"FRAMEWORK_SEARCH_PATHS" = ( "$(SDKROOT)/Developer/Library/Frameworks","$(inherited)","$(DEVELOPER_FRAMEWORKS_DIR)" );
|
379
|
+
"TEST_HOST" = "$(BUNDLE_LOADER)";
|
380
|
+
"GCC_PRECOMPILE_PREFIX_HEADER" = "YES";
|
381
|
+
"INFOPLIST_FILE" = "SampleTests/SampleTests-Info.plist";
|
382
|
+
"BUNDLE_LOADER" = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample";
|
383
|
+
"GCC_PREFIX_HEADER" = "Sample/Sample-Prefix.pch";
|
384
|
+
"GCC_PREPROCESSOR_DEFINITIONS" = ( "DEBUG=1","$(inherited)" );
|
385
|
+
};
|
386
|
+
"name" = "Debug";
|
387
|
+
};
|
388
|
+
"8AB8CD45198D6B6400CEA0CD" = { "isa" = "PBXBuildFile";
|
389
|
+
"fileRef" = "8AB8CD44198D6B6400CEA0CD";
|
390
|
+
};
|
391
|
+
"8AB8CD4B198D6B6500CEA0CD" = { "isa" = "PBXNativeTarget";
|
392
|
+
"buildConfigurationList" = "8AB8CD60198D6B6500CEA0CD";
|
393
|
+
"productReference" = "8AB8CD4C198D6B6500CEA0CD";
|
394
|
+
"productType" = "com.apple.product-type.bundle.unit-test";
|
395
|
+
"productName" = "SampleTests";
|
396
|
+
"buildPhases" = ( "8AB8CD48198D6B6500CEA0CD","8AB8CD49198D6B6500CEA0CD","8AB8CD4A198D6B6500CEA0CD" );
|
397
|
+
"dependencies" = ( "8AB8CD52198D6B6500CEA0CD" );
|
398
|
+
"name" = "SampleTests";
|
399
|
+
"buildRules" = ( );
|
400
|
+
};
|
401
|
+
"783AB3ACC4759E5DE4CD6F35" = { "isa" = "PBXFileReference";
|
402
|
+
"sourceTree" = "<group>";
|
403
|
+
"path" = "DMMMainStoryboard.h";
|
404
|
+
"lastKnownFileType" = "sourcecode.c.h";
|
405
|
+
};
|
406
|
+
"97276648429E62ACCC97F345" = { "isa" = "PBXGroup";
|
407
|
+
"children" = ( "783AB3ACC4759E5DE4CD6F35","CFC9CC14B6EB3E9D7E43BF4A" );
|
408
|
+
"name" = "Generated Files";
|
409
|
+
"sourceTree" = "<group>";
|
410
|
+
};
|
411
|
+
"CFC9CC14B6EB3E9D7E43BF4A" = { "isa" = "PBXFileReference";
|
412
|
+
"sourceTree" = "<group>";
|
413
|
+
"path" = "DMMMainStoryboard.m";
|
414
|
+
"lastKnownFileType" = "sourcecode.c.objc";
|
415
|
+
};
|
416
|
+
};
|
417
|
+
"rootObject" = "8AB8CD23198D6B6400CEA0CD";
|
418
|
+
}
|
@@ -7,11 +7,12 @@ module Ovaltine
|
|
7
7
|
SEGUE_SECTION_TITLE='Segue Identifiers'
|
8
8
|
VIEW_CONTROLLER_SECTION_TITLE='View Controllers'
|
9
9
|
|
10
|
-
def initialize storyboard, prefix, output_path
|
10
|
+
def initialize storyboard, prefix, copyright, output_path
|
11
11
|
scrubbed_name = storyboard.name.gsub(/\W/,'_')
|
12
12
|
@storyboard = storyboard
|
13
13
|
@prefix = prefix
|
14
14
|
@classname = "#{@prefix}#{scrubbed_name}Storyboard"
|
15
|
+
@copyright = copyright
|
15
16
|
@header_path = File.join(File.expand_path(output_path), "#{classname}.h")
|
16
17
|
@impl_path = File.join(File.expand_path(output_path), "#{classname}.m")
|
17
18
|
end
|
@@ -29,6 +30,14 @@ module Ovaltine
|
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
33
|
+
def copyright_text
|
34
|
+
if @copyright.length > 0
|
35
|
+
"Copyright (c) #{Time.new.year} #{@copyright}. All rights reserved."
|
36
|
+
else
|
37
|
+
''
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
32
41
|
private
|
33
42
|
|
34
43
|
def generate_header
|
@@ -37,7 +46,8 @@ module Ovaltine
|
|
37
46
|
.gsub('{CLASS_NAME}', classname)\
|
38
47
|
.gsub('{REUSE_IDENTIFIERS}', reuse_identifier_definitions)\
|
39
48
|
.gsub('{SEGUE_IDENTIFIERS}', segue_identifier_definitions)\
|
40
|
-
.gsub('{VIEW_CONTROLLERS}', view_controller_definitions)
|
49
|
+
.gsub('{VIEW_CONTROLLERS}', view_controller_definitions)\
|
50
|
+
.gsub('{COPYRIGHT}', copyright_text)
|
41
51
|
end
|
42
52
|
|
43
53
|
def generate_implementation
|
@@ -48,6 +58,7 @@ module Ovaltine
|
|
48
58
|
.gsub('{REUSE_IDENTIFIERS}', reuse_identifier_implementations)\
|
49
59
|
.gsub('{SEGUE_IDENTIFIERS}', segue_identifier_implementations)\
|
50
60
|
.gsub('{VIEW_CONTROLLERS}', view_controller_implementations)\
|
61
|
+
.gsub('{COPYRIGHT}', copyright_text)\
|
51
62
|
.gsub('{STORYBOARD}', StoryboardTemplates::STORYBOARD_IMPLEMENTATION_TEMPLATE.gsub('{IDENTIFIER_CONSTANT_NAME}', variable_name(storyboard.name)))
|
52
63
|
end
|
53
64
|
|
@@ -67,7 +78,7 @@ module Ovaltine
|
|
67
78
|
end
|
68
79
|
|
69
80
|
def reuse_identifier_implementations
|
70
|
-
prepend_title(CELL_REUSE_SECTION_TITLE, storyboard.cell_reuse_identifiers.each_with_index.map do |identifier, index|
|
81
|
+
prepend_title(CELL_REUSE_SECTION_TITLE, storyboard.cell_reuse_identifiers.sort.each_with_index.map do |identifier, index|
|
71
82
|
StoryboardTemplates::REUSE_IMPLEMENTATION_TEMPLATE\
|
72
83
|
.gsub('{IDENTIFIER}', format_reuse_identifier(identifier))\
|
73
84
|
.gsub('{IDENTIFIER_CONSTANT_NAME}', variable_name(identifier))
|
@@ -75,13 +86,13 @@ module Ovaltine
|
|
75
86
|
end
|
76
87
|
|
77
88
|
def segue_identifier_definitions
|
78
|
-
prepend_title(SEGUE_SECTION_TITLE, storyboard.segue_identifiers.each_with_index.map do |identifier, index|
|
89
|
+
prepend_title(SEGUE_SECTION_TITLE, storyboard.segue_identifiers.sort.each_with_index.map do |identifier, index|
|
79
90
|
StoryboardTemplates::SEGUE_DEFINITION_TEMPLATE.gsub('{IDENTIFIER}', format(identifier, 'identifier', 'SegueIdentifier'))
|
80
91
|
end.join("\n"))
|
81
92
|
end
|
82
93
|
|
83
94
|
def segue_identifier_implementations
|
84
|
-
prepend_title(SEGUE_SECTION_TITLE, storyboard.segue_identifiers.each_with_index.map do |identifier, index|
|
95
|
+
prepend_title(SEGUE_SECTION_TITLE, storyboard.segue_identifiers.sort.each_with_index.map do |identifier, index|
|
85
96
|
StoryboardTemplates::SEGUE_IMPLEMENTATION_TEMPLATE\
|
86
97
|
.gsub('{IDENTIFIER}', format_segue_identifier(identifier))\
|
87
98
|
.gsub('{IDENTIFIER_CONSTANT_NAME}', variable_name(identifier))
|
@@ -89,13 +100,13 @@ module Ovaltine
|
|
89
100
|
end
|
90
101
|
|
91
102
|
def view_controller_definitions
|
92
|
-
prepend_title(VIEW_CONTROLLER_SECTION_TITLE, storyboard.view_controller_identifiers.each_with_index.map do |identifier, index|
|
103
|
+
prepend_title(VIEW_CONTROLLER_SECTION_TITLE, storyboard.view_controller_identifiers.sort.each_with_index.map do |identifier, index|
|
93
104
|
StoryboardTemplates::VIEW_CONTROLLER_DEFINITION_TEMPLATE.gsub('{IDENTIFIER}', format_view_controller(identifier))
|
94
105
|
end.join("\n"))
|
95
106
|
end
|
96
107
|
|
97
108
|
def view_controller_implementations
|
98
|
-
prepend_title(VIEW_CONTROLLER_SECTION_TITLE, storyboard.view_controller_identifiers.each_with_index.map do |identifier, index|
|
109
|
+
prepend_title(VIEW_CONTROLLER_SECTION_TITLE, storyboard.view_controller_identifiers.sort.each_with_index.map do |identifier, index|
|
99
110
|
StoryboardTemplates::VIEW_CONTROLLER_IMPLEMENTATION_TEMPLATE\
|
100
111
|
.gsub('{IDENTIFIER}', variable_name(identifier))\
|
101
112
|
.gsub('{CAPITALIZED_IDENTIFIER}', format_view_controller(identifier))
|
@@ -106,7 +117,6 @@ module Ovaltine
|
|
106
117
|
"_#{@prefix}#{identifier.gsub(/\W/,'').gsub(/\b\w/){ $&.downcase }}"
|
107
118
|
end
|
108
119
|
|
109
|
-
|
110
120
|
def format_view_controller identifier
|
111
121
|
format(identifier, 'controller', 'ViewController', true)
|
112
122
|
end
|
@@ -16,7 +16,8 @@ module Ovaltine
|
|
16
16
|
|
17
17
|
HEADER_TEMPLATE='''//
|
18
18
|
// {FILENAME}
|
19
|
-
//
|
19
|
+
// {COPYRIGHT}
|
20
|
+
// Generated by Ovaltine - http://github.com/kattrali/ovaltine
|
20
21
|
|
21
22
|
#import <Foundation/Foundation.h>
|
22
23
|
|
@@ -35,7 +36,8 @@ module Ovaltine
|
|
35
36
|
|
36
37
|
IMPLEMENTATION_TEMPLATE='''//
|
37
38
|
// {FILENAME}
|
38
|
-
//
|
39
|
+
// {COPYRIGHT}
|
40
|
+
// Generated by Ovaltine - http://github.com/kattrali/ovaltine
|
39
41
|
|
40
42
|
#import <UIKit/UIKit.h>
|
41
43
|
#import "{CLASS_NAME}.h"
|
data/lib/ovaltine/version.rb
CHANGED
data/lib/ovaltine.rb
CHANGED
@@ -15,7 +15,7 @@ module Ovaltine
|
|
15
15
|
groups = files.group_by {|f| File.basename(f).sub('.storyboard','')}
|
16
16
|
formatters = groups.map do |name, paths|
|
17
17
|
storyboard = Storyboard.new(name, paths)
|
18
|
-
StoryboardFormatter.new(storyboard, options[:prefix], (options[:output_directory] || path))
|
18
|
+
StoryboardFormatter.new(storyboard, options[:prefix], options[:copy], (options[:output_directory] || path))
|
19
19
|
end
|
20
20
|
generated_paths = formatters.map(&:output_paths).flatten
|
21
21
|
if existing_path = generated_paths.detect {|p| File.exist?(p)} and !options[:auto_replace]
|
@@ -8,7 +8,7 @@ describe 'StoryboardFormatter' do
|
|
8
8
|
|
9
9
|
it 'writes valid output paths' do
|
10
10
|
storyboard = Ovaltine::Storyboard.new('Main?P', [])
|
11
|
-
formatter = Ovaltine::StoryboardFormatter.new(storyboard, '', '.')
|
11
|
+
formatter = Ovaltine::StoryboardFormatter.new(storyboard, '', '', '.')
|
12
12
|
names = formatter.output_paths.map {|p| File.basename(p)}
|
13
13
|
names.should.include 'Main_PStoryboard.m'
|
14
14
|
names.should.include 'Main_PStoryboard.h'
|
@@ -16,7 +16,7 @@ describe 'StoryboardFormatter' do
|
|
16
16
|
|
17
17
|
it 'uses the prefix in output paths' do
|
18
18
|
storyboard = Ovaltine::Storyboard.new('Main_iPhone', [])
|
19
|
-
formatter = Ovaltine::StoryboardFormatter.new(storyboard, 'ABC', '.')
|
19
|
+
formatter = Ovaltine::StoryboardFormatter.new(storyboard, 'ABC', '', '.')
|
20
20
|
names = formatter.output_paths.map {|p| File.basename(p)}
|
21
21
|
names.should.include 'ABCMain_iPhoneStoryboard.m'
|
22
22
|
names.should.include 'ABCMain_iPhoneStoryboard.h'
|
@@ -24,7 +24,25 @@ describe 'StoryboardFormatter' do
|
|
24
24
|
|
25
25
|
it 'uses the prefix in the generated class name' do
|
26
26
|
storyboard = Ovaltine::Storyboard.new('Onboarding', [])
|
27
|
-
formatter = Ovaltine::StoryboardFormatter.new(storyboard, 'DMU', '.')
|
27
|
+
formatter = Ovaltine::StoryboardFormatter.new(storyboard, 'DMU', '', '.')
|
28
28
|
formatter.classname.should.equal 'DMUOnboardingStoryboard'
|
29
29
|
end
|
30
|
+
|
31
|
+
it 'uses the current year in copyright text' do
|
32
|
+
storyboard = Ovaltine::Storyboard.new('GameOver', [])
|
33
|
+
formatter = Ovaltine::StoryboardFormatter.new(storyboard, 'DMU', 'Kattrali Inc.', '.')
|
34
|
+
formatter.copyright_text.should.include "Copyright (c) #{Time.new.year}"
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'uses the given copyright owner' do
|
38
|
+
storyboard = Ovaltine::Storyboard.new('GameOver', [])
|
39
|
+
formatter = Ovaltine::StoryboardFormatter.new(storyboard, 'DMU', 'Kattrali Inc.', '.')
|
40
|
+
formatter.copyright_text.should.include 'Kattrali Inc.'
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'opens copyright information when not provided' do
|
44
|
+
storyboard = Ovaltine::Storyboard.new('GameOver', [])
|
45
|
+
formatter = Ovaltine::StoryboardFormatter.new(storyboard, 'DMU', '', '.')
|
46
|
+
formatter.copyright_text.downcase.should.not.include "Copyright"
|
47
|
+
end
|
30
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ovaltine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delisa Mason
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09
|
11
|
+
date: 2014-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|