Sha256: c483e75600010135f07eb1ce6d7d8ac271809816b5de0b85765bc5f294d1172d

Contents?: true

Size: 1.29 KB

Versions: 3

Compression:

Stored size: 1.29 KB

Contents

module Picky

  module Generators

    module AllInOne

      # Generates a new Picky Sinatra/Unicorn combined Client/Server Example.
      #
      # Example:
      #   > picky-generate all_in_one my_client_server_directory
      #
      class Sinatra < Picky::Generators::Base

        def initialize identifier, name, *args
          super identifier, name, 'all_in_one/sinatra', *args
        end

        #
        #
        def generate
          exclaim "Setting up Picky Sinatra Client/Server \"#{name}\"."
          create_target_directory
          copy_all_files
          copy_all_files expand_prototype_path('shared/server')
          copy_all_files expand_prototype_path('shared/both')
          copy_all_files expand_prototype_path('shared/client')
          exclaim "\"#{name}\" is a great project name! Have fun :)\n"
          exclaim ""
          exclaim "Next steps:"
          exclaim "1. cd #{name}"
          exclaim "2. bundle install"
          exclaim "3. rake index"
          exclaim "4. unicorn -c unicorn.rb"
          exclaim "5. open http://localhost:8080/"
          exclaim "6. rake todo      # (optional) shows you where Picky needs input from you"
          exclaim "                  #            if you want to define your own search."
        end

      end

    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
picky-generators-4.12.1 lib/picky-generators/generators/all_in_one/sinatra.rb
picky-generators-4.12.0 lib/picky-generators/generators/all_in_one/sinatra.rb
picky-generators-4.11.3 lib/picky-generators/generators/all_in_one/sinatra.rb