Class: Dependabot::Bundler::NativeHelpers::BundleCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/bundler/native_helpers.rb

Constant Summary collapse

MAX_SECONDS =
1800
MIN_SECONDS =
60

Instance Method Summary collapse

Constructor Details

#initialize(timeout_seconds) ⇒ BundleCommand

Returns a new instance of BundleCommand.



13
14
15
# File 'lib/dependabot/bundler/native_helpers.rb', line 13

def initialize(timeout_seconds)
  @timeout_seconds = clamp(timeout_seconds)
end

Instance Method Details

#build(script) ⇒ Object



17
18
19
# File 'lib/dependabot/bundler/native_helpers.rb', line 17

def build(script)
  [timeout_command, :ruby, script].compact.join(" ")
end