Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

Commit 96f392e

Browse files
committed
Update dependencies
1 parent 5d5a122 commit 96f392e

File tree

6 files changed

+66
-19
lines changed

6 files changed

+66
-19
lines changed

Cartfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ github "Quick/Quick" "master"
88
github "Quick/Nimble" "master"
99
github "realm/realm-cocoa"
1010
github "RxSwiftCommunity/RxRealm" "master"
11-
github "hyperoslo/Hue" ~> 2.0.0
12-
github "robb/Cartography" ~> 1.0.0
11+
github "hyperoslo/Hue" ~> 2.0.1
12+
github "robb/Cartography" ~> 1.0.1

Cartfile.resolved

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
github "Alamofire/Alamofire" "4.0.1"
1+
github "Alamofire/Alamofire" "4.2.0"
22
github "robb/Cartography" "1.0.1"
33
github "Thoughtbot/Curry" "863ec7b235448ca53e682cf6958df4c30880c78e"
44
github "hyperoslo/Hue" "2.0.1"
5-
github "onevcat/Kingfisher" "1e057c77e3c6ea89231f34cb23da6ecec0460a84"
6-
github "Quick/Nimble" "8f08dc9c9757ab31ddf15326cff492f5aab1c17c"
7-
github "Quick/Quick" "c03861b2d0aefb6c9ceee6a7df315505aaee2cc4"
8-
github "antitypical/Result" "3.0.0"
5+
github "onevcat/Kingfisher" "402c933ac9fff1dd2a90cf5bcbf2fe788e2ead59"
6+
github "Quick/Nimble" "aad3c14cf6914d9b9bca31871efdb2fee0922d97"
7+
github "Quick/Quick" "0fdf273c7c1463a5f25c3942587452b1e892918c"
8+
github "antitypical/Result" "3.1.0"
99
github "thoughtbot/Runes" "v4.0.1"
1010
github "ReactiveX/RxSwift" "3.0.1"
11-
github "typelift/Swiftz" "6baf9450d84e6d41d248631110fe9408b77199c2"
12-
github "realm/realm-cocoa" "v2.0.3"
13-
github "Thoughtbot/Argo" "0c5242ba09c19c3c2b6bfc41ebd8616b8218722c"
14-
github "ReactiveCocoa/ReactiveSwift" "1.0.0-alpha.3"
15-
github "RxSwiftCommunity/RxRealm" "202d9abe8bfe002eeeeca339c592fa83d8654244"
16-
github "Moya/Moya" "dffad98a12e0f01105b1ad51afd87d774f3b9f48"
11+
github "typelift/Swiftz" "13066bc6e238b1e6c567ca51ba5bda7e26104b47"
12+
github "realm/realm-cocoa" "v2.1.1"
13+
github "Thoughtbot/Argo" "f6f2fdc6c74f2283650abacecbb87113918e0438"
14+
github "ReactiveCocoa/ReactiveSwift" "1.0.0-alpha.4"
15+
github "RxSwiftCommunity/RxRealm" "287064127ff4520333538256564d62a4774acdb8"
16+
github "Moya/Moya" "e55bcece7c3c0bcb37b4f09f95f595f274bf7a88"

Yomu/Extensions/NSImageView.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ import Kingfisher
1212
private var centerPointKey: Void?
1313

