<commit_before>class NginxUnicornVhostGenerator < Rails::Generators::Base
  def create_instance server_name, domain
    create_file "config/nginx_unicorn_instance",
                "
                upstream #{server_name}_server {
                server unix:/var/www/#{server_name}/shared/unicorn.sock fail_timeout=0;
                }

                server {
                  listen 80 default deferred;

                  client_max_body_size 1G;
                  server_name #{domain};
                  keepalive_timeout 5;
                  root /var/www/#{server_name}/current/public;
                      try_files $uri/index.html $uri.html $uri @myapp;

                  location @myapp {
                      proxy_pass http://#{server_name}_server;
                  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                  proxy_set_header Host $http_host;
                  proxy_redirect off;
                }

                error_page 500 502 503 504 /500.html;
                location = /500.html {
                  root /var/www/#{server_name}/current/public;
                }
                }
                "
  end
end<commit_msg>fix any problem<commit_after>class NginxUnicornVhostGenerator < Rails::Generators::NamedBase
  argument :domain, :type => :string, :required => true, :desc => "site's domain"
  def create_instance
    create_file "config/#{name}.vhost",
                "upstream #{name}_server {
server unix:/var/www/#{name}/shared/unicorn.sock fail_timeout=0;
}

server {
  listen 80 default deferred;

  client_max_body_size 1G;
  server_name #{domain};
  keepalive_timeout 5;
  root /var/www/#{name}/current/public;
      try_files $uri/index.html $uri.html $uri @myapp;

  location @myapp {
      proxy_pass http://#{name}_server;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Host $http_host;
  proxy_redirect off;
}

error_page 500 502 503 504 /500.html;
location = /500.html {
  root /var/www/#{name}/current/public;
}
}
"
  end
end
{'fraction_non_alphanumeric': 0.09970674486803519, 'fraction_numerical': 0.022482893450635387, 'mean_word_length': 2.0236336779911372, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '2004782', 'n_tokens_mistral': 674, 'n_tokens_neox': 594, 'n_words': 120}