cuke_modeler 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +292 -0
- data/Gemfile +1 -0
- data/README.md +14 -4
- data/Rakefile +41 -31
- data/appveyor.yml +1 -1
- data/cuke_modeler.gemspec +4 -1
- data/lib/cuke_modeler/containing.rb +2 -0
- data/lib/cuke_modeler/parsing.rb +8 -0
- data/lib/cuke_modeler/version.rb +1 -1
- data/testing/gemfiles/gherkin2.gemfile +1 -0
- data/testing/rspec/spec/integration/{gherkin_2_adapter_spec.rb → adapters/gherkin_2_adapter_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{gherkin_3_adapter_spec.rb → adapters/gherkin_3_adapter_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{gherkin_4_adapter_spec.rb → adapters/gherkin_4_adapter_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{gherkin_6_adapter_spec.rb → adapters/gherkin_6_adapter_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{background_integration_spec.rb → models/background_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{cell_integration_spec.rb → models/cell_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{comment_integration_spec.rb → models/comment_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{directory_integration_spec.rb → models/directory_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{doc_string_integration_spec.rb → models/doc_string_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{example_integration_spec.rb → models/example_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{feature_file_integration_spec.rb → models/feature_file_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{feature_integration_spec.rb → models/feature_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{model_integration_spec.rb → models/model_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{outline_integration_spec.rb → models/outline_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{row_integration_spec.rb → models/row_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{scenario_integration_spec.rb → models/scenario_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{step_integration_spec.rb → models/step_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{table_integration_spec.rb → models/table_integration_spec.rb} +1 -1
- data/testing/rspec/spec/integration/{tag_integration_spec.rb → models/tag_integration_spec.rb} +1 -1
- data/testing/rspec/spec/spec_helper.rb +3 -0
- data/testing/rspec/spec/unit/cuke_modeler_unit_spec.rb +25 -0
- data/testing/rspec/spec/unit/{background_unit_spec.rb → models/background_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{cell_unit_spec.rb → models/cell_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{comment_unit_spec.rb → models/comment_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{directory_unit_spec.rb → models/directory_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{doc_string_unit_spec.rb → models/doc_string_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{example_unit_spec.rb → models/example_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{feature_file_unit_spec.rb → models/feature_file_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{feature_unit_spec.rb → models/feature_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{model_unit_spec.rb → models/model_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{outline_unit_spec.rb → models/outline_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{row_unit_spec.rb → models/row_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{scenario_unit_spec.rb → models/scenario_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{step_unit_spec.rb → models/step_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{table_unit_spec.rb → models/table_unit_spec.rb} +1 -1
- data/testing/rspec/spec/unit/{tag_unit_spec.rb → models/tag_unit_spec.rb} +1 -1
- metadata +60 -42
- data/History.md +0 -196
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a3d9a2a79ed92fc6190aa4d8bfd198d319a283af35d7586ba9dd6e11562b108
|
4
|
+
data.tar.gz: d55ac4e9e29b02999ea13919ad24353e896a07608b854959ded2c2c664608711
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a6d159ad8a6d3a5dd556cbeb113f973a85dbc4c5cc130d9fef5f6abacf9b37a4cd1fe4bb7b58e75004bd0483ec3ec2a2b6a5b3991f520e906c0a87e34ad8809
|
7
|
+
data.tar.gz: 8b4e011d5152f35091002dc317da68e3a290cbed5069bba218e3ef41642d3c281554c3e2f4f7ff91ec756c18147864070f270e433cff23c05de430972fba5834
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,292 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
|
9
|
+
Nothing yet...
|
10
|
+
|
11
|
+
## [1.5.1] - 2019-04-14
|
12
|
+
|
13
|
+
### Added
|
14
|
+
|
15
|
+
- Add dependency version limits to Ruby which was previously unbound
|
16
|
+
- Add dependency version limits to `bundler`, which was previously unbound
|
17
|
+
- Added inline documentation to some methods that did not have any
|
18
|
+
|
19
|
+
## [1.5.0] - 2019-01-13
|
20
|
+
|
21
|
+
### Added
|
22
|
+
|
23
|
+
- Added methods to easily run elements of an arbitrarily rooted model tree through a given block of code.
|
24
|
+
|
25
|
+
|
26
|
+
## [1.4.0] - 2018-11-14
|
27
|
+
|
28
|
+
### Added
|
29
|
+
|
30
|
+
- Now compatible with Gherkin 6.x.
|
31
|
+
|
32
|
+
|
33
|
+
## [1.3.0] - 2017-10-19
|
34
|
+
|
35
|
+
### Added
|
36
|
+
|
37
|
+
- Now compatible with Gherkin 5.x.
|
38
|
+
|
39
|
+
|
40
|
+
## [1.2.1] - 2017-04-25
|
41
|
+
|
42
|
+
### Added
|
43
|
+
|
44
|
+
- Now officially compatible with Rake 12.x.
|
45
|
+
|
46
|
+
|
47
|
+
## [1.2.0] - 2016-11-23
|
48
|
+
|
49
|
+
### Added
|
50
|
+
|
51
|
+
- The comments in a feature file are now a modeled element.
|
52
|
+
|
53
|
+
|
54
|
+
## [1.1.1] - 2016-10-28
|
55
|
+
|
56
|
+
### Fixed
|
57
|
+
|
58
|
+
- Abstract instantiation of models when using a non-default dialect
|
59
|
+
now works correctly.
|
60
|
+
|
61
|
+
|
62
|
+
## [1.1.0] - 2016-10-28
|
63
|
+
|
64
|
+
### Added
|
65
|
+
|
66
|
+
- Support added for non-English dialects. This gem should now be able to model
|
67
|
+
feature files using any dialect supported by the 'gherkin' gem.
|
68
|
+
|
69
|
+
- Models for elements of Gherkin that have keywords (e.g. 'Feature', 'Scenario',
|
70
|
+
'Examples') now keep track of the keyword used by the element that they model.
|
71
|
+
|
72
|
+
### Fixed
|
73
|
+
|
74
|
+
- Fixed a bug that was causing example models to output extra newline
|
75
|
+
characters under certain circumstances.
|
76
|
+
|
77
|
+
|
78
|
+
## [1.0.4] - 2016-10-07
|
79
|
+
|
80
|
+
### Fixed
|
81
|
+
|
82
|
+
- Fixed a bug that caused some models to include nil objects in their
|
83
|
+
children collection if they did not have the relevant child object.
|
84
|
+
|
85
|
+
|
86
|
+
## [1.0.3] - 2016-09-12
|
87
|
+
|
88
|
+
### Fixed
|
89
|
+
|
90
|
+
- Fixed a gem dependency that was accidentally declared with '<=' instead of '<'.
|
91
|
+
|
92
|
+
|
93
|
+
## [1.0.2] - 2016-09-12
|
94
|
+
|
95
|
+
### Added
|
96
|
+
|
97
|
+
- A more detailed gem description and summary have been added to the gemspec.
|
98
|
+
|
99
|
+
- The gem now declares version limits on its dependencies.
|
100
|
+
|
101
|
+
- Badges for the current status of the project have been added to the Readme.
|
102
|
+
|
103
|
+
|
104
|
+
## [1.0.1] - 2016-09-10
|
105
|
+
|
106
|
+
### Added
|
107
|
+
|
108
|
+
- In the Readme file, added a link to the published documentation.
|
109
|
+
|
110
|
+
|
111
|
+
## [1.0.0] - 2016-09-08
|
112
|
+
|
113
|
+
### Added
|
114
|
+
|
115
|
+
- Background models can now be compared to other models that have steps (i.e.
|
116
|
+
scenarios and outlines).
|
117
|
+
|
118
|
+
- Added specific ancestor types for scenario, outline, and background models as
|
119
|
+
alternatives to the generic 'test' ancestor type.
|
120
|
+
|
121
|
+
|
122
|
+
### Changed
|
123
|
+
|
124
|
+
- A base model class has been added in order to simplify adding new element
|
125
|
+
models. Other classes and modules used for organizing common model behavior
|
126
|
+
have been created/removed/renamed.
|
127
|
+
|
128
|
+
- All modeled elements of a Cucumber test suite are now modeled with actual
|
129
|
+
classes. Previously, some elements (such as tags or rows in an example table)
|
130
|
+
were modeled with simple strings.
|
131
|
+
|
132
|
+
- Feature file models now only have a single feature model instead of a
|
133
|
+
collection of them (that would only ever have one item in it).
|
134
|
+
|
135
|
+
- Rows in an example table and rows in a step table no longer use two different
|
136
|
+
classes for modeling.
|
137
|
+
|
138
|
+
- All models for Gherkin elements now track the line number from which they
|
139
|
+
originate in a source file.
|
140
|
+
|
141
|
+
- The source line of a model is now a mutable attribute instead of being read
|
142
|
+
only.
|
143
|
+
|
144
|
+
- The file path of a feature file is now a mutable attribute instead of being
|
145
|
+
read only.
|
146
|
+
|
147
|
+
- Standardized the initial values of the attributes of abstractly created
|
148
|
+
models so that they are consistent across model types.
|
149
|
+
|
150
|
+
- Extra whitespace around parsed element descriptions is now trimmed away
|
151
|
+
before being stored in a model.
|
152
|
+
|
153
|
+
- Adding rows to examples via hashes can now be done without regard to the
|
154
|
+
order of the keys in the hash. The correct order can be determined by the
|
155
|
+
model.
|
156
|
+
|
157
|
+
- The saved parsing data that is generated by the 'gherkin' gem is no longer
|
158
|
+
duplicated for each model, resulting in significantly less memory usage.
|
159
|
+
|
160
|
+
- Various methods have been renamed.
|
161
|
+
|
162
|
+
|
163
|
+
### Removed
|
164
|
+
|
165
|
+
- Removed the backdoor used to pass around model data during the model creation
|
166
|
+
process. Model input can now only be text.
|
167
|
+
|
168
|
+
- Simple counting methods have been removed. Ruby's collection methods are just
|
169
|
+
as easy to use directly when dealing with classes that contain collections
|
170
|
+
and the removal of these counting methods simplifies the codebase.
|
171
|
+
|
172
|
+
- The 'World' module has been removed. The scope of this gem is to model files
|
173
|
+
written in Gherkin. Concepts like 'step definitions' and 'hooks' are better
|
174
|
+
left to libraries that include (possibly programming language specific) test
|
175
|
+
execution logic within their scope of concern.
|
176
|
+
|
177
|
+
- Step models no longer have 'arguments' because they require the concept of
|
178
|
+
step definitions, which are no longer within the scope of this gem.
|
179
|
+
|
180
|
+
- Removed deprecated behavior
|
181
|
+
- Marked
|
182
|
+
- Doc strings no longer use an array of strings to model their content
|
183
|
+
- Tables no longer use nested arrays of strings to model their rows
|
184
|
+
- Models that have descriptions no longer use an array of strings to
|
185
|
+
model their description
|
186
|
+
- The convenient (read: awkward) #step_text has been removed.
|
187
|
+
- Unmarked
|
188
|
+
- Examples no longer use an array of hashes to model their rows
|
189
|
+
|
190
|
+
|
191
|
+
### Fixed
|
192
|
+
|
193
|
+
- String output of models has been improved. More special characters in Gherkin
|
194
|
+
(e.g. vertical bars in rows) are appropriately escaped in the string output
|
195
|
+
of a model and several minor bugs related to using model string output as the
|
196
|
+
input text for new models have been fixed.
|
197
|
+
|
198
|
+
|
199
|
+
## [0.4.1] - 2016-05-12
|
200
|
+
|
201
|
+
### Added
|
202
|
+
|
203
|
+
- Increased the flexibility of input when adding rows to an Example object. Non-
|
204
|
+
string values can now be used as input and they will be converted into
|
205
|
+
strings. Original input objects are not modified.
|
206
|
+
|
207
|
+
- Added some error checking around adding value rows to an Example object
|
208
|
+
without adding a parameter row as well.
|
209
|
+
|
210
|
+
|
211
|
+
## [0.4.0] - 2016-05-01
|
212
|
+
|
213
|
+
### Added
|
214
|
+
|
215
|
+
- The path of a Directory object is now a changeable attribute instead of only
|
216
|
+
being populated if the instance was given a diretory to model.
|
217
|
+
|
218
|
+
### Fixed
|
219
|
+
|
220
|
+
- Fixed a bug that occurred if a Directory object was asked for its
|
221
|
+
`#name` when it was created as 'abstract' instead of modeling an existing
|
222
|
+
directory.
|
223
|
+
|
224
|
+
|
225
|
+
## [0.3.0] - 2016-04-24
|
226
|
+
|
227
|
+
### Added
|
228
|
+
|
229
|
+
- Support for version 4.x of the 'gherkin' gem added.
|
230
|
+
|
231
|
+
### Fixed
|
232
|
+
|
233
|
+
- Fixed a bug that was preventing Example objects from being created
|
234
|
+
from text if that text had less Gherkin structure than normal.
|
235
|
+
|
236
|
+
|
237
|
+
## [0.2.0] - 2016-02-21
|
238
|
+
|
239
|
+
### Added
|
240
|
+
|
241
|
+
- Better error feedback when parsing errors are encountered. It is now easier
|
242
|
+
to tell which file contained invalid Gherkin.
|
243
|
+
|
244
|
+
|
245
|
+
## [0.1.0] - 2016-02-10
|
246
|
+
|
247
|
+
### Added
|
248
|
+
|
249
|
+
- Support for version 3.x of the 'gherkin' gem added.
|
250
|
+
|
251
|
+
### Fixed
|
252
|
+
|
253
|
+
- The saved parsing data that is generated by the 'gherkin' gem is no
|
254
|
+
longer modified by the rest of the model creation process.
|
255
|
+
|
256
|
+
|
257
|
+
## [0.0.2] - 2015-11-22
|
258
|
+
|
259
|
+
### Fixed
|
260
|
+
|
261
|
+
- Fixed a bug that was causing object comparison using #== to not
|
262
|
+
work when comparing some models to other types of objects.
|
263
|
+
|
264
|
+
|
265
|
+
## [0.0.1] - 2014-06-02
|
266
|
+
|
267
|
+
### Added
|
268
|
+
|
269
|
+
- Initial release
|
270
|
+
|
271
|
+
|
272
|
+
[Unreleased]: https://github.com/enkessler/cuke_modeler/compare/v1.5.1...HEAD
|
273
|
+
[1.5.1]: https://github.com/enkessler/cuke_modeler/compare/v1.5.0...v1.5.1
|
274
|
+
[1.5.0]: https://github.com/enkessler/cuke_modeler/compare/v1.4.0...v1.5.0
|
275
|
+
[1.4.0]: https://github.com/enkessler/cuke_modeler/compare/v1.3.0...v1.4.0
|
276
|
+
[1.3.0]: https://github.com/enkessler/cuke_modeler/compare/v1.2.1...v1.3.0
|
277
|
+
[1.2.1]: https://github.com/enkessler/cuke_modeler/compare/v1.2.0...v1.2.1
|
278
|
+
[1.2.0]: https://github.com/enkessler/cuke_modeler/compare/v1.1.1...v1.2.0
|
279
|
+
[1.1.1]: https://github.com/enkessler/cuke_modeler/compare/v1.1.0...v1.1.1
|
280
|
+
[1.1.0]: https://github.com/enkessler/cuke_modeler/compare/v1.0.4...v1.1.0
|
281
|
+
[1.0.4]: https://github.com/enkessler/cuke_modeler/compare/v1.0.3...v1.0.4
|
282
|
+
[1.0.3]: https://github.com/enkessler/cuke_modeler/compare/v1.0.2...v1.0.3
|
283
|
+
[1.0.2]: https://github.com/enkessler/cuke_modeler/compare/v1.0.1...v1.0.2
|
284
|
+
[1.0.1]: https://github.com/enkessler/cuke_modeler/compare/v1.0.0...v1.0.1
|
285
|
+
[1.0.0]: https://github.com/enkessler/cuke_modeler/compare/v0.4.1...v1.0.0
|
286
|
+
[0.4.1]: https://github.com/enkessler/cuke_modeler/compare/v0.4.0...v0.4.1
|
287
|
+
[0.4.0]: https://github.com/enkessler/cuke_modeler/compare/v0.3.0...v0.4.0
|
288
|
+
[0.3.0]: https://github.com/enkessler/cuke_modeler/compare/v0.2.0...v0.3.0
|
289
|
+
[0.2.0]: https://github.com/enkessler/cuke_modeler/compare/v0.1.0...v0.2.0
|
290
|
+
[0.1.0]: https://github.com/enkessler/cuke_modeler/compare/v0.0.2...v0.1.0
|
291
|
+
[0.0.2]: https://github.com/enkessler/cuke_modeler/compare/v0.0.1...v0.0.2
|
292
|
+
[0.0.1]: https://github.com/enkessler/cuke_modeler/compare/ce627fb591966c9ef19a9e69338b1282e9902a0d...v0.0.1
|
data/Gemfile
CHANGED
@@ -19,6 +19,7 @@ if RUBY_VERSION =~ /^1\./
|
|
19
19
|
if RUBY_VERSION =~ /^1\.8/
|
20
20
|
gem 'cucumber', '~> 1.0' # Ruby 1.8.x support dropped after this version
|
21
21
|
gem 'gherkin', '< 2.12.1' # Ruby 1.8.x support dropped after this version
|
22
|
+
gem 'rainbow', '< 2.0' # Ruby 1.8.x support dropped after this version
|
22
23
|
gem 'rake', '< 11.0' # Ruby 1.8.x support dropped after this version
|
23
24
|
else
|
24
25
|
gem 'rake', '< 12.3.0' # Ruby 1.9.x support dropped after this version
|
data/README.md
CHANGED
@@ -1,10 +1,20 @@
|
|
1
|
+
Basic stuff:
|
1
2
|
[![Gem Version](https://badge.fury.io/rb/cuke_modeler.svg)](https://rubygems.org/gems/cuke_modeler)
|
3
|
+
[![Project License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/mit-license.php)
|
4
|
+
[![Downloads](https://img.shields.io/gem/dt/cuke_modeler.svg)](https://rubygems.org/gems/cuke_modeler)
|
5
|
+
|
6
|
+
User stuff:
|
7
|
+
[![Cucumber Docs](http://img.shields.io/badge/Documentation-Features-green.svg)](https://app.cucumber.pro/projects/cuke_modeler)
|
8
|
+
[![Yard Docs](http://img.shields.io/badge/Documentation-API-blue.svg)](https://www.rubydoc.info/gems/cuke_modeler)
|
9
|
+
|
10
|
+
Developer stuff:
|
2
11
|
[![Build Status](https://travis-ci.org/enkessler/cuke_modeler.svg?branch=dev)](https://travis-ci.org/enkessler/cuke_modeler)
|
3
12
|
[![Build status](https://ci.appveyor.com/api/projects/status/is8xqvoqn3pjh9l0/branch/dev?svg=true)](https://ci.appveyor.com/project/enkessler/cuke-modeler/branch/dev)
|
4
13
|
[![Coverage Status](https://coveralls.io/repos/github/enkessler/cuke_modeler/badge.svg?branch=dev)](https://coveralls.io/github/enkessler/cuke_modeler?branch=dev)
|
5
|
-
[![
|
6
|
-
[![
|
14
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/83986d8f7a918fed9707/maintainability)](https://codeclimate.com/github/enkessler/cuke_modeler/maintainability)
|
15
|
+
[![Inline docs](http://inch-ci.org/github/enkessler/cuke_modeler.svg?branch=dev)](https://inch-ci.org/github/enkessler/cuke_modeler?branch=dev)
|
7
16
|
|
17
|
+
---
|
8
18
|
|
9
19
|
# CukeModeler
|
10
20
|
|
@@ -73,7 +83,7 @@ One could, if so inclined, use this method to dynamically edit or even create
|
|
73
83
|
an entire test suite!
|
74
84
|
|
75
85
|
For more information on the different models and how to use them, see the
|
76
|
-
[documentation](
|
86
|
+
[documentation](https://app.cucumber.pro/projects/cuke_modeler).
|
77
87
|
|
78
88
|
## Modeling dialects other than English
|
79
89
|
|
@@ -119,7 +129,7 @@ that feature is ultimately run with SpecFlow (Cucumber for C#), Lettuce
|
|
119
129
|
## Contributing
|
120
130
|
|
121
131
|
1. Fork it
|
122
|
-
2. Create your feature branch (off of the development branch)
|
132
|
+
2. Create your feature branch (**off of the development branch**)
|
123
133
|
`git checkout -b my-new-feature`
|
124
134
|
3. Commit your changes
|
125
135
|
`git commit -am 'Add some feature'`
|
data/Rakefile
CHANGED
@@ -1,63 +1,73 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
require 'rake'
|
3
|
+
require 'racatt'
|
2
4
|
require 'coveralls/rake/task'
|
5
|
+
require 'rainbow'
|
3
6
|
|
4
|
-
|
7
|
+
|
8
|
+
Rainbow.enabled = true
|
9
|
+
|
10
|
+
namespace 'racatt' do
|
11
|
+
Racatt.create_tasks
|
12
|
+
end
|
5
13
|
|
6
14
|
|
7
15
|
namespace 'cuke_modeler' do
|
8
16
|
|
17
|
+
desc 'Removes the current code coverage data'
|
9
18
|
task :clear_coverage do
|
10
19
|
code_coverage_directory = "#{File.dirname(__FILE__)}/coverage"
|
11
20
|
|
12
21
|
FileUtils.remove_dir(code_coverage_directory, true)
|
13
22
|
end
|
14
23
|
|
24
|
+
desc 'Check documentation with RDoc'
|
25
|
+
task :check_documentation do
|
26
|
+
output = `rdoc lib -C`
|
27
|
+
puts output
|
15
28
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
# The task that CI will use
|
23
|
-
Coveralls::RakeTask.new
|
24
|
-
task :ci_build => [:smart_test, 'coveralls:push']
|
29
|
+
if output =~ /100.00% documented/
|
30
|
+
puts Rainbow('All code documented').green
|
31
|
+
else
|
32
|
+
raise Rainbow('Parts of the gem are undocumented').red
|
33
|
+
end
|
34
|
+
end
|
25
35
|
|
26
|
-
desc '
|
27
|
-
task :
|
28
|
-
rspec_args = '--tag ~@wip --pattern testing/rspec/spec/**/*_spec.rb'
|
36
|
+
desc 'Run all of the tests'
|
37
|
+
task :test_everything => [:clear_coverage] do
|
38
|
+
rspec_args = '--tag ~@wip --pattern "testing/rspec/spec/**/*_spec.rb" --force-color'
|
29
39
|
|
30
40
|
cucumber_version = Gem.loaded_specs['cucumber'].version.version
|
31
41
|
|
32
42
|
if cucumber_version =~ /^[123]\./
|
33
|
-
cucumber_args = 'testing/cucumber/features -r testing/cucumber/support -r testing/cucumber/step_definitions -f progress -t ~@wip'
|
43
|
+
cucumber_args = 'testing/cucumber/features -r testing/cucumber/support -r testing/cucumber/step_definitions -f progress -t ~@wip --color'
|
34
44
|
else
|
35
|
-
cucumber_args = "testing/cucumber/features -r testing/cucumber/support -r testing/cucumber/step_definitions -f progress -t 'not @wip'"
|
45
|
+
cucumber_args = "testing/cucumber/features -r testing/cucumber/support -r testing/cucumber/step_definitions -f progress -t 'not @wip' --color"
|
36
46
|
end
|
37
47
|
|
38
|
-
Rake::Task['
|
48
|
+
Rake::Task['racatt:test_everything'].invoke(rspec_args, cucumber_args)
|
39
49
|
end
|
40
50
|
|
51
|
+
# creates coveralls:push task
|
52
|
+
Coveralls::RakeTask.new
|
41
53
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
54
|
+
desc 'The task that CI will run. Do not run locally.'
|
55
|
+
task :ci_build => ['cuke_modeler:test_everything', 'coveralls:push']
|
56
|
+
|
57
|
+
desc 'Check that things look good before trying to release'
|
58
|
+
task :prerelease_check do
|
59
|
+
begin
|
60
|
+
Rake::Task['cuke_modeler:test_everything'].invoke
|
61
|
+
Rake::Task['cuke_modeler:check_documentation'].invoke
|
62
|
+
rescue => e
|
63
|
+
puts Rainbow("Something isn't right!").red
|
64
|
+
raise e
|
53
65
|
end
|
54
66
|
|
55
|
-
|
56
|
-
output = `relish push enkessler/CukeModeler:#{CukeModeler::VERSION} path #{this_dir}/testing/cucumber`
|
57
|
-
puts output
|
67
|
+
puts Rainbow('All is well. :)').green
|
58
68
|
end
|
59
69
|
|
60
70
|
end
|
61
71
|
|
62
72
|
|
63
|
-
task :default => 'cuke_modeler:
|
73
|
+
task :default => 'cuke_modeler:test_everything'
|