jeffrafter-cucumber 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. data/History.txt +262 -0
  2. data/License.txt +20 -0
  3. data/Manifest.txt +241 -0
  4. data/README.txt +41 -0
  5. data/Rakefile +8 -0
  6. data/TODO.txt +26 -0
  7. data/bin/cucumber +6 -0
  8. data/config/hoe.rb +69 -0
  9. data/config/requirements.rb +15 -0
  10. data/cucumber.yml +1 -0
  11. data/examples/calculator_ruby_features/Rakefile +6 -0
  12. data/examples/calculator_ruby_features/features/addition.rb +23 -0
  13. data/examples/calculator_ruby_features/features/step_definitons/calculator_steps.rb +43 -0
  14. data/examples/cs/README.textile +22 -0
  15. data/examples/cs/Rakefile +12 -0
  16. data/examples/cs/features/hello.feature +11 -0
  17. data/examples/cs/features/step_definitons/hello_steps.rb +25 -0
  18. data/examples/cs/features/step_definitons/tree_steps.rb +14 -0
  19. data/examples/cs/features/tree.feature +9 -0
  20. data/examples/cs/src/Hello.cs +18 -0
  21. data/examples/dos_line_endings/Rakefile +6 -0
  22. data/examples/dos_line_endings/features/dos_line_endings.feature +9 -0
  23. data/examples/i18n/README.textile +18 -0
  24. data/examples/i18n/Rakefile +16 -0
  25. data/examples/i18n/ar/Rakefile +6 -0
  26. data/examples/i18n/ar/features/addition.feature +17 -0
  27. data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +32 -0
  28. data/examples/i18n/ar/lib/calculator.rb +10 -0
  29. data/examples/i18n/da/Rakefile +6 -0
  30. data/examples/i18n/da/features/step_definitons/kalkulator_steps.rb +22 -0
  31. data/examples/i18n/da/features/summering.feature +17 -0
  32. data/examples/i18n/da/lib/kalkulator.rb +11 -0
  33. data/examples/i18n/de/Rakefile +6 -0
  34. data/examples/i18n/de/features/addition.feature +17 -0
  35. data/examples/i18n/de/features/division.feature +10 -0
  36. data/examples/i18n/de/features/step_definitons/calculator_steps.rb +30 -0
  37. data/examples/i18n/de/lib/calculator.rb +14 -0
  38. data/examples/i18n/en/Rakefile +6 -0
  39. data/examples/i18n/en/features/addition.feature +17 -0
  40. data/examples/i18n/en/features/division.feature +10 -0
  41. data/examples/i18n/en/features/step_definitons/calculator_steps.rb +31 -0
  42. data/examples/i18n/en/lib/calculator.rb +14 -0
  43. data/examples/i18n/es/Rakefile +6 -0
  44. data/examples/i18n/es/features/adicion.feature +17 -0
  45. data/examples/i18n/es/features/step_definitons/calculador_steps.rb +22 -0
  46. data/examples/i18n/es/lib/calculador.rb +11 -0
  47. data/examples/i18n/et/Rakefile +6 -0
  48. data/examples/i18n/et/features/liitmine.feature +17 -0
  49. data/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +26 -0
  50. data/examples/i18n/et/lib/kalkulaator.rb +10 -0
  51. data/examples/i18n/fr/Rakefile +6 -0
  52. data/examples/i18n/fr/features/addition.feature +13 -0
  53. data/examples/i18n/fr/features/step_definitions/calculatrice_steps.rb +22 -0
  54. data/examples/i18n/fr/lib/calculatrice.rb +10 -0
  55. data/examples/i18n/id/Rakefile +6 -0
  56. data/examples/i18n/id/features/addition.feature +17 -0
  57. data/examples/i18n/id/features/division.feature +10 -0
  58. data/examples/i18n/id/features/step_definitons/calculator_steps.rb +31 -0
  59. data/examples/i18n/id/lib/calculator.rb +14 -0
  60. data/examples/i18n/it/Rakefile +6 -0
  61. data/examples/i18n/it/features/somma.feature +10 -0
  62. data/examples/i18n/it/features/step_definitons/calcolatrice_steps.rb +22 -0
  63. data/examples/i18n/it/lib/calcolatrice.rb +11 -0
  64. data/examples/i18n/ja/README.txt +5 -0
  65. data/examples/i18n/ja/Rakefile +6 -0
  66. data/examples/i18n/ja/features/addition.feature +17 -0
  67. data/examples/i18n/ja/features/division.feature +10 -0
  68. data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +30 -0
  69. data/examples/i18n/ja/lib/calculator.rb +14 -0
  70. data/examples/i18n/lt/Rakefile +6 -0
  71. data/examples/i18n/lt/features/addition.feature +17 -0
  72. data/examples/i18n/lt/features/division.feature +10 -0
  73. data/examples/i18n/lt/features/step_definitons/calculator_steps.rb +31 -0
  74. data/examples/i18n/lt/lib/calculator.rb +14 -0
  75. data/examples/i18n/no/Rakefile +6 -0
  76. data/examples/i18n/no/features/step_definitons/kalkulator_steps.rb +22 -0
  77. data/examples/i18n/no/features/summering.feature +17 -0
  78. data/examples/i18n/no/lib/kalkulator.rb +11 -0
  79. data/examples/i18n/pt/Rakefile +6 -0
  80. data/examples/i18n/pt/features/adicao.feature +10 -0
  81. data/examples/i18n/pt/features/step_definitions/calculadora_steps.rb +22 -0
  82. data/examples/i18n/pt/lib/calculadora.rb +10 -0
  83. data/examples/i18n/ro/Rakefile +6 -0
  84. data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +22 -0
  85. data/examples/i18n/ro/features/suma.feature +10 -0
  86. data/examples/i18n/ro/lib/calculator.rb +11 -0
  87. data/examples/i18n/se/Rakefile +6 -0
  88. data/examples/i18n/se/features/step_definitons/kalkulator_steps.rb +22 -0
  89. data/examples/i18n/se/features/summering.feature +17 -0
  90. data/examples/i18n/se/lib/kalkulator.rb +11 -0
  91. data/examples/i18n/zh-CN/Rakefile +6 -0
  92. data/examples/i18n/zh-CN/features/addition.feature +17 -0
  93. data/examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb +24 -0
  94. data/examples/i18n/zh-CN/lib/calculator.rb +10 -0
  95. data/examples/java/README.textile +22 -0
  96. data/examples/java/Rakefile +12 -0
  97. data/examples/java/features/hello.feature +11 -0
  98. data/examples/java/features/step_definitons/hello_steps.rb +25 -0
  99. data/examples/java/features/step_definitons/tree_steps.rb +14 -0
  100. data/examples/java/features/tree.feature +9 -0
  101. data/examples/java/src/cucumber/demo/Hello.java +16 -0
  102. data/examples/selenium/Rakefile +6 -0
  103. data/examples/selenium/features/search.feature +9 -0
  104. data/examples/selenium/features/step_definitons/stories_steps.rb +41 -0
  105. data/examples/test_unit/Rakefile +6 -0
  106. data/examples/test_unit/features/step_definitions/test_unit_steps.rb +26 -0
  107. data/examples/test_unit/features/test_unit.feature +9 -0
  108. data/examples/tickets/Rakefile +11 -0
  109. data/examples/tickets/cucumber.yml +2 -0
  110. data/examples/tickets/features/step_definitons/tickets_steps.rb +32 -0
  111. data/examples/tickets/features/tickets.feature +24 -0
  112. data/examples/watir/Rakefile +6 -0
  113. data/examples/watir/features/search.feature +9 -0
  114. data/examples/watir/features/step_definitons/stories_steps.rb +51 -0
  115. data/features/see_features.feature +8 -0
  116. data/features/steps/features_steps.rb +9 -0
  117. data/gem_tasks/deployment.rake +34 -0
  118. data/gem_tasks/environment.rake +7 -0
  119. data/gem_tasks/features.rake +6 -0
  120. data/gem_tasks/fix_cr_lf.rake +10 -0
  121. data/gem_tasks/flog.rake +4 -0
  122. data/gem_tasks/gemspec.rake +6 -0
  123. data/gem_tasks/rspec.rake +35 -0
  124. data/gem_tasks/treetop.rake +41 -0
  125. data/lib/autotest/cucumber.rb +6 -0
  126. data/lib/autotest/cucumber_mixin.rb +109 -0
  127. data/lib/autotest/cucumber_rails.rb +6 -0
  128. data/lib/autotest/cucumber_rails_rspec.rb +6 -0
  129. data/lib/autotest/cucumber_rspec.rb +6 -0
  130. data/lib/autotest/discover.rb +9 -0
  131. data/lib/cucumber/broadcaster.rb +20 -0
  132. data/lib/cucumber/cli.rb +303 -0
  133. data/lib/cucumber/core_ext/proc.rb +69 -0
  134. data/lib/cucumber/core_ext/string.rb +28 -0
  135. data/lib/cucumber/executor.rb +190 -0
  136. data/lib/cucumber/formatters/ansicolor.rb +109 -0
  137. data/lib/cucumber/formatters/autotest_formatter.rb +23 -0
  138. data/lib/cucumber/formatters/cucumber.css +132 -0
  139. data/lib/cucumber/formatters/cucumber.js +11 -0
  140. data/lib/cucumber/formatters/html_formatter.rb +128 -0
  141. data/lib/cucumber/formatters/jquery.js +32 -0
  142. data/lib/cucumber/formatters/pretty_formatter.rb +234 -0
  143. data/lib/cucumber/formatters/profile_formatter.rb +92 -0
  144. data/lib/cucumber/formatters/progress_formatter.rb +58 -0
  145. data/lib/cucumber/formatters.rb +1 -0
  146. data/lib/cucumber/languages.yml +258 -0
  147. data/lib/cucumber/model/table.rb +28 -0
  148. data/lib/cucumber/model.rb +1 -0
  149. data/lib/cucumber/platform.rb +12 -0
  150. data/lib/cucumber/rails/rspec.rb +12 -0
  151. data/lib/cucumber/rails/world.rb +73 -0
  152. data/lib/cucumber/rake/task.rb +101 -0
  153. data/lib/cucumber/step_methods.rb +49 -0
  154. data/lib/cucumber/step_mother.rb +95 -0
  155. data/lib/cucumber/tree/feature.rb +63 -0
  156. data/lib/cucumber/tree/features.rb +21 -0
  157. data/lib/cucumber/tree/given_scenario.rb +13 -0
  158. data/lib/cucumber/tree/scenario.rb +174 -0
  159. data/lib/cucumber/tree/step.rb +134 -0
  160. data/lib/cucumber/tree/table.rb +26 -0
  161. data/lib/cucumber/tree/top_down_visitor.rb +23 -0
  162. data/lib/cucumber/tree.rb +18 -0
  163. data/lib/cucumber/treetop_parser/feature.treetop.erb +206 -0
  164. data/lib/cucumber/treetop_parser/feature_ar.rb +1591 -0
  165. data/lib/cucumber/treetop_parser/feature_cy.rb +1591 -0
  166. data/lib/cucumber/treetop_parser/feature_da.rb +1591 -0
  167. data/lib/cucumber/treetop_parser/feature_de.rb +1591 -0
  168. data/lib/cucumber/treetop_parser/feature_en-tx.rb +1591 -0
  169. data/lib/cucumber/treetop_parser/feature_en.rb +1591 -0
  170. data/lib/cucumber/treetop_parser/feature_es.rb +1591 -0
  171. data/lib/cucumber/treetop_parser/feature_et.rb +1591 -0
  172. data/lib/cucumber/treetop_parser/feature_fr.rb +1591 -0
  173. data/lib/cucumber/treetop_parser/feature_id.rb +1591 -0
  174. data/lib/cucumber/treetop_parser/feature_it.rb +1591 -0
  175. data/lib/cucumber/treetop_parser/feature_ja.rb +1591 -0
  176. data/lib/cucumber/treetop_parser/feature_lt.rb +1591 -0
  177. data/lib/cucumber/treetop_parser/feature_nl.rb +1591 -0
  178. data/lib/cucumber/treetop_parser/feature_no.rb +1591 -0
  179. data/lib/cucumber/treetop_parser/feature_parser.rb +34 -0
  180. data/lib/cucumber/treetop_parser/feature_pl.rb +1591 -0
  181. data/lib/cucumber/treetop_parser/feature_pt.rb +1591 -0
  182. data/lib/cucumber/treetop_parser/feature_ro.rb +1591 -0
  183. data/lib/cucumber/treetop_parser/feature_ro2.rb +1591 -0
  184. data/lib/cucumber/treetop_parser/feature_ru.rb +1591 -0
  185. data/lib/cucumber/treetop_parser/feature_se.rb +1591 -0
  186. data/lib/cucumber/treetop_parser/feature_zh-CN.rb +1591 -0
  187. data/lib/cucumber/version.rb +9 -0
  188. data/lib/cucumber.rb +38 -0
  189. data/rails_generators/cucumber/USAGE +11 -0
  190. data/rails_generators/cucumber/cucumber_generator.rb +30 -0
  191. data/rails_generators/cucumber/templates/cucumber +7 -0
  192. data/rails_generators/cucumber/templates/cucumber.rake +7 -0
  193. data/rails_generators/cucumber/templates/env.rb +8 -0
  194. data/rails_generators/cucumber/templates/webrat_steps.rb +95 -0
  195. data/rails_generators/feature/USAGE +12 -0
  196. data/rails_generators/feature/feature_generator.rb +16 -0
  197. data/rails_generators/feature/templates/feature.erb +28 -0
  198. data/rails_generators/feature/templates/steps.erb +22 -0
  199. data/script/console +10 -0
  200. data/script/console.cmd +1 -0
  201. data/script/destroy +14 -0
  202. data/script/destroy.cmd +1 -0
  203. data/script/generate +14 -0
  204. data/script/generate.cmd +1 -0
  205. data/script/txt2html +74 -0
  206. data/script/txt2html.cmd +1 -0
  207. data/setup.rb +1585 -0
  208. data/spec/cucumber/broadcaster_spec.rb +27 -0
  209. data/spec/cucumber/cli_spec.rb +412 -0
  210. data/spec/cucumber/core_ext/proc_spec.rb +45 -0
  211. data/spec/cucumber/core_ext/string_spec.rb +34 -0
  212. data/spec/cucumber/executor_spec.rb +298 -0
  213. data/spec/cucumber/formatters/ansicolor_spec.rb +35 -0
  214. data/spec/cucumber/formatters/autotest_formatter_spec.rb +26 -0
  215. data/spec/cucumber/formatters/features.html +269 -0
  216. data/spec/cucumber/formatters/html_formatter_spec.rb +74 -0
  217. data/spec/cucumber/formatters/pretty_formatter_spec.rb +204 -0
  218. data/spec/cucumber/formatters/profile_formatter_spec.rb +192 -0
  219. data/spec/cucumber/formatters/progress_formatter_spec.rb +65 -0
  220. data/spec/cucumber/model/table_spec.rb +20 -0
  221. data/spec/cucumber/rails/stubs/mini_rails.rb +17 -0
  222. data/spec/cucumber/rails/stubs/test_help.rb +1 -0
  223. data/spec/cucumber/rails/world_spec.rb +11 -0
  224. data/spec/cucumber/sell_cucumbers.feature +19 -0
  225. data/spec/cucumber/step_mother_spec.rb +74 -0
  226. data/spec/cucumber/tree/feature_spec.rb +43 -0
  227. data/spec/cucumber/tree/row_scenario_spec.rb +55 -0
  228. data/spec/cucumber/tree/scenario_spec.rb +76 -0
  229. data/spec/cucumber/tree/step_spec.rb +50 -0
  230. data/spec/cucumber/treetop_parser/empty_feature.feature +4 -0
  231. data/spec/cucumber/treetop_parser/empty_scenario.feature +9 -0
  232. data/spec/cucumber/treetop_parser/feature_parser_spec.rb +98 -0
  233. data/spec/cucumber/treetop_parser/fit_scenario.feature +8 -0
  234. data/spec/cucumber/treetop_parser/given_scenario.feature +9 -0
  235. data/spec/cucumber/treetop_parser/multiline_steps.feature +17 -0
  236. data/spec/cucumber/treetop_parser/multiple_tables.feature +29 -0
  237. data/spec/cucumber/treetop_parser/spaces.feature +10 -0
  238. data/spec/cucumber/treetop_parser/test_dos.feature +25 -0
  239. data/spec/cucumber/treetop_parser/with_comments.feature +10 -0
  240. data/spec/spec.opts +2 -0
  241. data/spec/spec_helper.rb +20 -0
  242. metadata +335 -0
