<commit_before>﻿using System;
using System.Linq;

namespace AppHarbor.Commands
{
	public class CreateCommand : ICommand
	{
		private readonly IAppHarborClient _appHarborClient;
		private readonly ApplicationConfiguration _applicationConfiguration;

		public CreateCommand(IAppHarborClient appHarborClient, ApplicationConfiguration applicationConfiguration)
		{
			_appHarborClient = appHarborClient;
			_applicationConfiguration = applicationConfiguration;
		}

		public void Execute(string[] arguments)
		{
			if (arguments.Length == 0)
			{
				throw new CommandException("An application name must be provided to create an application");
			}

			var result = _appHarborClient.CreateApplication(arguments.First(), arguments.Skip(1).FirstOrDefault());

			Console.WriteLine("Created application \"{0}\" | URL: https://{0}.apphb.com", result.ID);

			_applicationConfiguration.SetupApplication(result.ID, _appHarborClient.GetUser());
		}
	}
}<commit_msg>Prefer using interface over implementation<commit_after>﻿using System;
using System.Linq;

namespace AppHarbor.Commands
{
	public class CreateCommand : ICommand
	{
		private readonly IAppHarborClient _appHarborClient;
		private readonly IApplicationConfiguration _applicationConfiguration;

		public CreateCommand(IAppHarborClient appHarborClient, IApplicationConfiguration applicationConfiguration)
		{
			_appHarborClient = appHarborClient;
			_applicationConfiguration = applicationConfiguration;
		}

		public void Execute(string[] arguments)
		{
			if (arguments.Length == 0)
			{
				throw new CommandException("An application name must be provided to create an application");
			}

			var result = _appHarborClient.CreateApplication(arguments.First(), arguments.Skip(1).FirstOrDefault());

			Console.WriteLine("Created application \"{0}\" | URL: https://{0}.apphb.com", result.ID);

			_applicationConfiguration.SetupApplication(result.ID, _appHarborClient.GetUser());
		}
	}
}
{'fraction_non_alphanumeric': 0.09179989685404848, 'fraction_numerical': 0.0041258380608561115, 'mean_word_length': 5.621160409556314, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3733847', 'n_tokens_mistral': 576, 'n_tokens_neox': 510, 'n_words': 120}