macros4cuke 0.5.16 → 0.5.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +18 -13
  3. data/CHANGELOG.md +6 -0
  4. data/Gemfile +3 -1
  5. data/README.md +1 -1
  6. data/Rakefile +2 -0
  7. data/appveyor.yml +12 -9
  8. data/bin/macros4cuke +3 -1
  9. data/examples/demo/features/step_definitions/step_defs.rb +2 -0
  10. data/examples/demo/features/support/env.rb +2 -0
  11. data/examples/demo/features/support/use_macros4cuke.rb +2 -0
  12. data/examples/i18n/fr/features/step_definitions/demo_steps.rb +2 -0
  13. data/examples/i18n/fr/features/step_definitions/macro_steps_fr.rb +2 -0
  14. data/examples/i18n/fr/features/support/use_macros4cuke.rb +2 -0
  15. data/examples/i18n/nl/features/step_definitions/demo_steps.rb +2 -0
  16. data/examples/i18n/nl/features/step_definitions/macro_steps_nl.rb +2 -0
  17. data/examples/i18n/nl/features/support/use_macros4cuke.rb +2 -0
  18. data/lib/macro_steps.rb +2 -0
  19. data/lib/macros4cuke.rb +2 -0
  20. data/lib/macros4cuke/application.rb +4 -2
  21. data/lib/macros4cuke/cli/cmd-line.rb +10 -8
  22. data/lib/macros4cuke/coll-walker-factory.rb +2 -0
  23. data/lib/macros4cuke/constants.rb +4 -2
  24. data/lib/macros4cuke/cucumber.rb +2 -0
  25. data/lib/macros4cuke/exceptions.rb +8 -6
  26. data/lib/macros4cuke/formatter/all-notifications.rb +2 -0
  27. data/lib/macros4cuke/formatter/to-gherkin.rb +2 -0
  28. data/lib/macros4cuke/formatter/to-null.rb +2 -0
  29. data/lib/macros4cuke/formatter/to-trace.rb +2 -0
  30. data/lib/macros4cuke/formatting-service.rb +2 -0
  31. data/lib/macros4cuke/macro-collection.rb +2 -0
  32. data/lib/macros4cuke/macro-step-support.rb +3 -1
  33. data/lib/macros4cuke/macro-step.rb +3 -1
  34. data/lib/macros4cuke/templating/comment.rb +2 -0
  35. data/lib/macros4cuke/templating/engine.rb +6 -4
  36. data/lib/macros4cuke/templating/eo-line.rb +2 -0
  37. data/lib/macros4cuke/templating/placeholder.rb +2 -0
  38. data/lib/macros4cuke/templating/section.rb +3 -1
  39. data/lib/macros4cuke/templating/static-text.rb +2 -0
  40. data/lib/macros4cuke/templating/template-element.rb +2 -0
  41. data/lib/macros4cuke/templating/unary-element.rb +2 -0
  42. data/spec/macros4cuke/application_spec.rb +4 -2
  43. data/spec/macros4cuke/cli/cmd-line_spec.rb +4 -2
  44. data/spec/macros4cuke/coll-walker-factory_spec.rb +2 -0
  45. data/spec/macros4cuke/formatter/to-gherkin_spec.rb +2 -0
  46. data/spec/macros4cuke/formatter/to-null_spec.rb +2 -0
  47. data/spec/macros4cuke/formatter/to-trace_spec.rb +2 -0
  48. data/spec/macros4cuke/formatting-service_spec.rb +2 -0
  49. data/spec/macros4cuke/macro-collection_spec.rb +2 -0
  50. data/spec/macros4cuke/macro-step-support_spec.rb +2 -0
  51. data/spec/macros4cuke/macro-step_spec.rb +2 -0
  52. data/spec/macros4cuke/templating/comment_spec.rb +2 -0
  53. data/spec/macros4cuke/templating/engine_spec.rb +2 -0
  54. data/spec/macros4cuke/templating/eo-line_spec.rb +2 -0
  55. data/spec/macros4cuke/templating/placeholder_spec.rb +2 -0
  56. data/spec/macros4cuke/templating/section_spec.rb +2 -0
  57. data/spec/macros4cuke/templating/static_text_spec.rb +2 -0
  58. data/spec/macros4cuke/use-sample-collection.rb +4 -2
  59. data/spec/spec_helper.rb +2 -0
  60. metadata +6 -8
  61. data/.ruby-version +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7fa6f77c0a5b399e4370a1c32cce2f010d8c6e51
