<commit_before>require 'sinatra/base'

module DeployDocus
  class Base < Sinatra::Base

    get '/' do
      "DeployDocus"
    end


    post '/:application/:environment' do
      config = DeployDocus::Config.new(params[:application])
      deployer = DeployDocus::Deployer.new(config['repository'], config['ssh_key'], config.deploy_task(params[:environment]))

      if deployer.deploy!
        "OK"
      else
        "NOT OK"
      end
    end
  end
end<commit_msg>automatically get the key's path<commit_after>require 'sinatra/base'

module DeployDocus
  class Base < Sinatra::Base

    get '/' do
      "DeployDocus"
    end


    post '/:application/:environment' do
      config = DeployDocus::Config.new(params[:application])
      deployer = DeployDocus::Deployer.new(config['repository'], "keys/#{config['repository']}", config.deploy_task(params[:environment]))

      if deployer.deploy!
        "OK"
      else
        "NOT OK"
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0, 'mean_word_length': 3.0041322314049586, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1040097', 'n_tokens_mistral': 312, 'n_tokens_neox': 299, 'n_words': 63}