Class: Cucumber::Rake::Task::ForkedCucumberRunner
- Includes:
- Rake::DSL
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/rake/task.rb
Overview
:nodoc:
Constant Summary
Constants included from Rake::FileUtilsExt
Constants included from FileUtils
FileUtils::LN_SUPPORTED, FileUtils::RUBY
Instance Method Summary collapse
- #bundler_gem_available? ⇒ Boolean
- #cmd ⇒ Object
-
#initialize(libs, cucumber_bin, cucumber_opts, bundler, feature_files) ⇒ ForkedCucumberRunner
constructor
A new instance of ForkedCucumberRunner.
- #load_path ⇒ Object
- #quoted_binary(cucumber_bin) ⇒ Object
- #run ⇒ Object
- #use_bundler ⇒ Object
Methods included from Rake::FileUtilsExt
#nowrite, #rake_check_options, #rake_output_message, #verbose, #when_writing
Methods included from FileUtils
#ruby, #safe_ln, #sh, #split_all
Constructor Details
#initialize(libs, cucumber_bin, cucumber_opts, bundler, feature_files) ⇒ ForkedCucumberRunner
Returns a new instance of ForkedCucumberRunner.
58 59 60 61 62 63 64 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/rake/task.rb', line 58 def initialize(libs, cucumber_bin, cucumber_opts, bundler, feature_files) @libs = libs @cucumber_bin = cucumber_bin @cucumber_opts = cucumber_opts @bundler = bundler @feature_files = feature_files end |
Instance Method Details
#bundler_gem_available? ⇒ Boolean
78 79 80 81 82 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/rake/task.rb', line 78 def bundler_gem_available? Gem::Specification.find_by_name('bundler') rescue Gem::LoadError false end |
#cmd ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/rake/task.rb', line 84 def cmd if use_bundler [ Cucumber::RUBY_BINARY, '-S', 'bundle', 'exec', 'cucumber', @cucumber_opts, @feature_files ].flatten else [ Cucumber::RUBY_BINARY, '-I', load_path, quoted_binary(@cucumber_bin), @cucumber_opts, @feature_files ].flatten end end |
#load_path ⇒ Object
66 67 68 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/rake/task.rb', line 66 def load_path [format('"%<path>s"', path: @libs.join(File::PATH_SEPARATOR))] end |
#quoted_binary(cucumber_bin) ⇒ Object
70 71 72 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/rake/task.rb', line 70 def quoted_binary(cucumber_bin) [format('"%<path>s"', path: cucumber_bin)] end |