ceedling 0.9.4 → 0.10.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.
Files changed (34) hide show
  1. data/.gitignore +1 -0
  2. data/ceedling-gem.sublime-project +2 -569
  3. data/lib/ceedling/version.rb +4 -4
  4. data/lib/ceedling/version.rb.erb +1 -1
  5. data/new_project_template/vendor/ceedling/docs/Unity Summary.pdf +0 -0
  6. data/new_project_template/vendor/ceedling/lib/configurator.rb +1 -1
  7. data/new_project_template/vendor/ceedling/lib/configurator_builder.rb +34 -16
  8. data/new_project_template/vendor/ceedling/lib/configurator_plugins.rb +38 -7
  9. data/new_project_template/vendor/ceedling/lib/configurator_setup.rb +1 -0
  10. data/new_project_template/vendor/ceedling/lib/erb_wrapper.rb +9 -0
  11. data/new_project_template/vendor/ceedling/lib/file_system_wrapper.rb +10 -0
  12. data/new_project_template/vendor/ceedling/lib/file_wrapper.rb +5 -0
  13. data/new_project_template/vendor/ceedling/lib/generator.rb +6 -4
  14. data/new_project_template/vendor/ceedling/lib/objects.yml +9 -1
  15. data/new_project_template/vendor/ceedling/lib/plugin.rb +1 -0
  16. data/new_project_template/vendor/ceedling/lib/plugin_builder.rb +53 -0
  17. data/new_project_template/vendor/ceedling/lib/rake_wrapper.rb +2 -0
  18. data/new_project_template/vendor/ceedling/lib/tasks_base.rake +1 -1
  19. data/new_project_template/vendor/ceedling/lib/tool_executor.rb +1 -1
  20. data/new_project_template/vendor/ceedling/plugins/module_generator/{module_generator.yml → config/module_generator.yml} +0 -0
  21. data/new_project_template/vendor/ceedling/plugins/module_generator/{module_generator.rb → lib/module_generator.rb} +0 -0
  22. data/new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/{stdout_ide_tests_report.yml → config/stdout_ide_tests_report.yml} +0 -0
  23. data/new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/{stdout_ide_tests_report.rb → lib/stdout_ide_tests_report.rb} +0 -0
  24. data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/{template.erb → assets/template.erb} +0 -0
  25. data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/{stdout_pretty_tests_report.yml → config/stdout_pretty_tests_report.yml} +0 -0
  26. data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/{stdout_pretty_tests_report.rb → lib/stdout_pretty_tests_report.rb} +2 -3
  27. data/new_project_template/vendor/ceedling/release/build.info +1 -1
  28. data/new_project_template/vendor/ceedling/release/version.info +1 -1
  29. data/new_project_template/vendor/ceedling/vendor/cmock/release/build.info +1 -1
  30. data/new_project_template/vendor/ceedling/vendor/unity/auto/generate_test_runner.rb +11 -6
  31. data/new_project_template/vendor/ceedling/vendor/unity/release/build.info +1 -1
  32. data/new_project_template/vendor/ceedling/vendor/unity/src/unity.c +6 -2
  33. data/new_project_template/vendor/ceedling/vendor/unity/src/unity_internals.h +10 -0
  34. metadata +18 -22
