Sha256: 3dcecfcc61f0d96de9f376338de5f1dbbd141780e0fb5aedc2ace6785430c39d

Contents?: true

Size: 1.04 KB

Versions: 11

Compression:

Stored size: 1.04 KB

Contents

#!/usr/bin/env ruby

require 'rubygems' unless defined?(Gem) # Useful only on --dev mode
require 'bundler'

# Are we in the root of a Spontaneous site?
# If so then we want to use the bundled version of Spontaneous and its
# dependencies
if File.exist?("config/schema.yml")
  begin
    Bundler.setup(:default)
  rescue Bundler::GemfileNotFound
    # We're operating outside of a site dir, probably generating a site
    # so load the Spontaneous gem Gemfile
    ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
    retry
  rescue Bundler::GemNotFound => e
    STDERR.puts e.message
    STDERR.puts "Try running `bundle install`."
    exit!
  end
else
  # If spot is being run outside of a site, then we want to use the global
  # gem files
  spot_path = File.expand_path('../../lib', __FILE__)
  if File.directory?(spot_path) && !$:.include?(spot_path)
    $:.unshift(spot_path)
  end
end

require 'spontaneous'

begin
  Spontaneous::Cli::Root.start(ARGV)
rescue Interrupt => e
  puts "\nAbort..."
  exit 1
rescue SystemExit => e
  exit e.status
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta10 bin/spot
spontaneous-0.2.0.beta9 bin/spot
spontaneous-0.2.0.beta8 bin/spot
spontaneous-0.2.0.beta7 bin/spot
spontaneous-0.2.0.beta6 bin/spot
spontaneous-0.2.0.beta5 bin/spot
spontaneous-0.2.0.beta4 bin/spot
spontaneous-0.2.0.beta3 bin/spot
spontaneous-0.2.0.beta2 bin/spot
spontaneous-0.2.0.beta1 bin/spot
spontaneous-0.2.0.alpha7 bin/spot