<commit_before>require "conjure/docker/template"
require "erubis"
require "securerandom"

module Conjure
  class Passenger
    def initialize(container_host, options)
      @container_host = container_host
      @database = options[:database]
      @rails_env = options[:rails_env]
      @max_upload_mb = options[:max_upload_mb] || 20
      @system_packages = options[:system_packages] || []
      @ruby_version = options[:ruby_version] || "2.2"
      @rubygems_version = options[:rubygems_version]
      @use_ssl = !!options[:ssl_hostname]
      @ssl_hostname = options[:ssl_hostname] || "unknown"
      @services = options[:services] || []
      @system_packages += ["libsqlite3-dev", "libpq-dev"]
      @system_packages += ["libruby#{@ruby_version}", "ruby#{@ruby_version}"]
      @system_packages += @services.flat_map(&:system_packages)
    end

    def install
      server_template.start(@container_host, "/sbin/my_init", start_options)
    end

    def pending_files
      return [] unless @use_ssl<commit_msg>Provide a default for rails_env setting<commit_after>require "conjure/docker/template"
require "erubis"
require "securerandom"

module Conjure
  class Passenger
    def initialize(container_host, options)
      @container_host = container_host
      @database = options[:database]
      @rails_env = options[:rails_env] || "staging"
      @max_upload_mb = options[:max_upload_mb] || 20
      @system_packages = options[:system_packages] || []
      @ruby_version = options[:ruby_version] || "2.2"
      @rubygems_version = options[:rubygems_version]
      @use_ssl = !!options[:ssl_hostname]
      @ssl_hostname = options[:ssl_hostname] || "unknown"
      @services = options[:services] || []
      @system_packages += ["libsqlite3-dev", "libpq-dev"]
      @system_packages += ["libruby#{@ruby_version}", "ruby#{@ruby_version}"]
      @system_packages += @services.flat_map(&:system_packages)
    end

    def install
      server_template.start(@container_host, "/sbin/my_init", start_options)
    end

    def pending_files
      return [] unless @use_ssl
{'fraction_non_alphanumeric': 0.1310843373493976, 'fraction_numerical': 0.004819277108433735, 'mean_word_length': 4.088235294117647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3361132', 'n_tokens_mistral': 671, 'n_tokens_neox': 651, 'n_words': 117}