aruba 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db176cee47e40abfb28af95106c134aabf16cb8a1b85aa339dcc31d49745a37a
4
- data.tar.gz: 790ac5c8937b48a939950d6d2803a80cc0e1c54d4407c78d8cf82ddb0b839e45
3
+ metadata.gz: 26d3e68b36ad2938d35b9f147b8b776b3eb1e25b2e2a271f5346b8b423888964
4
+ data.tar.gz: 4a70c60f9ccb254e8c5edb7b9c91cc51274f11912c2c1554df61ed8d96cb3b5f
5
5
  SHA512:
6
- metadata.gz: '08b9f4362310465c9354905da9667222fc4b8db7ef1ad0e5e7404ba3b985d95d1713eecf1dd4724853613dadf2c8b5c0524ee54bc2418d037034262f925d7edb'
7
- data.tar.gz: f65e533940bf35620d222cdb9c23b7667f786459f24b7cf0e2df97938a062ba5d3f8d31250fd0d46595159079718df3ef708170e585c33d86c75f7c0ca3e8699
6
+ metadata.gz: 10d08cceb237bb14cd0c0559163326c3340eba5a7db7275d876f6836ec11323b37e734dff617f727c783b653cbdbf47c333952177b0cea4b2117ea4d8ba4d2a7
7
+ data.tar.gz: 9c71d0e7409899b56b36d53c2a4581ea7143093bacd6dd8fbacac60c211512e7bd4118ef69f7f4e8bca651010609079f05c90f746cdb9f2fdcba41ae9e684430
@@ -6,6 +6,21 @@ This project adheres to [Semantic Versioning][1].
6
6
 
7
7
  This document is formatted according to the principles of [Keep A CHANGELOG][2].
8
8
 
