<commit_before>//
//  Project.swift
//  Carthage
//
//  Created by <NAME> on 12/10/2014.
//  Copyright (c) 2014 Carthage. All rights reserved.
//

import Foundation
import LlamaKit

/// Represents a Project that is using Carthage.
public struct Project {
	/// Path to the root folder
    public var path: String

	/// The project's cart file
	public let cartfile: Cartfile?

	public init(path: String) {
		self.path = path

		let cartfileURL : NSURL? = NSURL.fileURLWithPath(self.path)?.URLByAppendingPathComponent("Cartfile")

		if (cartfileURL != nil) {
			let result : Result<Cartfile> = parseJSONAtURL(cartfileURL!)

			if (result.error() != nil) {
				return
			}
			cartfile = result.value()
		}
	}

	public func cloneDependencies() -> Result<()> {
		if let dependencies = cartfile?.dependencies {
			for dependency in dependencies {

                // Ignore the result for now
                cloneOrUpdateDependency(dependency)
			}
		}
		return success()
	}
}<commit_msg>Add the checkout dependency step.<commit_after>//
//  Project.swift
//  Carthage
//
//  Created by <NAME> on 12/10/2014.
//  Copyright (c) 2014 Carthage. All rights reserved.
//

import Foundation
import LlamaKit

/// Represents a Project that is using Carthage.
public struct Project {
	/// Path to the root folder
    public var path: String

	/// The project's cart file
	public let cartfile: Cartfile?

	public init(path: String) {
		self.path = path

		let cartfileURL : NSURL? = NSURL.fileURLWithPath(self.path)?.URLByAppendingPathComponent("Cartfile")

		if (cartfileURL != nil) {
			let result : Result<Cartfile> = parseJSONAtURL(cartfileURL!)

			if (result.error() != nil) {
				return
			}
			cartfile = result.value()
		}
	}

	public func cloneDependencies() -> Result<()> {
		if let dependencies = cartfile?.dependencies {
			for dependency in dependencies {

                // Ignore the result for now
                cloneOrUpdateDependency(dependency)

				let projectPath = path.stringByAppendingPathComponent("Libraries").stringByAppendingPathComponent(dependency.repository.name)

				checkoutDependency(dependency, projectPath)
			}
		}
		return success()
	}
}
{'fraction_non_alphanumeric': 0.11044362292051756, 'fraction_numerical': 0.011090573012939002, 'mean_word_length': 3.069548872180451, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '4859615', 'n_tokens_mistral': 746, 'n_tokens_neox': 639, 'n_words': 185}