4
- data.tar.gz: ca6cec55d6b05408130568b2e2622ef72346ee5e
2
+ SHA256:
3
+ metadata.gz: 59cdbf1005ed8a0f8525a8afb447fbd249950f974715172e7e0014ec9b03e4f7
4
+ data.tar.gz: 3c69c6d111833499a4a72e641c3c457ebfc8f1083dd0967193339581048e863e
5
5
  SHA512:
6
- metadata.gz: 7c267ffa13b3a2962631fceb384d84a73b563560a4814e489a375a65b0610a123ccfcc6cba8f6616180e29f2710ec7fd3e5e872f42e5f7d8cc194f783294da8a
7
- data.tar.gz: c5cb85a360829982b46ad8b98658e18203d79eac8c405b3c7ded5b9deaa8ad55d35042d466394554c05cb5770376c61a41f30dd7eb34fb976d57be4858e4de2a
6
+ metadata.gz: 86c291d93a1f7ab956b7f638faedde35faf3034d4e4a73ae8458cc3a4b0dd74f1732aedd0a1dafd47b7018a9e0428e986296e543e2dbabe4f3f752b7089a0b3b
7
+ data.tar.gz: 5155b56a1244877e7b3e25dc7ddadfc31760ebbbc15176a3a26017920283742cdd1f93cc8fe913a65a3b04ea95936f07f721d65b24eb1b836fb65633045e7aae
@@ -1,24 +1,29 @@
1
1
  language: ruby
2
+ dist: trusty
3
+
4
+ before_install:
5
+ - gem update --system
6
+ - gem install bundler
7
+
8
+ script:
9
+ - bundle exec rake
10
+
2
11
  rvm:
3
- - 2.6.0
4
- - 2.5.3
5
- - 2.4.5
12
+ - 2.6.3
13
+ - 2.5.5
14
+ - 2.4.6
6
15
  - 2.3.8
7
- - 2.2.10
8
- - 2.1.10
9
- - 2.0.0-p648
10
- - ruby-head
11
- - jruby-9.1.9.0
12
- - jruby-head
16
+ - ruby-head
17
+ - jruby-9.1.9.0
18
+ - jruby-head
19
+
13
20
  matrix:
14
21
  allow_failures:
15
22
  - rvm: ruby-head
16
23
  - rvm: jruby-head
17
24
 
18
- gemfile:
19
- - Gemfile
20
-
25
+
21
26
  # whitelist
22
- branches:
27
+ branches:
23
28
  only:
24
29
  - master
@@ -1,3 +1,9 @@
1
+ ### 0.5.17 / 2019-08-18
2
+ - Code refactoring to use string frozen magic comments (as a consequence, macros4cuke runs only on Rubies 2.3 or newer).
3
+ - Code restyling to please rubocop 0.7.40.
4
+ * [CHANGE] File `.travis.yml`: updated Ruby versions.
5
+ * [CHANGE] File `appveyor.yml` updated Ruby versions.
6
+
1
7
  ### 0.5.16 / 2019-01-4
2
8
  - Maintenance release.
3
9
 
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gem 'cucumber', '~> 3.0'
@@ -6,4 +8,4 @@ group :development do
6
8
  gem 'rake', '>= 10.0.0'
7
9
  gem 'rspec', '~> 3.0'
8
10
  gem 'simplecov', '>= 0.8.0'
9
- end
11
+ end
data/README.md CHANGED
@@ -558,4 +558,4 @@ Macros with Cucumber is a hot topic, so it is good to know what other people say
558
558
 
559
559
  Copyright
560
560
  ---------
