vipergen-xctestable 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f686a4c7abf098f61e7065228cdb73fa06aef71
4
- data.tar.gz: c3f50d48aa02939ec526a3314ad7ebe73a8dde50
3
+ metadata.gz: 9eb8b12bdd5b2a0fbe12c0e82b3b101bce725689
4
+ data.tar.gz: 68f1cb0f229d8aa563121f1208656865fffc4c31
5
5
  SHA512:
6
- metadata.gz: ca25561cb3c2d438fd8b6823d4f8cd07726dc98cd04a7d5dd79c06487eae89029205b59c470dc6cae6d8a1e477d9a24a39f9fd6c45d69f1308c7742ad131ea21
7
- data.tar.gz: e2d76be52ab03a4ae858b43e726e7ecae3cc33680d56d067c6ba041339ed399a15f8e4b071b3b7d0d9b0d257333d0ef331dc860405050fedbd62f52fbff44213
6
+ metadata.gz: c5a472838ee69f5da656bfd227d2bd52d12fb81f2f4494feec03865bb6f7b078c5f93b5c155dbd7195cf35a67f8d962042651d4bd004d720bc8af482808f4ad1
7
+ data.tar.gz: de26bb574d0907931fece48a4856e5a0af22f7a15b43fb139e7427be4293e0007c45c9f7e76a03c781c62f16aff30566e91367d93bb6610831b2b1bf86513a39
data/README.md CHANGED
@@ -92,14 +92,14 @@ If everything were right, you should have now the vipergem command available in
92
92
  ## How to generate a VIPER module with a given name?
93
93
  You have just to execute the following command
94
94
  ```bash
95
- vipergen-xctestable generate MyFirstViperModule --path=~/myproject/shared
95
+ vipergen generate MyFirstViperModule --path=~/myproject/shared
96
96
  ```
97
97
  And then the files structure will be automatically created. Don't forget to add this folder to your project dragging it into the XCode/Appcode inspector
98
98
 
99
99
  ## What options are available in generator?
100
100
  You have just to execute the following command
101
101
  ```bash
102
- vipergen-xctestable help generate
102
+ vipergen help generate
103
103
  ```
104
104
  And then you will see all options available
105
105
 
@@ -5,7 +5,6 @@
5
5
 
6
6
  import Foundation
7
7
 
