Sha256: 058e2c6642ad89ad6427dd8df43e89079ed2121411b6bf808d2bf4f9c54fe1ac

Contents?: true

Size: 397 Bytes

Versions: 32

Compression:

Stored size: 397 Bytes

Contents

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

    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}".colorize(:red)
        exit 1
      end
    end

    eval(code) # inline script
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
jets-1.1.5 lib/jets/commands/runner.rb
jets-1.1.4 lib/jets/commands/runner.rb
jets-1.1.3 lib/jets/commands/runner.rb
jets-1.1.2 lib/jets/commands/runner.rb
jets-1.1.1 lib/jets/commands/runner.rb
jets-1.1.0 lib/jets/commands/runner.rb
jets-1.0.18 lib/jets/commands/runner.rb
jets-1.0.17 lib/jets/commands/runner.rb
jets-1.0.16 lib/jets/commands/runner.rb
jets-1.0.15 lib/jets/commands/runner.rb
jets-1.0.13 lib/jets/commands/runner.rb
jets-1.0.12 lib/jets/commands/runner.rb
jets-1.0.11 lib/jets/commands/runner.rb
jets-1.0.10 lib/jets/commands/runner.rb
jets-1.0.9 lib/jets/commands/runner.rb
jets-1.0.8 lib/jets/commands/runner.rb
jets-1.0.7 lib/jets/commands/runner.rb
jets-1.0.6 lib/jets/commands/runner.rb
jets-1.0.5 lib/jets/commands/runner.rb
jets-1.0.4 lib/jets/commands/runner.rb