macros4cuke 0.5.17 → 0.5.18

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