Sha256: c5ff4dce834a9e3a91fd0425689916d5acb617c1c70a08c369595bacbd4edfea

Contents?: true

Size: 867 Bytes

Versions: 4

Compression:

Stored size: 867 Bytes

Contents

module Picky

  module Generators

    module Server

      # Generates a new Picky Sinatra/Unicorn Server Example.
      #
      # Example:
      #   > picky-generate sinatra_server my_sinatra_directory
      #
      class Sinatra < Picky::Generators::Base

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

        #
        #
        def generate
          generate_for "Sinatra Server",
          [
            'shared/server',
            'shared/both'
          ],
          [
            "cd #{name}",
            "bundle install",
            "rake index",
            "unicorn -c unicorn.rb",
            "curl http://localhost:8080/books?query=turing",
            "rake todo # (optional) Shows you where Picky needs input from you."
          ]
        end

      end

    end

  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
picky-generators-4.12.5 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.12.4 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.12.3 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.12.2 lib/picky-generators/generators/server/sinatra.rb