     }
     
     /// SwiftRandom extension
-    static func random() -> NSDate {
+    public static func random() -> NSDate {
         let randomTime = NSTimeInterval(arc4random_uniform(UInt32.max))
         return NSDate(timeIntervalSince1970: randomTime)
     }
     
 }
 
-extension CGFloat {
+public extension CGFloat {
     /// SwiftRandom extension
-    static func random() -> CGFloat {
+    public static func random() -> CGFloat {
         return CGFloat(Float(arc4random()) / Float(UINT32_MAX))
     }
 }
 
-extension UIColor {
+public extension UIColor {
     /// SwiftRandom extension
-    static func random(randomAlpha: Bool = false) -> UIColor {
+    public static func random(randomAlpha: Bool = false) -> UIColor {
         let randomRed = CGFloat.random()
         let randomGreen = CGFloat.random()
         let randomBlue = CGFloat.random()


// each type has its own random

extension Int {
    /// SwiftRandom extension
    static func random(lower: Int = 0, _ upper: Int = 100) -> Int {
        return lower + Int(arc4random_uniform(UInt32(upper - lower + 1)))
    }
}

extension Bool {
    /// SwiftRandom extension
    static func random() -> Bool {
        return Int.random() % 2 == 0
    }
}

extension NSDate {
    /// SwiftRandom extension
    static func randomWithinDaysBeforeToday(days: Int) -> NSDate {
        let today = NSDate()
        
        guard let gregorian = NSCalendar(calendarIdentifier: NSCalendarIdentifierGregorian) else {

    }
}

public extension Array {
    /// SwiftRandom extension
    public func randomItem() -> Element {
        let index = Int(arc4random_uniform(UInt32(self.count)))
        return self[index]
    }
}

public extension NSURL {
    /// SwiftRandom extension
    public static func randomURL() -> NSURL {
        return NSURL(string: Randoms.randomFakeURLString())!
    }
}

public struct Randoms {
    
    //==========================================================================================================
    // MARK: - Object randoms
    //==========================================================================================================
    
    public static func randomInt(lower: Int = 0, _ upper: Int = 100) -> Int {
        return Int.random(lower, upper)
    }
    
    public static func randomPercentageisOver(percentage: Int) -> Bool {
        return Int.random() > percentage
    }
    
    public static func randomBool() -> Bool {
        return Bool.random()
    }
    
    public static func randomDateWithinDaysBeforeToday(days: Int) -> NSDate {
        return NSDate.randomWithinDaysBeforeToday(days)
    }
    
    public static func randomDate() -> NSDate {
        return NSDate.random()
    }
    
    public static func randomCGFloat() -> CGFloat {
        return CGFloat.random()
    }
    
    public static func randomColor(randomAlpha: Bool = false) -> UIColor {
        return UIColor.random(randomAlpha)
    }
    
    public static func randomNSURL() -> NSURL {
        return NSURL.randomURL()
    }
    
