Sha256: 29380dbe2f2efff98e9de69b52d520d158308b45d8881439be9ed2446d28f2e4

Contents?: true

Size: 814 Bytes

Versions: 1

Compression:

Stored size: 814 Bytes

Contents

require "thor"
require "thor/group"
require_relative "simba/version"

module Simba
  class SkeletonGenerator < Thor::Group
    include Thor::Actions

    def self.source_root
      File.dirname(__FILE__)
    end

    def self.banner
      "simba [app_name]"
    end

    desc "Description:\n\n\tsimba is a generator for Sinatra applications."

    argument :name, :desc => "The name of your sinatra app"
    class_option :skip_bundle, :default => false, :type => :boolean

    def setup_skeleton
      self.destination_root = name
      directory("simba/base_app/", self.destination_root)
    end

    def bundle_dependencies
      unless options[:skip_bundle]
        say "Bundling application dependencies using bundler."
        in_root do
          run 'bundle install'
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simba-0.0.2 lib/simba.rb