ceedling 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/Rakefile +55 -6
  2. data/examples/temp_sensor/project.yml +2 -2
  3. data/lib/ceedling/version.rb +3 -3
  4. data/lib/ceedling/version.rb.erb +1 -1
  5. data/new_project_template/project.yml +1 -1
  6. data/new_project_template/vendor/ceedling/{vendor/c_exception/docs → docs}/CExceptionSummary.pdf +0 -0
  7. data/new_project_template/vendor/ceedling/vendor/cmock/docs/CMock Summary.pdf b/data/new_project_template/vendor/ceedling/docs/CMock → Summary.pdf +0 -0
  8. data/new_project_template/vendor/ceedling/vendor/c_exception/vendor/unity/docs/Unity Summary.pdf b/data/new_project_template/vendor/ceedling/docs/Unity → Summary.pdf +0 -0
  9. data/new_project_template/vendor/ceedling/lib/configurator.rb +65 -16
  10. data/new_project_template/vendor/ceedling/lib/configurator_builder.rb +1 -8
  11. data/new_project_template/vendor/ceedling/lib/configurator_plugins.rb +8 -1
  12. data/new_project_template/vendor/ceedling/lib/configurator_setup.rb +30 -34
  13. data/new_project_template/vendor/ceedling/lib/configurator_validator.rb +32 -5
  14. data/new_project_template/vendor/ceedling/lib/constants.rb +17 -4
  15. data/new_project_template/vendor/ceedling/lib/defaults.rb +120 -106
  16. data/new_project_template/vendor/ceedling/lib/file_path_utils.rb +1 -1
  17. data/new_project_template/vendor/ceedling/lib/generator.rb +14 -6
  18. data/new_project_template/vendor/ceedling/lib/objects.yml +5 -0
  19. data/new_project_template/vendor/ceedling/lib/plugin.rb +2 -1
  20. data/new_project_template/vendor/ceedling/lib/plugin_manager.rb +6 -1
  21. data/new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb +2 -2
  22. data/new_project_template/vendor/ceedling/lib/preprocessinator_includes_handler.rb +2 -2
  23. data/new_project_template/vendor/ceedling/lib/rules_cmock.rake +1 -1
  24. data/new_project_template/vendor/ceedling/lib/rules_preprocess.rake +2 -2
  25. data/new_project_template/vendor/ceedling/lib/rules_release.rake +4 -4
  26. data/new_project_template/vendor/ceedling/lib/rules_release_aux_dependencies.rake +1 -1
  27. data/new_project_template/vendor/ceedling/lib/rules_tests.rake +5 -5
  28. data/new_project_template/vendor/ceedling/lib/rules_tests_aux_dependencies.rake +1 -1
  29. data/new_project_template/vendor/ceedling/lib/setupinator.rb +10 -3
  30. data/new_project_template/vendor/ceedling/lib/system_utils.rb +32 -0
  31. data/new_project_template/vendor/ceedling/lib/system_wrapper.rb +13 -5
  32. data/new_project_template/vendor/ceedling/lib/tasks_base.rake +2 -2
  33. data/new_project_template/vendor/ceedling/lib/tasks_release.rake +1 -1
  34. data/new_project_template/vendor/ceedling/lib/tasks_tests.rake +1 -1
  35. data/new_project_template/vendor/ceedling/lib/tool_executor.rb +38 -10
  36. data/new_project_template/vendor/ceedling/lib/tool_executor_helper.rb +68 -10
  37. data/new_project_template/vendor/ceedling/plugins/bullseye/bullseye.rake +142 -0
  38. data/new_project_template/vendor/ceedling/plugins/bullseye/bullseye.rb +145 -0
  39. data/new_project_template/vendor/ceedling/plugins/bullseye/defaults.yml +49 -0
  40. data/new_project_template/vendor/ceedling/plugins/bullseye/template.erb +15 -0
  41. data/new_project_template/vendor/ceedling/plugins/gcov/defaults.yml +34 -0
  42. data/new_project_template/vendor/ceedling/plugins/gcov/gcov.rake +136 -0
  43. data/new_project_template/vendor/ceedling/plugins/gcov/gcov.rb +115 -0
  44. data/new_project_template/vendor/ceedling/plugins/gcov/template.erb +15 -0
  45. data/new_project_template/vendor/ceedling/plugins/stdout_ide_tests_report/stdout_ide_tests_report.rb +1 -1
  46. data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb +3 -63
  47. data/new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/template.erb +59 -0
  48. data/new_project_template/vendor/ceedling/plugins/warnings_report/warnings_report.rb +71 -0
  49. data/new_project_template/vendor/ceedling/release/build.info +1 -1
  50. data/new_project_template/vendor/ceedling/vendor/c_exception/release/version.info +1 -1
  51. data/new_project_template/vendor/ceedling/vendor/unity/src/unity.c +30 -21
  52. metadata +18 -27
  53. data/new_project_template/vendor/ceedling/docs/Ceedling Packet.odt +0 -0
  54. data/new_project_template/vendor/ceedling/docs/CeedlingLogo.png +0 -0
  55. data/new_project_template/vendor/ceedling/rakefile.rb +0 -59
  56. data/new_project_template/vendor/ceedling/rakefile_helper.rb +0 -23
  57. data/new_project_template/vendor/ceedling/vendor/c_exception/docs/CExceptionSummary.odt +0 -0
  58. data/new_project_template/vendor/ceedling/vendor/c_exception/docs/license.txt +0 -30
  59. data/new_project_template/vendor/ceedling/vendor/c_exception/docs/readme.txt +0 -236
  60. data/new_project_template/vendor/ceedling/vendor/c_exception/vendor/unity/docs/Unity Summary.txt +0 -217
  61. data/new_project_template/vendor/ceedling/vendor/cmock/docs/CMock Summary.odt +0 -0
  62. data/new_project_template/vendor/ceedling/vendor/cmock/docs/license.txt +0 -31
  63. data/new_project_template/vendor/ceedling/vendor/deep_merge/MIT-LICENSE +0 -20
  64. data/new_project_template/vendor/ceedling/vendor/deep_merge/README +0 -94
  65. data/new_project_template/vendor/ceedling/vendor/deep_merge/Rakefile +0 -28
  66. data/new_project_template/vendor/ceedling/vendor/deep_merge/test/test_deep_merge.rb +0 -553
  67. data/new_project_template/vendor/ceedling/vendor/diy/History.txt +0 -28
  68. data/new_project_template/vendor/ceedling/vendor/diy/README.rdoc +0 -233
  69. data/new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.odt +0 -0
  70. data/new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.pdf +0 -0
  71. data/new_project_template/vendor/ceedling/vendor/unity/docs/Unity Summary.txt +0 -217
  72. data/new_project_template/vendor/ceedling/vendor/unity/docs/license.txt +0 -31
