Sha256: 2e632bf5d3dc3d7aef64fb7f928398617a04b82304a51aa6c93b3edeacaf10c2

Contents?: true

Size: 967 Bytes

Versions: 2

Compression:

Stored size: 967 Bytes

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'

Spontaneous::Cli::Root.start(ARGV)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spontaneous-0.2.0.alpha6 bin/spot
spontaneous-0.2.0.alpha5 bin/spot