Sha256: 66a6947c268d33aabbdb9906d5feb8e226f146819bf58b91cc9ac289f5392c96

Contents?: true

Size: 1.33 KB

Versions: 5

Compression:

Stored size: 1.33 KB

Contents

#!/usr/bin/env ruby

require 'rake'

bundler_message = 'Bundler is required. Please install bundler with ' \
                  "'gem install bundler'"

begin
  require 'bundler'

rescue LoadError
  puts bundler_message

end

fail bundler_message unless defined?(Bundler)

ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
# load Gem.bin_path('bundler', 'bundle')

Bundler.setup

Rake.application.init

gem_dir = File.expand_path('..', File.dirname(__FILE__))
$LOAD_PATH.unshift(gem_dir) unless $LOAD_PATH.include?(gem_dir)

# Initialize vedeu
require 'vedeu'

# Load the rake tasks of vedeu
load "#{gem_dir}/lib/vedeu/tasks/vedeu.rake"

# Let's go!
begin
  if ARGV.empty?
    print "\n\e[33mVedeu v#{Vedeu::VERSION}\e[39m\n\n"
    print "\e[4m\e[36mUsage:\e[39m\e[24m\n\n"
    print "\e[32m  vedeu new [app_name]\e[39m\n"
    print '    Creates the skeleton file and directory structure for a new '
    print "Vedeu client application.\n\n"
    print "\e[32m  vedeu view [view_name]\e[39m\n"
    print "    Creates a new view for Vedeu.\n"
    print "\n\n"

  else
    Rake.application.invoke_task(ARGV.shift)

  end

rescue RuntimeError => exception
  puts 'Vedeu Error: Either the task you specified failed, or the task could ' \
       "not be built.\n"
  puts "Exception: #{exception.class.name}"
  puts "Message: #{exception.message}"

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vedeu-0.4.41 bin/vedeu
vedeu-0.4.40 bin/vedeu
vedeu-0.4.39 bin/vedeu
vedeu-0.4.38 bin/vedeu
vedeu-0.4.37 bin/vedeu