<commit_before>//
//  MockURLSession.swift
//  MockURLSession
//
//  Created by YAMAMOTOKenta on 8/24/16.
//  Copyright © 2016 ymkjp. All rights reserved.
//

import Foundation

public protocol MockURLSessionNormalizer {
    // Normalize URL to match resources
    func normalizeUrl(url: NSURL) -> NSURL
}

public class MockURLSession: NSURLSession {
    public typealias CompletionHandler = (NSData?, NSURLResponse?, NSError?) -> Void
    public typealias Response = (data: NSData?, urlResponse: NSURLResponse?, error: NSError?)
    public typealias HttpHeadersField = [String : String]
    
    public static let bundleId = NSBundle(forClass: sharedInstance.dynamicType).bundleIdentifier!
    private static let sharedInstance = MockURLSession()
    
    public struct Error {
        static let Domain: String = MockURLSession.bundleId<commit_msg>Add bundle ID<commit_after>//
//  MockURLSession.swift
//  MockURLSession
//
//  Created by YAMAMOTOKenta on 8/24/16.
//  Copyright © 2016 ymkjp. All rights reserved.
//

import Foundation

public protocol MockURLSessionNormalizer {
    // Normalize URL to match resources
    func normalizeUrl(url: NSURL) -> NSURL
}

public class MockURLSession: NSURLSession {
    public typealias CompletionHandler = (NSData?, NSURLResponse?, NSError?) -> Void
    public typealias Response = (data: NSData?, urlResponse: NSURLResponse?, error: NSError?)
    public typealias HttpHeadersField = [String : String]
    
    public static let bundleId = NSBundle(forClass: sharedInstance.dynamicType).bundleIdentifier ?? "MockURLSession"
    private static let sharedInstance = MockURLSession()
    
    public struct Error {
        static let Domain: String = MockURLSession.bundleId
{'fraction_non_alphanumeric': 0.08784176847004072, 'fraction_numerical': 0.010471204188481676, 'mean_word_length': 3.8179271708683475, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2472894', 'n_tokens_mistral': 502, 'n_tokens_neox': 486, 'n_words': 148}