Sha256: 2eae40270d2103198c50ecbe277f7e58f85682545dc329cf90925c8a91fe6684

Contents?: true

Size: 699 Bytes

Versions: 24

Compression:

Stored size: 699 Bytes

Contents

module FaaStRuby
  module Local
    def self.start!(sync: false, deploy_env: 'stage', debug: false)
      Thread.new do
        env = {
          'SYNC' => sync,
          'DEPLOY_ENVIRONMENT' => deploy_env
        }
        cmd = []
        cmd << "SYNC=true" if sync
        cmd << "DEBUG=true" if debug
        cmd << "DEPLOY_ENVIRONMENT=#{deploy_env}"
        cmd << "faastruby watch"
        5.times do
          system(cmd.join(" "))
          sleep 1
        end
        puts "FaaStRuby Local exited due to an error."
        puts "If you think this shouldn't have happened, open an issue here: https://github.com/FaaStRuby/faastruby-cli/issues/new"
        exit 1
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
faastruby-0.5.30 lib/faastruby/server/local.rb
faastruby-0.5.29 lib/faastruby/server/local.rb
faastruby-0.5.28 lib/faastruby/server/local.rb
faastruby-0.5.27 lib/faastruby/server/local.rb
faastruby-0.5.26 lib/faastruby/server/local.rb
faastruby-0.5.25 lib/faastruby/server/local.rb
faastruby-0.5.24 lib/faastruby/server/local.rb
faastruby-0.5.23 lib/faastruby/server/local.rb
faastruby-0.5.22 lib/faastruby/server/local.rb
faastruby-0.5.21 lib/faastruby/server/local.rb
faastruby-0.5.20 lib/faastruby/server/local.rb
faastruby-0.5.19 lib/faastruby/server/local.rb
faastruby-0.5.18 lib/faastruby/server/local.rb
faastruby-0.5.17 lib/faastruby/server/local.rb
faastruby-0.5.16 lib/faastruby/server/local.rb
faastruby-0.5.15 lib/faastruby/server/local.rb
faastruby-0.5.14 lib/faastruby/server/local.rb
faastruby-0.5.13 lib/faastruby/server/local.rb
faastruby-0.5.12 lib/faastruby/server/local.rb
faastruby-0.5.11 lib/faastruby/server/local.rb