<commit_before>Capistrano::Configuration.instance(:must_exist).load do 
  namespace :deprec do
    namespace :ssh do

      desc "Sets up authorized_keys file on remote server"
      task :setup_keys do
        unless ssh_options[:keys]  
          puts <<-ERROR

          You need to define the name of your SSH key(s)
          e.g. ssh_options[:keys] = %w(/Users/someuser/.ssh/id_rsa)

          You can put this in your .caprc file in your home directory.

          ERROR
          exit
        end
    
        deprec2.mkdir '~/.ssh', :mode => '0700'
        put(ssh_options[:keys].collect{|key| File.read(key+'.pub')}.join("\n"),
          File.join('/home', user, '.ssh/authorized_keys'),
          :mode => 0600 )
      end      
    end
  end
end<commit_msg>Use relative paths rather than ~/ which doesn't always work<commit_after>Capistrano::Configuration.instance(:must_exist).load do 
  namespace :deprec do
    namespace :ssh do

      desc "Sets up authorized_keys file on remote server"
      task :setup_keys do
        unless ssh_options[:keys]  
          puts <<-ERROR

          You need to define the name of your SSH key(s)
          e.g. ssh_options[:keys] = %w(/Users/someuser/.ssh/id_rsa)

          You can put this in your .caprc file in your home directory.

          ERROR
          exit
        end
        
        deprec2.mkdir '.ssh', :mode => '0700'
        put(ssh_options[:keys].collect{|key| File.read(key+'.pub')}.join("\n"),
          '.ssh/authorized_keys', :mode => 0600 )
      end      
    end
  end
end
{'fraction_non_alphanumeric': 0.11290322580645161, 'fraction_numerical': 0.011612903225806452, 'mean_word_length': 2.0652173913043477, 'pattern_counts': {'":': 0, '<': 7, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6405595', 'n_tokens_mistral': 497, 'n_tokens_neox': 459, 'n_words': 137}