<commit_before>require 'rails/generators'

module Enjoy
  class CapifyGenerator < Rails::Generators::Base
    argument :kind, type: :string
    argument :port, type: :string
    argument :domain, type: :string

    source_root File.expand_path('../templates', __FILE__)

    def app_name
      Rails.application.class.name.split("::")[0]
    end

    def deploy_to
      if kind == 'data'
        "/data/#{app_name.downcase}/app"
      else
        "/home/#{app_name.downcase}/#{app_name.downcase}"
      end
    end
    def tmp_path
      if kind == 'data'
        "/data/#{app_name.downcase}/tmp_dump"
      else
        "/home/#{app_name.downcase}/tmp_dump"
      end
    end

    desc 'Enjoy capistrano setup generator'
    def install
      copy_file "Capfile", "Capfile"
      template "unicorn.erb", "config/unicorn/production.rb"
      template "deploy.erb", "config/deploy.rb"
      template "production.erb", "config/deploy/production.rb"
      template "dl.erb", "lib/tasks/dl.thor"
    end
  end
end
<commit_msg>mongoid 5.0 fix  for config<commit_after>require 'rails/generators'

module Enjoy
  class CapifyGenerator < Rails::Generators::Base
    argument :kind, type: :string
    argument :port, type: :string
    argument :domain, type: :string

    source_root File.expand_path('../templates', __FILE__)

    def app_name
      Rails.application.class.name.split("::")[0]
    end

    def deploy_to
      if kind == 'data'
        "/data/#{app_name.downcase}/app"
      else
        "/home/#{app_name.downcase}/www/#{app_name.downcase}"
      end
    end
    def tmp_path
      if kind == 'data'
        "/data/#{app_name.downcase}/tmp_dump"
      else
        "/home/#{app_name.downcase}/www/#{app_name.downcase}/tmp_dump"
      end
    end

    desc 'Enjoy capistrano setup generator'
    def install
      copy_file "Capfile", "Capfile"
      template "unicorn.erb", "config/unicorn/production.rb"
      template "deploy.erb", "config/deploy.rb"
      template "production.erb", "config/deploy/production.rb"
      template "dl.erb", "lib/tasks/dl.thor"
    end
  end
end
{'fraction_non_alphanumeric': 0.1320574162679426, 'fraction_numerical': 0.0019138755980861245, 'mean_word_length': 2.668421052631579, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7137017', 'n_tokens_mistral': 705, 'n_tokens_neox': 682, 'n_words': 146}