Sha256: f03e8c5de520b35581d94f217ce806ca461b3c5d5fa0af178981532c0357da9a

Contents?: true

Size: 846 Bytes

Versions: 23

Compression:

Stored size: 846 Bytes

Contents

# frozen_string_literal: true

module PraxisGen
  class App < Thor
    include Thor::Actions

    namespace 'praxis:app'
    def self.source_root
      "#{File.dirname(__FILE__)}/templates/generator/empty_app"
    end

    argument :app_name, required: true
    desc 'new', 'Generates a blank new app under <app_name> (with a full skeleton ready to start coding)'

    # Generator for a blank new app (with a full skeleton ready to get you going)
    def new
      puts "Creating new blank Praxis app under #{app_name}"
      # Copy example files
      ['config.ru', 'Gemfile', 'Rakefile', 'README.md'].each do |file|
        copy_file file, verbose: true
      end
      # Copy example directories
      root_dirs = %w[config app design spec docs]
      root_dirs.each do |dir|
        directory dir, recursive: true
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
praxis-2.0.0 tasks/thor/app.rb
praxis-2.0.pre.40 tasks/thor/app.rb
praxis-2.0.pre.39 tasks/thor/app.rb
praxis-2.0.pre.38 tasks/thor/app.rb
praxis-2.0.pre.37 tasks/thor/app.rb
praxis-2.0.pre.36 tasks/thor/app.rb
praxis-2.0.pre.35 tasks/thor/app.rb
praxis-2.0.pre.34 tasks/thor/app.rb
praxis-2.0.pre.33 tasks/thor/app.rb
praxis-2.0.pre.32 tasks/thor/app.rb
praxis-2.0.pre.31 tasks/thor/app.rb
praxis-2.0.pre.30 tasks/thor/app.rb
praxis-2.0.pre.29 tasks/thor/app.rb
praxis-2.0.pre.28 tasks/thor/app.rb
praxis-2.0.pre.27 tasks/thor/app.rb
praxis-2.0.pre.26 tasks/thor/app.rb
praxis-2.0.pre.25 tasks/thor/app.rb
praxis-2.0.pre.24 tasks/thor/app.rb
praxis-2.0.pre.23 tasks/thor/app.rb
praxis-2.0.pre.22 tasks/thor/app.rb