561
- Copyright (c) 2014-2017, Dimitri Geshef. Macros4Cuke is released under the MIT License see [LICENSE.txt](https://github.com/famished-tiger/Macros4Cuke/blob/master/LICENSE.txt) for details.
561
+ Copyright (c) 2014-2019, Dimitri Geshef. Macros4Cuke is released under the MIT License see [LICENSE.txt](https://github.com/famished-tiger/Macros4Cuke/blob/master/LICENSE.txt) for details.
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems'
2
4
  require_relative './lib/macros4cuke/constants'
3
5
 
@@ -1,25 +1,28 @@
1
1
  version: '{build}'
2
- max_jobs: 3
2
+ max_jobs: 5
3
3
  environment:
4
4
  matrix:
5
+ - Ruby_version: 26-x64
5
6
  - Ruby_version: 25-x64
6
7
  - Ruby_version: 24-x64
7
8
  - Ruby_version: 23-x64
8
- - Ruby_version: 22-x64
9
- - Ruby_version: 21-x64
10
- - Ruby_version: 200-x64
9
+ - Ruby_version: 26
11
10
  - Ruby_version: 25
12
11
  - Ruby_version: 24
13
12
  - Ruby_version: 23
14
- - Ruby_version: 22
15
- - Ruby_version: 21
16
- - Ruby_version: 200
17
13
 
18
14
  install:
19
- SET PATH=C:\Ruby%Ruby_version%\bin;%PATH%
20
- bundle install --retry=3 --clean --force
15
+ - set PATH=C:\Ruby%Ruby_version%\bin;%PATH%
16
+ - gem update --system
17
+ - gem install bundler
18
+ - bundle install --retry=3 --clean --force
21
19
 
22
20
  build: off
23
21
 
22
+ before_test:
23
+ - ruby -v
24
+ - gem -v
25
+ - bundle -v
26
+
24
27
  test_script:
25
28
  - bundle exec rake
@@ -1,11 +1,13 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  # File: macros4cuke
3
5
  # The 'executable' of the Macros4Cuke library.
4
6
  mydir = File.dirname(__FILE__)
5
7
  lib_dir = mydir + '/../lib'
6
8
  $LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include?(lib_dir)
7
9
 
8
- require 'macros4cuke' # Load the Cukedep::Application class
10
+ require 'macros4cuke' # Load the Cukedep::Application class
9
11
 
10
12
  # The application's entry point
11
13
  app = Macros4Cuke::Application.new
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: demo_steps.rb
2
4
  # A few step definitions for demo and testing purpose.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: env.rb
2
4
 
3
5
  module DemoMacros4Cuke # Use the module as a namespace
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: use_macros4cuke.rb
2
4
  # Purpose: Add the support for macros in Cucumber.
3
5
  # This file is meant to be put next to the 'env.rb' file
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Quelques définitions de pas de scénarios Cucumber.
2
4
 
3
5
  require 'stringio'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # "Traduction" en Français des macro-pas de Macros4Cuke
2
4
  # Des définitions de pas faisant directement appel à l'API de Macros4Cuke
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: use_macros4cuke.rb
2
4
  # Purpose: Add the support for macros in Cucumber.
3
5
  # This file is meant to be put next to the 'env.rb' file
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Een paar stappen definities.
2
4
 
3
5
  require 'stringio'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # "Vertaling" in het Nederlands van macrostappen van Macros4Cuke
2
4
  # Dit zijn stappen definities dat rechstreeks het API van Macros4Cuke gebruiken
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: use_macros4cuke.rb
2
4
  # Purpose: Add the support for macros in Cucumber.
3
5
  # This file is meant to be put next to the 'env.rb' file
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: macro_steps.rb
2
4
  # Purpose: step definitions that help to build macro-steps
3
5
  # (i.e. a Cucumber step that is equivalent to a sequence of sub-steps)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: macros4cuke.rb
2
4
  # This file acts as a jumping-off point for loading dependencies expected
3
5
  # for a Macros4Cuke user.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: application.rb
2
4
 
3
5
  require 'erb'
@@ -60,8 +62,8 @@ class Application
60
62
  # Write file contents to file in binary mode in order to avoid eol
61
63
  # consisting of CRLF
62
64
  File.open(destination, 'wb') { |theFile| theFile.write(file_text) }
63
- rescue Macros4Cuke::CmdLineError => exc
64
- $stderr.puts exc.message
65
+ rescue Macros4Cuke::CmdLineError => e
66
+ $stderr.puts e.message
65
67
  exit
66
68
  end
67
69
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: cli.rb
2
4
 
3
5
  # Access the OptionParser library from the standard Ruby library
@@ -23,7 +25,7 @@ class CmdLine
23
25
  For help about the command-line syntax, do:
24
26
  macros4cuke --help
25
27
  END_MSG
26
- .freeze
28
+
27
29
  # A Hash with the result of the command-line parse.
28
30
  attr_reader(:options)
29
31
 
@@ -74,15 +76,15 @@ EOS
74
76
  def parse!(theCmdLineArgs)
75
77
  begin
76
78
  parser.parse!(theCmdLineArgs.dup)
77
- rescue Macros4Cuke::CmdLineError => exc
78
- $stderr.puts exc.message
79
+ rescue Macros4Cuke::CmdLineError => e
80
+ $stderr.puts e.message
79
81
  exit
80
- rescue OptionParser::InvalidOption => exc
81
- $stderr.puts exc.message
82
+ rescue OptionParser::InvalidOption => e
83
+ $stderr.puts e.message
82
84
  exit
83
- rescue OptionParser::MissingArgument => exc
84
- err_msg = ''
85
- exc.args.each do |arg|
85
+ rescue OptionParser::MissingArgument => e
86
+ err_msg = +''
87
+ e.args.each do |arg|
86
88
  err_msg << "No argument provided with command line option: #{arg}\n"
87
89
  end
88
90
  $stderr.puts err_msg
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: coll-walker-factory.rb
2
4
  # Purpose: Implementation of the CollWalkerFactory class.
3
5
 
@@ -1,12 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: constants.rb
2
4
  # Purpose: definition of Macros4Cuke constants.
3
5
 
4
6
  module Macros4Cuke # Module used as a namespace
5
7
  # The version number of the gem.
6
- Version = '0.5.16'.freeze
8
+ Version = '0.5.17'
7
9
 
8
10
  # Brief description of the gem.
9
- Description = 'Add your own macro-steps to Cucumber scenarios'.freeze
11
+ Description = 'Add your own macro-steps to Cucumber scenarios'
10
12
 
11
13
  # Constant Macros4Cuke::RootDir contains the absolute path of Macro4Cuke's
12
14
  # root directory. Note: it also ends with a slash character.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: cucumber.rb
2
4
  # Purpose: Load Macros4Cuke modules and classes, register its step definitions
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: exceptions.rb
2
4
 
3
5
  module Macros4Cuke # Module used as a namespace
@@ -121,9 +123,9 @@ end # class
121
123
  # is nil or empty.
122
124
  class NoFormattingEventForFormatter < Macros4CukeError
123
125
  def initialize(aFormatter)
124
- msg = "Formatter #{aFormatter.class}"
125
- msg << ' does not support any formatting event.'
126
- super(msg)
126
+ msg1 = "Formatter #{aFormatter.class}"
127
+ msg2 = 'does not support any formatting event.'
128
+ super(msg1 + ' ' + msg2)
127
129
  end
128
130
  end # class
129
131
 
@@ -131,9 +133,9 @@ end # class
131
133
  # Raised when a macro-step formatter uses an unknown formatting event.
132
134
  class UnknownFormattingEvent < Macros4CukeError
133
135
  def initialize(aFormatter, anEvent)
134
- msg = "Formatter #{aFormatter.class}"
135
- msg << " uses the unknown formatting event '#{anEvent}'."
136
- super(msg)
136
+ msg1 = "Formatter #{aFormatter.class}"
137
+ msg2 = "uses the unknown formatting event '#{anEvent}'."
138
+ super(msg1 + ' ' + msg2)
137
139
  end
138
140
  end # class
139
141
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: all_notifications.rb
2
4
 
3
5
  module Macros4Cuke # Module used as a namespace
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: to-gherkin.rb
2
4
 
3
5
  require_relative '../constants'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: to-null.rb
2
4
 
3
5
  require_relative 'all-notifications'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: to-trace.rb
2
4
 
3
5
  require_relative 'all-notifications'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: formatting-service.rb
2
4
  # Purpose: Implementation of the FormattingService class.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: macro-collection.rb
2
4
  # Purpose: Implementation of the MacroCollection class.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: macro-step-support.rb
2
4
 
3
5
  require_relative 'exceptions'
@@ -40,7 +42,7 @@ module MacroStepSupport
40
42
  rendered_steps = collection.render_steps(aPhraseInstance, rawData)
41
43
 
42
44
  # Keep track of the sub-steps to execute
43
- @substeps_trace = '' if @substeps_trace.nil?
45
+ @substeps_trace = +'' if @substeps_trace.nil?
44
46
  @substeps_trace << rendered_steps
45
47
 
46
48
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: macro-step.rb
2
4
  # Purpose: Implementation of the MacroStep class.
3
5
 
@@ -135,7 +137,7 @@ class MacroStep
135
137
  macro_parameters[phrase_args[index]] = val
136
138
  end
137
139
 
138
- unless rawData.nil?
140
+ if rawData
139
141
  rawData.each do |a_row|
140
142
  (a_key, value) = validate_row(a_row, macro_parameters)
141
143
  if macro_parameters.include? a_key
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: eo-line.rb
2
4
 
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: engine.rb
2
4
  # Purpose: Implementation of the Engine class.
3
5
 
@@ -67,7 +69,7 @@ class Engine
67
69
  return '' if @representation.empty?
68
70
 
69
71
  prev = nil
70
- result = @representation.each_with_object('') do |element, subResult|
72
+ result = @representation.each_with_object(+'') do |element, subResult|
71
73
  # Output compaction rules:
72
74
  # -In case of consecutive eol's only one is rendered.
73
75
  # -In case of comment followed by one eol, both aren't rendered
@@ -146,9 +148,9 @@ class Engine
146
148
  when '<' then unbalance += 1
147
149
  when '>' then unbalance -= 1
148
150
  end
149
-
150
- raise(StandardError, "Nested opening chevron '<'.") if unbalance > 1
151
- raise(StandardError, "Missing opening chevron '<'.") if unbalance < 0
151
+ suffix = "opening chevron '<'."
152
+ raise(StandardError, 'Nested ' + suffix) if unbalance > 1
153
+ raise(StandardError, 'Missing ' + suffix) if unbalance.negative?
152
154
  end
153
155
 
154
156
  raise(StandardError, "Missing closing chevron '>'.") if unbalance == 1
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Macros4Cuke # Module used as a namespace
2
4
  # Module containing all classes implementing the simple template engine
3
5
  # used internally in Macros4Cuke.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: placeholder.rb
2
4
  # Purpose: Implementation of the Placeholder class.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: section.rb
2
4
  # Purpose: Implementation of the Section and ConditionalSection classes.
3
5
 
@@ -76,7 +78,7 @@ class ConditionalSection < Section
76
78
  actual_value = retrieve_value_from(aContextObject, theLocals)
77
79
  if (!actual_value.nil? && existence) || (actual_value.nil? && !existence)
78
80
  # Let render the children
79
- result = children.each_with_object('') do |a_child, sub_result|
81
+ result = children.each_with_object(+'') do |a_child, sub_result|
80
82
  sub_result << a_child.render(aContextObject, theLocals)
81
83
  end
82
84
  else
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: static-text.rb
2
4
 
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: template-element.rb
2
4
  require_relative 'static-text'
3
5
  require_relative 'comment'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: unary-element.rb
2
4
  # Purpose: Implementation of the Section and ConditionalSection classes.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: macro-collection_spec.rb
2
4
 
3
5
  require_relative '../spec_helper'
@@ -20,7 +22,7 @@ describe Application do
20
22
 
21
23
  def hijack_stdout()
22
24
  @orig_stdout = $stdout
23
- $stdout = StringIO.new('', 'w')
25
+ $stdout = StringIO.new(+'', 'w')
24
26
  end
25
27
 
26
28
  def restore_stdout()
@@ -29,7 +31,7 @@ describe Application do
29
31
 
30
32
  def hijack_stderr()
31
33
  @orig_stderr = $stderr
32
- $stderr = StringIO.new('', 'w')
34
+ $stderr = StringIO.new(+'', 'w')
33
35
  end
34
36
 
35
37
  def restore_stderr()
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: cmd-line_spec.rb
2
4
 
3
5
  require 'stringio'
@@ -22,7 +24,7 @@ describe CmdLine do
22
24
 
23
25
  def hijack_stdout()
24
26
  @orig_stdout = $stdout
25
- $stdout = StringIO.new('', 'w')
27
+ $stdout = StringIO.new(+'', 'w')
26
28
  end
27
29
 
28
30
  def restore_stdout()
@@ -31,7 +33,7 @@ describe CmdLine do
31
33
 
32
34
  def hijack_stderr()
33
35
  @orig_stderr = $stderr
34
- $stderr = StringIO.new('', 'w')
36
+ $stderr = StringIO.new(+'', 'w')
35
37
  end
36
38
 
37
39
  def restore_stderr()
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: collection-walker_spec.rb
2
4
 
3
5
  require_relative '../spec_helper'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: to-gherkin_spec.rb
2
4
 
3
5
  require 'stringio'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: to-null_spec.rb
2
4
 
3
5
  require_relative '../../spec_helper'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: to-trace_spec.rb
2
4
  require 'stringio'
3
5
  require_relative '../../spec_helper'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: collection-walker_spec.rb
2
4
 
3
5
  require_relative '../spec_helper'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: macro-collection_spec.rb
2
4
 
3
5
  require_relative '../spec_helper'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: macro-step_spec.rb
2
4
  require_relative '../spec_helper'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: macro-step_spec.rb
2
4
 
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: comment_spec.rb
2
4
  require_relative '../../spec_helper'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: engine_spec.rb
2
4
  require_relative '../../spec_helper'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: eo-line_spec.rb
2
4
  require_relative '../../spec_helper'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: placeholder_spec.rb
2
4
  require_relative '../../spec_helper'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: section_spec.rb
2
4
  require_relative '../../spec_helper'
3
5
  require_relative '../../../lib/macros4cuke/templating/template-element'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: placeholder_spec.rb
2
4
  require_relative '../../spec_helper'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: use-sample-collection.rb
2
4
  # Purpose: mix-in module with helper methods to build a sample
3
5
  # collection of macro-steps.
@@ -10,7 +12,7 @@ module Macros4Cuke # Open this namespace to avoid module qualifier prefixes
10
12
  # a sample collection of macro-steps.
11
13
  module UseSampleCollection
12
14
  # Phrase of first macro-step in the collection.
13
- SamplePhrase1 = 'enter my credentials as <userid>'.freeze
15
+ SamplePhrase1 = 'enter my credentials as <userid>'
14
16
 
15
17
  # Sub-steps of the first macro-step in the collection.
16
18
  SampleSubsteps1 = begin
@@ -26,7 +28,7 @@ SNIPPET
26
28
  end
27
29
 
28
30
  # Phrase of second macro-step in the collection.
29
- SamplePhrase2 = 'fill in the form with'.freeze
31
+ SamplePhrase2 = 'fill in the form with'
30
32
 
31
33
  # Sub-steps of the second macro-step in the collection.
32
34
  SampleSubsteps2 = begin
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # File: spec_helper.rb
2
4
  # Purpose: utility file that is loaded by all our RSpec files
3
5
 
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: macros4cuke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.16
4
+ version: 0.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitri Geshef
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-04 00:00:00.000000000 Z
11
+ date: 2019-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
@@ -77,7 +77,6 @@ files:
77
77
  - ".rspec"
78
78
  - ".rubocop.yml"
79
79
  - ".ruby-gemset"
80
- - ".ruby-version"
81
80
  - ".simplecov"
82
81
  - ".travis.yml"
83
82
  - ".yardopts"
@@ -182,15 +181,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
181
  requirements:
183
182
  - - ">="
184
183
  - !ruby/object:Gem::Version
185
- version: 2.0.0
184
+ version: 2.3.0
186
185
  required_rubygems_version: !ruby/object:Gem::Requirement
187
186
  requirements:
188
187
  - - ">="
189
188
  - !ruby/object:Gem::Version
190
189
  version: '0'
191
190
  requirements: []
192
- rubyforge_project:
193
- rubygems_version: 2.6.13
191
+ rubygems_version: 3.0.3
194
192
  signing_key:
195
193
  specification_version: 4
196
194
  summary: Add your own macro-steps to Cucumber scenarios
@@ -1 +0,0 @@
1
- 2.2.0