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 +4 -4
- data/README.md +2 -2
- data/lib/templates/xctestable/swift/DataManager/API/VIPERAPIDataManager.swift +1 -2
- data/lib/templates/xctestable/swift/DataManager/Local/VIPERLocalDataManager.swift +1 -2
- data/lib/templates/xctestable/swift/Interactor/VIPERInteractor.swift +1 -2
- data/lib/templates/xctestable/swift/Interactor/VIPERInteractorTests.swift +1 -1
- data/lib/templates/xctestable/swift/Models/VIPERDomainModel.swift +28 -0
- data/lib/templates/xctestable/swift/Models/VIPERViewModel.swift +10 -0
- data/lib/templates/xctestable/swift/Presenter/VIPERPresenter.swift +1 -2
- data/lib/templates/xctestable/swift/Presenter/VIPERPresenterTests.swift +1 -1
- data/lib/templates/xctestable/swift/Protocols/VIPERProtocols.swift +8 -16
- data/lib/templates/xctestable/swift/View/VIPERView.swift +1 -2
- data/lib/templates/xctestable/swift/View/VIPERViewTests.swift +1 -1
- data/lib/templates/xctestable/swift/WireFrame/VIPERWireFrame.swift +2 -4
- data/lib/vipergen/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9eb8b12bdd5b2a0fbe12c0e82b3b101bce725689
|
4
|
+
data.tar.gz: 68f1cb0f229d8aa563121f1208656865fffc4c31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
102
|
+
vipergen help generate
|
103
103
|
```
|
104
104
|
And then you will see all options available
|
105
105
|
|
@@ -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?
|
@@ -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
|
+
}
|
@@ -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?
|
@@ -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,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()
|
data/lib/vipergen/version.rb
CHANGED
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.
|
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-
|
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
|