Sha256: 3732e2f3232a3f5345a470c49d0f416902d1ed4e48023f7ac986c341427d74e9

Contents?: true

Size: 926 Bytes

Versions: 15

Compression:

Stored size: 926 Bytes

Contents

#!/usr/bin/env ruby

require 'pathname'
require 'trollop'

root = Pathname.new(__FILE__).dirname.parent
lib_path = (root + 'lib').realdirpath

$LOAD_PATH.unshift(lib_path)

require 'alephant/preview'
require 'alephant/preview/tasks'

SUB_COMMANDS = %w(preview)
global_opts = Trollop::options do
  banner <<-EOS
Static publishing to S3 based on SQS messages
Usage:
    alephant-preview         # Runs preview server
    alephant-preview update  # Attempts to update preview template
      Dependent on the following environmen variables being set:
      - STATIC_HOST_REGEX"static.(int|test|live).myhost.com"
      - PREVIEW_TEMPLATE_URL"http://myapp.com/mustache_template"
EOS
  stop_on SUB_COMMANDS
end

cmd = ARGV.shift # get the subcommand
case cmd
when nil
  Rake::Task['alephant:preview:go'].invoke
when "update"
  Rake::Task['alephant:preview:update'].invoke
else
  Trollop::die "unknown subcommand #{cmd.inspect}"
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
alephant-preview-0.3.1 bin/alephant-preview
alephant-preview-0.3.0 bin/alephant-preview
alephant-preview-0.2.0 bin/alephant-preview
alephant-preview-0.1.2 bin/alephant-preview
alephant-preview-0.1.1 bin/alephant-preview
alephant-preview-0.1.0 bin/alephant-preview
alephant-preview-0.0.7 bin/alephant-preview
alephant-preview-0.0.6 bin/alephant-preview
alephant-preview-0.0.5.4 bin/alephant-preview
alephant-preview-0.0.5.3 bin/alephant-preview
alephant-preview-0.0.5.2 bin/alephant-preview
alephant-preview-0.0.5.1 bin/alephant-preview
alephant-preview-0.0.3 bin/alephant-preview
alephant-preview-0.0.2 bin/alephant-preview
alephant-preview-0.0.1 bin/alephant-preview