@@ -12,26 +12,26 @@ class Options
1212 CUCUMBER_PUBLISH_URL = ENV [ 'CUCUMBER_PUBLISH_URL' ] || 'https://messages.cucumber.io/api/reports -X GET'
1313 INDENT = ' ' * 53
1414 BUILTIN_FORMATS = {
15- 'pretty' => [ 'Cucumber::Formatter::Pretty' , 'Prints the feature as is - in colours.' ] ,
16- 'progress' => [ 'Cucumber::Formatter::Progress' , 'Prints one character per scenario.' ] ,
17- 'rerun' => [ 'Cucumber::Formatter::Rerun' , 'Prints failing files with line numbers.' ] ,
18- 'usage' => [ 'Cucumber::Formatter::Usage' , "Prints where step definitions are used.\n " \
19- "#{ INDENT } The slowest step definitions (with duration) are\n " \
20- "#{ INDENT } listed first. If --dry-run is used the duration\n " \
21- "#{ INDENT } is not shown, and step definitions are sorted by\n " \
22- "#{ INDENT } filename instead." ] ,
23- 'stepdefs' => [ 'Cucumber::Formatter::Stepdefs' , "Prints All step definitions with their locations. Same as\n " \
24- "#{ INDENT } the usage formatter, except that steps are not printed." ] ,
25- 'junit' => [ 'Cucumber::Formatter::Junit' , "Generates a report similar to Ant+JUnit. Use\n " \
26- "#{ INDENT } junit,fileattribute=true to include a file attribute." ] ,
27- 'json' => [ 'Cucumber::Formatter::Json' , "Prints the feature as JSON.\n " \
28- "#{ INDENT } The JSON format is in maintenance mode.\n " \
29- "#{ INDENT } Please consider using the message formatter\n " \
30- "#{ INDENT } with the standalone json-formatter\n " \
31- "#{ INDENT } (https://github.com/cucumber/cucumber/tree/master/json-formatter)." ] ,
32- 'message' => [ 'Cucumber::Formatter::Message' , 'Prints each message in NDJSON form, which can then be consumed by other tools.' ] ,
33- 'html' => [ 'Cucumber::Formatter::HTML' , 'Outputs HTML report' ] ,
34- 'summary' => [ 'Cucumber::Formatter::Summary' , 'Summary output of feature and scenarios' ]
15+ 'pretty' => [ 'Cucumber::Formatter::Pretty' , 'Prints the feature as is - in colours.' ] ,
16+ 'progress' => [ 'Cucumber::Formatter::Progress' , 'Prints one character per scenario.' ] ,
17+ 'rerun' => [ 'Cucumber::Formatter::Rerun' , 'Prints failing files with line numbers.' ] ,
18+ 'usage' => [ 'Cucumber::Formatter::Usage' , "Prints where step definitions are used.\n " \
19+ "#{ INDENT } The slowest step definitions (with duration) are\n " \
20+ "#{ INDENT } listed first. If --dry-run is used the duration\n " \
21+ "#{ INDENT } is not shown, and step definitions are sorted by\n " \
22+ "#{ INDENT } filename instead." ] ,
23+ 'stepdefs' => [ 'Cucumber::Formatter::Stepdefs' , "Prints All step definitions with their locations. Same as\n " \
24+ "#{ INDENT } the usage formatter, except that steps are not printed." ] ,
25+ 'junit' => [ 'Cucumber::Formatter::Junit' , "Generates a report similar to Ant+JUnit. Use\n " \
26+ "#{ INDENT } junit,fileattribute=true to include a file attribute." ] ,
27+ 'json' => [ 'Cucumber::Formatter::Json' , "Prints the feature as JSON.\n " \
28+ "#{ INDENT } The JSON format is in maintenance mode.\n " \
29+ "#{ INDENT } Please consider using the message formatter\n " \
30+ "#{ INDENT } with the standalone json-formatter\n " \
31+ "#{ INDENT } (https://github.com/cucumber/cucumber/tree/master/json-formatter)." ] ,
32+ 'message' => [ 'Cucumber::Formatter::Message' , 'Prints each message in NDJSON form, which can then be consumed by other tools.' ] ,
33+ 'html' => [ 'Cucumber::Formatter::HTML' , 'Outputs HTML report' ] ,
34+ 'summary' => [ 'Cucumber::Formatter::Summary' , 'Summary output of feature and scenarios' ]
3535 } . freeze
3636 max = BUILTIN_FORMATS . keys . map ( &:length ) . max
3737 FORMAT_HELP_MSG = [
@@ -295,9 +295,9 @@ def strict_msg
295295 ]
296296 end
297297
298- def parse_formats ( v )
299- formatter , *formatter_options = v . split ( ',' )
300- options_hash = Hash [ formatter_options . map { |s | s . split ( '=' ) } ]
298+ def parse_formats ( value )
299+ formatter , *formatter_options = value . split ( ',' )
300+ options_hash = Hash [ formatter_options . map { |string | string . split ( '=' ) } ]
301301 [ formatter , options_hash ]
302302 end
303303
@@ -375,12 +375,12 @@ def banner
375375 ] . join ( "\n " )
376376 end
377377
378- def require_files ( v )
379- @options [ :require ] << v
380- return unless Cucumber ::JRUBY && File . directory? ( v )
378+ def require_files ( filenames )
379+ @options [ :require ] << filenames
380+ return unless Cucumber ::JRUBY && File . directory? ( filenames )
381381
382382 require 'java'
383- $CLASSPATH << v
383+ $CLASSPATH << filenames
384384 end
385385
386386 def require_jars ( jars )
@@ -441,8 +441,8 @@ def initialize_project
441441 ProjectInitializer . new . run && Kernel . exit ( 0 )
442442 end
443443
444- def add_profile ( p )
445- @profiles << p
444+ def add_profile ( profile )
445+ @profiles << profile
446446 end
447447
448448 def set_option ( option , value = nil )
0 commit comments