data/.gitignore CHANGED
@@ -4,6 +4,7 @@ Gemfile.lock
4
4
  pkg/*
5
5
  doc
6
6
  .yardoc
7
+ *.sublime-workspace
7
8
 
8
9
  new_project_template/vendor/ceedling/docs/CeedlingPacket.pdf
9
10
  new_project_template/vendor/ceedling/vendor/unity/auto/colour_prompt.rb
@@ -1,575 +1,8 @@
1
1
  {
2
- "auto_complete":
3
- {
4
- "selected_items":
5
- [
6
- ]
7
- },
8
- "buffers":
9
- [
10
- {
11
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/examples/temp_sensor/project.yml",
12
- "settings":
13
- {
14
- "buffer_size": 1078,
15
- "line_ending": "Windows"
16
- }
17
- },
18
- {
19
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/README.md",
20
- "settings":
21
- {
22
- "buffer_size": 1918,
23
- "line_ending": "Unix"
24
- }
25
- },
26
- {
27
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/ceedling.gemspec",
28
- "settings":
29
- {
30
- "buffer_size": 1013,
31
- "line_ending": "Unix"
32
- }
33
- },
34
- {
35
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/lib/ceedling/version.rb",
36
- "settings":
37
- {
38
- "buffer_size": 243,
39
- "line_ending": "Unix"
40
- }
41
- },
42
- {
43
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/bin/ceedling",
44
- "settings":
45
- {
46
- "buffer_size": 1745,
47
- "line_ending": "Unix"
48
- }
49
- },
50
- {
51
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/new_project_template/project.yml",
52
- "settings":
53
- {
54
- "buffer_size": 1275,
55
- "line_ending": "Unix"
56
- }
57
- },
58
- {
59
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/lib/ceedling/version.rb.erb",
60
- "settings":
61
- {
62
- "buffer_size": 320,
63
- "line_ending": "Unix"
64
- }
65
- },
66
- {
67
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/lib/ceedling.rb",
68
- "settings":
69
- {
70
- "buffer_size": 102,
71
- "line_ending": "Unix"
72
- }
73
- },
74
- {
75
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/new_project_template/rakefile.rb",
76
- "settings":
77
- {
78
- "buffer_size": 131,
79
- "line_ending": "Unix"
80
- }
81
- },
82
- {
83
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/new_project_template/vendor/ceedling/lib/rakefile.rb",
84
- "settings":
85
- {
86
- "buffer_size": 2353,
87
- "line_ending": "Windows"
88
- }
89
- },
90
- {
91
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/new_project_template/vendor/ceedling/lib/tasks_base.rake",
92
- "settings":
93
- {
94
- "buffer_size": 2996,
95
- "line_ending": "Windows"
96
- }
97
- }
98
- ],
99
- "build_system": "",
100
- "file_history":
101
- [
102
- "/Users/greg/git/ceedling-gem/ceedling-gem/Rakefile",
103
- "/Users/greg/git/ceedling-gem/ceedling-gem/version.info",
104
- "/Users/greg/git/ceedling-gem/ceedling-gem/new_project_template/vendor/ceedling/plugins/bullseye/template.erb",
105
- "/Users/greg/git/ceedling-gem/ceedling-gem/temp/vendor/cmock/release/version.info",
106
- "/Users/greg/git/ceedling-gem/ceedling-gem/temp/vendor/c_exception/release/version.info",
107
- "/Users/greg/git/ceedling-gem/ceedling-gem/examples/temp_sensor/rakefile.rb",
108
- "/Users/greg/git/ceedling-gem/ceedling-gem/delete.rb",
109
- "/Users/greg/git/ceedling-gem/ceedling-gem/temp_sensor_project/rakefile.rb",
110
- "/Users/greg/Downloads/BullseyeCoverage-8.0.19/README",
111
- "/Users/greg/git/ceedling-gem/ceedling-gem/ceedling-gem.sublime-project",
112
- "/Users/greg/Downloads/project.yml",
113
- "/Users/greg/git/ceedling-gem/ceedling-gem/Gemfile",
114
- "/Users/greg/git/ceedling-gem/ceedling-gem/foo.rb",
115
- "/opt/local/bin/ruby"
116
- ],
117
- "find_in_files":
118
- {
119
- "include_history":
120
- [
121
- ""
122
- ],
123
- "location_history":
124
- [
125
- "<open folders>"
126
- ]
127
- },
128
- "find_state":
129
- {
130
- "case_sensitive": false,
131
- "find_history":
132
- [
133
- "test_sensor",
134
- "task :version",
135
- "dest",
136
- "Dir"
137
- ],
138
- "highlight": true,
139
- "in_selection": false,
140
- "preserve_case": false,
141
- "regex": false,
142
- "replace_history":
143
- [
144
- ],
145
- "reverse": false,
146
- "show_context": true,
147
- "use_buffer": false,
148
- "whole_word": false,
149
- "wrap": true
150
- },
151
2
  "folders":
152
- {
153
- "mount_points":
154
- [
155
- "/Users/greg/git/ceedling-gem/ceedling-gem"
156
- ]
157
- },
158
- "groups":
159
3
  [
160
4
  {
161
- "selected": 1,
162
- "sheets":
163
- [
164
- {
165
- "buffer": 0,
166
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/examples/temp_sensor/project.yml",
167
- "settings":
168
- {
169
- "buffer_size": 1078,
170
- "regions":
171
- {
172
- },
173
- "selection":
174
- [
175
- [
176
- 371,
177
- 371
178
- ]
179
- ],
180
- "settings":
181
- {
182
- "syntax": "Packages/YAML/YAML.tmLanguage",
183
- "tab_size": 2,
184
- "translate_tabs_to_spaces": true
185
- },
186
- "translation.x": 0,
187
- "translation.y": 211,
188
- "zoom_level": 1
189
- },
190
- "type": "text"
191
- },
192
- {
193
- "buffer": 1,
194
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/README.md",
195
- "settings":
196
- {
197
- "buffer_size": 1918,
198
- "regions":
199
- {
200
- },
201
- "selection":
202
- [
203
- [
204
- 1247,
205
- 1247
206
- ]
207
- ],
208
- "settings":
209
- {
210
- "syntax": "Packages/Markdown/Markdown.tmLanguage"
211
- },
212
- "translation.x": 0,
213
- "translation.y": 239,
214
- "zoom_level": 1
215
- },
216
- "type": "text"
217
- },
218
- {
219
- "buffer": 2,
220
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/ceedling.gemspec",
221
- "settings":
222
- {
223
- "buffer_size": 1013,
224
- "regions":
225
- {
226
- },
227
- "selection":
228
- [
229
- [
230
- 593,
231
- 593
232
- ]
233
- ],
234
- "settings":
235
- {
236
- "syntax": "Packages/Ruby/Ruby.tmLanguage",
237
- "tab_size": 2,
238
- "translate_tabs_to_spaces": true
239
- },
240
- "translation.x": 0,
241
- "translation.y": 0,
242
- "zoom_level": 1
243
- },
244
- "type": "text"
245
- },
246
- {
247
- "buffer": 3,
248
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/lib/ceedling/version.rb",
249
- "settings":
250
- {
251
- "buffer_size": 243,
252
- "regions":
253
- {
254
- },
255
- "selection":
256
- [
257
- [
258
- 0,
259
- 0
260
- ]
261
- ],
262
- "settings":
263
- {
264
- "syntax": "Packages/Ruby/Ruby.tmLanguage",
265
- "tab_size": 4,
266
- "translate_tabs_to_spaces": true
267
- },
268
- "translation.x": 0,
269
- "translation.y": 0,
270
- "zoom_level": 1
271
- },
272
- "type": "text"
273
- },
274
- {
275
- "buffer": 4,
276
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/bin/ceedling",
277
- "settings":
278
- {
279
- "buffer_size": 1745,
280
- "regions":
281
- {
282
- },
283
- "selection":
284
- [
285
- [
286
- 1370,
287
- 1370
288
- ]
289
- ],
290
- "settings":
291
- {
292
- "syntax": "Packages/Ruby/Ruby.tmLanguage",
293
- "tab_size": 2,
294
- "translate_tabs_to_spaces": true
295
- },
296
- "translation.x": 0,
297
- "translation.y": 0,
298
- "zoom_level": 1
299
- },
300
- "type": "text"
301
- },
302
- {
303
- "buffer": 5,
304
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/new_project_template/project.yml",
305
- "settings":
306
- {
307
- "buffer_size": 1275,
308
- "regions":
309
- {
310
- },
311
- "selection":
312
- [
313
- [
314
- 860,
315
- 860
316
- ]
317
- ],
318
- "settings":
319
- {
320
- "syntax": "Packages/YAML/YAML.tmLanguage",
321
- "tab_size": 2,
322
- "translate_tabs_to_spaces": true
323
- },
324
- "translation.x": 0,
325
- "translation.y": 127,
326
- "zoom_level": 1
327
- },
328
- "type": "text"
329
- }
330
- ]
331
- },
332
- {
333
- "selected": 4,
334
- "sheets":
335
- [
336
- {
337
- "buffer": 6,
338
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/lib/ceedling/version.rb.erb",
339
- "settings":
340
- {
341
- "buffer_size": 320,
342
- "regions":
343
- {
344
- },
345
- "selection":
346
- [
347
- [
348
- 75,
349
- 75
350
- ]
351
- ],
352
- "settings":
353
- {
354
- "syntax": "Packages/Rails/HTML (Rails).tmLanguage",
355
- "tab_size": 4,
356
- "translate_tabs_to_spaces": true
357
- },
358
- "translation.x": 0,
359
- "translation.y": 0,
360
- "zoom_level": 1
361
- },
362
- "type": "text"
363
- },
364
- {
365
- "buffer": 7,
366
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/lib/ceedling.rb",
367
- "settings":
368
- {
369
- "buffer_size": 102,
370
- "regions":
371
- {
372
- },
373
- "selection":
374
- [
375
- [
376
- 0,
377
- 0
378
- ]
379
- ],
380
- "settings":
381
- {
382
- "syntax": "Packages/Ruby/Ruby.tmLanguage"
383
- },
384
- "translation.x": 0,
385
- "translation.y": 0,
386
- "zoom_level": 1
387
- },
388
- "type": "text"
389
- },
390
- {
391
- "buffer": 8,
392
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/new_project_template/rakefile.rb",
393
- "settings":
394
- {
395
- "buffer_size": 131,
396
- "regions":
397
- {
398
- },
399
- "selection":
400
- [
401
- [
402
- 131,
403
- 131
404
- ]
405
- ],
406
- "settings":
407
- {
408
- "syntax": "Packages/Ruby/Ruby.tmLanguage"
409
- },
410
- "translation.x": 0,
411
- "translation.y": 0,
412
- "zoom_level": 1
413
- },
414
- "type": "text"
415
- },
416
- {
417
- "buffer": 9,
418
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/new_project_template/vendor/ceedling/lib/rakefile.rb",
419
- "settings":
420
- {
421
- "buffer_size": 2353,
422
- "regions":
423
- {
424
- },
425
- "selection":
426
- [
427
- [
428
- 632,
429
- 632
430
- ]
431
- ],
432
- "settings":
433
- {
434
- "syntax": "Packages/Ruby/Ruby.tmLanguage",
435
- "tab_size": 2,
436
- "translate_tabs_to_spaces": true
437
- },
438
- "translation.x": 0,
439
- "translation.y": 0,
440
- "zoom_level": 1
441
- },
442
- "type": "text"
443
- },
444
- {
445
- "buffer": 10,
446
- "file": "/Users/greg/git/ceedling-gem/ceedling-gem/new_project_template/vendor/ceedling/lib/tasks_base.rake",
447
- "settings":
448
- {
449
- "buffer_size": 2996,
450
- "regions":
451
- {
452
- },
453
- "selection":
454
- [
455
- [
456
- 802,
457
- 802
458
- ]
459
- ],
460
- "settings":
461
- {
462
- "syntax": "Packages/Ruby/Ruby.tmLanguage",
463
- "tab_size": 2,
464
- "translate_tabs_to_spaces": true
465
- },
466
- "translation.x": 0,
467
- "translation.y": 0,
468
- "zoom_level": 1
469
- },
470
- "type": "text"
471
- }
472
- ]
5
+ "path": "/Users/greg/git/ceedling-gem"
473
6
  }
474
- ],
475
- "layout":
476
- {
477
- "cells":
478
- [
479
- [
480
- 0,
481
- 0,
482
- 1,
483
- 1
484
- ],
485
- [
486
- 1,
487
- 0,
488
- 2,
489
- 1
490
- ]
491
- ],
492
- "cols":
493
- [
494
- 0,
495
- 0.5,
496
- 1
497
- ],
498
- "rows":
499
- [
500
- 0,
501
- 1
502
- ]
503
- },
504
- "menu_visible": true,
505
- "save_all_on_build": true,
506
- "select_file":
507
- {
508
- "height": 0,
509
- "selected_items":
510
- [
511
- [
512
- "ceedling",
513
- "lib/ceedling.rb"
514
- ],
515
- [
516
- "versioerb",
517
- "lib/ceedling/version.rb.erb"
518
- ],
519
- [
520
- "/plugins",
521
- "new_project_template/vendor/ceedling/plugins/bullseye/template.erb"
522
- ],
523
- [
524
- "versionin",
525
- "temp/vendor/cmock/release/version.info"
526
- ],
527
- [
528
- "versinfo",
529
- "temp/vendor/c_exception/release/version.info"
530
- ],
531
- [
532
- "proje",
533
- "new_project_template/project.yml"
534
- ],
535
- [
536
- "rake",
537
- "Rakefile"
538
- ],
539
- [
540
- "ceedlingversion",
541
- "lib/ceedling/version.rb"
542
- ],
543
- [
544
- "gemfil",
545
- "Gemfile"
546
- ],
547
- [
548
- "gem",
549
- "ceedling.gemspec"
550
- ],
551
- [
552
- "gems",
553
- "ceedling.gemspec"
554
- ],
555
- [
556
- "foo",
557
- "foo.rb"
558
- ]
559
- ],
560
- "width": 0
561
- },
562
- "select_project":
563
- {
564
- "height": 0,
565
- "selected_items":
566
- [
567
- ],
568
- "width": 0
569
- },
570
- "show_minimap": false,
571
- "show_tabs": true,
572
- "side_bar_visible": false,
573
- "side_bar_width": 245,
574
- "status_bar_visible": true
7
+ ]
575
8
  }
@@ -2,15 +2,15 @@
2
2
  module Ceedling
3
3
  module Version
4
4
  # @private
5
- GEM = "0.9.4"
5
+ GEM = "0.10.0"
6
6
 
7
7
  # @private
8
- CEEDLING = "0.9.217"
8
+ CEEDLING = "0.10.224"
9
9
  # @private
10
10
  CEXCEPTION = "1.2.17"
11
11
  # @private
12
- CMOCK = "2.0.214"
12
+ CMOCK = "2.0.215"
13
13
  # @private
14
- UNITY = "2.0.135"
14
+ UNITY = "2.0.136"
15
15
  end
16
16
  end
@@ -2,7 +2,7 @@
2
2
  module Ceedling
3
3
  module Version
4
4
  # @private
5
- GEM = "0.9.4"
5
+ GEM = "0.10.0"
6
6
 
7
7
  # @private
8
8
  CEEDLING = "<%= versions["CEEDLING"] %>"
@@ -225,7 +225,7 @@ class Configurator
225
225
 
226
226
  paths = [ # individual paths that don't follow convention processed below
227
227
  config[:project][:build_root],
228
- config[:release_build][:artifacts]]
228
+ config[:release_build][:artifacts]] # cmock path in case it was explicitly set in config
229
229
 
230
230
  paths.flatten.each { |path| FilePathUtils::standardize( path ) }
231
231
 
@@ -230,8 +230,8 @@ class ConfiguratorBuilder
230
230
  def collect_source_and_include_paths(in_hash)
231
231
  return {
232
232
  :collection_paths_source_and_include =>
233
- in_hash[:collection_paths_source] +
234
- in_hash[:collection_paths_include]
233
+ ( in_hash[:collection_paths_source] +
234
+ in_hash[:collection_paths_include] ).select {|x| File.directory?(x)}
235
235
  }
236
236
  end
237
237
 
@@ -251,25 +251,24 @@ class ConfiguratorBuilder
251
251
  def collect_test_support_source_include_paths(in_hash)
252
252
  return {
253
253
  :collection_paths_test_support_source_include =>
254
- in_hash[:collection_paths_test] +
254
+ (in_hash[:collection_paths_test] +
255
255
  in_hash[:collection_paths_support] +
256
256
  in_hash[:collection_paths_source] +
257
- in_hash[:collection_paths_include]
257
+ in_hash[:collection_paths_include] ).select {|x| File.directory?(x)}
258
258
  }
259
259
  end
260
+
261
+
262
+ def collect_vendor_paths(in_hash)
263
+ return {:collection_paths_vendor => get_vendor_paths(in_hash)}
264
+ end
260
265
 
261
-
262
- def collect_test_support_source_include_vendor_paths(in_hash)
263
- extra_paths = []
264
- extra_paths << FilePathUtils::form_ceedling_vendor_path(UNITY_LIB_PATH)
265
- extra_paths << FilePathUtils::form_ceedling_vendor_path(CEXCEPTION_LIB_PATH) if (in_hash[:project_use_exceptions])
266
- extra_paths << FilePathUtils::form_ceedling_vendor_path(CMOCK_LIB_PATH) if (in_hash[:project_use_mocks])
267
- extra_paths << in_hash[:cmock_mock_path] if (in_hash[:project_use_mocks])
268
266
 
267
+ def collect_test_support_source_include_vendor_paths(in_hash)
269
268
  return {
270
269
  :collection_paths_test_support_source_include_vendor =>
271
270
  in_hash[:collection_paths_test_support_source_include] +
272
- extra_paths
271
+ get_vendor_paths(in_hash)
273
272
  }
274
273
  end
275
274
 
@@ -304,11 +303,13 @@ class ConfiguratorBuilder
304
303
 
305
304
  def collect_source(in_hash)
306
305
  all_source = @file_wrapper.instantiate_file_list
307
-
308
306
  in_hash[:collection_paths_source].each do |path|
309
- all_source.include( File.join(path, "*#{in_hash[:extension_source]}") )
307
+ if File.exists?(path) and not File.directory?(path)
308
+ all_source.include( path )
309
+ else
310
+ all_source.include( File.join(path, "*#{in_hash[:extension_source]}") )
311
+ end
310
312
  end
311
-
312
313
  @file_system_utils.revise_file_list( all_source, in_hash[:files_source] )
313
314
 
314
315
  return {:collection_all_source => all_source}
@@ -349,7 +350,11 @@ class ConfiguratorBuilder
349
350
 
350
351
  paths.each do |path|
351
352
  all_input.include( File.join(path, "*#{in_hash[:extension_header]}") )
352
- all_input.include( File.join(path, "*#{in_hash[:extension_source]}") )
353
+ if File.exists?(path) and not File.directory?(path)
354
+ all_input.include( path )
355
+ else
356
+ all_input.include( File.join(path, "*#{in_hash[:extension_source]}") )
357
+ end
353
358
  end
354
359
 
355
360
  @file_system_utils.revise_file_list( all_input, in_hash[:files_test] )
@@ -415,5 +420,18 @@ class ConfiguratorBuilder
415
420
 
416
421
  return { :collection_test_fixture_extra_link_objects => objects }
417
422
  end
423
+
424
+
425
+ private
426
+
427
+ def get_vendor_paths(in_hash)
428
+ vendor_paths = []
429
+ vendor_paths << FilePathUtils::form_ceedling_vendor_path(UNITY_LIB_PATH)
430
+ vendor_paths << FilePathUtils::form_ceedling_vendor_path(CEXCEPTION_LIB_PATH) if (in_hash[:project_use_exceptions])
431
+ vendor_paths << FilePathUtils::form_ceedling_vendor_path(CMOCK_LIB_PATH) if (in_hash[:project_use_mocks])
432
+ vendor_paths << in_hash[:cmock_mock_path] if (in_hash[:project_use_mocks])
433
+
434
+ return vendor_paths
435
+ end
418
436
 
419
437
  end
@@ -18,10 +18,15 @@ class ConfiguratorPlugins
18
18
  @system_wrapper.add_load_path( root ) if ( not @file_wrapper.directory_listing( File.join( root, '*.rb' ) ).empty? )
19
19
 
20
20
  config[:plugins][:enabled].each do |plugin|
21
- path = File.join( root, plugin )
21
+ path = File.join(root, plugin, "lib")
22
+ old_path = File.join( root, plugin )
23
+
22
24
  if ( not @file_wrapper.directory_listing( File.join( path, '*.rb' ) ).empty? )
23
25
  plugin_paths[(plugin + '_path').to_sym] = path
24
26
  @system_wrapper.add_load_path( path )
27
+ elsif ( not @file_wrapper.directory_listing( File.join( old_path, '*.rb' ) ).empty? )
28
+ plugin_paths[(plugin + '_path').to_sym] = old_path
29
+ @system_wrapper.add_load_path( old_path )
25
30
  end
26
31
  end
27
32
  end
@@ -52,8 +57,19 @@ class ConfiguratorPlugins
52
57
  def find_script_plugins(config)
53
58
  config[:plugins][:load_paths].each do |root|
54
59
  config[:plugins][:enabled].each do |plugin|
55
- script_plugin_path = File.join(root, plugin, "#{plugin}.rb")
56
- @script_plugins << plugin if @file_wrapper.exist?(script_plugin_path)
60
+ script_plugin_path = File.join(root, plugin, "lib", "#{plugin}.rb")
61
+
62
+ # Add the old path here to support legacy style. Eventaully remove.
63
+ old_script_plugin_path = File.join(root, plugin, "#{plugin}.rb")
64
+
65
+ if @file_wrapper.exist?(script_plugin_path) or @file_wrapper.exist?(old_script_plugin_path)
66
+ @script_plugins << plugin
67
+ end
68
+
69
+ # Print depreciation warning.
70
+ if @file_wrapper.exist?(old_script_plugin_path)
71
+ $stderr.puts "WARNING: Depreciated plugin style used in #{plugin}. Use new directory structure!"
72
+ end
57
73
  end
58
74
  end
59
75
 
@@ -67,8 +83,17 @@ class ConfiguratorPlugins
67
83
 
68
84
  config[:plugins][:load_paths].each do |root|
69
85
  config[:plugins][:enabled].each do |plugin|
70
- config_plugin_path = File.join(root, plugin, "#{plugin}.yml")
71
- plugins_with_path << config_plugin_path if @file_wrapper.exist?(config_plugin_path)
86
+ config_plugin_path = File.join(root, plugin, "config", "#{plugin}.yml")
87
+
88
+ # Add the old path here to support legacy style. Eventaully remove.
89
+ old_config_plugin_path = File.join(root, plugin, "#{plugin}.yml")
90
+
91
+ if @file_wrapper.exist?(config_plugin_path)
92
+ plugins_with_path << config_plugin_path
93
+ elsif @file_wrapper.exist?(old_config_plugin_path)
94
+ # there's a warning printed for this in find_script_plugins
95
+ plugins_with_path << old_config_plugin_path
96
+ end
72
97
  end
73
98
  end
74
99
 
@@ -82,8 +107,14 @@ class ConfiguratorPlugins
82
107
 
83
108
  config[:plugins][:load_paths].each do |root|
84
109
  config[:plugins][:enabled].each do |plugin|
85
- default_path = File.join(root, plugin, 'defaults.yml')
86
- defaults_with_path << default_path if @file_wrapper.exist?(default_path)
110
+ default_path = File.join(root, plugin, 'config', 'defaults.yml')
111
+ old_default_path = File.join(root, plugin, 'defaults.yml')
112
+
113
+ if @file_wrapper.exist?(default_path)
114
+ defaults_with_path << default_path
115
+ elsif @file_wrapper.exist?(old_default_path)
116
+ defaults_with_path << old_default_path
117
+ end
87
118
  end
88
119
  end
89
120
 
@@ -29,6 +29,7 @@ class ConfiguratorSetup
29
29
  ### iterate through all entries in paths section and expand any & all globs to actual paths
30
30
  flattened_config.merge!(@configurator_builder.expand_all_path_globs(flattened_config))
31
31
 
32
+ flattened_config.merge!(@configurator_builder.collect_vendor_paths(flattened_config))
32
33
  flattened_config.merge!(@configurator_builder.collect_source_and_include_paths(flattened_config))
33
34
  flattened_config.merge!(@configurator_builder.collect_source_include_vendor_paths(flattened_config))
34
35
  flattened_config.merge!(@configurator_builder.collect_test_support_source_include_paths(flattened_config))
@@ -0,0 +1,9 @@
1
+ require 'erb'
2
+
3
+ class ErbWrapper
4
+ def generate_file(template, data, output_file)
5
+ File.open(output_file, "w") do |f|
6
+ f << ERB.new(template, 0, "<>").result(binding)
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+
2
+ class FileSystemWrapper
3
+
4
+ def cd(path)
5
+ FileUtils.cd path do
6
+ yield
7
+ end
8
+ end
9
+
10
+ end
@@ -10,6 +10,11 @@ class FileWrapper
10
10
  return File.expand_path(path)
11
11
  end
12
12
 
13
+ def basename(path, extension=nil)
14
+ return File.basename(path, extension) if extension
15
+ return File.basename(path)
16
+ end
17
+
13
18
  def exist?(filepath)
14
19
  return true if (filepath == NULL_FILE_PATH)
15
20
  return File.exist?(filepath)
@@ -3,7 +3,7 @@ require 'constants'
3
3
 
4
4
  class Generator
5
5
 
6
- constructor :configurator,
6
+ constructor :configurator,
7
7
  :generator_helper,
8
8
  :preprocessinator,
9
9
  :cmock_builder,
@@ -13,8 +13,10 @@ class Generator
13
13
  :test_includes_extractor,
14
14
  :tool_executor,
15
15
  :file_finder,
16
+ :file_path_utils,
16
17
  :streaminator,
17
- :plugin_manager
18
+ :plugin_manager,
19
+ :file_wrapper
18
20
 
19
21
 
20
22
  def generate_shallow_includes_list(context, file)
@@ -80,7 +82,7 @@ class Generator
80
82
  @plugin_manager.pre_compile_execute(arg_hash)
81
83
 
82
84
  @streaminator.stdout_puts("Compiling #{File.basename(arg_hash[:source])}...", Verbosity::NORMAL)
83
- command =
85
+ command =
84
86
  @tool_executor.build_command_line( arg_hash[:tool],
85
87
  arg_hash[:source],
86
88
  arg_hash[:object],
@@ -104,7 +106,7 @@ class Generator
104
106
  @plugin_manager.pre_link_execute(arg_hash)
105
107
 
106
108
  @streaminator.stdout_puts("Linking #{File.basename(arg_hash[:executable])}...", Verbosity::NORMAL)
107
- command =
109
+ command =
108
110
  @tool_executor.build_command_line( arg_hash[:tool],
109
111
  arg_hash[:objects],
110
112
  arg_hash[:executable],
@@ -1,6 +1,8 @@
1
1
 
2
2
  file_wrapper:
3
3
 
4
+ file_system_wrapper:
5
+
4
6
  stream_wrapper:
5
7
 
6
8
  rake_wrapper:
@@ -119,6 +121,8 @@ streaminator_helper:
119
121
 
120
122
  setupinator:
121
123
 
124
+ plugin_builder:
125
+
122
126
  plugin_manager:
123
127
  compose:
124
128
  - configurator
@@ -185,8 +189,10 @@ generator:
185
189
  - test_includes_extractor
186
190
  - tool_executor
187
191
  - file_finder
192
+ - file_path_utils
188
193
  - streaminator
189
194
  - plugin_manager
195
+ - file_wrapper
190
196
 
191
197
  generator_helper:
192
198
  compose:
@@ -298,4 +304,6 @@ release_invoker_helper:
298
304
  build_invoker_utils:
299
305
  compose:
300
306
  - configurator
301
- - streaminator
307
+ - streaminator
308
+
309
+ erb_wrapper:
@@ -32,6 +32,7 @@ end
32
32
 
33
33
  class Plugin
34
34
  attr_reader :name, :environment
35
+ attr_accessor :plugin_objects
35
36
 
36
37
  def initialize(system_objects, name)
37
38
  @environment = []
@@ -0,0 +1,53 @@
1
+ require 'plugin'
2
+
3
+ class PluginBuilder
4
+
5
+ attr_accessor :plugin_objects
6
+
7
+ def construct_plugin(plugin_name, object_map_yaml, system_objects)
8
+ # @streaminator.stdout_puts("Constructing plugin #{plugin_name}...", Verbosity::OBNOXIOUS)
9
+ object_map = {}
10
+ @plugin_objects = {}
11
+ @system_objects = system_objects
12
+
13
+ if object_map_yaml
14
+ @object_map = YAML.load(object_map_yaml)
15
+ @object_map.each_key do |obj|
16
+ construct_object(obj)
17
+ end
18
+ else
19
+ raise "Invalid object map for plugin #{plugin_name}!"
20
+ end
21
+
22
+ return @plugin_objects
23
+ end
24
+
25
+ private
26
+
27
+ def camelize(underscored_name)
28
+ return underscored_name.gsub(/(_|^)([a-z0-9])/) {$2.upcase}
29
+ end
30
+
31
+ def construct_object(obj)
32
+ if @plugin_objects[obj].nil?
33
+ if @object_map[obj] && @object_map[obj]['compose']
34
+ @object_map[obj]['compose'].each do |dep|
35
+ construct_object(dep)
36
+ end
37
+ end
38
+ build_object(obj)
39
+ end
40
+ end
41
+
42
+ def build_object(new_object)
43
+ if @plugin_objects[new_object.to_sym].nil?
44
+ # @streaminator.stdout_puts("Building plugin object #{new_object}", Verbosity::OBNOXIOUS)
45
+ require new_object
46
+ class_name = camelize(new_object)
47
+ new_instance = eval("#{class_name}.new(@system_objects, class_name.to_s)")
48
+ new_instance.plugin_objects = @plugin_objects
49
+ @plugin_objects[new_object.to_sym] = new_instance
50
+ end
51
+ end
52
+
53
+ end
@@ -2,6 +2,8 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'makefile' # our replacement for rake's make-style dependency loader
4
4
 
5
+ include Rake::DSL if defined?(Rake::DSL)
6
+
5
7
  class Rake::Task
6
8
  attr_reader :already_invoked
7
9
  end
@@ -84,7 +84,7 @@ namespace :options do
84
84
 
85
85
  desc "Merge #{option} project options."
86
86
  task option.downcase.to_sym do
87
- @ceedling[:setupinator].reset_defaults( @ceedling[:setupinator].config_hash )
87
+ # @ceedling[:setupinator].reset_defaults( @ceedling[:setupinator].config_hash )
88
88
  hash = @ceedling[:project_config_manager].merge_options( @ceedling[:setupinator].config_hash, option_path )
89
89
  @ceedling[:setupinator].do_setup( hash )
90
90
  end
@@ -45,7 +45,7 @@ class ToolExecutor
45
45
  options[:boom] = true if (options[:boom].nil?)
46
46
  options[:stderr_redirect] = StdErrRedirect::NONE if (options[:stderr_redirect].nil?)
47
47
  options[:background_exec] = BackgroundExec::NONE if (options[:background_exec].nil?)
48
-
48
+
49
49
  # build command line
50
50
  command_line = [
51
51
  @tool_executor_helper.background_exec_cmdline_prepend( options ),
@@ -5,9 +5,8 @@ class StdoutPrettyTestsReport < Plugin
5
5
 
6
6
  def setup
7
7
  @result_list = []
8
-
9
- template = @ceedling[:file_wrapper].read( File.join( PLUGINS_STDOUT_PRETTY_TESTS_REPORT_PATH, 'template.erb' ) )
10
-
8
+ @plugin_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
9
+ template = @ceedling[:file_wrapper].read(File.join(@plugin_root, 'assets/template.erb'))
11
10
  @ceedling[:plugin_reportinator].register_test_results_template( template )
12
11
  end
13
12
 
@@ -1 +1 @@
1
- 217
1
+ 224
@@ -1 +1 @@
1
- 0.9
1
+ 0.10
@@ -111,12 +111,17 @@ class UnityTestRunnerGenerator
111
111
 
112
112
  def find_includes(input_file)
113
113
  input_file.rewind
114
- includes = []
115
- input_file.readlines.each do |line|
116
- scan_results = line.scan(/^\s*#include\s+\"\s*(.+)\.[hH]\s*\"/)
117
- includes << scan_results[0][0] if (scan_results.size > 0)
118
- end
119
- return includes
114
+
115
+ #read in file
116
+ source = input_file.read
117
+
118
+ #remove comments (block and line, in three steps to ensure correct precedence)
119
+ source.gsub!(/\/\/(?:.+\/\*|\*(?:$|[^\/])).*$/, '') # remove line comments that comment out the start of blocks
120
+ source.gsub!(/\/\*.*?\*\//m, '') # remove block comments
121
+ source.gsub!(/\/\/.*$/, '') # remove line comments (all that remain)
122
+
123
+ #parse out includes
124
+ return source.scan(/^\s*#include\s+\"\s*(.+)\.[hH]\s*\"/).flatten
120
125
  end
121
126
 
122
127
  def find_mocks(includes)
@@ -816,8 +816,8 @@ void UnityAssertEqualStringArray( const char** expected,
816
816
  //-----------------------------------------------
817
817
  void UnityAssertEqualMemory( const void* expected,
818
818
  const void* actual,
819
- _UU32 length,
820
- _UU32 num_elements,
819
+ const _UU32 length,
820
+ const _UU32 num_elements,
821
821
  const char* msg,
822
822
  const UNITY_LINE_TYPE lineNumber)
823
823
  {
@@ -933,6 +933,10 @@ void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int
933
933
  void UnityBegin(void)
934
934
  {
935
935
  Unity.NumberOfTests = 0;
936
+ Unity.TestFailures = 0;
937
+ Unity.TestIgnores = 0;
938
+ Unity.CurrentTestFailed = 0;
939
+ Unity.CurrentTestIgnored = 0;
936
940
  }
937
941
 
938
942
  //-----------------------------------------------
@@ -183,14 +183,23 @@ typedef void (*UnityTestFunction)(void);
183
183
 
184
184
  typedef enum
185
185
  {
186
+ #if (UNITY_INT_WIDTH == 16)
187
+ UNITY_DISPLAY_STYLE_INT = 2 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
188
+ #elif (UNITY_INT_WIDTH == 32)
186
189
  UNITY_DISPLAY_STYLE_INT = 4 + UNITY_DISPLAY_RANGE_INT + UNITY_DISPLAY_RANGE_AUTO,
190
+ #endif
187
191
  UNITY_DISPLAY_STYLE_INT8 = 1 + UNITY_DISPLAY_RANGE_INT,
188
192
  UNITY_DISPLAY_STYLE_INT16 = 2 + UNITY_DISPLAY_RANGE_INT,
189
193
  UNITY_DISPLAY_STYLE_INT32 = 4 + UNITY_DISPLAY_RANGE_INT,
190
194
  #ifdef UNITY_SUPPORT_64
191
195
  UNITY_DISPLAY_STYLE_INT64 = 8 + UNITY_DISPLAY_RANGE_INT,
192
196
  #endif
197
+
198
+ #if (UNITY_INT_WIDTH == 16)
193
199
  UNITY_DISPLAY_STYLE_UINT = 4 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
200
+ #elif (UNITY_INT_WIDTH == 32)
201
+ UNITY_DISPLAY_STYLE_UINT = 2 + UNITY_DISPLAY_RANGE_UINT + UNITY_DISPLAY_RANGE_AUTO,
202
+ #endif
194
203
  UNITY_DISPLAY_STYLE_UINT8 = 1 + UNITY_DISPLAY_RANGE_UINT,
195
204
  UNITY_DISPLAY_STYLE_UINT16 = 2 + UNITY_DISPLAY_RANGE_UINT,
196
205
  UNITY_DISPLAY_STYLE_UINT32 = 4 + UNITY_DISPLAY_RANGE_UINT,
@@ -203,6 +212,7 @@ typedef enum
203
212
  #ifdef UNITY_SUPPORT_64
204
213
  UNITY_DISPLAY_STYLE_HEX64 = 8 + UNITY_DISPLAY_RANGE_HEX,
205
214
  #endif
215
+ UNITY_DISPLAY_STYLE_UNKNOWN
206
216
  } UNITY_DISPLAY_STYLE_T;
207
217
 
208
218
  struct _Unity
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ceedling
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
- - 9
9
- - 4
10
- version: 0.9.4
7
+ - 10
8
+ - 0
9
+ version: 0.10.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Mike Karlesky, Mark VanderVoord
@@ -17,17 +16,16 @@ autorequire:
17
16
  bindir: bin
18
17
  cert_chain: []
19
18
 
20
- date: 2011-08-09 00:00:00 Z
19
+ date: 2011-12-27 00:00:00 -05:00
20
+ default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: thor
24
24
  prerelease: false
25
25
  requirement: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
26
  requirements:
28
27
  - - ">="
29
28
  - !ruby/object:Gem::Version
30
- hash: 45
31
29
  segments:
32
30
  - 0
33
31
  - 14
@@ -39,11 +37,9 @@ dependencies:
39
37
  name: rake
40
38
  prerelease: false
41
39
  requirement: &id002 !ruby/object:Gem::Requirement
42
- none: false
43
40
  requirements:
44
41
  - - ">="
45
42
  - !ruby/object:Gem::Version
46
- hash: 49
47
43
  segments:
48
44
  - 0
49
45
  - 8
@@ -180,10 +176,12 @@ files:
180
176
  - new_project_template/vendor/ceedling/lib/constants.rb
181
177
  - new_project_template/vendor/ceedling/lib/defaults.rb
182
178
  - new_project_template/vendor/ceedling/lib/dependinator.rb
179
+ - new_project_template/vendor/ceedling/lib/erb_wrapper.rb
183
180
  - new_project_template/vendor/ceedling/lib/file_finder.rb
184
181
  - new_project_template/vendor/ceedling/lib/file_finder_helper.rb
185
182
  - new_project_template/vendor/ceedling/lib/file_path_utils.rb
186
183
  - new_project_template/vendor/ceedling/lib/file_system_utils.rb
184
+ - new_project_template/vendor/ceedling/lib/file_system_wrapper.rb
187
185
  - new_project_template/vendor/ceedling/lib/file_wrapper.rb
188
186
  - new_project_template/vendor/ceedling/lib/flaginator.rb
189
187
  - new_project_template/vendor/ceedling/lib/generator.rb
@@ -195,6 +193,7 @@ files:
195
193
  - new_project_template/vendor/ceedling/lib/makefile.rb
196
194
  - new_project_template/vendor/ceedling/lib/objects.yml
197
195
  - new_project_template/vendor/ceedling/lib/plugin.rb
196
+ - new_project_template/vendor/ceedling/lib/plugin_builder.rb
198
197
  - new_project_template/vendor/ceedling/lib/plugin_manager.rb
199
198
  - new_project_template/vendor/ceedling/lib/plugin_manager_helper.rb
200
199
  - new_project_template/vendor/ceedling/lib/plugin_reportinator.rb
@@ -249,14 +248,14 @@ files:
249
248
  - new_project_template/vendor/ceedling/plugins/gcov/gcov.rb
250
249
  - new_project_template/vendor/ceedling/plugins/gcov/readme.txt
251
250
  - new_project_template/vendor/ceedling/plugins/gcov/template.erb
251
+ - new_project_template/vendor/ceedling/plugins/module_generator/config/module_generator.yml
252
+ - new_project_template/vendor/ceedling/plugins/module_generator/lib/module_generator.rb
252
253
  - new_project_template/vendor/ceedling/plugins/module_generator/module_generator.rake
253
- - new_project_template/vendor/ceedling/plugins/module_generator/module_generator.rb
254
- - new_project_template/vendor/ceedling/plugins/module_generator/module_generator.yml
255
- - new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/stdout_ide_tests_report.rb
256
- - new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/stdout_ide_tests_report.yml
257
- - new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb
258
- - new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.yml
259
- - new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/template.erb
254
+ - new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/config/stdout_ide_tests_report.yml
255
+ - new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/lib/stdout_ide_tests_report.rb
256
+ - new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/assets/template.erb
257
+ - new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/config/stdout_pretty_tests_report.yml
258
+ - new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/lib/stdout_pretty_tests_report.rb
260
259
  - new_project_template/vendor/ceedling/plugins/warnings_report/warnings_report.rb
261
260
  - new_project_template/vendor/ceedling/plugins/xml_tests_report/xml_tests_report.rb
262
261
  - new_project_template/vendor/ceedling/release/build.info
@@ -295,6 +294,7 @@ files:
295
294
  - new_project_template/vendor/ceedling/vendor/unity/src/unity.c
296
295
  - new_project_template/vendor/ceedling/vendor/unity/src/unity.h
297
296
  - new_project_template/vendor/ceedling/vendor/unity/src/unity_internals.h
297
+ has_rdoc: true
298
298
  homepage: http://throwtheswitch.org/
299
299
  licenses: []
300
300
 
@@ -304,27 +304,23 @@ rdoc_options: []
304
304
  require_paths:
305
305
  - lib
306
306
  required_ruby_version: !ruby/object:Gem::Requirement
307
- none: false
308
307
  requirements:
309
308
  - - ">="
310
309
  - !ruby/object:Gem::Version
311
- hash: 3
312
310
  segments:
313
311
  - 0
314
312
  version: "0"
315
313
  required_rubygems_version: !ruby/object:Gem::Requirement
316
- none: false
317
314
  requirements:
318
315
  - - ">="
319
316
  - !ruby/object:Gem::Version
320
- hash: 3
321
317
  segments:
322
318
  - 0
323
319
  version: "0"
324
320
  requirements: []
325
321
 
326
322
  rubyforge_project: ceedling
327
- rubygems_version: 1.8.2
323
+ rubygems_version: 1.3.6
328
324
  signing_key:
329
325
  specification_version: 3
330
326
  summary: Gemified version of the Ceedling C testing / build environment