Sha256: 38239c79e602e7d6e970cf0227b1d7fc65332c6efd931e1f799232ca12bfb0b2
Contents?: true
Size: 434 Bytes
Versions: 2
Compression:
Stored size: 434 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'sinatra' SRC_PATH = ARGV[0] || "." class Roccofy < Sinatra::Application get '*' do path = "#{SRC_PATH}#{params[:splat]}" if File.exist?(path) and path =~ /\.rb$/ cmd = "rocco #{path}" puts cmd system cmd p = path.sub(/\.rb$/,'.html') x=File.read(p) File.unlink(p) x else "incorrect path." end end end Roccofy.run!
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
roccofy-0.0.2 | bin/roccofy |
roccofy-0.0.1 | bin/roccofy |