1414
extension NSImageView {
15+
/// Center point of `NSImageView` in its parent view coordinate system
16+
fileprivate var centerPoint: CGPoint? {
17+
let value = objc_getAssociatedObject(self, &centerPointKey) as? NSValue
18+
19+
return value?.pointValue
20+
}
21+
1522
/// An abstraction for Kingfisher.
1623
/// It helps to provide accurate arity thus it can be used with RxCocoa's `drive` easily
1724
/// `someUrl.drive(onNext: imageView.setImageUrl)`
@@ -21,12 +28,9 @@ extension NSImageView {
2128
kf.setImage(with: url)
2229
}
2330

24-
fileprivate var centerPoint: CGPoint? {
25-
let value = objc_getAssociatedObject(self, &centerPointKey) as? NSValue
26-
27-
return value?.pointValue
28-
}
29-
31+
/// Set center point of `NSImageView` in its parent view coordinate system
32+
///
33+
/// - parameter point: Center Point
3034
fileprivate func setCenterPoint(_ point: CGPoint) {
3135
objc_setAssociatedObject(self, &centerPointKey, NSValue(point: point), .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
3236
}

Yomu/Extensions/NSProgressIndicator.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
import AppKit
1010

1111
extension NSProgressIndicator {
12+
/// This method will start animating if given `true`, `stopAnimation` if false.
13+
///
14+
/// - parameter shouldAnimate: Bool
1215
func animating(_ shouldAnimate: Bool) {
1316
if shouldAnimate {
1417
startAnimation(nil)

Yomu/Extensions/NSView.swift

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ enum BorderPosition {
3131
}
3232

3333
extension NSView {
34+
/// Draw border based on the given `Border` spec
35+
///
36+
/// - parameter border: `Border` spec
3437
func drawBorder(_ border: Border) {
3538
wantsLayer = true
3639

@@ -55,6 +58,11 @@ extension NSView {
5558
}
5659
}
5760

61+
/// Draw a border (rectangle) at left
62+
///
63+
/// - parameter borderWidth: Border width in point
64+
/// - parameter radius: Border radius
65+
/// - parameter color: Border color
5866
fileprivate func drawBorderAtLeft(width borderWidth: CGFloat, radius: CGFloat, color: NSColor) {
5967
let borderFrame = CGRect(
6068
x: 0,
@@ -66,6 +74,11 @@ extension NSView {
6674
drawBorder(frame: borderFrame, width: borderWidth, radius: radius, color: color)
6775
}
6876

77+
/// Draw a border (rectangle) at top
78+
///
79+
/// - parameter borderWidth: Border width in point
80+
/// - parameter radius: Border radius
81+
/// - parameter color: Border color
6982
fileprivate func drawBorderAtTop(width borderWidth: CGFloat, radius: CGFloat, color: NSColor) {
7083
let borderFrame = CGRect(
7184
x: 0,
@@ -77,6 +90,11 @@ extension NSView {
7790
drawBorder(frame: borderFrame, width: borderWidth, radius: radius, color: color)
7891
}
7992

93+
/// Draw a border (rectangle) at right
94+
///
95+
/// - parameter borderWidth: Border width in point
96+
/// - parameter radius: Border radius
97+
/// - parameter color: Border color
8098
fileprivate func drawBorderAtRight(width borderWidth: CGFloat, radius: CGFloat, color: NSColor) {
8199
let borderFrame = CGRect(
82100
x: frame.size.width - borderWidth,
@@ -88,6 +106,11 @@ extension NSView {
88106
drawBorder(frame: borderFrame, width: borderWidth, radius: radius, color: color)
89107
}
90108

109+
/// Draw a border (rectangle) at bottom
110+
///
111+
/// - parameter borderWidth: Border width in point
112+
/// - parameter radius: Border radius
113+
/// - parameter color: Border color
91114
fileprivate func drawBorderAtBottom(width borderWidth: CGFloat, radius: CGFloat, color: NSColor) {
92115
let borderFrame = CGRect(
93116
x: 0,
@@ -99,6 +122,12 @@ extension NSView {
99122
drawBorder(frame: borderFrame, width: borderWidth, radius: radius, color: color)
100123
}
101124

125+
/// Draw border based on the given frame, will use layer to draw the border.
126+
///
127+
/// - parameter borderFrame: Border layer frame
128+
/// - parameter borderWidth: Border width in point
129+
/// - parameter radius: Border radius
130+
/// - parameter color: Border color
102131
fileprivate func drawBorder(
103132
frame borderFrame: CGRect,
104133
width: CGFloat,

Yomu/Models/MangaRealm.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import Foundation
1010
import RealmSwift
1111

12+
/// Represents Manga object for `Realm` database
1213
class MangaRealm: Object {
1314
dynamic var id: String = ""
1415
dynamic var slug: String = ""
@@ -23,6 +24,11 @@ class MangaRealm: Object {
2324
return "id"
2425
}
2526

27+
/// Convert the given `Manga` struct to `MangaRealm` object
28+
///
29+
/// - parameter manga: `Manga`
30+
///
31+
/// - returns: `MangaRealm`
2632
static func from(manga: Manga) -> MangaRealm {
2733
let mangaRealm = MangaRealm()
2834

@@ -38,6 +44,11 @@ class MangaRealm: Object {
3844
return mangaRealm
3945
}
4046

47+
/// Convert the given `MangaRealm` object to `Manga` struct
48+
///
49+
/// - parameter mangaRealm: `MangaRealm`
50+
///
51+
/// - returns: `Manga`
4152
static func from(mangaRealm: MangaRealm) -> Manga {
4253
let categories = mangaRealm
4354
.commaSeparatedCategories.characters

0 commit comments

Comments
 (0)