From faeb3aef6e5d2b9367dc8c24ab6d295b0c864be8 Mon Sep 17 00:00:00 2001 From: Bruno Rocha Date: Tue, 30 Jul 2019 10:46:14 -0300 Subject: [PATCH] Make Summary.genericFor public --- CHANGELOG.md | 3 +++ Formula/swiftinfo.rb | 2 +- Sources/SwiftInfoCore/Summary.swift | 16 ++++++++-------- SwiftInfo.podspec | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53ea49c..c5a1875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ ## master +## 2.3.3 +* Make `Summary.genericFor` public for custom providers - Bruno Rocha + ## 2.3.2 * ProjectInfo now allows you to manually specify a `versionNumber` and `buildNumber` in case your Info.plist doesn't have them (Buck iOS apps) - Bruno Rocha diff --git a/Formula/swiftinfo.rb b/Formula/swiftinfo.rb index e5ff00c..b5ce483 100644 --- a/Formula/swiftinfo.rb +++ b/Formula/swiftinfo.rb @@ -1,7 +1,7 @@ class Swiftinfo < Formula desc "📊 Extract and analyze the evolution of an iOS app's code." homepage "https://github.com/rockbruno/SwiftInfo" - version "2.3.2" + version "2.3.3" url "https://github.com/rockbruno/SwiftInfo/releases/download/#{version}/swiftinfo.zip" # TODO: Try something to provide a SHA automatically diff --git a/Sources/SwiftInfoCore/Summary.swift b/Sources/SwiftInfoCore/Summary.swift index f92aca4..c1e6ff7 100644 --- a/Sources/SwiftInfoCore/Summary.swift +++ b/Sources/SwiftInfoCore/Summary.swift @@ -39,14 +39,14 @@ public struct Summary: Codable, Hashable { self.stringValue = stringValue } - static func genericFor(prefix: String, - now: T, - old: T?, - increaseIsBad: Bool, - stringValueFormatter: ((T) -> String)? = nil, - numericValueFormatter: ((T) -> Float)? = nil, - difference: ((T, T) -> T)) - -> Summary { + public static func genericFor(prefix: String, + now: T, + old: T?, + increaseIsBad: Bool, + stringValueFormatter: ((T) -> String)? = nil, + numericValueFormatter: ((T) -> Float)? = nil, + difference: ((T, T) -> T)) + -> Summary { let stringFormatter = stringValueFormatter ?? { return "\($0)" } let numberFormatter = numericValueFormatter ?? { Float($0) } func result(text: String, style: Style) -> Summary { diff --git a/SwiftInfo.podspec b/SwiftInfo.podspec index 585bc65..2e34da2 100644 --- a/SwiftInfo.podspec +++ b/SwiftInfo.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'SwiftInfo' s.module_name = 'SwiftInfo' - s.version = '2.3.2' + s.version = '2.3.3' s.license = { type: 'MIT', file: 'LICENSE' } s.summary = 'Extract and analyze the evolution of an iOS app\'s code.' s.homepage = 'https://github.com/rockbruno/SwiftInfo'