9
+ ## [1.0.4] / 2021-01-04
10
+
11
+ * Update rubocop and fix new offenses (various pull requests)
12
+ * Turn off Cucumber publish warning in CI ([#737] by [olleolleolle])
13
+ * Move CI from Travis CI to GitHub Actions ([#738] by [mvz])
14
+ * Remove superfluous :each from before hooks in RSpec-related cucumber
15
+ scenarios ([#748] by [mvz])
16
+ * Make disabling Bundler more robust ([#750] by [mvz])
17
+ * Officially support Ruby 3.0 ([#763] by [mvz])
18
+ * Clean up hook methods in configuration ([#751] by [mvz])
19
+ * Speed up RSpec suite ([#767] by [mvz])
20
+ * Speed up Cucumber suite ([#766] and [#771] by [mvz])
21
+ * Remove obsolete `String#strip_heredoc` monkey-patch ([#769] by [mvz])
22
+ * Simplify configuration option specification ([#772] by [mvz])
23
+
9
24
  ## [1.0.3]
10
25
 
11
26
  * Loosen Cucumber dependency to allow Cucumber 5.0 ([#727] by [mvz])
@@ -2,7 +2,6 @@ require 'rspec/expectations'
2
2
  require 'shellwords'
3
3
 
4
4
  require 'aruba/version'
5
- require 'aruba/extensions/string/strip'
6
5
 
7
6
  require 'aruba/platform'
8
7
  require 'aruba/api/core'
@@ -7,8 +7,23 @@ module Aruba
7
7
 
8
8
  # Unset variables used by bundler
9
9
  def unset_bundler_env_vars
10
- %w(RUBYOPT BUNDLE_PATH BUNDLE_BIN_PATH BUNDLE_GEMFILE).each do |key|
11
- delete_environment_variable(key)
10
+ empty_env = with_environment { with_unbundled_env { ENV.to_h } }
11
+ aruba_env = aruba.environment.to_h
12
+ (aruba_env.keys - empty_env.keys).each do |key|
13
+ delete_environment_variable key
14
+ end
15
+ empty_env.each do |k, v|
16
+ set_environment_variable k, v
17
+ end
18
+ end
19
+
20
+ private
21
+
22
+ def with_unbundled_env(&block)
23
+ if ::Bundler.respond_to?(:with_unbundled_env)
24
+ ::Bundler.with_unbundled_env(&block)
25
+ else
26
+ ::Bundler.with_clean_env(&block)
12
27
  end
13
28
  end
14
29
  end
@@ -64,7 +64,7 @@ module Aruba
64
64
  # If block is given use it to filter the commands which should be
65
65
  # stoppend.
66
66
  def stop_all_commands(&block)
67
- cmds = if block_given?
67
+ cmds = if block
68
68
  all_commands.select(&block)
69
69
  else
70
70
  all_commands
@@ -81,7 +81,7 @@ module Aruba
81
81
  # If block is given use it to filter the commands which should be
82
82
  # terminated.
83
83
  def terminate_all_commands(&block)
84
- cmds = if block_given?
84
+ cmds = if block
85
85
  all_commands.select(&block)
86
86
  else
87
87
  all_commands
@@ -256,7 +256,7 @@ module Aruba
256
256
  end
257
257
 
258
258
  def start_command(command)
259
- aruba.config.before(:command, self, command)
259
+ aruba.config.run_before_hook(:command, self, command)
260
260
 
261
261
  in_current_directory do
262
262
  command.start
@@ -265,7 +265,7 @@ module Aruba
265
265
  stop_signal = command.stop_signal
266
266
  aruba.announcer.announce(:stop_signal, command.pid, stop_signal) if stop_signal
267
267
 
268
- aruba.config.after(:command, self, command)
268
+ aruba.config.run_after_hook(:command, self, command)
269
269
  end
270
270
  end
271
271
  end
@@ -57,7 +57,7 @@ module Aruba
57
57
  # result = cd('some-dir') { Dir.getwd }
58
58
  #
59
59
  def cd(dir, &block)
60
- if block_given?
60
+ if block
61
61
  begin
62
62
  unless Aruba.platform.directory?(expand_path(dir))
63
63
  raise ArgumentError,
@@ -1,7 +1,6 @@
1
1
  require 'pathname'
2
2
 
3
3
  require 'aruba/platform'
4
- require 'aruba/extensions/string/strip'
5
4
 
6
5
  Aruba.platform.require_matching_files('../matchers/file/*.rb', __FILE__)
7
6
  Aruba.platform.require_matching_files('../matchers/directory/*.rb', __FILE__)
@@ -57,9 +57,8 @@ module Aruba
57
57
  # Get path
58
58
  def to_pathname
59
59
  current_path = @obj.inject do |path, element|
60
- if element.start_with? '~'
61
- element
62
- elsif Aruba.platform.absolute_path? element
60
+ if element.start_with?('~') ||
61
+ Aruba.platform.absolute_path?(element)
63
62
  element
64
63
  else
65
64
  File.join(path, element)
@@ -20,27 +20,18 @@ module Aruba
20
20
  # @param [Symbol] name
21
21
  # The name of the reader
22
22
  #
23
- # @param [Hash] opts
24
- # Options
25
- #
26
- # @option [Class, Module] contract
27
- # The contract for the option
23
+ # @option [Class, Module] type
24
+ # The type contract for the option
28
25
  #
29
26
  # @option [Object] default
30
27
  # The default value
31
- def option_reader(name, opts = {})
32
- contract = opts[:contract]
33
- default = opts[:default]
34
-
28
+ def option_reader(name, type:, default: nil)
35
29
  raise ArgumentError, 'Either use block or default value' if block_given? && default
36
- raise ArgumentError, 'contract-options is required' if contract.nil?
37
30
 
38
- Contract contract
39
31
  add_option(name, block_given? ? yield(InConfigWrapper.new(known_options)) : default)
40
32
 
33
+ Contract None => type
41
34
  define_method(name) { find_option(name).value }
42
-
43
- self
44
35
  end
45
36
 
46
37
  # Define an option reader and writer
@@ -48,30 +39,23 @@ module Aruba
48
39
  # @param [Symbol] name
49
40
  # The name of the reader
50
41
  #
51
- # @param [Hash] opts
52
- # Options
53
- #
54
- # @option [Class, Module] contract
55
- # The contract for the option
42
+ # @option [Class, Module] type
43
+ # The type contract for the option
56
44
  #
57
45
  # @option [Object] default
58
46
  # The default value
59
47
  #
60
- def option_accessor(name, opts = {})
61
- contract = opts[:contract]
62
- default = opts[:default]
63
-
48
+ def option_accessor(name, type:, default: nil)
64
49
  raise ArgumentError, 'Either use block or default value' if block_given? && default
65
- raise ArgumentError, 'contract-options is required' if contract.nil?
66
50
 
67
51
  # Add writer
68
52
  add_option(name, block_given? ? yield(InConfigWrapper.new(known_options)) : default)
69
53
 
70
- Contract contract
54
+ Contract type => type
71
55
  define_method("#{name}=") { |v| find_option(name).value = v }
72
56
 
73
57
  # Add reader
74
- option_reader name, contract: { None => contract.values.first }
58
+ option_reader name, type: type
75
59
  end
76
60
 
77
61
  private
@@ -90,8 +74,6 @@ module Aruba
90
74
  attr_accessor :local_options
91
75
  attr_writer :hooks
92
76
 
93
- # attr_reader :hooks
94
-
95
77
  public
96
78
 
97
79
  # Create configuration
@@ -120,68 +102,68 @@ module Aruba
120
102
  obj
121
103
  end
122
104
 
123
- # Define or run before-hook
105
+ # Define before-hook
124
106
  #
125
107
  # @param [Symbol, String] name
126
108
  # The name of the hook
127
109
  #
128
- # @param [Proc] context
129
- # The context a hook should run in. This is a runtime only option.
130
- #
131
- # @param [Array] args
132
- # Arguments for the run of hook. This is a runtime only option.
133
- #
134
110
  # @yield
135
111
  # The code block which should be run. This is a configure time only option
136
- def before(name, context = proc {}, *args, &block)
112
+ def before(name, &block)
137
113
  name = format('%s_%s', 'before_', name.to_s).to_sym
114
+ raise ArgumentError, 'A block is required' unless block
138
115
 
139
- if block_given?
140
- @hooks.append(name, block)
116
+ @hooks.append(name, block)
141
117
 
142
- self
143
- else
144
- @hooks.execute(name, context, *args)
145
- end
118
+ self
146
119
  end
147
120
 
148
- # Define or run after-hook
121
+ # Run before-hook
149
122
  #
150
123
  # @param [Symbol, String] name
151
124
  # The name of the hook
152
125
  #
153
126
  # @param [Proc] context
154
- # The context a hook should run in. This is a runtime only option.
127
+ # The context a hook should run in
155
128
  #
156
129
  # @param [Array] args
157
- # Arguments for the run of hook. This is a runtime only option.
130
+ # Arguments for the run of hook
131
+ def run_before_hook(name, context, *args)
132
+ name = format('%s_%s', 'before_', name.to_s).to_sym
133
+
134
+ @hooks.execute(name, context, *args)
135
+ end
136
+
137
+ # Define after-hook
138
+ #
139
+ # @param [Symbol, String] name
140
+ # The name of the hook
158
141
  #
159
142
  # @yield
160
143
  # The code block which should be run. This is a configure time only option
161
- def after(name, context = proc {}, *args, &block)
144
+ def after(name, &block)
162
145
  name = format('%s_%s', 'after_', name.to_s).to_sym
146
+ raise ArgumentError, 'A block is required' unless block
163
147
 
164
- if block_given?
165
- @hooks.append(name, block)
166
-
167
- self
168
- else
169
- @hooks.execute(name, context, *args)
170
- end
171
- end
172
-
173
- # Check if before-hook <name> is defined
174
- def before?(name)
175
- name = format('%s_%s', 'before_', name.to_s).to_sym
148
+ @hooks.append(name, block)
176
149
 
177
- @hooks.exist? name
150
+ self
178
151
  end
179
152
 
180
- # Check if after-hook <name> is defined
181
- def after?(name)
153
+ # Run after-hook
154
+ #
155
+ # @param [Symbol, String] name
156
+ # The name of the hook
157
+ #
158
+ # @param [Proc] context
159
+ # The context a hook should run in
160
+ #
161
+ # @param [Array] args
162
+ # Arguments for the run of hook
163
+ def run_after_hook(name, context, *args)
182
164
  name = format('%s_%s', 'after_', name.to_s).to_sym
183
165
 
184
- @hooks.exist? name
166
+ @hooks.execute(name, context, *args)
185
167
  end
186
168
 
187
169
  # Check if <name> is option
@@ -17,69 +17,59 @@ module Aruba
17
17
  #
18
18
  # This defines the configuration options of aruba
19
19
  class Configuration < BasicConfiguration
20
- option_reader :root_directory, contract: { None => String }, default: Dir.getwd
20
+ option_reader :root_directory, type: String, default: Dir.getwd
21
21
 
22
22
  option_accessor :working_directory,
23
- contract: { Aruba::Contracts::RelativePath =>
24
- Aruba::Contracts::RelativePath },
23
+ type: Aruba::Contracts::RelativePath,
25
24
  default: 'tmp/aruba'
26
25
 
27
- option_reader :fixtures_path_prefix, contract: { None => String }, default: '%'
26
+ option_reader :fixtures_path_prefix, type: String, default: '%'
28
27
 
29
- option_accessor :exit_timeout, contract: { Num => Num }, default: 15
30
- option_accessor :stop_signal, contract: { Maybe[String] => Maybe[String] }, default: nil
31
- option_accessor :io_wait_timeout, contract: { Num => Num }, default: 0.1
32
- option_accessor :startup_wait_time, contract: { Num => Num }, default: 0
28
+ option_accessor :exit_timeout, type: Num, default: 15
29
+ option_accessor :stop_signal, type: Maybe[String], default: nil
30
+ option_accessor :io_wait_timeout, type: Num, default: 0.1
31
+ option_accessor :startup_wait_time, type: Num, default: 0
33
32
  option_accessor :fixtures_directories,
34
- contract: { Array => ArrayOf[String] },
33
+ type: ArrayOf[String],
35
34
  default: %w(features/fixtures spec/fixtures test/fixtures fixtures)
36
35
 
37
- option_accessor :command_runtime_environment, contract: { Hash => Hash }, default: {}
36
+ option_accessor :command_runtime_environment, type: Hash, default: {}
38
37
  option_accessor :command_search_paths,
39
- contract: { ArrayOf[String] => ArrayOf[String] } do |config|
38
+ type: ArrayOf[String] do |config|
40
39
  [File.join(config.root_directory.value, 'bin'),
41
40
  File.join(config.root_directory.value, 'exe')]
42
41
  end
43
- option_accessor :remove_ansi_escape_sequences, contract: { Bool => Bool }, default: true
42
+ option_accessor :remove_ansi_escape_sequences, type: Bool, default: true
44
43
  option_accessor :command_launcher,
45
- contract: {
46
- Aruba::Contracts::Enum[:in_process, :spawn, :debug] =>
47
- Aruba::Contracts::Enum[:in_process, :spawn, :debug]
48
- },
44
+ type: Aruba::Contracts::Enum[:in_process, :spawn, :debug],
49
45
  default: :spawn
50
- option_accessor :main_class, contract: { Class => Maybe[Class] }, default: nil
46
+ option_accessor :main_class, type: Maybe[Class], default: nil
51
47
 
52
48
  option_accessor :home_directory,
53
- contract: {
54
- Or[Aruba::Contracts::AbsolutePath, Aruba::Contracts::RelativePath] =>
55
- Or[Aruba::Contracts::AbsolutePath, Aruba::Contracts::RelativePath]
56
- } do |config|
57
- File.join(config.root_directory.value, config.working_directory.value)
58
- end
49
+ type: Or[Aruba::Contracts::AbsolutePath,
50
+ Aruba::Contracts::RelativePath] do |config|
51
+ File.join(config.root_directory.value, config.working_directory.value)
52
+ end
59
53
 
60
54
  option_accessor :log_level,
61
- contract: {
62
- Aruba::Contracts::Enum[:fatal, :warn, :debug, :info,
63
- :error, :unknown, :silent] =>
55
+ type:
64
56
  Aruba::Contracts::Enum[:fatal, :warn, :debug, :info,
65
- :error, :unknown, :silent]
66
- },
57
+ :error, :unknown, :silent],
67
58
  default: :info
68
59
 
69
60
  # TODO: deprecate this value and replace with "filesystem allocation unit"
70
61
  # equal to 4096 by default. "filesystem allocation unit" would represent
71
62
  # the actual MINIMUM space taken in bytes by a 1-byte file
72
63
  option_accessor :physical_block_size,
73
- contract: { Aruba::Contracts::IsPowerOfTwo =>
74
- Aruba::Contracts::IsPowerOfTwo },
64
+ type: Aruba::Contracts::IsPowerOfTwo,
75
65
  default: 512
76
- option_accessor :console_history_file, contract: { String => String },
66
+ option_accessor :console_history_file, type: String,
77
67
  default: '~/.aruba_history'
78
68
 
79
69
  option_accessor :activate_announcer_on_command_failure,
80
- contract: { ArrayOf[Symbol] => ArrayOf[Symbol] },
70
+ type: ArrayOf[Symbol],
81
71
  default: []
82
- option_accessor :allow_absolute_paths, contract: { Bool => Bool }, default: false
72
+ option_accessor :allow_absolute_paths, type: Bool, default: false
83
73
  end
84
74
  end
85
75
 
@@ -112,7 +112,7 @@ module Aruba
112
112
  end
113
113
 
114
114
  def output_format(channel, string = '%s', &block)
115
- output_formats[channel.to_sym] = if block_given?
115
+ output_formats[channel.to_sym] = if block
116
116
  block
117
117
  elsif string.is_a?(Proc)
118
118
  string
@@ -47,20 +47,21 @@ module Aruba
47
47
  def logger
48
48
  l = ::Logger.new($stderr)
49
49
 
50
- case mode
51
- when :debug
52
- l.level = ::Logger::DEBUG
50
+ if mode == :debug
53
51
  format_debug(l)
54
- when :silent
55
- l.level = 9_999
56
- when :info
57
- l.level = ::Logger::INFO
58
- format_standard(l)
59
52
  else
60
- l.level = ::Logger::INFO
61
53
  format_standard(l)
62
54
  end
63
55
 
56
+ l.level = case mode
57
+ when :debug
58
+ ::Logger::DEBUG
59
+ when :silent
60
+ 9_999
61
+ else
62
+ ::Logger::INFO
63
+ end
64
+
64
65
  l
65
66
  end
66
67
 
@@ -7,9 +7,7 @@ module Aruba
7
7
  # @private
8
8
  class DetermineDiskUsage
9
9
  def call(paths)
10
- size = paths.flatten.map do |path|
11
- minimum_disk_space_used path
12
- end.inject(0, &:+)
10
+ size = paths.flatten.sum { |path| minimum_disk_space_used path }
13
11
 
14
12
  FileSize.new(size)
15
13
  end
@@ -1,28 +1,34 @@
1
- require 'forwardable'
2
-
3
1
  module Aruba
4
2
  module Platforms
5
3
  # File System Status object
6
4
  #
7
5
  # This is a wrapper for File::Stat returning only a subset of information.
8
6
  class FilesystemStatus
9
- METHODS = [
10
- :executable?,
11
- :ctime,
12
- :atime,
13
- :mtime,
14
- :size
15
- ].freeze
16
-
17
- extend Forwardable
18
-
19
7
  private
20
8
 
21
9
  attr_reader :status
22
10
 
23
11
  public
24
12
 
25
- def_delegators :@status, *METHODS
13
+ def executable?
14
+ status.executable?
15
+ end
16
+
17
+ def ctime
18
+ status.ctime
19
+ end
20
+
21
+ def atime
22
+ status.atime
23
+ end
24
+
25
+ def mtime
26
+ status.mtime
27
+ end
28
+
29
+ def size
30
+ status.size
31
+ end
26
32
 
27
33
  def initialize(path)
28
34
  @status = File::Stat.new(path)
@@ -11,7 +11,7 @@ module Aruba
11
11
  def initialize(other_env, &block)
12
12
  @other_env = other_env.to_h.transform_values(&:to_s)
13
13
 
14
- @block = (block if block_given?)
14
+ @block = block
15
15
  end
16
16
 
17
17
  def call(env)
@@ -31,7 +31,7 @@ module Aruba
31
31
  # @private
32
32
  class UnixPlatform
33
33
  def self.match?
34
- !FFI::Platform.windows?
34
+ !Cucumber::WINDOWS
35
35
  end
36
36
 
37
37
  def environment_variables
@@ -1,4 +1,4 @@
1
- require 'ffi'
1
+ require 'cucumber/platform'
2
2
 
3
3
  require 'aruba/platforms/unix_platform'
4
4
  require 'aruba/platforms/windows_command_string'
@@ -20,7 +20,7 @@ module Aruba
20
20
  # @private
21
21
  class WindowsPlatform < UnixPlatform
22
22
  def self.match?
23
- FFI::Platform.windows?
23
+ Cucumber::WINDOWS
24
24
  end
25
25
 
26
26
  # @see UnixPlatform#command_string
@@ -14,7 +14,7 @@ module Aruba
14
14
  attr_reader :exit_status, :environment, :working_directory, :main_class,
15
15
  :io_wait_timeout, :exit_timeout, :startup_wait_time, :stop_signal
16
16
 
17
- def initialize(cmd, exit_timeout, io_wait_timeout, working_directory,
17
+ def initialize(cmd, exit_timeout, io_wait_timeout, working_directory, # rubocop:disable Metrics/ParameterLists
18
18
  environment = Aruba.platform.environment_variables.hash_from_env,
19
19
  main_class = nil, stop_signal = nil, startup_wait_time = 0)
20
20
  @cmd = cmd
@@ -46,7 +46,7 @@ module Aruba
46
46
  # @private
47
47
  attr_reader :main_class
48
48
 
49
- def initialize(cmd, exit_timeout, io_wait_timeout, working_directory,
49
+ def initialize(cmd, exit_timeout, io_wait_timeout, working_directory, # rubocop:disable Metrics/ParameterLists
50
50
  environment = Aruba.platform.environment_variables.hash_from_env,
51
51
  main_class = nil, stop_signal = nil, startup_wait_time = 0)
52
52
  @cmd = cmd
@@ -48,7 +48,7 @@ module Aruba
48
48
  #
49
49
  # @param [Numeric] startup_wait_time
50
50
  # The amount of seconds to wait after Aruba has started a command.
51
- def initialize(cmd, exit_timeout, io_wait_timeout, working_directory,
51
+ def initialize(cmd, exit_timeout, io_wait_timeout, working_directory, # rubocop:disable Metrics/ParameterLists
52
52
  environment = Aruba.platform.environment_variables.hash_from_env,
53
53
  main_class = nil, stop_signal = nil, startup_wait_time = 0)
54
54
  super
@@ -1,3 +1,3 @@
1
1
  module Aruba
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '1.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aruba
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aslak Hellesøy, Matt Wynne and other Aruba Contributors
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-22 00:00:00.000000000 Z
11
+ date: 2021-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: childprocess
@@ -64,20 +64,6 @@ dependencies:
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: '6.0'
67
- - !ruby/object:Gem::Dependency
68
- name: ffi
69
- requirement: !ruby/object:Gem::Requirement
70
- requirements:
71
- - - "~>"
72
- - !ruby/object:Gem::Version
73
- version: '1.9'
74
- type: :runtime
75
- prerelease: false
76
- version_requirements: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - "~>"
79
- - !ruby/object:Gem::Version
80
- version: '1.9'
81
67
  - !ruby/object:Gem::Dependency
82
68
  name: rspec-expectations
83
69
  requirement: !ruby/object:Gem::Requirement
@@ -196,70 +182,70 @@ dependencies:
196
182
  requirements:
197
183
  - - "~>"
198
184
  - !ruby/object:Gem::Version
199
- version: '3.6'
185
+ version: 3.10.0
200
186
  type: :development
201
187
  prerelease: false
202
188
  version_requirements: !ruby/object:Gem::Requirement
203
189
  requirements:
204
190
  - - "~>"
205
191
  - !ruby/object:Gem::Version
206
- version: '3.6'
192
+ version: 3.10.0
207
193
  - !ruby/object:Gem::Dependency
208
194
  name: rubocop
209
195
  requirement: !ruby/object:Gem::Requirement
210
196
  requirements:
211
197
  - - "~>"
212
198
  - !ruby/object:Gem::Version
213
- version: 0.89.0
199
+ version: 1.6.0
214
200
  type: :development
215
201
  prerelease: false
216
202
  version_requirements: !ruby/object:Gem::Requirement
217
203
  requirements:
218
204
  - - "~>"
219
205
  - !ruby/object:Gem::Version
220
- version: 0.89.0
206
+ version: 1.6.0
221
207
  - !ruby/object:Gem::Dependency
222
208
  name: rubocop-packaging
223
209
  requirement: !ruby/object:Gem::Requirement
224
210
  requirements:
225
211
  - - "~>"
226
212
  - !ruby/object:Gem::Version
227
- version: 0.3.0
213
+ version: 0.5.0
228
214
  type: :development
229
215
  prerelease: false
230
216
  version_requirements: !ruby/object:Gem::Requirement
231
217
  requirements:
232
218
  - - "~>"
233
219
  - !ruby/object:Gem::Version
234
- version: 0.3.0
220
+ version: 0.5.0
235
221
  - !ruby/object:Gem::Dependency
236
222
  name: rubocop-performance
237
223
  requirement: !ruby/object:Gem::Requirement
238
224
  requirements:
239
225
  - - "~>"
240
226
  - !ruby/object:Gem::Version
241
- version: 1.7.1
227
+ version: 1.9.0
242
228
  type: :development
243
229
  prerelease: false
244
230
  version_requirements: !ruby/object:Gem::Requirement
245
231
  requirements:
246
232
  - - "~>"
247
233
  - !ruby/object:Gem::Version
248
- version: 1.7.1
234
+ version: 1.9.0
249
235
  - !ruby/object:Gem::Dependency
250
236
  name: rubocop-rspec
251
237
  requirement: !ruby/object:Gem::Requirement
252
238
  requirements:
253
239
  - - "~>"
254
240
  - !ruby/object:Gem::Version
255
- version: 1.43.1
241
+ version: 2.1.0
256
242
  type: :development
257
243
  prerelease: false
258
244
  version_requirements: !ruby/object:Gem::Requirement
259
245
  requirements:
260
246
  - - "~>"
261
247
  - !ruby/object:Gem::Version
262
- version: 1.43.1
248
+ version: 2.1.0
263
249
  - !ruby/object:Gem::Dependency
264
250
  name: simplecov
265
251
  requirement: !ruby/object:Gem::Requirement
@@ -269,7 +255,7 @@ dependencies:
269
255
  version: 0.18.0
270
256
  - - "<"
271
257
  - !ruby/object:Gem::Version
272
- version: 0.20.0
258
+ version: 0.21.0
273
259
  type: :development
274
260
  prerelease: false
275
261
  version_requirements: !ruby/object:Gem::Requirement
@@ -279,7 +265,7 @@ dependencies:
279
265
  version: 0.18.0
280
266
  - - "<"
281
267
  - !ruby/object:Gem::Version
282
- version: 0.20.0
268
+ version: 0.21.0
283
269
  - !ruby/object:Gem::Dependency
284
270
  name: yard-junk
285
271
  requirement: !ruby/object:Gem::Requirement
@@ -296,7 +282,7 @@ dependencies:
296
282
  version: 0.0.7
297
283
  description: |
298
284
  Extension for popular TDD and BDD frameworks like "Cucumber", "RSpec" and "Minitest",
299
- to make testing commandline applications meaningful, easy and fun.
285
+ to make testing command line applications meaningful, easy and fun.
300
286
  email: cukes@googlegroups.com
301
287
  executables:
302
288
  - aruba
@@ -345,7 +331,6 @@ files:
345
331
  - lib/aruba/event_bus.rb
346
332
  - lib/aruba/event_bus/name_resolver.rb
347
333
  - lib/aruba/events.rb
348
- - lib/aruba/extensions/string/strip.rb
349
334
  - lib/aruba/file_size.rb
350
335
  - lib/aruba/generators/script_file.rb
351
336
  - lib/aruba/hooks.rb
@@ -422,7 +407,7 @@ metadata:
422
407
  documentation_uri: https://www.rubydoc.info/gems/aruba
423
408
  homepage_uri: https://github.com/cucumber/aruba
424
409
  source_code_uri: https://github.com/cucumber/aruba
425
- post_install_message:
410
+ post_install_message:
426
411
  rdoc_options:
427
412
  - "--charset"
428
413
  - UTF-8
@@ -441,8 +426,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
441
426
  - !ruby/object:Gem::Version
442
427
  version: '0'
443
428
  requirements: []
444
- rubygems_version: 3.1.2
445
- signing_key:
429
+ rubygems_version: 3.2.3
430
+ signing_key:
446
431
  specification_version: 4
447
- summary: aruba-1.0.3
432
+ summary: aruba-1.0.4
448
433
  test_files: []
@@ -1,25 +0,0 @@
1
- # String
2
- class String
3
- # Strips indentation in heredocs.
4
- #
5
- # For example in
6
- #
7
- # if options[:usage]
8
- # puts <<-USAGE.strip_heredoc
9
- # This command does such and such.
10
- #
11
- # Supported options are:
12
- # -h This message
13
- # ...
14
- # USAGE
15
- # end
16
- #
17
- # the user would see the usage message aligned against the left margin.
18
- #
19
- # Technically, it looks for the least indented line in the whole string, and removes
20
- # that amount of leading whitespace.
21
- def strip_heredoc
22
- indent = scan(/^[ \t]*(?=\S)/).min.to_s.size
23
- gsub(/^[ \t]{#{indent}}/, '')
24
- end
25
- end