data/History.txt ADDED
@@ -0,0 +1,262 @@
1
+ == 0.1.11 (In Git)
2
+
3
+ == New features
4
+ * CUCUMBER_NO_JCODE environment variable disables jcode. Workaround for http://tinyurl.com/55uu3u (Aslak Hellesøy)
5
+ * CUCUMBR LIKEZ 2 SPEEK WIF KATS. KTHXBAI (Aimee Daniells)
6
+ * Support for dynamically pluggable formatters (#99 Joseph Wilk)
7
+ * --verbose mode to see ruby files and feature files loaded by Cucumber (#106 Joseph Wilk)
8
+
9
+ == Bugfixes
10
+
11
+ == Removed features
12
+
13
+ == 0.1.10 2008-11-25
14
+
15
+ This release mostly has smaller bugfixes. The most significant new feature is how
16
+ line numbers are specified. You can now run multiple features at specific lines numbers like this:
17
+
18
+ cucumber foo.feature:15 bar.feature:6:45:111
19
+
20
+ This will run foo.feature at line 15 and bar.feature at line 6, 45 and 111.
21
+
22
+ === New features
23
+ * Added example showing how to use Cucumber with Test::Unit + Matchy instead of RSpec (Aslak Hellesøy)
24
+ * Yield existing world object to World block (#87 Aslak Hellesøy)
25
+ * AUTOFEATURE=tRue works (case insensitive) (Aslak Hellesøy)
26
+ * Initial support for .NET via IronRuby. (Aslak Hellesøy)
27
+ * Lithuanian translation (sauliusgrigaitis)
28
+ * New webrat step defintions to wrap the new selects_time, selects_date, and selects_datetime methods. (Ben Mabey)
29
+ * Try to load webrat gem if it's not installed as a plugin (Aslak Hellesøy)
30
+ * Support example.feature:20 or example.feature:10:20:30 syntax for running features at specific line number(s). (#88 Joseph Wilk)
31
+
32
+ === Bugfixes
33
+ * Windows - all the 'a' characters in the output have gone on strike (#81 Luis Lavena, Joseph Wilk, Aslak Hellesøy)
34
+ * Raise a nice error when encountering step definition without block (#95 Aslak Hellesøy)
35
+ * Features written using Ruby where breaking due to missing a line number (#91 Joseph Wilk)
36
+ * Directly creating a Table meant the scenario table header was never set which was causing a formatter error (#91 Joseph Wilk)
37
+
38
+ === Removed features
39
+ * $KCODE='u' is no longer done automatically. Developers should do that explicitly when needed in step definitions or env.rb.
40
+ * Step definition without a block being treated as pending (#64 Joseph Wilk)
41
+ * The --line option has been removed. Use the new file.feature:line format instead.
42
+
43
+ == 0.1.9 2008-11-12
44
+
45
+ With this release Cucumber supports 19 (!) natural languages:
46
+
47
+ * Arabic
48
+ * Chinese Simplified
49
+ * Danish
50
+ * Dutch
51
+ * Estonian
52
+ * French
53
+ * German
54
+ * Italian
55
+ * Japanese
56
+ * Malay
57
+ * Norwegian
58
+ * Polish
59
+ * Portuguese
60
+ * Romanian
61
+ * Russian
62
+ * Spanish
63
+ * Swedish
64
+ * Texan
65
+ * Welsh
66
+
67
+ Thanks a lot to everyone who has contributed translations. If you don't see your language here, please
68
+ add it: http://github.com/aslakhellesoy/cucumber/wikis/spoken-languages
69
+
70
+ Main functional changes in this release is "Autotest":http://github.com/aslakhellesoy/cucumber/wikis/autotest-integration
71
+ support and how multiline strings work in feature files:
72
+
73
+ # In your .feature file
74
+ Then I should see
75
+ """
76
+ A string
77
+ that "indents"
78
+ and spans
79
+ several lines
80
+
81
+ """
82
+
83
+ # In your steps.rb file
84
+ Then 'I should see' do |text|
85
+ text.should == "A string\n that \"indents\"\nand spans\nseveral lines\n"
86
+ end
87
+
88
+ The triple quotes are used to define the start and end of a string, and it also defines what gets stripped away
89
+ in the inside string. If the triple quotes are indented 4 spaces, then the text within will have the 4 first
90
+ spaces removed too.
91
+
92
+ === New features
93
+ * Added --[no-]color option to force color on or off (Peter Jaros)
94
+ * Step definition without a block will be treated as pending (#64 Joseph Wilk)
95
+ * Added support for Welsh (improvements welcome) (Joseph Wilk)
96
+ * Added --quiet option to hide all development aid output when using Pretty formatter (#69 Joseph Wilk)
97
+ * Added --no-snippets option to hide snippets for pending steps when using Pretty formatter (#69 Joseph Wilk)
98
+ * Added error messages concerning cucumber.yml. (#70 Ben Mabey)
99
+ * Added Autotest support - work in progress... (Peter Jaros)
100
+ * Added new --exclude option (Bryan Helkamp)
101
+ * Added new --scenario option (Peter Jaros)
102
+ * Renamed common_webrat.rb to webrat_steps.rb (Ben Mabey, Aslak Hellesøy)
103
+ * Added new feature[:feature_path] task (Roman Gonzalez)
104
+ * Added support for Polish (Joseph Wilk)
105
+ * Support specifying multiple formatters and multiple outputs (#47 Joseph Wilk)
106
+ * Added support for Japanese. (Kakutani Shintaro)
107
+ * Added support for Texan (improvements welcome). (Aslak Hellesøy)
108
+
109
+ === Bugfixes
110
+ * Pending step snippets should escape special Regexp characters (#82 Joseph Wilk)
111
+ * Scenario without a body shouldn't show up as complete (#63 Josh Knowles)
112
+ * Fixed bug where utf-8 strings where breaking comment alighments. (#79 Joseph Wilk)
113
+ * Fixed next_column_index not resetting after large tables (#60, Barry Mitchelson)
114
+ * The HTML formatter was rendering everything twice. Cannot invoke visit_feature on formatters in executor (#72 Joseph Wilk)
115
+ * Row Scenarios need to support pending? in order for the Profile formatter to work (Joseph Wilk)
116
+ * Snippets are not shown for steps which already have a step definition (#65 Joseph Wilk)
117
+ * Prevent feature/scenario/pending step comments from containing '//' when running features by specifying a directory with a trailing '/' (Joseph Wilk)
118
+ * Scenario tables need spacing after them (#59 Joseph Wilk)
119
+ * Support running scenario table rows when using --line argument (#55 Joseph Wilk)
120
+ * Don't load cucumber.yml unless it exists (Aslak Hellesøy)
121
+ * Fixing bug where specifying line number 1 in a feature which starts with a scenario with a scenario table was raising an error (#56 Joseph Wilk)
122
+
123
+ === Removed features
124
+
125
+
126
+ == 0.1.8 2008-10-18
127
+
128
+ This release extends the support for tables. PLEASE NOTE THAT TABLES ARE STILL EXPERIMENTAL.
129
+ In previous releases it has been possible to use tables to define "more examples" of a scenario i
130
+ n a FIT-style column fixture kind of way. Now you can also use tables as arguments to steps.
131
+
132
+ Tables used to define more examples after a scenario must now be prefixed. In English it looks like this:
133
+
134
+ Feature: Addition
135
+ In order to avoid silly mistakes
136
+ As a math idiot
137
+ I want to be told the sum of two numbers
138
+
139
+ Scenario: Add two numbers
140
+ Given I have entered 50 into the calculator
141
+ And I have entered 70 into the calculator
142
+ When I press add
143
+ Then the result should be 120 on the screen
144
+ And the result class should be Fixnum
145
+
146
+ More Examples:
147
+ | input_1 | input_2 | button | output | class |
148
+ | 20 | 30 | add | 50 | Fixnum |
149
+ | 2 | 5 | add | 7 | Fixnum |
150
+ | 0 | 40 | add | 40 | Fixnum |
151
+
152
+ Languages that are not updated yet will have to use "More Examples" until we get the translations.
153
+
154
+ Tables can also be used as arguments to individual steps. In fact, steps now support a single argument
155
+ that can span several lines. This can be a table or a string.
156
+
157
+ Example:
158
+
159
+ Given the following people exist:
160
+ | name | email | phone |
161
+ | Aslak | aslak@email.com | 123 |
162
+ | Joe | joe@email.com | 234 |
163
+ | Bryan | bryan@email.org | 456 |
164
+ When I search for email.com
165
+ Then I should see:
166
+ | name | email | phone |
167
+ | Aslak | aslak@email.com | 123 |
168
+ | Joe | joe@email.com | 234 |
169
+ And I should see:
170
+ "Some text
171
+ on several lines"
172
+
173
+ The step definitions for such multiline steps must define an extra block argument for the argument:
174
+
175
+ Given /the following people exist:/ do |people_table|
176
+ # people_table is of type Cucumber::Model::Table
177
+ # See RDoc for more info
178
+ end
179
+
180
+ Then /I should see:/ do |string|
181
+ # string is a plain old ruby String with leading spaces on each line removed
182
+ end
183
+
184
+ === New features
185
+ * Added profile formatter. (#35, Joseph Wilk)
186
+ * Added support for Chinese Simplified. (Liming Lian)
187
+ * Added support for Dutch. (Sjoerd Tieleman)
188
+ * Multiline steps are now supported. (#4, Aslak Hellesøy)
189
+ * Tables used to define more examples for a scenario must be prefixed "More Examples" (see languages.yml for other languages)
190
+ * Show the file and line number for scenarios as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
191
+ * Show the file for the feature as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
192
+ * Show the feature file and line for pending steps as a comment when displaying with the pretty formatter. (#40, Joseph Wilk)
193
+
194
+ === Bugfixes
195
+ * Fixed speling errors in Spanish (Daniel Cadenas)
196
+ * ActionMailer delivery_method should not be set to test (#41, Luke Melia)
197
+ * Reverse incorrectly ordered args in webrat select step (#43, David Chelimsky)
198
+ * Support comments above the first scenario (#31, Aslak Hellesøy)
199
+ * Fixed the HTML Formatter to use actual values for FIT table headers (#30, Joseph Wilk)
200
+
201
+ === Removed features
202
+ * Removed the /^I go to (.*)$/ step from common_webrat.rb - it's not language agnostic and provides little value.
203
+
204
+ === New features
205
+ * Added new --out option to make it easier to specify output from Rake and cucumber.yml
206
+
207
+ == 0.1.7 2008-10-05
208
+
209
+ This release fixes a few bugs and adds some new features. The most notable features are:
210
+
211
+ === Calling steps from steps
212
+
213
+ Step definitions are a little bit closer to having regular method semantics.
214
+ You define them, but now you can also call them from other steps. Here is an
215
+ example:
216
+
217
+ Given /I am logged in as an (.*) named (.*)$/ do |role, name|
218
+ Given "I am registered as #{role}, #{name}, secret"
219
+ When "I log in with #{name}, secret"
220
+ end
221
+
222
+ Given /I am registered as (.*), (.*), (.*)/ do |role, name, password|
223
+ # (Code removed for brevity)
224
+ end
225
+
226
+ When /I log in with (.*), (.*)/ do |name, password|
227
+ # (Code removed for brevity)
228
+ end
229
+
230
+ This means that steps can be reused in other steps. The GivenScenario feature achieves a similar
231
+ effect (on the scenario level), but this feature is something we're not very happy with, mostly
232
+ because it's not parameterisable. Calling steps from steps is.
233
+
234
+ GivenScenario will still be working several releases, but the plan is to remove it completely in
235
+ the 0.3.0 release.
236
+
237
+ === Seeing where a step is defined
238
+
239
+ Prior to this release it could be hard to find out where the ruby step definition matching
240
+ a plain text step is defined. Not anymore! Cucumber will now output this:
241
+
242
+ Scenario: Regular numbers
243
+ Given I have entered 3 into the calculator # features/steps/calculator_steps.rb:12
244
+ And I have entered 2 into the calculator # features/steps/calculator_steps.rb:12
245
+ When I press divide # features/steps/calculator_steps.rb:16
246
+ Then the result should be 1.5 on the screen # features/steps/calculator_steps.rb:20
247
+ And the result class should be Float # features/steps/calculator_steps.rb:24
248
+
249
+ === Bugfixes
250
+ * Fixed a bug in the command line args being lost when using --profile (#27, Joseph Wilk)
251
+ * Fixed a bug in Webrat selects (Tim Glen)
252
+ * Fixed parsing of DOS line endings (#2, #28, Aslak Hellesøy)
253
+
254
+ === New features
255
+ * Steps can be called from other steps (#3, Bryan Helmkamp, Aslak Hellesøy)
256
+ * Added But keyword to all languages (#21, Aslak Hellesøy)
257
+ * Added --no-source option to display step definition location next to step text (#26, Joseph Wilk, Aslak Hellesøy)
258
+ * Added more Webrat steps (#25, Tim Glen)
259
+
260
+ == 0.1.6 2008-10-01
261
+
262
+ First gem release!
data/License.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 Aslak Hellesøy
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Manifest.txt ADDED
@@ -0,0 +1,241 @@
1
+ History.txt
2
+ License.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ TODO.txt
7
+ bin/cucumber
8
+ config/hoe.rb
9
+ config/requirements.rb
10
+ cucumber.yml
11
+ examples/calculator_ruby_features/Rakefile
12
+ examples/calculator_ruby_features/features/addition.rb
13
+ examples/calculator_ruby_features/features/step_definitons/calculator_steps.rb
14
+ examples/cs/README.textile
15
+ examples/cs/Rakefile
16
+ examples/cs/features/hello.feature
17
+ examples/cs/features/step_definitons/hello_steps.rb
18
+ examples/cs/features/step_definitons/tree_steps.rb
19
+ examples/cs/features/tree.feature
20
+ examples/cs/src/Hello.cs
21
+ examples/dos_line_endings/Rakefile
22
+ examples/dos_line_endings/features/dos_line_endings.feature
23
+ examples/i18n/README.textile
24
+ examples/i18n/Rakefile
25
+ examples/i18n/ar/Rakefile
26
+ examples/i18n/ar/features/addition.feature
27
+ examples/i18n/ar/features/step_definitons/calculator_steps.rb
28
+ examples/i18n/ar/lib/calculator.rb
29
+ examples/i18n/da/Rakefile
30
+ examples/i18n/da/features/step_definitons/kalkulator_steps.rb
31
+ examples/i18n/da/features/summering.feature
32
+ examples/i18n/da/lib/kalkulator.rb
33
+ examples/i18n/de/Rakefile
34
+ examples/i18n/de/features/addition.feature
35
+ examples/i18n/de/features/division.feature
36
+ examples/i18n/de/features/step_definitons/calculator_steps.rb
37
+ examples/i18n/de/lib/calculator.rb
38
+ examples/i18n/en/Rakefile
39
+ examples/i18n/en/features/addition.feature
40
+ examples/i18n/en/features/division.feature
41
+ examples/i18n/en/features/step_definitons/calculator_steps.rb
42
+ examples/i18n/en/lib/calculator.rb
43
+ examples/i18n/es/Rakefile
44
+ examples/i18n/es/features/adicion.feature
45
+ examples/i18n/es/features/step_definitons/calculador_steps.rb
46
+ examples/i18n/es/lib/calculador.rb
47
+ examples/i18n/et/Rakefile
48
+ examples/i18n/et/features/liitmine.feature
49
+ examples/i18n/et/features/step_definitions/kalkulaator_steps.rb
50
+ examples/i18n/et/lib/kalkulaator.rb
51
+ examples/i18n/fr/Rakefile
52
+ examples/i18n/fr/features/addition.feature
53
+ examples/i18n/fr/features/step_definitions/calculatrice_steps.rb
54
+ examples/i18n/fr/lib/calculatrice.rb
55
+ examples/i18n/id/Rakefile
56
+ examples/i18n/id/features/addition.feature
57
+ examples/i18n/id/features/division.feature
58
+ examples/i18n/id/features/step_definitons/calculator_steps.rb
59
+ examples/i18n/id/lib/calculator.rb
60
+ examples/i18n/it/Rakefile
61
+ examples/i18n/it/features/somma.feature
62
+ examples/i18n/it/features/step_definitons/calcolatrice_steps.rb
63
+ examples/i18n/it/lib/calcolatrice.rb
64
+ examples/i18n/ja/README.txt
65
+ examples/i18n/ja/Rakefile
66
+ examples/i18n/ja/features/addition.feature
67
+ examples/i18n/ja/features/division.feature
68
+ examples/i18n/ja/features/step_definitons/calculator_steps.rb
69
+ examples/i18n/ja/lib/calculator.rb
70
+ examples/i18n/lt/Rakefile
71
+ examples/i18n/lt/features/addition.feature
72
+ examples/i18n/lt/features/division.feature
73
+ examples/i18n/lt/features/step_definitons/calculator_steps.rb
74
+ examples/i18n/lt/lib/calculator.rb
75
+ examples/i18n/no/Rakefile
76
+ examples/i18n/no/features/step_definitons/kalkulator_steps.rb
77
+ examples/i18n/no/features/summering.feature
78
+ examples/i18n/no/lib/kalkulator.rb
79
+ examples/i18n/pt/Rakefile
80
+ examples/i18n/pt/features/adicao.feature
81
+ examples/i18n/pt/features/step_definitions/calculadora_steps.rb
82
+ examples/i18n/pt/lib/calculadora.rb
83
+ examples/i18n/ro/Rakefile
84
+ examples/i18n/ro/features/step_definitons/calculator_steps.rb
85
+ examples/i18n/ro/features/suma.feature
86
+ examples/i18n/ro/lib/calculator.rb
87
+ examples/i18n/se/Rakefile
88
+ examples/i18n/se/features/step_definitons/kalkulator_steps.rb
89
+ examples/i18n/se/features/summering.feature
90
+ examples/i18n/se/lib/kalkulator.rb
91
+ examples/i18n/zh-CN/Rakefile
92
+ examples/i18n/zh-CN/features/addition.feature
93
+ examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb
94
+ examples/i18n/zh-CN/lib/calculator.rb
95
+ examples/java/README.textile
96
+ examples/java/Rakefile
97
+ examples/java/features/hello.feature
98
+ examples/java/features/step_definitons/hello_steps.rb
99
+ examples/java/features/step_definitons/tree_steps.rb
100
+ examples/java/features/tree.feature
101
+ examples/java/src/cucumber/demo/Hello.java
102
+ examples/selenium/Rakefile
103
+ examples/selenium/features/search.feature
104
+ examples/selenium/features/step_definitons/stories_steps.rb
105
+ examples/test_unit/Rakefile
106
+ examples/test_unit/features/step_definitions/test_unit_steps.rb
107
+ examples/test_unit/features/test_unit.feature
108
+ examples/tickets/Rakefile
109
+ examples/tickets/cucumber.yml
110
+ examples/tickets/features/step_definitons/tickets_steps.rb
111
+ examples/tickets/features/tickets.feature
112
+ examples/watir/Rakefile
113
+ examples/watir/features/search.feature
114
+ examples/watir/features/step_definitons/stories_steps.rb
115
+ features/see_features.feature
116
+ features/steps/features_steps.rb
117
+ gem_tasks/deployment.rake
118
+ gem_tasks/environment.rake
119
+ gem_tasks/features.rake
120
+ gem_tasks/fix_cr_lf.rake
121
+ gem_tasks/flog.rake
122
+ gem_tasks/gemspec.rake
123
+ gem_tasks/rspec.rake
124
+ gem_tasks/treetop.rake
125
+ lib/autotest/cucumber.rb
126
+ lib/autotest/cucumber_mixin.rb
127
+ lib/autotest/cucumber_rails.rb
128
+ lib/autotest/cucumber_rails_rspec.rb
129
+ lib/autotest/cucumber_rspec.rb
130
+ lib/autotest/discover.rb
131
+ lib/cucumber.rb
132
+ lib/cucumber/broadcaster.rb
133
+ lib/cucumber/cli.rb
134
+ lib/cucumber/core_ext/proc.rb
135
+ lib/cucumber/core_ext/string.rb
136
+ lib/cucumber/executor.rb
137
+ lib/cucumber/formatters.rb
138
+ lib/cucumber/formatters/ansicolor.rb
139
+ lib/cucumber/formatters/autotest_formatter.rb
140
+ lib/cucumber/formatters/cucumber.css
141
+ lib/cucumber/formatters/cucumber.js
142
+ lib/cucumber/formatters/html_formatter.rb
143
+ lib/cucumber/formatters/jquery.js
144
+ lib/cucumber/formatters/pretty_formatter.rb
145
+ lib/cucumber/formatters/profile_formatter.rb
146
+ lib/cucumber/formatters/progress_formatter.rb
147
+ lib/cucumber/languages.yml
148
+ lib/cucumber/model.rb
149
+ lib/cucumber/model/table.rb
150
+ lib/cucumber/platform.rb
151
+ lib/cucumber/rails/rspec.rb
152
+ lib/cucumber/rails/world.rb
153
+ lib/cucumber/rake/task.rb
154
+ lib/cucumber/step_methods.rb
155
+ lib/cucumber/step_mother.rb
156
+ lib/cucumber/tree.rb
157
+ lib/cucumber/tree/feature.rb
158
+ lib/cucumber/tree/features.rb
159
+ lib/cucumber/tree/given_scenario.rb
160
+ lib/cucumber/tree/scenario.rb
161
+ lib/cucumber/tree/step.rb
162
+ lib/cucumber/tree/table.rb
163
+ lib/cucumber/tree/top_down_visitor.rb
164
+ lib/cucumber/treetop_parser/feature.treetop.erb
165
+ lib/cucumber/treetop_parser/feature_ar.rb
166
+ lib/cucumber/treetop_parser/feature_cy.rb
167
+ lib/cucumber/treetop_parser/feature_da.rb
168
+ lib/cucumber/treetop_parser/feature_de.rb
169
+ lib/cucumber/treetop_parser/feature_en-tx.rb
170
+ lib/cucumber/treetop_parser/feature_en.rb
171
+ lib/cucumber/treetop_parser/feature_es.rb
172
+ lib/cucumber/treetop_parser/feature_et.rb
173
+ lib/cucumber/treetop_parser/feature_fr.rb
174
+ lib/cucumber/treetop_parser/feature_id.rb
175
+ lib/cucumber/treetop_parser/feature_it.rb
176
+ lib/cucumber/treetop_parser/feature_ja.rb
177
+ lib/cucumber/treetop_parser/feature_lt.rb
178
+ lib/cucumber/treetop_parser/feature_nl.rb
179
+ lib/cucumber/treetop_parser/feature_no.rb
180
+ lib/cucumber/treetop_parser/feature_parser.rb
181
+ lib/cucumber/treetop_parser/feature_pl.rb
182
+ lib/cucumber/treetop_parser/feature_pt.rb
183
+ lib/cucumber/treetop_parser/feature_ro.rb
184
+ lib/cucumber/treetop_parser/feature_ro2.rb
185
+ lib/cucumber/treetop_parser/feature_ru.rb
186
+ lib/cucumber/treetop_parser/feature_se.rb
187
+ lib/cucumber/treetop_parser/feature_zh-CN.rb
188
+ lib/cucumber/version.rb
189
+ rails_generators/cucumber/USAGE
190
+ rails_generators/cucumber/cucumber_generator.rb
191
+ rails_generators/cucumber/templates/cucumber
192
+ rails_generators/cucumber/templates/cucumber.rake
193
+ rails_generators/cucumber/templates/env.rb
194
+ rails_generators/cucumber/templates/webrat_steps.rb
195
+ rails_generators/feature/USAGE
196
+ rails_generators/feature/feature_generator.rb
197
+ rails_generators/feature/templates/feature.erb
198
+ rails_generators/feature/templates/steps.erb
199
+ script/console
200
+ script/console.cmd
201
+ script/destroy
202
+ script/destroy.cmd
203
+ script/generate
204
+ script/generate.cmd
205
+ script/txt2html
206
+ script/txt2html.cmd
207
+ setup.rb
208
+ spec/cucumber/broadcaster_spec.rb
209
+ spec/cucumber/cli_spec.rb
210
+ spec/cucumber/core_ext/proc_spec.rb
211
+ spec/cucumber/core_ext/string_spec.rb
212
+ spec/cucumber/executor_spec.rb
213
+ spec/cucumber/formatters/ansicolor_spec.rb
214
+ spec/cucumber/formatters/autotest_formatter_spec.rb
215
+ spec/cucumber/formatters/features.html
216
+ spec/cucumber/formatters/html_formatter_spec.rb
217
+ spec/cucumber/formatters/pretty_formatter_spec.rb
218
+ spec/cucumber/formatters/profile_formatter_spec.rb
219
+ spec/cucumber/formatters/progress_formatter_spec.rb
220
+ spec/cucumber/model/table_spec.rb
221
+ spec/cucumber/rails/stubs/mini_rails.rb
222
+ spec/cucumber/rails/stubs/test_help.rb
223
+ spec/cucumber/rails/world_spec.rb
224
+ spec/cucumber/sell_cucumbers.feature
225
+ spec/cucumber/step_mother_spec.rb
226
+ spec/cucumber/tree/feature_spec.rb
227
+ spec/cucumber/tree/row_scenario_spec.rb
228
+ spec/cucumber/tree/scenario_spec.rb
229
+ spec/cucumber/tree/step_spec.rb
230
+ spec/cucumber/treetop_parser/empty_feature.feature
231
+ spec/cucumber/treetop_parser/empty_scenario.feature
232
+ spec/cucumber/treetop_parser/feature_parser_spec.rb
233
+ spec/cucumber/treetop_parser/fit_scenario.feature
234
+ spec/cucumber/treetop_parser/given_scenario.feature
235
+ spec/cucumber/treetop_parser/multiline_steps.feature
236
+ spec/cucumber/treetop_parser/multiple_tables.feature
237
+ spec/cucumber/treetop_parser/spaces.feature
238
+ spec/cucumber/treetop_parser/test_dos.feature
239
+ spec/cucumber/treetop_parser/with_comments.feature
240
+ spec/spec.opts
241
+ spec/spec_helper.rb
data/README.txt ADDED
@@ -0,0 +1,41 @@
1
+ = Cucumber
2
+
3
+ * http://github.com/aslakhellesoy/cucumber
4
+
5
+ == DESCRIPTION:
6
+
7
+ Cucumber executes plain text documentation of code against that code.
8
+ Documentation: http://github.com/aslakhellesoy/cucumber/wikis/home
9
+
10
+ == REQUIREMENTS:
11
+
12
+ * FIX (list of requirements)
13
+
14
+ == INSTALL:
15
+
16
+ * gem install cucumber
17
+
18
+ == LICENSE:
19
+
20
+ (The MIT License)
21
+
22
+ Copyright (c) 2008 Aslak Hellesøy
23
+
24
+ Permission is hereby granted, free of charge, to any person obtaining
25
+ a copy of this software and associated documentation files (the
26
+ 'Software'), to deal in the Software without restriction, including
27
+ without limitation the rights to use, copy, modify, merge, publish,
28
+ distribute, sublicense, and/or sell copies of the Software, and to
29
+ permit persons to whom the Software is furnished to do so, subject to
30
+ the following conditions:
31
+
32
+ The above copyright notice and this permission notice shall be
33
+ included in all copies or substantial portions of the Software.
34
+
35
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
36
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
37
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
38
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
39
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
40
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
41
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ ENV['NODOT'] = 'true' # We don't want class diagrams in RDoc
2
+ require 'config/requirements'
3
+ require 'config/hoe' # setup Hoe + all gem configuration
4
+
5
+ Dir['gem_tasks/**/*.rake'].each { |rake| load rake }
6
+
7
+ # Hoe gives us :default => :test, but we don't have Test::Unit tests.
8
+ Rake::Task[:default].clear_prerequisites
data/TODO.txt ADDED
@@ -0,0 +1,26 @@
1
+ == FEATURES/PROBLEMS:
2
+
3
+ * TODO: OK Refactor: Extract explicit node classes with RDoc (for better API doc)
4
+ * TODO: OK Get rid of the compile method. Compile the parser in Rake.
5
+ * TODO: OK Make grammar support \r\n, \r and \n (Add some fixture features for that)
6
+ * TODO: OK Make grammar support indentation
7
+ * TODO: OK Make grammar be totally relaxed about narrative
8
+ * TODO: OK Add a yaml file for different languages
9
+ * TODO: OK Custom nodes for the syntax tree
10
+ * TODO: OK Actually execute the features
11
+ * TODO: Make rake run specs by default
12
+ * TODO: OK Make it work with pure ruby regexen
13
+ * TODO: OK Make it work with string steps
14
+ * TODO: bin/cucumber --require [dir|file|glob]* --language no --format [file]*
15
+ * TODO: OK Pending steps shold print a block of code that can be pasted into code
16
+ * TODO: cucumber --where "Some text from a step" that prints "__FILE__:__LINE__ (STEP PATTERN)"
17
+ * TODO: Customisable trace output (like javascriptlint)
18
+ * TODO: Experiment: Make $variables become @variables
19
+ * TODO: OK GivenScenario
20
+ * TODO: OK PureRuby
21
+ * Make two trees include accept mixin
22
+ * TODO: Call steps from steps
23
+ * TODO: i18n in ruby too
24
+ * TODO: Don't load any treetop files if no .feature files are found
25
+ * TODO: Summary prints execution time
26
+ * TODO: --nocolor option
data/bin/cucumber ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # Add '.rb' to work around a bug in IronRuby's File#dirname
3
+ $:.unshift(File.dirname(__FILE__ + '.rb') + '/../lib') unless $:.include?(File.dirname(__FILE__ + '.rb') + '/../lib')
4
+
5
+ require 'cucumber/cli'
6
+ Cucumber::CLI.execute
data/config/hoe.rb ADDED
@@ -0,0 +1,69 @@
1
+ require 'cucumber/version'
2
+
3
+ AUTHOR = 'Aslak Hellesøy' # can also be an array of Authors
4
+ EMAIL = "aslak.hellesoy@gmail.com"
5
+ DESCRIPTION = "Executable Feature scenarios"
6
+ GEM_NAME = 'cucumber' # what ppl will type to install your gem
7
+ HOMEPATH = "http://github.com/aslakhellesoy/cucumber"
8
+ RUBYFORGE_PROJECT = 'rspec'
9
+
10
+ @config_file = "~/.rubyforge/user-config.yml"
11
+ @config = nil
12
+ RUBYFORGE_USERNAME = "aslak_hellesoy"
13
+ def rubyforge_username
14
+ unless @config
15
+ begin
16
+ @config = YAML.load(File.read(File.expand_path(@config_file)))
17
+ rescue
18
+ puts <<-EOS
19
+ ERROR: No rubyforge config file found: #{@config_file}
20
+ Run 'rubyforge setup' to prepare your env for access to Rubyforge
21
+ - See http://newgem.rubyforge.org/rubyforge.html for more details
22
+ EOS
23
+ exit
24
+ end
25
+ end
26
+ RUBYFORGE_USERNAME.replace @config["username"]
27
+ end
28
+
29
+
30
+ REV = nil
31
+ # UNCOMMENT IF REQUIRED:
32
+ # REV = YAML.load(`svn info`)['Revision']
33
+ VERS = Cucumber::VERSION::STRING + (REV ? ".#{REV}" : "")
34
+ RDOC_OPTS = ['--quiet', '--title', 'Cucumber documentation',
35
+ "--opname", "index.html",
36
+ "--line-numbers",
37
+ "--main", "README.textile",
38
+ "--inline-source"]
39
+
40
+ class Hoe
41
+ def extra_deps
42
+ @extra_deps.reject! { |x| Array(x).first == 'hoe' }
43
+ @extra_deps
44
+ end
45
+ end
46
+
47
+ # Generate all the Rake tasks
48
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
49
+ $hoe = Hoe.new(GEM_NAME, VERS) do |p|
50
+ p.developer(AUTHOR, EMAIL)
51
+ p.description = DESCRIPTION
52
+ p.summary = DESCRIPTION
53
+ p.url = HOMEPATH
54
+ p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
55
+ p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store', '**/*.class', '**/*.jar'] #An array of file patterns to delete on clean.
56
+
57
+ # == Optional
58
+ p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
59
+ #p.extra_deps = [] # An array of rubygem dependencies [name, version], e.g. [ ['active_support', '>= 1.3.1'] ]
60
+ p.extra_deps = [ ['term-ansicolor', '>= 1.0.3'], ['treetop', '>= 1.2.4'], ['diff-lcs', '>= 1.1.2'] ]
61
+
62
+ #p.spec_extras = {} # A hash of extra values to set in the gemspec.
63
+
64
+ end
65
+
66
+ CHANGES = $hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
67
+ PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
68
+ $hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
69
+ $hoe.rsync_args = '-av --delete --ignore-errors'