<commit_before>module Platter
  class AppBuilder < Rails::AppBuilder
    PORT = 3000

    def readme
      template "README.md.erb", "README.md"
    end

    def replace_gemfile
      remove_file "Gemfile"
      template "Gemfile.erb", "Gemfile"
    end

    def add_api_support
      inject_into_file "Gemfile", after: "ruby \"#{Platter::RUBY_VERSION}\"" do
        %Q{

gem "versionist"
gem "active_model_serializers", github: "rails-api/active_model_serializers", branch: "0-8-stable"
        }
      end
    end

    def setup_git
      remove_file '.gitignore'
      copy_file "platter_gitignore", ".gitignore"
      run "git init"
    end

    def setup_server
      template "Procfile", "Procfile"
    end

    # Development builds
    #
    def provide_development_setup_bin
      template "bin_development_setup.rb", "bin/setup", port: PORT, force: true
      run "chmod a+x bin/setup"
    end

    def setup_development_mail_delivery_strategy
      inject_into_file "config/environments/development.rb",
        %Q{

  # We use mailcatcher to preview emails
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
        },
          after: "config.action_mailer.raise_delivery_errors = false"
    end

  end
end
<commit_msg>Adds more action mailer configuration for development<commit_after>module Platter
  class AppBuilder < Rails::AppBuilder
    PORT = 3000

    def readme
      template "README.md.erb", "README.md"
    end

    def replace_gemfile
      remove_file "Gemfile"
      template "Gemfile.erb", "Gemfile"
    end

    def add_api_support
      inject_into_file "Gemfile", after: "ruby \"#{Platter::RUBY_VERSION}\"" do
        %Q{

gem "versionist"
gem "active_model_serializers", github: "rails-api/active_model_serializers", branch: "0-8-stable"
        }
      end
    end

    def setup_git
      remove_file '.gitignore'
      copy_file "platter_gitignore", ".gitignore"
      run "git init"
    end

    def setup_server
      template "Procfile", "Procfile"
    end

    # Development builds
    #
    def provide_development_setup_bin
      template "bin_development_setup.rb", "bin/setup", port: PORT, force: true
      run "chmod a+x bin/setup"
    end

    def setup_development_mail_delivery_strategy
      inject_into_file "config/environments/development.rb",
        %Q{

  # We use mailcatcher to preview emails
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
  config.action_mailer.default_url_options = { host: "localhost:#{PORT}" }
  config.action_mailer.asset_host = "http://localhost:#{PORT}"
        },
          after: "config.action_mailer.raise_delivery_errors = false"
    end

  end
end

{'fraction_non_alphanumeric': 0.09799713876967096, 'fraction_numerical': 0.00715307582260372, 'mean_word_length': 2.9957142857142856, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1849036', 'n_tokens_mistral': 951, 'n_tokens_neox': 898, 'n_words': 205}