@@ -1,28 +0,0 @@
1
- == 1.1.2 / 2009-11-30
2
- * Converted to Jeweler for gem packaging
3
- * diy/factory.rb was somehow missing from the 1.1.1 gem on gemcutter. This has been fixed as part of the Jeweler changeover.
4
- * Rebuilt homepage http://atomicobject.github.com/diy
5
-
6
- == 1.1.1 / 2008-05-21
7
- * Fixed bug that did not allow a method to be properly injected into an object
8
-
9
- == 1.1 / 2008-05-20
10
- * Added 'method' directive for building a bounded method from an object defined in diy
11
-
12
- == 1.0.3 / 2007-12-11
13
-
14
- * The 1.0.1 release had a load-path search in it that resulted in requiring files with full path names (rooted in loadpath entries). This is unintuitive, and will almost always result in a double "require" if the application code ever requires a library. The "require" for library loading now relies implicitly on the load path (just like normal human-coded requires.)
15
-
16
- == 1.0.1 / 2007-12-02
17
-
18
- * Added 'using_namespace' directive for assuming a module for a group of object defs
19
- * Added 'use_class_directly' option for configuring an ObjectDef. Instead of instantiating an instance
20
- of the specified class, the class itself is referenced. (Good for injecting ActiveRecord classes into
21
- other components in the guise of factories.
22
- * Added DIY::Context.auto_require boolean setting. When false, the library of a
23
- class is not autoloaded ahead of object construction. Is true by default.
24
- * 'auto_require' can, if neccessary, be set in the YAML config for an individual object.
25
-
26
- == 1.0.0 / 2007-11-19
27
-
28
- * Released!
@@ -1,233 +0,0 @@
1
- == DIY
2
-
3
- * http://atomicobject.github.com/diy
4
-
5
- == DESCRIPTION:
6
-
7
- DIY (Dependency Injection in YAML) is a simple dependency injection library
8
- which focuses on declarative composition of objects through constructor injection.
9
-
10
- == INSTALL:
11
-
12
- * gem install diy
13
-
14
- == SYNOPSIS:
15
-
16
- === Common Usage
17
-
18
- Author a YAML file that describes your objects and how they fit together.
19
- This means you're building a Hash whose keys are the object names, and whose
20
- values are Hashes that define the object.
21
-
22
- The following context defines an automobile engine:
23
-
24
- context.yml:
25
- ---
26
- engine:
27
- compose: throttle, block
28
- throttle:
29
- compose: cable, pedal
30
- block:
31
- cable:
32
- pedal:
33
-
34
- In your code, use DIY to load the YAML, then access its parts:
35
-
36
- context = DIY::Context.from_file('context.yml')
37
- context[:engine] => <Engine:0x81eb0>
38
-
39
- This approach assumes:
40
-
41
- * You've got classes for Engine, Throttle, Block, Cable and Pedal
42
- * They're defined in engine.rb, throttle.rb, etc
43
- * The library files are in your load-path
44
- * Engine and Throttle both have a constructor that accepts a Hash. The Hash
45
- will contain keys 'throttle', 'block' (for Engine) and 'cable, 'pedal' (for Throttle)
46
- and the values will be references to their respective objects.
47
- * Block, Cable and Pedal all have default constructors that accept no arguments
48
-
49
- Sample code for Engine's constructor:
50
-
51
- class Engine
52
- def initialize(components)
53
- @throttle = components['throttle']
54
- @block = components['block']
55
- end
56
- end
57
-
58
- Writing code like that is repetetive; that's why we created the Constructor gem, which lets you
59
- specify object components using the "constructor" class method:
60
-
61
- Using constructor, you can write Engine like this:
62
-
63
- class Engine
64
- constructor :throttle, :block
65
- end
66
-
67
- === Special Cases
68
-
69
- If your object has a lot of components (or they have big names) you can specify an array of component names
70
- as opposed to a comma-separated list:
71
-
72
- engine:
73
- compose:
74
- - throttle
75
- - block
76
-
77
- Sometimes you won't be able to rely on DIY's basic assumptions about class names and library files.
78
-
79
- * You can specify the 'class' option
80
- * You can specify the 'library' option. If you do not, the library is inferred from the class name.
81
- (Eg, My::Train::Station will be sought in "my/train/station.rb"
82
-
83
- engine:
84
- class: FourHorse::Base
85
- library: general_engines/base
86
- compose: throttle, block
87
-
88
- If the Hash coming into your constructor needs to have some keys that do not exactly match the official
89
- object names, you can specify them one-by-one:
90
-
91
- engine:
92
- the_throttle: throttle
93
- the_block: block
94
-
95
- === Non-singleton objects
96
-
97
- Non-singletons are named objects that provide a new instance every time you ask for them.
98
- By default, DIY considers all objects to be singletons. To override, use the "singleton" setting and
99
- set it to false:
100
-
101
- foo:
102
- singleton: false
103
-
104
- === Sub-Contexts
105
-
106
- Sub-contexts are useful for creating isolated object networks that may need to be instantiated
107
- zero or many times in your application. Objects defined in subcontexts can reference "upward" to
108
- their surroundings, as well as objects in the subcontext itself.
109
-
110
- If you wanted to be able to make more than one Engine from the preceding examples, you might try:
111
-
112
- ---
113
- epa_regulations:
114
-
115
- +automotive_plant:
116
- engine:
117
- compose: block, throttle, epa_regulations
118
- block:
119
- throttle:
120
-
121
- Each time you delve into the automotive_plant, you get a solar system of the defined objects.
122
- In this context, the objects are singleton-like. The next time you invoke the subcontext, however,
123
- you'll be working with a fresh set of objects... another solar system with the same layout, so to speak.
124
-
125
- Subcontexts are not initialized until you call upon them, which you do using the "within" method:
126
-
127
- context = DIY::Context.from_file('context.yml')
128
- context.within('automotive_plant') do |plant|
129
- puts plant[:engine]
130
- end
131
-
132
- === Direct Class References
133
-
134
- Occasionally you will have a class at your disposal that you'd like to provide directly as components
135
- to other objects (as opposed to getting _instances_ of that class, you want to reference the class itself, eg,
136
- to use its factory methods). Enter the "use_class_directly" flag:
137
-
138
- ---
139
- customer_order_finder:
140
- class: CustomerOrder
141
- use_class_directly: true
142
-
143
- This can be handy in Rails when you'd like to use some of class methods on an ActiveRecord subclass, but
144
- you'd like to avoid direct ActiveRecord class usage in your code. In this case, the customer_order_finder
145
- is actually the CustomerOrder class, and so, it has methods like "find" and "destroy_all".
146
-
147
- === Namespace Convenience
148
-
149
- If you find yourself writing context entries like this:
150
-
151
- ---
152
- engine:
153
- class: Car::Parts::Engine
154
- throttle:
155
- class: Car::Parts::Block
156
- cable:
157
- class: Car::Parts::Cable
158
-
159
- You can set the "assumed" module for a group of objects like this:
160
-
161
- ---
162
- using_namespace Car Parts:
163
- engine:
164
-
165
- throttle:
166
-
167
- block:
168
-
169
- === Preventing auto-requiring of library files
170
-
171
- Normally, DIY will "require" the library for an object just before it instantiates the object.
172
- If this is not desired (in Rails, auto-require can lead to library double-load issues), you
173
- can deactivate auto-require. There is a global default setting (handled in code) and
174
- a per-object override (handled in the context YAML):
175
-
176
- DIY::Context.auto_require = false
177
-
178
- ---
179
- engine:
180
- auto_require: false
181
-
182
- === Factories
183
-
184
- It is possible to create factories automatically with DIY:
185
-
186
- ---
187
- car_dealer:
188
- compose: car_factory
189
-
190
- car_factory:
191
- builds: car
192
-
193
- Then you can use the factory to easily build objects:
194
-
195
- context = DIY::Context.from_file('context.yml')
196
- context[:car_factory].create => <Car:0x81eb0>
197
-
198
- === Method Directive
199
-
200
- This introduces the concept of first class methods. An object can now be constructed with a method object
201
- bound to a particular object in the diy context.
202
-
203
- ---
204
- trinket_builder:
205
-
206
- method build_trinket:
207
- object: trinket_builder
208
- method: build
209
-
210
- == LICENSE:
211
-
212
- (The MIT License)
213
-
214
- Copyright (c) 2007 Atomic Object
215
-
216
- Permission is hereby granted, free of charge, to any person obtaining
217
- a copy of this software and associated documentation files (the
218
- 'Software'), to deal in the Software without restriction, including
219
- without limitation the rights to use, copy, modify, merge, publish,
220
- distribute, sublicense, and/or sell copies of the Software, and to
221
- permit persons to whom the Software is furnished to do so, subject to
222
- the following conditions:
223
-
224
- The above copyright notice and this permission notice shall be
225
- included in all copies or substantial portions of the Software.
226
-
227
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
228
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
229
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
230
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
231
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
232
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
233
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,217 +0,0 @@
1
- ==============
2
- Unity Test API
3
- ==============
4
-
5
- [Copyright (c) 2007 - Unity Project by Mike Karlesky, Mark VanderVoord, and Greg Williams]
6
-
7
- -------------
8
- Running Tests
9
- -------------
10
-
11
- RUN_TEST(func, linenum)
12
-
13
- Each Test is run within the macro RUN_TEST. This macro performs necessary setup before the test is called and handles cleanup and result tabulation afterwards.
14
-
15
- --------------
16
- Ignoring Tests
17
- --------------
18
-
19
- There are times when a test is incomplete or not valid for some reason. At these times, TEST_IGNORE can be called. Control will immediately be returned to the caller of the test, and no failures will be returned.
20
-
21
- TEST_IGNORE()
22
-
23
- Ignore this test and return immediately
24
-
25
- TEST_IGNORE_MESSAGE (message)
26
-
27
- Ignore this test and return immediately. Output a message stating why the test was ignored.
28
-
29
- --------------
30
- Aborting Tests
31
- --------------
32
-
33
- There are times when a test will contain an infinite loop on error conditions, or there may be reason to escape from the test early without executing the rest of the test. A pair of macros support this functionality in Unity. The first (TEST_PROTECT) sets up the feature, and handles emergency abort cases. TEST_ABORT can then be used at any time within the tests to return to the last TEST_PROTECT call.
34
-
35
- TEST_PROTECT()
36
-
37
- Setup and Catch macro
38
-
39
- TEST_ABORT()
40
-
41
- Abort Test macro
42
-
43
- Example:
44
-
45
- main()
46
- {
47
- if (TEST_PROTECT() == 0)
48
- {
49
- MyTest();
50
- }
51
- }
52
-
53
- If MyTest calls TEST_ABORT, program control will immediately return to TEST_PROTECT with a non-zero return value.
54
-
55
-
56
- =======================
57
- Unity Assertion Summary
58
- =======================
59
-
60
- --------------------
61
- Basic Validity Tests
62
- --------------------
63
-
64
- TEST_ASSERT_TRUE(condition)
65
-
66
- Evaluates whatever code is in condition and fails if it evaluates to false
67
-
68
- TEST_ASSERT_FALSE(condition)
69
-
70
- Evaluates whatever code is in condition and fails if it evaluates to true
71
-
72
- TEST_ASSERT(condition)
73
-
74
- Another way of calling TEST_ASSERT_TRUE
75
-
76
- TEST_ASSERT_UNLESS(condition)
77
-
78
- Another way of calling TEST_ASSERT_FALSE
79
-
80
- TEST_FAIL()
81
- TEST_FAIL_MESSAGE(message)
82
-
83
- This test is automatically marked as a failure. The message is output stating why.
84
-
85
- ------------------------------
86
- Numerical Assertions: Integers
87
- ------------------------------
88
-
89
- TEST_ASSERT_EQUAL_INT(expected, actual)
90
- TEST_ASSERT_EQUAL_INT8(expected, actual)
91
- TEST_ASSERT_EQUAL_INT16(expected, actual)
92
- TEST_ASSERT_EQUAL_INT32(expected, actual)
93
- TEST_ASSERT_EQUAL_INT64(expected, actual)
94
-
95
- Compare two integers for equality and display errors as signed integers. A cast will be performed
96
- to your natural integer size so often this can just be used. When you need to specify the exact size,
97
- like when comparing arrays, you can use a specific version:
98
-
99
-
100
-
101
- TEST_ASSERT_EQUAL_UINT(expected, actual)
102
-
103
- Compare two integers for equality and display errors as unsigned integers. Like INT, there are
104
- variants for different sizes also.
105
-
106
-
107
-
108
- TEST_ASSERT_EQUAL_HEX(expected, actual)
109
-
110
- Compares two integers for equality and display errors as hexadecimal. Like the other integer comparisons,
111
- you can specify the size... here the size will also effect how many nibbles are shown (for example, HEX16
112
- will show 4 nibbles).
113
-
114
- _ARRAY
115
-
116
- You can append _ARRAY to any of these macros to make an array comparison of that type. Here you will
117
- need to care a bit more about the actual size of the value being checked. You will also specify an
118
- additional argument which is the number of elements to compare. For example:
119
-
120
- TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, elements)
121
-
122
-
123
- TEST_ASSERT_EQUAL(expected, actual)
124
-
125
- Another way of calling TEST_ASSERT_EQUAL_INT
126
-
127
-
128
-
129
- TEST_ASSERT_INT_WITHIN(delta, expected, actual)
130
-
131
- Asserts that the actual value is within plus or minus delta of the expected value. This also comes in
132
- size specific variants.
133
-
134
-
135
- -----------------------------
136
- Numerical Assertions: Bitwise
137
- -----------------------------
138
-
139
- TEST_ASSERT_BITS(mask, expected, actual)
140
-
141
- Use an integer mask to specify which bits should be compared between two other integers. High bits in the mask are compared, low bits ignored.
142
-
143
- TEST_ASSERT_BITS_HIGH(mask, actual)
144
-
145
- Use an integer mask to specify which bits should be inspected to determine if they are all set high. High bits in the mask are compared, low bits ignored.
146
-
147
- TEST_ASSERT_BITS_LOW(mask, actual)
148
-
149
- Use an integer mask to specify which bits should be inspected to determine if they are all set low. High bits in the mask are compared, low bits ignored.
150
-
151
- TEST_ASSERT_BIT_HIGH(bit, actual)
152
-
153
- Test a single bit and verify that it is high. The bit is specified 0-31 for a 32-bit integer.
154
-
155
- TEST_ASSERT_BIT_LOW(bit, actual)
156
-
157
- Test a single bit and verify that it is low. The bit is specified 0-31 for a 32-bit integer.
158
-
159
- ----------------------------
160
- Numerical Assertions: Floats
161
- ----------------------------
162
-
163
- TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual)
164
-
165
- Asserts that the actual value is within plus or minus delta of the expected value.
166
-
167
- TEST_ASSERT_EQUAL_FLOAT(expected, actual)
168
-
169
- Asserts that two floating point values are "equal" within a small % delta of the expected value.
170
-
171
- -----------------
172
- String Assertions
173
- -----------------
174
-
175
- TEST_ASSERT_EQUAL_STRING(expected, actual)
176
-
177
- Compare two null-terminate strings. Fail if any character is different or if the lengths are different.
178
-
179
- TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message)
180
-
181
- Compare two null-terminate strings. Fail if any character is different or if the lengths are different. Output a custom message on failure.
182
-
183
- ------------------
184
- Pointer Assertions
185
- ------------------
186
-
187
- Most pointer operations can be performed by simply using the integer comparisons above. However, a couple of special cases are added for clarity.
188
-
189
- TEST_ASSERT_NULL(pointer)
190
-
191
- Fails if the pointer is not equal to NULL
192
-
193
- TEST_ASSERT_NOT_NULL(pointer)
194
-
195
- Fails if the pointer is equal to NULL
196
-
197
-
198
- -----------------
199
- Memory Assertions
200
- -----------------
201
-
202
- TEST_ASSERT_EQUAL_MEMORY(expected, actual, len)
203
-
204
- Compare two blocks of memory. This is a good generic assertion for types that can't be coerced into acting like
205
- standard types... but since it's a memory compare, you have to be careful that your data types are packed.
206
-
207
- --------
208
- _MESSAGE
209
- --------
210
-
211
- you can append _MESSAGE to any of the macros to make them take an additional argument. This argument
212
- is a string that will be printed at the end of the failure strings. This is useful for specifying more
213
- information about the problem.
214
-
215
-
216
-
217
-