Sha256: ce401b30d66e4d42f287a5c192c24438ff1c2713d4b1f30262af02fabca93f0b

Contents?: true

Size: 388 Bytes

Versions: 35

Compression:

Stored size: 388 Bytes

Contents

class Jets::Commands::Runner
  def self.run(code)
    Jets.boot

    if code =~ %r{^file://}
      path = code.sub('file://', '')
      full_path = "#{Jets.root}/#{path}"
      if File.exist?(full_path)
        code = IO.read(full_path)
      else
        puts "ERROR: file not found at #{full_path}".color(:red)
        exit 1
      end
    end

    eval(code) # inline script
  end
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
jets-1.9.7 lib/jets/commands/runner.rb
jets-1.9.6 lib/jets/commands/runner.rb
jets-1.9.5 lib/jets/commands/runner.rb
jets-1.9.4 lib/jets/commands/runner.rb
jets-1.9.3 lib/jets/commands/runner.rb
jets-1.9.2 lib/jets/commands/runner.rb
jets-1.9.1 lib/jets/commands/runner.rb
jets-1.9.0 lib/jets/commands/runner.rb
jets-1.8.14 lib/jets/commands/runner.rb
jets-1.8.13 lib/jets/commands/runner.rb
jets-1.8.12 lib/jets/commands/runner.rb
jets-1.8.11 lib/jets/commands/runner.rb
jets-1.8.10 lib/jets/commands/runner.rb
jets-1.8.9 lib/jets/commands/runner.rb
jets-1.8.8 lib/jets/commands/runner.rb
jets-1.8.7 lib/jets/commands/runner.rb
jets-1.8.6 lib/jets/commands/runner.rb
jets-1.8.5 lib/jets/commands/runner.rb
jets-1.8.4 lib/jets/commands/runner.rb
jets-1.8.3 lib/jets/commands/runner.rb