mvcgen 0.1.2 → 0.1.4
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/lib/mvcgen/version.rb +1 -1
- metadata +1 -12
- data/lib/templates/default/objc/DataManager/VIPERDataManager.h +0 -15
- data/lib/templates/default/objc/DataManager/VIPERDataManager.m +0 -11
- data/lib/templates/default/objc/Interactor/VIPERInteractor.h +0 -16
- data/lib/templates/default/objc/Interactor/VIPERInteractor.m +0 -10
- data/lib/templates/default/objc/Presenter/VIPERPresenter.h +0 -18
- data/lib/templates/default/objc/Presenter/VIPERPresenter.m +0 -11
- data/lib/templates/default/objc/Protocols/VIPERProtocols.h +0 -64
- data/lib/templates/default/objc/ViewController/VIPERViewController.h +0 -13
- data/lib/templates/default/objc/ViewController/VIPERViewController.m +0 -32
- data/lib/templates/default/objc/WireFrame/VIPERWireFrame.h +0 -19
- data/lib/templates/default/objc/WireFrame/VIPERWireFrame.m +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fc03e17d818a9fde47ab0de64b2973cfbe76aa7
|
4
|
+
data.tar.gz: c9729dd8a3b2beebcc130719d677bcab745ae98e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76e5de9622d9f508d62db84dd72701feb61dee5470e6f9ccfdf53cc977be687b061f7596d76ddd10b126ea4818745927c31d34da75b16d3cca4caafb92c7fd5f
|
7
|
+
data.tar.gz: 1e1cbc4f42ae335d939c52f831e11ec20d591194969ff904adfd1666b6a9f71a26e56dd1ad4c3740e78eb06152f1092d92a1892e56b12e442bbd545f4e0caea9
|
data/lib/mvcgen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mvcgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Martinez
|
@@ -100,17 +100,6 @@ files:
|
|
100
100
|
- lib/mvcgen/templatemanager.rb
|
101
101
|
- lib/mvcgen/version.rb
|
102
102
|
- lib/templates/default/mvcspec.yml
|
103
|
-
- lib/templates/default/objc/DataManager/VIPERDataManager.h
|
104
|
-
- lib/templates/default/objc/DataManager/VIPERDataManager.m
|
105
|
-
- lib/templates/default/objc/Interactor/VIPERInteractor.h
|
106
|
-
- lib/templates/default/objc/Interactor/VIPERInteractor.m
|
107
|
-
- lib/templates/default/objc/Presenter/VIPERPresenter.h
|
108
|
-
- lib/templates/default/objc/Presenter/VIPERPresenter.m
|
109
|
-
- lib/templates/default/objc/Protocols/VIPERProtocols.h
|
110
|
-
- lib/templates/default/objc/ViewController/VIPERViewController.h
|
111
|
-
- lib/templates/default/objc/ViewController/VIPERViewController.m
|
112
|
-
- lib/templates/default/objc/WireFrame/VIPERWireFrame.h
|
113
|
-
- lib/templates/default/objc/WireFrame/VIPERWireFrame.m
|
114
103
|
- lib/templates/default/swift/Config/Config.plist
|
115
104
|
- lib/templates/default/swift/Config/Config.swift
|
116
105
|
- lib/templates/default/swift/Extensions/Buttons.swift
|
@@ -1,15 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Created by Pedro Piñera Buendía on 2014.
|
3
|
-
// Copyright (c) 2014 Redbooth. All rights reserved.
|
4
|
-
//
|
5
|
-
|
6
|
-
#import <Foundation/Foundation.h>
|
7
|
-
#import "VIPERProtocols.h"
|
8
|
-
|
9
|
-
|
10
|
-
@interface VIPERDataManager : NSObject <VIPERDataManagerInputProtocol>
|
11
|
-
|
12
|
-
// Properties
|
13
|
-
@property (nonatomic, weak) id <VIPERDataManagerOutputProtocol> interactor;
|
14
|
-
|
15
|
-
@end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Created by Pedro Piñera Buendía on 2014.
|
3
|
-
// Copyright (c) 2014 Redbooth. All rights reserved.
|
4
|
-
//
|
5
|
-
|
6
|
-
#import <Foundation/Foundation.h>
|
7
|
-
#import "VIPERProtocols.h"
|
8
|
-
|
9
|
-
|
10
|
-
@interface VIPERInteractor : NSObject <VIPERInteractorInputProtocol, VIPERDataManagerOutputProtocol>
|
11
|
-
|
12
|
-
// Properties
|
13
|
-
@property (nonatomic, weak) id <VIPERInteractorOutputProtocol> presenter;
|
14
|
-
@property (nonatomic, strong) id <VIPERDataManagerInputProtocol> dataManager;
|
15
|
-
|
16
|
-
@end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Created by Pedro Piñera Buendía on 2014.
|
3
|
-
// Copyright (c) 2014 Redbooth. All rights reserved.
|
4
|
-
//
|
5
|
-
|
6
|
-
#import <Foundation/Foundation.h>
|
7
|
-
#import "VIPERProtocols.h"
|
8
|
-
|
9
|
-
@class VIPERWireFrame;
|
10
|
-
|
11
|
-
@interface VIPERPresenter : NSObject <VIPERPresenterProtocol, VIPERInteractorOutputProtocol>
|
12
|
-
|
13
|
-
// Properties
|
14
|
-
@property (nonatomic, weak) id <VIPERViewProtocol> view;
|
15
|
-
@property (nonatomic, strong) id <VIPERInteractorInputProtocol> interactor;
|
16
|
-
@property (nonatomic, strong) VIPERWireFrame *wireFrame;
|
17
|
-
|
18
|
-
@end
|
@@ -1,64 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Created by Pedro Piñera Buendía on 2014.
|
3
|
-
// Copyright (c) 2014 Redbooth. All rights reserved.
|
4
|
-
//
|
5
|
-
|
6
|
-
#import <Foundation/Foundation.h>
|
7
|
-
#import <UIKit/UIKit.h>
|
8
|
-
|
9
|
-
@protocol VIPERDataManagerOutputProtocol;
|
10
|
-
@protocol VIPERInteractorOutputProtocol;
|
11
|
-
@protocol VIPERInteractorInputProtocol;
|
12
|
-
@protocol VIPERViewProtocol;
|
13
|
-
@protocol VIPERPresenterProtocol;
|
14
|
-
@protocol VIPERDataManagerInputProtocol;
|
15
|
-
@class VIPERWireFrame;
|
16
|
-
|
17
|
-
typedef void (^CompletionBlock)(NSError **error);
|
18
|
-
|
19
|
-
@protocol VIPERViewProtocol
|
20
|
-
@required
|
21
|
-
@property (nonatomic, strong) id <VIPERPresenterProtocol> presenter;
|
22
|
-
/**
|
23
|
-
* Add here your methods for communication VIEWCONTROLLER -> PRESENTER
|
24
|
-
*/
|
25
|
-
@end
|
26
|
-
|
27
|
-
@protocol VIPERPresenterProtocol
|
28
|
-
@required
|
29
|
-
@property (nonatomic, weak) id <VIPERViewProtocol> view;
|
30
|
-
@property (nonatomic, strong) id <VIPERInteractorInputProtocol> interactor;
|
31
|
-
@property (nonatomic, strong) VIPERWireFrame *wireFrame;
|
32
|
-
/**
|
33
|
-
* Add here your methods for communication VIEWCONTROLLER/WIREFRAME -> PRESENTER
|
34
|
-
*/
|
35
|
-
@end
|
36
|
-
|
37
|
-
@protocol VIPERInteractorOutputProtocol
|
38
|
-
/**
|
39
|
-
* Add here your methods for communication INTERACTOR -> PRESENTER
|
40
|
-
*/
|
41
|
-
@end
|
42
|
-
|
43
|
-
@protocol VIPERInteractorInputProtocol
|
44
|
-
@required
|
45
|
-
@property (nonatomic, weak) id <VIPERInteractorOutputProtocol> presenter;
|
46
|
-
/**
|
47
|
-
* Add here your methods for communication PRESENTER -> INTERACTOR
|
48
|
-
*/
|
49
|
-
@end
|
50
|
-
|
51
|
-
|
52
|
-
@protocol VIPERDataManagerInputProtocol
|
53
|
-
@property (nonatomic, weak) id <VIPERDataManagerOutputProtocol> interactor;
|
54
|
-
/**
|
55
|
-
* Add here your methods for communication INTERACTOR -> DATAMANAGER
|
56
|
-
*/
|
57
|
-
@end
|
58
|
-
|
59
|
-
@protocol VIPERDataManagerOutputProtocol
|
60
|
-
@property (nonatomic, strong) id <VIPERDataManagerInputProtocol> dataManager;
|
61
|
-
/**
|
62
|
-
* Add here your methods for communication DATAMANAGER -> INTERACTOR
|
63
|
-
*/
|
64
|
-
@end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Created by Pedro Piñera Buendía on 2014.
|
3
|
-
// Copyright (c) 2014 Redbooth. All rights reserved.
|
4
|
-
//
|
5
|
-
|
6
|
-
#import <UIKit/UIKit.h>
|
7
|
-
#import "VIPERProtocols.h"
|
8
|
-
|
9
|
-
@interface VIPERViewController : UIViewController <VIPERViewProtocol>
|
10
|
-
|
11
|
-
@property (nonatomic, strong) id <VIPERPresenterProtocol> presenter;
|
12
|
-
|
13
|
-
@end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Created by Pedro Piñera Buendía on 2014.
|
3
|
-
// Copyright (c) 2014 Redbooth. All rights reserved.
|
4
|
-
//
|
5
|
-
|
6
|
-
#import "VIPERViewController.h"
|
7
|
-
|
8
|
-
@implementation VIPERViewController
|
9
|
-
|
10
|
-
#pragma mark - ViewController Lifecycle
|
11
|
-
|
12
|
-
- (void)viewDidLoad
|
13
|
-
{
|
14
|
-
[super viewDidLoad];
|
15
|
-
}
|
16
|
-
|
17
|
-
- (void)viewDidDisappear:(BOOL)animated
|
18
|
-
{
|
19
|
-
[super viewDidDisappear:animated];
|
20
|
-
}
|
21
|
-
|
22
|
-
- (void)viewWillAppear:(BOOL)animated
|
23
|
-
{
|
24
|
-
[super viewWillAppear:animated];
|
25
|
-
}
|
26
|
-
|
27
|
-
- (void)viewWillDisappear:(BOOL)animated
|
28
|
-
{
|
29
|
-
[super viewWillDisappear:animated];
|
30
|
-
}
|
31
|
-
|
32
|
-
@end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Created by Pedro Piñera Buendía on 2014.
|
3
|
-
// Copyright (c) 2014 Redbooth. All rights reserved.
|
4
|
-
//
|
5
|
-
|
6
|
-
#import <Foundation/Foundation.h>
|
7
|
-
#import "VIPERProtocols.h"
|
8
|
-
#import "VIPERViewController.h"
|
9
|
-
#import "VIPERDataManager.h"
|
10
|
-
#import "VIPERInteractor.h"
|
11
|
-
#import "VIPERPresenter.h"
|
12
|
-
#import "VIPERWireframe.h"
|
13
|
-
#import <UIKit/UIKit.h>
|
14
|
-
|
15
|
-
@interface VIPERWireFrame : NSObject
|
16
|
-
|
17
|
-
+ (void)presentVIPERModuleFrom:(id)fromView;
|
18
|
-
|
19
|
-
@end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Created by Pedro Piñera Buendía on 2014.
|
3
|
-
// Copyright (c) 2014 Redbooth. All rights reserved.
|
4
|
-
//
|
5
|
-
|
6
|
-
#import "VIPERWireFrame.h"
|
7
|
-
|
8
|
-
@implementation VIPERWireFrame
|
9
|
-
|
10
|
-
+ (void)presentVIPERModuleFrom:(UIViewController*)fromViewController
|
11
|
-
{
|
12
|
-
// Generating module components
|
13
|
-
UIViewController <VIPERViewProtocol> *viewController = [[VIPERViewController alloc] init];
|
14
|
-
id <VIPERPresenterProtocol, VIPERInteractorOutputProtocol> presenter = [VIPERPresenter new];
|
15
|
-
id <VIPERInteractorInputProtocol, VIPERDataManagerOutputProtocol> interactor = [VIPERInteractor new];
|
16
|
-
id <VIPERDataManagerInputProtocol> dataManager = [VIPERDataManager new];
|
17
|
-
VIPERWireFrame *wireFrame = [VIPERWireFrame new];
|
18
|
-
|
19
|
-
// Connecting
|
20
|
-
viewController.presenter = presenter;
|
21
|
-
presenter.view = viewController;
|
22
|
-
presenter.wireFrame = wireFrame;
|
23
|
-
presenter.interactor = interactor;
|
24
|
-
interactor.presenter = presenter;
|
25
|
-
interactor.dataManager = dataManager;
|
26
|
-
dataManager.interactor = interactor;
|
27
|
-
|
28
|
-
//TOODO - New view controller presentation (present, push, pop, .. )
|
29
|
-
}
|
30
|
-
|
31
|
-
@end
|