don't use OpenStruct (#7)

it's getting removed from Ruby
This commit is contained in:
Cody Cutrer 2024-06-11 10:10:19 -06:00 committed by GitHub
parent d7fa5536da
commit 34c2f3c2d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 23 additions and 2 deletions

View File

@ -6,9 +6,30 @@ module RSpecQ
# queue. The RSpecQ::Parser will mutate args, removing any rspecq
# args so that RSpec::Core::Parser only sees the args intended
# for rspec.
class Configuration < OpenStruct
Configuration = Struct.new(
:build,
:exclude_pattern,
:fail_fast,
:files_or_dirs_to_run,
:file_split_threshold,
:include_pattern,
:junit_output,
:max_requeues,
:queue_wait_timeout,
:redis_host,
:redis_url,
:redis_opts,
:report,
:report_timeout,
:reproduction,
:rspec_args,
:seed,
:timings,
:worker,
keyword_init: true
) do
def initialize(args)
super RSpecQ::Parser.parse!(args)
super(**RSpecQ::Parser.parse!(args))
self.files_or_dirs_to_run = RSpec::Core::Parser.new(args).parse[:files_or_directories_to_run]
l = files_or_dirs_to_run.length