yard-cucumber2 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/.rspec +3 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +37 -0
- data/History.txt +274 -0
- data/LICENSE.txt +22 -0
- data/README.md +188 -0
- data/Rakefile +25 -0
- data/example/README.md +8 -0
- data/example/child_feature/README.md +21 -0
- data/example/child_feature/child.feature +11 -0
- data/example/child_feature/grandchild_feature/grandchild.feature +12 -0
- data/example/empty.feature +2 -0
- data/example/french.feature +18 -0
- data/example/scenario.feature +63 -0
- data/example/scenario_outline.feature +94 -0
- data/example/scenario_outline_multi.feature +15 -0
- data/example/step_definitions/example.step.rb +109 -0
- data/example/step_definitions/first.step.rb +21 -0
- data/example/step_definitions/french_steps.rb +32 -0
- data/example/step_definitions/struct.rb +11 -0
- data/example/step_definitions/support/env.rb +7 -0
- data/example/step_definitions/support/env_support.rb +12 -0
- data/example/step_definitions/support/support.rb +6 -0
- data/example/tags.feature +18 -0
- data/example/transform.feature +13 -0
- data/lib/cucumber/city_builder.rb +331 -0
- data/lib/docserver/default/fulldoc/html/js/cucumber.js +85 -0
- data/lib/docserver/default/layout/html/headers.erb +14 -0
- data/lib/docserver/doc_server/full_list/html/full_list.erb +39 -0
- data/lib/docserver/doc_server/full_list/html/setup.rb +18 -0
- data/lib/templates/default/feature/html/feature.erb +39 -0
- data/lib/templates/default/feature/html/no_steps_defined.erb +1 -0
- data/lib/templates/default/feature/html/outline.erb +56 -0
- data/lib/templates/default/feature/html/pystring.erb +3 -0
- data/lib/templates/default/feature/html/scenario.erb +55 -0
- data/lib/templates/default/feature/html/setup.rb +55 -0
- data/lib/templates/default/feature/html/steps.erb +39 -0
- data/lib/templates/default/feature/html/table.erb +20 -0
- data/lib/templates/default/featuredirectory/html/alpha_table.erb +30 -0
- data/lib/templates/default/featuredirectory/html/directory.erb +32 -0
- data/lib/templates/default/featuredirectory/html/setup.rb +41 -0
- data/lib/templates/default/featuretags/html/namespace.erb +131 -0
- data/lib/templates/default/featuretags/html/setup.rb +34 -0
- data/lib/templates/default/fulldoc/html/css/cucumber.css +227 -0
- data/lib/templates/default/fulldoc/html/directories.erb +53 -0
- data/lib/templates/default/fulldoc/html/full_list_featuredirectories.erb +11 -0
- data/lib/templates/default/fulldoc/html/full_list_features.erb +29 -0
- data/lib/templates/default/fulldoc/html/full_list_stepdefinitions.erb +16 -0
- data/lib/templates/default/fulldoc/html/full_list_steps.erb +17 -0
- data/lib/templates/default/fulldoc/html/full_list_tags.erb +12 -0
- data/lib/templates/default/fulldoc/html/js/cucumber.js +305 -0
- data/lib/templates/default/fulldoc/html/setup.rb +175 -0
- data/lib/templates/default/layout/html/setup.rb +56 -0
- data/lib/templates/default/requirements/html/alpha_table.erb +26 -0
- data/lib/templates/default/requirements/html/requirements.erb +50 -0
- data/lib/templates/default/requirements/html/setup.rb +51 -0
- data/lib/templates/default/steptransformers/html/header.erb +12 -0
- data/lib/templates/default/steptransformers/html/index.erb +10 -0
- data/lib/templates/default/steptransformers/html/setup.rb +94 -0
- data/lib/templates/default/steptransformers/html/transformers.erb +79 -0
- data/lib/templates/default/steptransformers/html/undefinedsteps.erb +26 -0
- data/lib/templates/default/tag/html/alpha_table.erb +32 -0
- data/lib/templates/default/tag/html/setup.rb +27 -0
- data/lib/templates/default/tag/html/tag.erb +35 -0
- data/lib/yard-cucumber.rb +47 -0
- data/lib/yard-cucumber/version.rb +3 -0
- data/lib/yard/code_objects/cucumber/base.rb +32 -0
- data/lib/yard/code_objects/cucumber/feature.rb +18 -0
- data/lib/yard/code_objects/cucumber/namespace_object.rb +49 -0
- data/lib/yard/code_objects/cucumber/scenario.rb +26 -0
- data/lib/yard/code_objects/cucumber/scenario_outline.rb +75 -0
- data/lib/yard/code_objects/cucumber/step.rb +38 -0
- data/lib/yard/code_objects/cucumber/tag.rb +27 -0
- data/lib/yard/code_objects/step_definition.rb +7 -0
- data/lib/yard/code_objects/step_transform.rb +7 -0
- data/lib/yard/code_objects/step_transformer.rb +97 -0
- data/lib/yard/handlers/cucumber/base.rb +21 -0
- data/lib/yard/handlers/cucumber/feature_handler.rb +131 -0
- data/lib/yard/handlers/legacy/step_definition_handler.rb +45 -0
- data/lib/yard/handlers/legacy/step_transform_handler.rb +24 -0
- data/lib/yard/handlers/step_definition_handler.rb +86 -0
- data/lib/yard/handlers/step_transform_handler.rb +31 -0
- data/lib/yard/parser/cucumber/feature.rb +73 -0
- data/lib/yard/server/adapter.rb +43 -0
- data/lib/yard/server/commands/list_command.rb +31 -0
- data/lib/yard/server/router.rb +32 -0
- data/lib/yard/templates/helpers/base_helper.rb +26 -0
- data/yard-cucumber.gemspec +65 -0
- metadata +199 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: c3bf0fa2ab10d47df81e78db9cb8ebafd975d6f6
|
|
4
|
+
data.tar.gz: ccaf86d57bcfd174b7e866039780f5da5da9e731
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d28eacac4d2afcfc32fe50918c52fbb67540453baa10d0b8cc4087b09df93f3901a7ffdf64d111109b963dcc4254a702c0da7131f7040b55a58806a78020b496
|
|
7
|
+
data.tar.gz: 5dca095469e4eec1d5a0d84ff73a993105372e91d95828842ae924c3738cc59a22b968c16da43f751cd15d0354fcdbda54f263b5822d821b5784739c1c911b1f
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.ruby-gemset
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
yard-cucumber
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.1.7
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
yard-cucumber (2.3.2)
|
|
5
|
+
cucumber (>= 1.3.0)
|
|
6
|
+
gherkin (~> 2.12)
|
|
7
|
+
yard (>= 0.8.1)
|
|
8
|
+
|
|
9
|
+
GEM
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
|
+
specs:
|
|
12
|
+
builder (3.2.2)
|
|
13
|
+
cucumber (2.0.2)
|
|
14
|
+
builder (>= 2.1.2)
|
|
15
|
+
cucumber-core (~> 1.2.0)
|
|
16
|
+
diff-lcs (>= 1.1.3)
|
|
17
|
+
gherkin (~> 2.12)
|
|
18
|
+
multi_json (>= 1.7.5, < 2.0)
|
|
19
|
+
multi_test (>= 0.1.2)
|
|
20
|
+
cucumber-core (1.2.0)
|
|
21
|
+
gherkin (~> 2.12.0)
|
|
22
|
+
diff-lcs (1.2.5)
|
|
23
|
+
gherkin (2.12.2)
|
|
24
|
+
multi_json (~> 1.3)
|
|
25
|
+
multi_json (1.11.2)
|
|
26
|
+
multi_test (0.1.2)
|
|
27
|
+
rake (10.4.2)
|
|
28
|
+
redcarpet (2.2.2)
|
|
29
|
+
yard (0.8.7.6)
|
|
30
|
+
|
|
31
|
+
PLATFORMS
|
|
32
|
+
ruby
|
|
33
|
+
|
|
34
|
+
DEPENDENCIES
|
|
35
|
+
rake
|
|
36
|
+
redcarpet
|
|
37
|
+
yard-cucumber!
|
data/History.txt
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
=== 2.3.3/ 2015-11-08
|
|
2
|
+
|
|
3
|
+
* Change gem dependencies to allow support of cucumber 2.0+
|
|
4
|
+
|
|
5
|
+
=== 2.3.2/ 2013-11-08
|
|
6
|
+
|
|
7
|
+
* De-duping uses of step definitions when the line number is the same (ipwnstuff)
|
|
8
|
+
|
|
9
|
+
=== 2.3.1/ 2013-07-12
|
|
10
|
+
|
|
11
|
+
* Fixes for Cucumber ~> 1.3 and gherkin ~> 2.12 by loading
|
|
12
|
+
a required platform file.
|
|
13
|
+
* Added appropriate MIT license
|
|
14
|
+
|
|
15
|
+
=== 2.3.0/ 2013-07-12
|
|
16
|
+
|
|
17
|
+
* Fixes for Cucumber ~> 1.3 and gherkin ~> 2.12 by loading
|
|
18
|
+
a required platform file.
|
|
19
|
+
|
|
20
|
+
=== 2.2.3/ 2013-02-15
|
|
21
|
+
|
|
22
|
+
* Step Definitions that are marked as 'pending' will now appear as pending
|
|
23
|
+
on the step definition and transforms page.
|
|
24
|
+
|
|
25
|
+
=== 2.2.2/ 2012-10-07
|
|
26
|
+
|
|
27
|
+
* Steps and Definitions have links to step transformer page
|
|
28
|
+
* Step definitions in the search menu no longer expand constants
|
|
29
|
+
|
|
30
|
+
=== 2.2.1/ 2012-09-29
|
|
31
|
+
|
|
32
|
+
* Fixes and compatibility with JRuby (Thanks @singram)
|
|
33
|
+
|
|
34
|
+
=== 2.2.0/ 2012-05-29
|
|
35
|
+
|
|
36
|
+
* Fixes and changes to become compatible with YARD 0.8.1
|
|
37
|
+
|
|
38
|
+
=== 2.1.7/ 2011-11-24
|
|
39
|
+
|
|
40
|
+
* Better parsing support for doc_strings (thanks @nikosd)
|
|
41
|
+
|
|
42
|
+
=== 2.1.6 / 2011-11-24
|
|
43
|
+
|
|
44
|
+
* FIX for yard-server (Thanks @msolovyov, @maxigit, @nikosd)
|
|
45
|
+
|
|
46
|
+
=== 2.1.5 / 2011-10-19
|
|
47
|
+
|
|
48
|
+
* FIX for multiple scenario outlines (Thanks @ardavis)
|
|
49
|
+
|
|
50
|
+
=== 2.1.4 / 2011-10-10
|
|
51
|
+
|
|
52
|
+
* Support for multiple scenario outlines (Thanks @jmerrifield)
|
|
53
|
+
|
|
54
|
+
=== 2.1.3 / 2011-09-24
|
|
55
|
+
|
|
56
|
+
* Support for Gherkin ~ 2.5 (Thanks @turboladen)
|
|
57
|
+
|
|
58
|
+
=== 2.1.2 / 2011-09-16
|
|
59
|
+
|
|
60
|
+
* JRuby Bug Fix (Thanks @aledalgrande)
|
|
61
|
+
|
|
62
|
+
=== 2.1.1 / 2011-06-17
|
|
63
|
+
|
|
64
|
+
* Gherkin 2.4.0 Compatibility (Thanks @bowsersenior)
|
|
65
|
+
|
|
66
|
+
=== 2.1.0 / 2011-05-22
|
|
67
|
+
|
|
68
|
+
* YARD 0.7.0 compatibility (removed some monkey-patching)
|
|
69
|
+
* Add more menus (Steps and Step Definitions)
|
|
70
|
+
* Define step definitions in your language Internalization (Ruby 1.9.2)
|
|
71
|
+
|
|
72
|
+
=== 2.0.3 / 2011-05-22
|
|
73
|
+
|
|
74
|
+
* Updated Cucumber links to the new github organization
|
|
75
|
+
|
|
76
|
+
=== 2.0.2 / 2011-04-06
|
|
77
|
+
|
|
78
|
+
- No Features/Tags will still generate landing pages instead of no pages
|
|
79
|
+
- Changed link to current gem 'yard-cucumber'
|
|
80
|
+
|
|
81
|
+
=== 2.0.1 / 2011-03-14
|
|
82
|
+
|
|
83
|
+
- YARD 0.6.5 compatibility
|
|
84
|
+
|
|
85
|
+
=== 2.0.0 / 2011-02-08
|
|
86
|
+
|
|
87
|
+
* Cucumber In The YARD becomes `yard-cucumber` and with that gains the
|
|
88
|
+
benefits of being a YARD plugin
|
|
89
|
+
|
|
90
|
+
=== 1.7.9 / 2011-02-05
|
|
91
|
+
|
|
92
|
+
- FIX links to Scenarios and Transforms in various places
|
|
93
|
+
- FIX Comments on Step Definitions that may blow up
|
|
94
|
+
|
|
95
|
+
=== 1.7.8 / 2011-01-30
|
|
96
|
+
|
|
97
|
+
* 'All Features' lands you on the root features directory; 'Requirements'
|
|
98
|
+
is still accessible through the breadcrumbs.
|
|
99
|
+
* Feature directory pages will display all the features in all subdirectories
|
|
100
|
+
* Better sorting for features, tags, and step transformers.
|
|
101
|
+
|
|
102
|
+
- FIX Feature-Scenario links and Cursors
|
|
103
|
+
|
|
104
|
+
=== 1.7.7 / 2011-01-06
|
|
105
|
+
|
|
106
|
+
* Feature Directories now support a README.md file that can be used to provide
|
|
107
|
+
information (with markdown support) about the directory of features.
|
|
108
|
+
|
|
109
|
+
=== 1.7.6 / 2011-01-06
|
|
110
|
+
|
|
111
|
+
* Feature descriptions, multi-line strings, and comments will preserve spacing.
|
|
112
|
+
|
|
113
|
+
=== 1.7.5 / 2010-12-14
|
|
114
|
+
|
|
115
|
+
* FIX Step Transforms were colliding with Step Definitions in Ruby 1.9.2
|
|
116
|
+
|
|
117
|
+
=== 1.7.4 / 2010-12-11
|
|
118
|
+
|
|
119
|
+
* Ruby 1.9.2 Support
|
|
120
|
+
* Change to YARD Server support:
|
|
121
|
+
yard server -e /path/to/gem/lib/server.b
|
|
122
|
+
|
|
123
|
+
=== 1.7.3 / 2010-12-06
|
|
124
|
+
|
|
125
|
+
* Shortcut Keys (t) for tags and (r) for features (f was taken)
|
|
126
|
+
* Step definitions/transforms consolidate steps for easier viewing
|
|
127
|
+
and when they have no steps they are colored differently
|
|
128
|
+
* Tag filtering supports inverse (~) of tags
|
|
129
|
+
|
|
130
|
+
* FIX Scenario Outlines without examples will not crash the parser
|
|
131
|
+
* FIX Features, Scenarios, and Directories should display in alphabetic order
|
|
132
|
+
* FIX Comments and multiline strings will display correctly
|
|
133
|
+
* FIX Feature comments will show
|
|
134
|
+
|
|
135
|
+
=== 1.7.2 / 2010-11-30
|
|
136
|
+
|
|
137
|
+
* Step Definition and Transform page enhancements
|
|
138
|
+
* Step Regex links to Rubular
|
|
139
|
+
* FIX Steps with HTML encoded characters will display correctly
|
|
140
|
+
|
|
141
|
+
=== 1.7.1 / 2010-11-28
|
|
142
|
+
|
|
143
|
+
* Feature file with layout enhancements
|
|
144
|
+
* Scenarios are now linked/linkable
|
|
145
|
+
* FIX Scenario Outline error on CentOS, Ruby 1.8.7
|
|
146
|
+
* FIX Requiring Cucumber before Gherkin so that correct gherkin is loaded
|
|
147
|
+
|
|
148
|
+
=== 1.7.0 / 2010-11-18
|
|
149
|
+
|
|
150
|
+
* Dynamic Tag Union / Intersection
|
|
151
|
+
|
|
152
|
+
=== 1.6.4 / 2010-11-16
|
|
153
|
+
|
|
154
|
+
* `yard server` can now serve up requirements with YARD 0.6.2
|
|
155
|
+
* 'All Tags' page now has a cucumber tag AND filtering tool (beta)
|
|
156
|
+
* Step Defs and Transforms will show comments
|
|
157
|
+
|
|
158
|
+
* FIX removed warnings by no longer requiring YARD
|
|
159
|
+
|
|
160
|
+
=== 1.6.2 / 2010-11-07
|
|
161
|
+
|
|
162
|
+
* Undefined Steps are displayed on the Step Transformer page
|
|
163
|
+
* Defined and Undefined steps are better linked to the Transformer page
|
|
164
|
+
|
|
165
|
+
* FIX Requirements tags were conflicting with YARD tags and being displayed
|
|
166
|
+
in multiple locations
|
|
167
|
+
* FIX Scenario Outlines Examples failed to show their tables or text
|
|
168
|
+
|
|
169
|
+
=== 1.6.1 / 2010-11-04
|
|
170
|
+
|
|
171
|
+
* FIX - Feature Directries with sub-directories aborted serialization
|
|
172
|
+
|
|
173
|
+
=== 1.6.0 / 2010-11-02
|
|
174
|
+
|
|
175
|
+
* Feature directories, subdirectories, and Tags breadcrumb pages are present
|
|
176
|
+
* Scenario Outlines now display each example inline when the example is clicked
|
|
177
|
+
* 'All Features' and 'All Tags' links in the search fields
|
|
178
|
+
|
|
179
|
+
=== 1.5.4 / 2010-10-28
|
|
180
|
+
|
|
181
|
+
* Optimization - Found that for a large test suite that the processing time was
|
|
182
|
+
approaching 2 hours (oh boy!). Reduced that time to a few minutes by optimizing
|
|
183
|
+
the feature handler to cache all step definitions and step transforms.
|
|
184
|
+
|
|
185
|
+
* Step Transforms will now attempt to unpack any constants found within them.
|
|
186
|
+
* FIX - Step Transforms were not being parsed because the regex incorrectly included
|
|
187
|
+
the block.
|
|
188
|
+
* FIX - Features and Scenarios with multiple tags were not being displayed
|
|
189
|
+
|
|
190
|
+
=== 1.5.3 / 2010-10-26
|
|
191
|
+
|
|
192
|
+
* FIX - Step Definition YARD handler regex was poorly formed and raised exceptions
|
|
193
|
+
when it contained a forward-slash (even if escaped).
|
|
194
|
+
* FIX - Step highlighting was causing 'Out Of Memory' issues because
|
|
195
|
+
gsub could not handle nil values.
|
|
196
|
+
* FIX - Step highlighting failed to replace matches properly causing for corrupted
|
|
197
|
+
HTML span values to appear in the highlighted step definitions
|
|
198
|
+
|
|
199
|
+
=== 1.5.2 / 2010-10-26
|
|
200
|
+
|
|
201
|
+
* FIX - Step Transform YARD handler regex was poorly formed and raised exceptions
|
|
202
|
+
when a transform contained a forward-slash (even if escaped).
|
|
203
|
+
|
|
204
|
+
=== 1.5.1 / 2010-10-26
|
|
205
|
+
|
|
206
|
+
* Unified Feature/Scenario search field that resembles the Namespace-Class field
|
|
207
|
+
* Tag search also displays immediate features/scenarios
|
|
208
|
+
* Removed Scenario searching field
|
|
209
|
+
* Added filename and line number to a number of locations
|
|
210
|
+
* Minor Tag template enhancements
|
|
211
|
+
* FIX - Scenario Outline Reference was being replaced with the first example
|
|
212
|
+
* FIX - Scenario Outlines were not getting counted for tags
|
|
213
|
+
|
|
214
|
+
=== 1.5 / 2010-10-25
|
|
215
|
+
|
|
216
|
+
* Steps that have found their step definitions will also attempt to find their
|
|
217
|
+
step transforms (However step transforms are not unpacked yet like step
|
|
218
|
+
definitions).
|
|
219
|
+
* Scenario Outlines will expand, behind the scenes, and match like traditional
|
|
220
|
+
scenarios.
|
|
221
|
+
* FIX - duplication of owners that the tag reports has been removed.
|
|
222
|
+
* INFO level messaging while processing features and scenarios to help assist
|
|
223
|
+
with feedback during the long processing.
|
|
224
|
+
|
|
225
|
+
=== 1.4 / 2010-10-17
|
|
226
|
+
|
|
227
|
+
* Tagusage has been retired
|
|
228
|
+
* Tags are found during parsing by name or created and all uses are appended to the exising or newly created object
|
|
229
|
+
* Tagusage template renamed and fixed up for just a tag and all the references
|
|
230
|
+
* Tags are named tag_TAG (removed the @ as it was encoded during file serialization and I couldn't find an encoder helper)
|
|
231
|
+
* Cleaned up all references in the fulldoc, full list to references tags
|
|
232
|
+
|
|
233
|
+
* Moved Cucumber CodeObjects, Handlers, and Parsers to a Cucumber sub-directory
|
|
234
|
+
* Moved StepDefinition and StepTransforms form extensions.rb to individual StepObject and Handlers files
|
|
235
|
+
|
|
236
|
+
* (lsegal advice) Created Cucumber Namespace and sub namespaces for features, tags, and step transformers.
|
|
237
|
+
* (lsegal advice) Started to break apart the feature.erb into smaller digestable erb sections
|
|
238
|
+
|
|
239
|
+
* Feature namespace now parallels the directory structure of the feature directory (from where it is parsed)
|
|
240
|
+
* Feature files have simpler names; i.e. featurefile.html instead of featurefile.feature.html
|
|
241
|
+
* Feature page title now states Feature: The Feature ( KEYWORD: FEATURE_TITLE )
|
|
242
|
+
* Moved the templates to lib/templates so I could use yard/templates to override the YARD helpers
|
|
243
|
+
|
|
244
|
+
* Changed document parsing to mirror the order imposed by Cucumber, this is to stop features being loaded before step definitions.
|
|
245
|
+
This should hopefully address the issue where steps were not being mapped correctly to step definitions. This fixed the issue
|
|
246
|
+
in the small and large test suite I ran it against.
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
=== 1.3 / 2010-10-13
|
|
250
|
+
|
|
251
|
+
* (7rans requested) Step definitions to show their source code; required a better source definition to be stored during creation of the CodeObject
|
|
252
|
+
* Fixes to the Feature template which had some unclosed table header elements
|
|
253
|
+
* Scenario Outline helper methods added to Scenarios
|
|
254
|
+
* Scenario Outlines, Tables, and Multiline Strings had other minor CSS changes
|
|
255
|
+
* Step tables and Scenario Example tables are no longer locked to 150px; instead that is the minimum width
|
|
256
|
+
* Tables and Multiline Strings (PyStrings) are no longer displayed in the steps frame which was causing ugliness with the striping of the rows
|
|
257
|
+
* (lsegal strongly recommended) Removed the pervasive use of filename in the CodeObjects
|
|
258
|
+
* Cleaned up the fulldoc setup to remove the redundancy
|
|
259
|
+
* Updated all the templates to support the lack of filename
|
|
260
|
+
|
|
261
|
+
=== 1.2 / 2010-10-10
|
|
262
|
+
|
|
263
|
+
* FIX: Empty Step Definitions caused failure during serialization
|
|
264
|
+
* FIX: Empty Step Definitions caused failure during rendering HTML
|
|
265
|
+
|
|
266
|
+
=== 1.1 / 2010-10-10
|
|
267
|
+
|
|
268
|
+
* FIX: Feature template had references to old methods for description (when it was an array)
|
|
269
|
+
* FIX: Empty feature files caused the documentation to fail; ignoring emptying feature files
|
|
270
|
+
* FIX: Tags, Step definitions, and other CodeObjects that were not present caused rendering to fail; Checking for nil
|
|
271
|
+
|
|
272
|
+
=== 1.0 / 2010-10-10
|
|
273
|
+
|
|
274
|
+
* Initial Release
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013 Franklin Webber
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
22
|
+
|
data/README.md
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# YARD-Cucumber: A Requirements Documentation Tool
|
|
2
|
+
|
|
3
|
+
## Synopsis
|
|
4
|
+
|
|
5
|
+
YARD-Cucumber (formerly Cucumber-In-The-Yard) is a YARD extension that processes
|
|
6
|
+
Cucumber features, scenarios, steps, tags, step definitions, and even transforms
|
|
7
|
+
to provide documentation similar to what you expect to how YARD displays
|
|
8
|
+
classes, methods and constants.This tools bridges the gap of having feature
|
|
9
|
+
files found in your source code and true documentation that your team, product
|
|
10
|
+
owners and stakeholders can use.
|
|
11
|
+
|
|
12
|
+
## Examples
|
|
13
|
+
|
|
14
|
+
I have created a trivial, example project to help provide a quick
|
|
15
|
+
visualization of the resulting documentation. I encourage you to look at it as
|
|
16
|
+
an example and see if it would assist your project from a multitude of
|
|
17
|
+
perspectives: as the project's core developer; another developer or a new
|
|
18
|
+
developer; quality assurance engineer; or product owner/stakeholder.
|
|
19
|
+
|
|
20
|
+
The implemented example has been deployed at [http://burtlo.github.io/yard-cucumber/](http://burtlo.github.io/yard-cucumber/).
|
|
21
|
+
|
|
22
|
+
**1. View Features and Scenarios** [example](http://burtlo.github.io/yard-cucumber/requirements.html)
|
|
23
|
+
|
|
24
|
+
**2. Search through [features, scenarios](http://burtlo.github.io/yard-cucumber/feature_list.html), and [tags](http://burtlo.github.io/yard-cucumber/tag_list.html)**
|
|
25
|
+
|
|
26
|
+
**3. Dynamic Tag Unions and Intersections** [example](http://burtlo.github.io/yard-cucumber/requirements/tags.html)
|
|
27
|
+
|
|
28
|
+
**4. View all features and scenarios by tag** [example](http://burtlo.github.io/yard-cucumber/requirements/tags/bvt.html)
|
|
29
|
+
|
|
30
|
+
**5. View Step Definitions and Transforms** [example](http://burtlo.github.io/yard-cucumber/requirements/step_transformers.html)
|
|
31
|
+
|
|
32
|
+
**6. All steps [matched](http://burtlo.github.io/yard-cucumber/requirements/step_transformers.html#definition_5-stepdefinition) to step definitions**
|
|
33
|
+
|
|
34
|
+
**7. [Steps](http://burtlo.github.io/yard-cucumber/requirements/step_transformers.html#step_transform7-steptransform) that have transforms applied to them**
|
|
35
|
+
|
|
36
|
+
**8. [Undefined steps](http://burtlo.github.io/yard-cucumber/requirements/step_transformers.html#undefined_steps) and even [Rubular](http://rubular.com/) links of your step definitions.**
|
|
37
|
+
|
|
38
|
+
**9. Feature directories with a README.md will be parsed into the description** [example](http://burtlo.github.io/yard-cucumber/requirements/example/child_feature.html)
|
|
39
|
+
|
|
40
|
+
**10. Configurable Menus - want a searchable steps menu and remove the tags menu**
|
|
41
|
+
|
|
42
|
+
**11. Step definitions in your language (Ruby 1.9.2 - Internationalization)**
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
YARD-Cucumber requires the following gems installed:
|
|
47
|
+
|
|
48
|
+
Gherkin 2.2.9 - http://cukes.info
|
|
49
|
+
Cucumber 0.7.5 - http://cukes.info
|
|
50
|
+
YARD 0.8.1 - http://yardoc.org
|
|
51
|
+
|
|
52
|
+
To install `yard-cucumber` use the following command:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
$ gem install yard-cucumber
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
(Add `sudo` if you're installing under a POSIX system as root)
|
|
59
|
+
|
|
60
|
+
## Usage
|
|
61
|
+
|
|
62
|
+
YARD supports for automatically including gems with the prefix `yard-`
|
|
63
|
+
as a plugin. To enable automatic loading yard-cucumber.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
$ mkdir ~/.yard
|
|
67
|
+
$ yard config load_plugins true
|
|
68
|
+
$ yardoc 'example/**/*.rb' 'example/**/*.feature'
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Now you can run YARD as you [normally](https://github.com/lsegal/yard) would and
|
|
72
|
+
have your features, step definitions and transforms captured.
|
|
73
|
+
|
|
74
|
+
An example with the rake task:
|
|
75
|
+
|
|
76
|
+
```ruby
|
|
77
|
+
require 'yard'
|
|
78
|
+
|
|
79
|
+
YARD::Rake::YardocTask.new do |t|
|
|
80
|
+
t.files = ['features/**/*.feature', 'features/**/*.rb']
|
|
81
|
+
t.options = ['--any', '--extra', '--opts'] # optional
|
|
82
|
+
end
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## Configuration
|
|
87
|
+
|
|
88
|
+
* Adding or Removing search fields (yardoc)
|
|
89
|
+
|
|
90
|
+
Be default the yardoc output will generate a search field for features and tags.
|
|
91
|
+
This can be configured through the yard configuration file `~/.yard/config` to
|
|
92
|
+
add or remove these search fields.
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
--- !map:SymbolHash
|
|
96
|
+
:load_plugins: true
|
|
97
|
+
:ignored_plugins: []
|
|
98
|
+
|
|
99
|
+
:autoload_plugins: []
|
|
100
|
+
|
|
101
|
+
:safe_mode: false
|
|
102
|
+
|
|
103
|
+
:"yard-cucumber":
|
|
104
|
+
menus: [ 'features', 'directories', 'tags', 'steps', 'step definitions' ]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
By default the configuration, yaml format, that is generate by the `yard config`
|
|
108
|
+
command will save a `SymbolHash`. You can still edit this file add the entry for
|
|
109
|
+
`:"yard-cucumber":` and the sub-entry `menus:` which can contain all of the above
|
|
110
|
+
mentioned menus or simply an empty array `[]` if you want no additional menus.
|
|
111
|
+
|
|
112
|
+
* Step definitions in your language (Ruby 1.9.2)
|
|
113
|
+
|
|
114
|
+
Again the yard configuration file you can define additional step definitions
|
|
115
|
+
that can be matched.
|
|
116
|
+
|
|
117
|
+
```yaml
|
|
118
|
+
:"yard-cucumber":
|
|
119
|
+
language:
|
|
120
|
+
step_definitions: [ 'Given', 'When', 'Then', 'And', 'Soit', 'Etantdonné', 'Lorsque', 'Lorsqu', 'Alors', 'Et' ]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
In this example, I have included the French step definition words alongside the
|
|
124
|
+
English step definitions. Even without specifying this feature files in other
|
|
125
|
+
languages are found, this provides the ability for the step definitions to match
|
|
126
|
+
correctly to step definitions.
|
|
127
|
+
|
|
128
|
+
## Details
|
|
129
|
+
|
|
130
|
+
There are two things that I enjoy: a test framework written in my own Domain
|
|
131
|
+
Specific Language (DSL) that is easily understood by all those on a project
|
|
132
|
+
and the ability for all participants to easily read, search, and view the tests.
|
|
133
|
+
|
|
134
|
+
Cucumber is an amazing tool that allowed me to define exercisable requirements.
|
|
135
|
+
My biggest obstacle was bringing these requirements to my team, the product
|
|
136
|
+
owner, and other stakeholders.
|
|
137
|
+
|
|
138
|
+
Initially I tried to expose more of the functionality by providing freshly
|
|
139
|
+
authored requirements through email, attachments to JIRA tickets, or linked in
|
|
140
|
+
wiki documents. None of these methods were very sustainable or successful.
|
|
141
|
+
First, I was continually pushing out the documents to those interested.
|
|
142
|
+
Second, the documents were displayed to the user in text without the syntax
|
|
143
|
+
highlighting that was exceedingly helpful for quickly understanding the requirements.
|
|
144
|
+
|
|
145
|
+
I also found it hard to share the test framework that I had put together with
|
|
146
|
+
another developer that joined the team. It was difficult to direct them around
|
|
147
|
+
the features, tags, step definitions, and transforms. It was when I started to
|
|
148
|
+
convey to them the conventions that I had established that I wished I had a
|
|
149
|
+
tool that would allow me to provide documentation like one would find generated
|
|
150
|
+
by a great tool like YARD.
|
|
151
|
+
|
|
152
|
+
So I set out to integrate Cucumber objects like features, backgrounds,
|
|
153
|
+
scenarios, tags, steps, step definitions, and transforms into a YARD template.
|
|
154
|
+
From my quick survey of the landscape I can see that the my needs are
|
|
155
|
+
different than a lot of others that use Cucumber. The entire project that
|
|
156
|
+
spawned this effort was solely to exercise the functionality of a different,
|
|
157
|
+
large project and so there is a huge dependence on having the requirements
|
|
158
|
+
documented. This is in contrast to other projects that are using this on a
|
|
159
|
+
small scale to test the functionality of small software component. Though,
|
|
160
|
+
ultimately, I realized that the functionality may provide a valuable tool for
|
|
161
|
+
many as I feel it helps more solidly bridge the reporting of the documentation
|
|
162
|
+
by putting a coat of paint on it.
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## LICENSE
|
|
166
|
+
|
|
167
|
+
(The MIT License)
|
|
168
|
+
|
|
169
|
+
Copyright (c) 2011 Franklin Webber
|
|
170
|
+
|
|
171
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
172
|
+
a copy of this software and associated documentation files (the
|
|
173
|
+
'Software'), to deal in the Software without restriction, including
|
|
174
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
175
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
176
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
177
|
+
the following conditions:
|
|
178
|
+
|
|
179
|
+
The above copyright notice and this permission notice shall be
|
|
180
|
+
included in all copies or substantial portions of the Software.
|
|
181
|
+
|
|
182
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
183
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
184
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
185
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
186
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
187
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
188
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|