Sha256: 4f876fed7adde97aa5c2704be974d8cceae70ffc022e55e966d5c5477f9aac22
Contents?: true
Size: 1.11 KB
Versions: 4
Compression:
Stored size: 1.11 KB
Contents
#!/usr/bin/env ruby require 'pathname' require 'socket' fqdn = Socket.gethostbyname(Socket.gethostname).first @root = Pathname.new(File.dirname(__FILE__)).parent.expand_path action = ARGV[0] case action when "start" require 'rubygems' require 'rack' puts ' _ ___' puts '| | / (_)________ _____ ____' puts '| | / / / ___/ __ `/ __ `/ _ \\' puts '| |/ / (__ ) /_/ / /_/ / __/' puts '|___/_/____/\__,_/\__, /\___/' puts ' /____/' puts puts "will be running at http://#{fqdn}:9292/" puts config = @root.join('lib/visage/config.ru').to_s server = Rack::Server.new(:config => config, :Port => 9292) server.start when "genapache" require 'socket' fqdn = Socket.gethostbyname(Socket.gethostname).first public_dir = @root.join('lib/visage/public') puts <<-CONFIG <VirtualHost *> ServerName #{fqdn} ServerAdmin root@#{fqdn} DocumentRoot #{public_dir} <Directory "#{public_dir}"> Options FollowSymLinks Indexes AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> CONFIG else puts "Usage: visage <start|genapache>" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
visage-app-0.2.4 | bin/visage |
visage-app-0.2.3 | bin/visage |
visage-app-0.2.2 | bin/visage |
visage-app-0.2.1 | bin/visage |