Sha256: 295e7f7d245312b4eabfa6b374498329d03c4ecf8118b24a47cf1881031091a1
Contents?: true
Size: 1015 Bytes
Versions: 11
Compression:
Stored size: 1015 Bytes
Contents
#!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + "/../lib/stasis") Stasis::Gems.activate %w(slop) require 'slop' slop = Slop.parse :help => true do on :d, :development, "Development mode\t\t(auto-regenerate)" on :o, :only, "Only generate specific files\t(comma-separated)", :optional => true, :as => Array on :p, :public, "Public directory path", :optional => true on :s, :server, "Server mode\t\t\t(default redis host: localhost:6379/0)", :optional => true, :default => "localhost:6379/0" end options = slop.to_hash options.delete(:server) unless slop.server? if slop.development? Stasis::DevMode.new(Dir.pwd, options) elsif slop.only? && slop.public? Stasis.new(Dir.pwd, slop[:public], options).render(*slop[:only]) elsif slop.only? Stasis.new(Dir.pwd, options).render(*slop[:only]) elsif slop.server? Stasis::Server.new(Dir.pwd, options) elsif slop.public? Stasis.new(Dir.pwd, slop[:public], options).render(*slop[:only]) else Stasis.new(Dir.pwd, options).render end
Version data entries
11 entries across 11 versions & 1 rubygems