Sha256: 3da7e07b7064167ba546c6bf99d8b708fa4041a33bab0a24e12f632ea55a41b2

Contents?: true

Size: 519 Bytes

Versions: 10

Compression:

Stored size: 519 Bytes

Contents

class Step
  def self.relocate(path)
    return path if Open.exists?(path)
    Path.setup(path) unless Path === path
    relocated = path.relocate
    return relocated if Open.exists?(relocated)
    subpath = path.split("/")[-3..-1] * "/"
    relocated = Path.setup("var/jobs")[subpath]
    return relocated if Open.exists?(relocated)
    path
  end

  def self.load(path)
    path = relocate(path) unless Open.exists?(path)
    #raise "Could not load #{path}" unless Open.exists?(path)
    s = Step.new path
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
scout-gear-10.7.1 lib/scout/workflow/step/load.rb
scout-gear-10.7.0 lib/scout/workflow/step/load.rb
scout-gear-10.4.0 lib/scout/workflow/step/load.rb
scout-gear-10.3.0 lib/scout/workflow/step/load.rb
scout-gear-10.2.0 lib/scout/workflow/step/load.rb
scout-gear-10.1.0 lib/scout/workflow/step/load.rb
scout-gear-10.0.1 lib/scout/workflow/step/load.rb
scout-gear-9.1.0 lib/scout/workflow/step/load.rb
scout-gear-9.0.0 lib/scout/workflow/step/load.rb
scout-gear-8.1.0 lib/scout/workflow/step/load.rb