8
- final class VIPERAPIDataManager: VIPERAPIDataManagerInputProtocol
9
- {
8
+ final class VIPERAPIDataManager: VIPERAPIDataManagerInputProtocol {
10
9
  init() {}
11
10
  }
@@ -5,7 +5,6 @@
5
5
 
6
6
  import Foundation
7
7
 
8
- final class VIPERLocalDataManager: VIPERLocalDataManagerInputProtocol
9
- {
8
+ final class VIPERLocalDataManager: VIPERLocalDataManagerInputProtocol {
10
9
  init() {}
11
10
  }
@@ -5,8 +5,7 @@
5
5
 
6
6
  import Foundation
7
7
 
8
- final class VIPERInteractor: VIPERInteractorInputProtocol
9
- {
8
+ final class VIPERInteractor: VIPERInteractorInputProtocol {
10
9
  weak var presenter: VIPERInteractorOutputProtocol?
11
10
  var APIDataManager: VIPERAPIDataManagerInputProtocol?
12
11
  var localDataManager: VIPERLocalDataManagerInputProtocol?
@@ -7,7 +7,7 @@ import XCTest
7
7
 
8
8
  @testable import SWIFT_MODULE
9
9
 
10
- class VIPERInteractorTests: XCTestCase{
10
+ class VIPERInteractorTests: XCTestCase {
11
11
 
12
12
  class Mock{
13
13
 
@@ -0,0 +1,28 @@
1
+ //
2
+ // Created by AUTHOR.
3
+ // Copyright (c) YEAR AUTHOR. All rights reserved.
4
+ //
5
+
6
+ import Foundation
7
+
8
+ /** Use Object Mapper */
9
+ final class VIPERDomainModel {
10
+ // Members
11
+
12
+ /**
13
+ required init?(_ map: Map) {
14
+
15
+ }
16
+
17
+ func mapping(map: Map) {
18
+ username <- map["username"]
19
+ age <- map["age"]
20
+ weight <- map["weight"]
21
+ array <- map["arr"]
22
+ dictionary <- map["dict"]
23
+ bestFriend <- map["best_friend"]
24
+ friends <- map["friends"]
25
+ birthday <- (map["birthday"], DateTransform())
26
+ }
27
+ */
28
+ }
@@ -0,0 +1,10 @@
1
+ //
2
+ // Created by AUTHOR.
3
+ // Copyright (c) YEAR AUTHOR. All rights reserved.
4
+ //
5
+
6
+ import Foundation
7
+
8
+ final class VIPERViewModel {
9
+
10
+ }
@@ -5,8 +5,7 @@
5
5
 
6
6
  import Foundation
7
7
 
8
- final class VIPERPresenter: VIPERPresenterProtocol, VIPERInteractorOutputProtocol
9
- {
8
+ final class VIPERPresenter: VIPERPresenterProtocol, VIPERInteractorOutputProtocol {
10
9
  weak var view: VIPERViewProtocol?
11
10
  var interactor: VIPERInteractorInputProtocol?
12
11
  var wireFrame: VIPERWireFrameProtocol?
@@ -7,7 +7,7 @@ import XCTest
7
7
 
8
8
  @testable import SWIFT_MODULE
9
9
 
10
- class VIPERPresenterTests: XCTestCase{
10
+ class VIPERPresenterTests: XCTestCase {
11
11
 
12
12
  class Mock{
13
13
 
@@ -6,24 +6,21 @@
6
6
  import Foundation
7
7
  import UIKit
8
8
 
9
- protocol VIPERViewProtocol: class
10
- {
9
+ protocol VIPERViewProtocol: class {
11
10
  var presenter: VIPERPresenterProtocol? { get set }
12
11
  /**
13
12
  * Add here your methods for communication PRESENTER -> VIEW
14
13
  */
15
14
  }
16
15
 
17
- protocol VIPERWireFrameProtocol: class
18
- {
16
+ protocol VIPERWireFrameProtocol: class {
19
17
  static func setupVIPERModule(object: AnyObject) -> UIViewController
20
18
  /**
21
19
  * Add here your methods for communication PRESENTER -> WIREFRAME
22
20
  */
23
21
  }
24
22
 
25
- protocol VIPERPresenterProtocol: class
26
- {
23
+ protocol VIPERPresenterProtocol: class {
27
24
  var view: VIPERViewProtocol? { get set }
28
25
  var interactor: VIPERInteractorInputProtocol? { get set }
29
26
  var wireFrame: VIPERWireFrameProtocol? { get set }
@@ -32,15 +29,13 @@ protocol VIPERPresenterProtocol: class
32
29
  */
33
30
  }
34
31
 
35
- protocol VIPERInteractorOutputProtocol: class
36
- {
32
+ protocol VIPERInteractorOutputProtocol: class {
37
33
  /**
38
34
  * Add here your methods for communication INTERACTOR -> PRESENTER
39
35
  */
40
36
  }
41
37
 
42
- protocol VIPERInteractorInputProtocol: class
43
- {
38
+ protocol VIPERInteractorInputProtocol: class {
44
39
  var presenter: VIPERInteractorOutputProtocol? { get set }
45
40
  var APIDataManager: VIPERAPIDataManagerInputProtocol? { get set }
46
41
  var localDataManager: VIPERLocalDataManagerInputProtocol? { get set }
@@ -49,22 +44,19 @@ protocol VIPERInteractorInputProtocol: class
49
44
  */
50
45
  }
51
46
 
52
- protocol VIPERDataManagerInputProtocol: class
53
- {
47
+ protocol VIPERDataManagerInputProtocol: class {
54
48
  /**
55
49
  * Add here your methods for communication INTERACTOR -> DATAMANAGER
56
50
  */
57
51
  }
58
52
 
59
- protocol VIPERAPIDataManagerInputProtocol: class
60
- {
53
+ protocol VIPERAPIDataManagerInputProtocol: class {
61
54
  /**
62
55
  * Add here your methods for communication INTERACTOR -> APIDATAMANAGER
63
56
  */
64
57
  }
65
58
 
66
- protocol VIPERLocalDataManagerInputProtocol: class
67
- {
59
+ protocol VIPERLocalDataManagerInputProtocol: class {
68
60
  /**
69
61
  * Add here your methods for communication INTERACTOR -> LOCALDATAMANAGER
70
62
  */
@@ -6,7 +6,6 @@
6
6
  import Foundation
7
7
  import UIKit
8
8
 
9
- final class VIPERView: UIViewController, VIPERViewProtocol
10
- {
9
+ final class VIPERView: UIViewController, VIPERViewProtocol {
11
10
  var presenter: VIPERPresenterProtocol?
12
11
  }
@@ -7,7 +7,7 @@ import XCTest
7
7
 
8
8
  @testable import SWIFT_MODULE
9
9
 
10
- class VIPERViewTests: XCTestCase{
10
+ class VIPERViewTests: XCTestCase {
11
11
 
12
12
  class Mock{
13
13
 
@@ -6,10 +6,8 @@
6
6
  import Foundation
7
7
  import UIKit
8
8
 
9
- final class VIPERWireFrame: VIPERWireFrameProtocol
10
- {
11
- class func setupVIPERModule(object: AnyObject) -> UIViewController
12
- {
9
+ final class VIPERWireFrame: VIPERWireFrameProtocol {
10
+ class func setupVIPERModule(object: AnyObject) -> UIViewController {
13
11
  // Generating module components
14
12
  let view: VIPERViewProtocol = VIPERView()
15
13
  let presenter: VIPERPresenterProtocol & VIPERInteractorOutputProtocol = VIPERPresenter()
@@ -1,4 +1,4 @@
1
1
  module Vipergen
2
2
  NAME = "vipergen"
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vipergen-xctestable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Piñera
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-09-14 00:00:00.000000000 Z
13
+ date: 2016-09-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -161,6 +161,8 @@ files:
161
161
  - lib/templates/xctestable/swift/DataManager/Local/VIPERLocalDataManager.swift
162
162
  - lib/templates/xctestable/swift/Interactor/VIPERInteractor.swift
163
163
  - lib/templates/xctestable/swift/Interactor/VIPERInteractorTests.swift
164
+ - lib/templates/xctestable/swift/Models/VIPERDomainModel.swift
165
+ - lib/templates/xctestable/swift/Models/VIPERViewModel.swift
164
166
  - lib/templates/xctestable/swift/Presenter/VIPERPresenter.swift
165
167
  - lib/templates/xctestable/swift/Presenter/VIPERPresenterTests.swift
166
168
  - lib/templates/xctestable/swift/Protocols/VIPERProtocols.swift