<commit_before>module RPCapistrano
  module Rvm
    def self.load_into(configuration)
      configuration.load do
        set :rvm_type, :system
        _cset :rvm_ruby_string, :local
        require 'rvm/capistrano'

        before 'deploy:update_code', 'rp:rvm:info'
        after 'deploy:setup', 'rp:rvm:create_rake_wrapper'

        namespace :rp do
          namespace :rvm do
            desc "Prints out the current rvm environment"
            task :info, :roles => :app, :only => { :primary => true } do
              puts " ** RVM INFO ======================================================"
              run "rvm info" do |ch, stream, data|
                puts data
              end
              puts " ** =============================================================="
              puts "\n"
            end

            desc "Create rake wrapper"
            task :create_rake_wrapper do
              ruby_version = /[0-9]\.[0-9]\.[0-9]/.match(rvm_ruby_string).to_s.gsub('.', '')
              run "rvm wrapper #{rvm_ruby_string} #{app_name}_#{ruby_version} rake"
            end
          end
        end
      end
    end
  end
end

if Capistrano::Configuration.instance
  RPCapistrano::Rvm.load_into(Capistrano::Configuration.instance)
end
<commit_msg>Add task for trusting rvmrc file after deploy<commit_after>module RPCapistrano
  module Rvm
    def self.load_into(configuration)
      configuration.load do
        set :rvm_type, :system
        _cset :rvm_ruby_string, :local
        require 'rvm/capistrano'

        before 'deploy:update_code', 'rp:rvm:info'
        after 'deploy:setup', 'rp:rvm:create_rake_wrapper'
        after 'deploy', 'rp:rvm:trust_rvmrc'

        namespace :rp do
          namespace :rvm do
            desc "Prints out the current rvm environment"
            task :info, :roles => :app, :only => { :primary => true } do
              puts " ** RVM INFO ======================================================"
              run "rvm info" do |ch, stream, data|
                puts data
              end
              puts " ** =============================================================="
              puts "\n"
            end

            desc "Create rake wrapper"
            task :create_rake_wrapper do
              ruby_version = /[0-9]\.[0-9]\.[0-9]/.match(rvm_ruby_string).to_s.gsub('.', '')
              run "rvm wrapper #{rvm_ruby_string} #{app_name}_#{ruby_version} rake"
            end

            desc "Trust rvmrc file"
            task :trust_rvmrc do
              run "rvm rvmrc trust #{release_path}"
            end
          end
        end
      end
    end
  end
end

if Capistrano::Configuration.instance
  RPCapistrano::Rvm.load_into(Capistrano::Configuration.instance)
end

{'fraction_non_alphanumeric': 0.17770539268910604, 'fraction_numerical': 0.004343105320304018, 'mean_word_length': 2.0541436464088396, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6925851', 'n_tokens_mistral': 816, 'n_tokens_neox': 787, 'n_words': 195}