Sha256: 7580a5d7809ec306f27dc2ebca154ad08dec4f892efde4745ee4743604949d4b

Contents?: true

Size: 891 Bytes

Versions: 50

Compression:

Stored size: 891 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",
            "bundle exec rake index",
            "bundle exec 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

50 entries across 50 versions & 1 rubygems

Version Path
picky-generators-4.14.0 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.13.1 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.13.0 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.12.13 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.12.12 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.12.11 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.12.10 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.12.8 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.12.7 lib/picky-generators/generators/server/sinatra.rb
picky-generators-4.12.6 lib/picky-generators/generators/server/sinatra.rb