Sha256: 678f7bc6f1918b0174dc893b5028a069449ca7b04ad56798e14510b226c91ea4

Contents?: true

Size: 1.37 KB

Versions: 24

Compression:

Stored size: 1.37 KB

Contents

# coding: utf-8
# frozen_string_literal: true

require 'rack/handler/puma'
require 'stealth/commands/command'

module Stealth
  module Commands
    class Server < Command
      def initialize(port:)
        @port = port
        $stdout.sync = true
      end

      def start
        # Rack::Handler::Puma.run(Stealth::Server)
        puts ascii_art
        exec "foreman start -f Procfile.dev -p #{@port}"
      end

      private

        def ascii_art
          <<~ART
                                    --
                                  -yooy-
                                -yo`  `oy-
                              -yo`      `oy-
                            -hh`          `hh-
                          -yo`/y:        :y/`oy-
                        -yo`    /y:    :y/    `oy-
                      -yo`        /y::y/        `oy-
                    -yd+           /dd/           +dy-
                  -yo` :y/       :y/  /y:       /y/ `oy-
                -yo`     :y/   :y/      /y:   /y/     `oy-
              -yo`         :yoy/          /yoy:         `oy-
              -yo`         :yoy/          /yoy:         `oy-
                -yo`     :y/   :y/      /y:   /y:     `oy-
                  -yo` :y/       :y/  /y:       /y: `oy-
                    -yh/           :yy:           /hy-


                            Stealth v#{Stealth::VERSION}

          ART
        end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
stealth-2.0.0.beta7 lib/stealth/commands/server.rb
stealth-2.0.0.beta6 lib/stealth/commands/server.rb
stealth-2.0.0.beta5 lib/stealth/commands/server.rb
stealth-2.0.0.beta4 lib/stealth/commands/server.rb
stealth-2.0.0.beta3 lib/stealth/commands/server.rb
stealth-2.0.0.beta2 lib/stealth/commands/server.rb
stealth-2.0.0.beta1 lib/stealth/commands/server.rb
stealth-1.1.6 lib/stealth/commands/server.rb
stealth-1.1.5 lib/stealth/commands/server.rb
stealth-1.1.4 lib/stealth/commands/server.rb
stealth-1.1.3 lib/stealth/commands/server.rb
stealth-1.1.2 lib/stealth/commands/server.rb
stealth-1.1.1 lib/stealth/commands/server.rb
stealth-1.1.0 lib/stealth/commands/server.rb
stealth-1.1.0.rc3 lib/stealth/commands/server.rb
stealth-1.1.0.rc2 lib/stealth/commands/server.rb
stealth-1.1.0.rc1 lib/stealth/commands/server.rb
stealth-1.0.4 lib/stealth/commands/server.rb
stealth-1.0.3 lib/stealth/commands/server.rb
stealth-1.0.2 lib/stealth/commands/server.rb