blue_printer 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8eaf5f26c8d2ff327f35dbbe6bac65b895fbc7e9
4
- data.tar.gz: ce6a272b85fc7d648f9fa4377c5baaff2c4c9375
3
+ metadata.gz: d4900eed3f21e11c26b839df1247bca9327b9dd2
4
+ data.tar.gz: 6cfaec35da4515468fa9a397ae6a7465466d6e0b
5
5
  SHA512:
6
- metadata.gz: eb0c531115ad4d6735f04abcd971a545daa86f14906b84bfbeb766bd040ec747c936283265300b0c6b48d70a03cbd7f4cef46b098c8618ef93ba8fe6b6b59e4e
7
- data.tar.gz: 03fb37fe45785deb6483ed7b0480e5517f0a9670ac49cf140274141a2a1f960e5d4f073a47343eb6cc8bdd607e404554e27a4dbb27f9fab2497043cf34781b31
6
+ metadata.gz: 45dc4f4f164a33136b77cdf428033134e7e92f3708d47c65ee1c47ca8bf59ee94dd1ed2b1551464dd81524c0675193d3971fc85cfbf33b71eca8ffc99bcee3b0
7
+ data.tar.gz: f6bd6e9f7efa614cfcb969b2284cb12a4b2801e73fef5bd80f4b93d474bdc6c8d3554585715d37ac63fb0414e1ed576c77ce8385b2f9f711ece17bd69cac551c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blue_printer (0.1.1)
4
+ blue_printer (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -13,12 +13,7 @@ protocol ___VARIABLE_productName___DataStore {
13
13
  class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_productName___Interactable, ___VARIABLE_productName___DataStore {
14
14
 
15
15
  // MARK: - Properties
16
- private let presenter: ___VARIABLE_productName___Presentable
17
- private var worker: ___VARIABLE_productName___DataProvidable?
16
+ var presenter: ___VARIABLE_productName___Presentable?
17
+ var worker: ___VARIABLE_productName___DataProvidable?
18
18
 
19
- // MARK: - Initializers
20
- init(presenter: ___VARIABLE_productName___Presentable, worker: ___VARIABLE_productName___DataProvidable = ___VARIABLE_productName___Worker()) {
21
- self.presenter = presenter
22
- self.worker = worker
23
- }
24
19
  }
@@ -5,7 +5,7 @@ import XCTest
5
5
 
6
6
  class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
7
7
 
8
- // MARK: - Spies
8
+ // MARK: - Test doubles
9
9
  class PresenterSpy: ___VARIABLE_productName___Presentable {
10
10
  // var presentLoadingViewCalled = false
11
11
  // var presentErrorCalled = false
@@ -32,13 +32,15 @@ class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
32
32
  var presenterSpy: PresenterSpy!
33
33
  var workerSpy: WorkerSpy!
34
34
 
35
- // MARK: - Setup
35
+ // MARK: - Test lifecycle
36
36
  override func setUp() {
37
37
  super.setUp()
38
38
 
39
39
  presenterSpy = PresenterSpy()
40
40
  workerSpy = WorkerSpy()
41
- sut = ___VARIABLE_productName___Interactor(presenter: presenterSpy, worker: workerSpy)
41
+ sut = ___VARIABLE_productName___Interactor()
42
+ sut.presenter = presenterSpy
43
+ sut.worker = workerSpy
42
44
  }
43
45
 
44
46
  // MARK: - Tests
@@ -9,12 +9,7 @@ protocol ___VARIABLE_productName___Presentable {
9
9
  class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_productName___Presentable {
10
10
 
11
11
  // MARK: - Properties
12
- private weak var viewController: ___VARIABLE_productName___Displayable?
13
-
14
- // MARK: - Initializers
15
- init(viewController: ___VARIABLE_productName___Displayable) {
16
- self.viewController = viewController
17
- }
12
+ weak var viewController: ___VARIABLE_productName___Displayable?
18
13
 
19
14
  }
20
15
 
@@ -5,7 +5,7 @@ import XCTest
5
5
 
6
6
  class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
7
7
 
8
- // MARK: - Spies
8
+ // MARK: - Test doubles
9
9
  class ViewControllerSpy: ___VARIABLE_productName___Displayable {
10
10
 
11
11
  }
@@ -14,11 +14,12 @@ class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
14
14
  var sut: ___VARIABLE_productName___Presenter!
15
15
  var viewControllerSpy: ViewControllerSpy!
16
16
 
17
- // MARK: - Setup
17
+ // MARK: - Test lifecycle
18
18
  override func setUp() {
19
19
  super.setUp()
20
20
  viewControllerSpy = ViewControllerSpy()
21
- sut = ___VARIABLE_productName___Presenter(viewController: viewControllerSpy)
21
+ sut = ___VARIABLE_productName___Presenter()
22
+ sut.viewController = viewControllerSpy
22
23
  }
23
24
 
24
25
  // MARK: - Tests
@@ -1,6 +1,6 @@
1
1
  //___FILEHEADER___
2
2
 
3
- import Foundation
3
+ import UIKit
4
4
 
5
5
  protocol ___VARIABLE_productName___Routable {
6
6
 
@@ -10,7 +10,7 @@ class ___FILEBASENAMEASIDENTIFIER___: UIViewController, ___VARIABLE_productName_
10
10
 
11
11
  // MARK: - Properties
12
12
  var router: (___VARIABLE_productName___Routable & ___VARIABLE_productName___DataPassing)!
13
- private var interactor: ___VARIABLE_productName___Interactable!
13
+ var interactor: ___VARIABLE_productName___Interactable!
14
14
 
15
15
  // MARK: - Initializers
16
16
  override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
@@ -19,21 +19,21 @@ class ___FILEBASENAMEASIDENTIFIER___: UIViewController, ___VARIABLE_productName_
19
19
  }
20
20
 
21
21
  required init?(coder aDecoder: NSCoder) {
22
- fatalError("init(coder:) has not been implemented")
23
- }
24
-
25
- /// Use this initializer only for unit testing
26
- init(interactor: ___VARIABLE_productName___Interactable, router: (___VARIABLE_productName___Routable & ___VARIABLE_productName___DataPassing)) {
27
- super.init(nibName: nil, bundle: nil)
28
- self.interactor = interactor
29
- self.router = router
22
+ super.init(coder: aDecoder)
23
+ setupVIP()
30
24
  }
31
25
 
32
26
  // MARK: - Setup VIP
33
27
  private func setupVIP() {
34
- let presenter = ___VARIABLE_productName___Presenter(viewController: self)
35
- let interactor = ___VARIABLE_productName___Interactor(presenter: presenter)
36
- self.interactor = interactorrouter = ___VARIABLE_productName___Router(viewController: self, dataStore: interactor)
28
+ let interactor = ___VARIABLE_productName___Interactor()
29
+ let presenter = ___VARIABLE_productName___Presenter()
30
+ let router = ___VARIABLE_productName___Router()
31
+ self.interactor = interactor
32
+ self.router = router
33
+ interactor.presenter = presenter
34
+ presenter.viewController = self
35
+ router.viewController = self
36
+ router.dataStore = interactor
37
37
  }
38
38
 
39
39
  // MARK: - Lifecycle
@@ -20,12 +20,14 @@ class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
20
20
  var interactorSpy: InteractorSpy!
21
21
  var routerSpy: RouterSpy!
22
22
 
23
- // MARK: - Setup
23
+ // MARK: - Test lifecycle
24
24
  override func setUp() {
25
25
  super.setUp()
26
26
  interactorSpy = InteractorSpy()
27
27
  routerSpy = RouterSpy()
28
- sut = ___VARIABLE_productName___ViewController(interactor: interactorSpy, router: routerSpy)
28
+ sut = ___VARIABLE_productName___ViewController()
29
+ sut.interactor = interactorSpy
30
+ sut.router = routerSpy
29
31
  sut.beginAppearanceTransition(true, animated: false)
30
32
  sut.endAppearanceTransition()
31
33
  }
@@ -1,3 +1,3 @@
1
1
  module BluePrinter
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blue_printer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dunya Kirkali
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-06-20 00:00:00.000000000 Z
12
+ date: 2019-06-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler