Skip to content

Commit

Permalink
Make Summary.genericFor public
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbruno committed Jul 30, 2019
1 parent 0388a89 commit faeb3ae
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Formula/swiftinfo.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down
16 changes: 8 additions & 8 deletions Sources/SwiftInfoCore/Summary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public struct Summary: Codable, Hashable {
self.stringValue = stringValue
}

static func genericFor<T: BinaryInteger>(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<T: BinaryInteger>(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 {
Expand Down
2 changes: 1 addition & 1 deletion SwiftInfo.podspec
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit faeb3ae

Please sign in to comment.