Sha256: b765cf21c589db87ab5a16aeae71eab2308ee17fe6b75c46fcf255de51524e3d

Contents?: true

Size: 463 Bytes

Versions: 4

Compression:

Stored size: 463 Bytes

Contents

require_relative "../base"

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

      def configure_rack_timeout
        append_file ".sample.env", rack_timeout_config
      end

      private

      def rack_timeout_config
        %(RACK_TIMEOUT_SERVICE_TIMEOUT=10)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
suspenders-20230113.0 lib/suspenders/generators/production/timeout_generator.rb
suspenders-1.56.1 lib/suspenders/generators/production/timeout_generator.rb
suspenders-1.55.1 lib/suspenders/generators/production/timeout_generator.rb
suspenders-1.55.0 lib/suspenders/generators/production/timeout_generator.rb