Sha256: fa406bffef7d4440f0011d265f1c855cb85aa6ec5db26cc62e28245d007e361f

Contents?: true

Size: 452 Bytes

Versions: 5

Compression:

Stored size: 452 Bytes

Contents

require_relative "../base"

module Suspenders
  module Production
    class TimeoutGenerator < Generators::Base
      def add_gem
        gem "rack-timeout", group: :production
        Bundler.with_clean_env { run "bundle install" }
      end

      def configure_rack_timeout
        append_file ".env", rack_timeout_config
      end

      private

      def rack_timeout_config
        %{RACK_TIMEOUT_SERVICE_TIMEOUT=10}
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
suspenders-1.54.0 lib/suspenders/generators/production/timeout_generator.rb
welaika-suspenders-3.0 lib/suspenders/generators/production/timeout_generator.rb
welaika-suspenders-2.36 lib/suspenders/generators/production/timeout_generator.rb
welaika-suspenders-2.35 lib/suspenders/generators/production/timeout_generator.rb
welaika-suspenders-2.34 lib/suspenders/generators/production/timeout_generator.rb