vipergen-afnan 0.2.7 → 0.2.8

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: 2b00196a7d3e615c449d19d50edee3091bd08676
4
- data.tar.gz: 96b584282d700df052e0bcfe6f7312462bb1fccc
3
+ metadata.gz: db7ee9afe28c6705132dd71165ca47c8032a08d1
4
+ data.tar.gz: 183fdb46c9053c1f25804c1c910b2a8d01f3210f
5
5
  SHA512:
6
- metadata.gz: 1a058058ade86443ad259fa759427f32b4a0dde86407c164c17ff50b3aaf85ce9986bb9216239e853f2692cfab762f31bd71a731b3a8e9b0dfaab75931a7a739
7
- data.tar.gz: f85670ec8d9892e71f942c203a0893499da9b794ad3c125cd760e4034790bd84c69a18e31fb6e3b487569ec2436004d40da98d9959c3fab27281a771698874d3
6
+ metadata.gz: d079a298067225dfdcc832b275340002c08e106c34351cffb23e40ad5352b46d1f4401977d5a96ec17ade3c2e5aaf62b43b7c069950f4dd3cf7234d60065ca89
7
+ data.tar.gz: d026ef0a38c0b322560432310464c258dcd0b943a5b13425a99aefa62b2d563b778e2f1a5964cabf74058ea4cafcf644c9046558841e7e8fc82ab5a6c7c67784
data/README.md CHANGED
@@ -85,7 +85,7 @@ The implementation scheme returned by this generator is hardly inspired in the e
85
85
  ## How to install vipergen ?
86
86
  You can install it easily as using the gem. With ruby installed in your OSX execute:
87
87
  ```bash
88
- sudo gem install vipergen-roche
88
+ sudo gem install vipergen-afnan
89
89
  ```
90
90
  If everything were right, you should have now the vipergem command available in your system console
91
91
 
@@ -144,6 +144,7 @@ updated_at: 2014-08-24
144
144
  ### Available Templates
145
145
  - default by pepimbur
146
146
  - testable by wojtysim (includes Spec file templates for Interactor, Presenter and View)
147
+ - MAU by afnan-ahmad (restructured default template)
147
148
 
148
149
  ## Resources
149
150
  - Redbooth presentation: https://speakerdeck.com/sergigracia/clean-architecture-viper
@@ -0,0 +1,56 @@
1
+ //
2
+ // VIPERInteractorTests.m
3
+ // PROJECT
4
+ //
5
+ // Created by AUTHOR on DATE.
6
+ // Copyright © YEAR COMPANY. All rights reserved.
7
+ //
8
+
9
+ #import <XCTest/XCTest.h>
10
+ #import <OCMock/OCMock.h>
11
+ #import "VIPERInteractor.h"
12
+ #import "VIPERLocalDataManager.h"
13
+ #import "VIPERAPIDataManager.h"
14
+ #import "VIPERDayItem.h"
15
+
16
+ @interface VIPERInteractorTests : XCTestCase
17
+
18
+ @property (nonatomic, strong) VIPERInteractor *interactor;
19
+ @property (nonatomic, strong) id presenter;
20
+ @property (nonatomic, strong) id dataManager;
21
+ @property (nonatomic, strong) id apiManager;
22
+
23
+ @end
24
+
25
+ @implementation VIPERInteractorTests
26
+
27
+ - (void)setUp
28
+ {
29
+ [super setUp];
30
+
31
+ self.dataManager = [OCMockObject niceMockForClass:[VIPERLocalDataManager class]];
32
+ self.apiManager = [OCMockObject niceMockForClass:[VIPERAPIDataManager class]];
33
+
34
+ self.interactor = [[VIPERInteractor alloc] init];
35
+ self.presenter = [OCMockObject niceMockForProtocol:@protocol(VIPERInteractorOutputProtocol)];
36
+
37
+ self.interactor.presenter = self.presenter;
38
+ self.interactor.localDataManager = self.dataManager;
39
+ self.interactor.APIDataManager = self.apiManager;
40
+
41
+
42
+ [MagicalRecord setupCoreDataStackWithInMemoryStore];
43
+ }
44
+
45
+ - (void)tearDown
46
+ {
47
+ [self.dataManager verify];
48
+ [self.apiManager verify];
49
+ [self.presenter verify];
50
+
51
+ [MagicalRecord cleanUp];
52
+
53
+ [super tearDown];
54
+ }
55
+
56
+ @end
@@ -0,0 +1,54 @@
1
+ //
2
+ // VIPERPresenterTests.m
3
+ // PROJECT
4
+ //
5
+ // Created by AUTHOR on DATE.
6
+ // Copyright © YEAR COMPANY. All rights reserved.
7
+ //
8
+
9
+ #import <XCTest/XCTest.h>
10
+ #import <OCMock/OCMock.h>
11
+ #import "VIPERPresenter.h"
12
+ #import "VIPERWireFrame.h"
13
+ #import "VIPERView.h"
14
+ #import "VIPERInteractor.h"
15
+
16
+ @interface VIPERPresenterTests : XCTestCase
17
+
18
+ @property (nonatomic, strong) VIPERPresenter *presenter;
19
+ @property (nonatomic, strong) id wireframe;
20
+ @property (nonatomic, strong) id view;
21
+ @property (nonatomic, strong) id interactor;
22
+
23
+ @end
24
+
25
+ @implementation VIPERPresenterTests
26
+
27
+ - (void)setUp
28
+ {
29
+ [super setUp];
30
+
31
+ self.presenter = [[VIPERPresenter alloc] init];
32
+ self.wireframe = [OCMockObject niceMockForClass:[VIPERWireFrame class]];
33
+ self.view = [OCMockObject niceMockForClass:[VIPERView class]];
34
+ self.interactor = [OCMockObject niceMockForClass:[VIPERInteractor class]];
35
+
36
+ self.presenter.wireFrame = self.wireframe;
37
+ self.presenter.view = self.view;
38
+ self.presenter.interactor = self.interactor;
39
+
40
+ [MagicalRecord setupCoreDataStackWithInMemoryStore];
41
+ }
42
+
43
+ - (void)tearDown
44
+ {
45
+ [self.wireframe verify];
46
+ [self.view verify];
47
+ [self.interactor verify];
48
+
49
+ [MagicalRecord cleanUp];
50
+
51
+ [super tearDown];
52
+ }
53
+
54
+ @end
@@ -0,0 +1,43 @@
1
+ //
2
+ // VIPERViewTests.m
3
+ // PROJECT
4
+ //
5
+ // Created by AUTHOR on DATE.
6
+ // Copyright © YEAR COMPANY. All rights reserved.
7
+ //
8
+
9
+ #import <XCTest/XCTest.h>
10
+ #import <OCMock/OCMock.h>
11
+ #import "VIPERView.h"
12
+ #import "VIPERPresenter.h"
13
+ #import "VIPERSlotItem.h"
14
+ #import "VIPERDayItem.h"
15
+
16
+ @interface VIPERViewTests : XCTestCase
17
+
18
+ @property (nonatomic, strong) VIPERView *view;
19
+ @property (nonatomic, strong) id presenter;
20
+
21
+ @end
22
+
23
+ @implementation VIPERViewTests
24
+
25
+ - (void)setUp
26
+ {
27
+ [super setUp];
28
+
29
+ self.view = [[[NSBundle mainBundle] loadNibNamed:@"VIPER" owner:nil options:nil] firstObject];
30
+ self.presenter = [OCMockObject niceMockForClass:[VIPERPresenter class]];
31
+
32
+ [UIApplication sharedApplication].keyWindow.rootViewController = self.view;
33
+ self.view.presenter = self.presenter;
34
+ }
35
+
36
+ - (void)tearDown
37
+ {
38
+ [self.presenter verify];
39
+
40
+ [super tearDown];
41
+ }
42
+
43
+ @end
@@ -0,0 +1,35 @@
1
+ //
2
+ // VIPERInteractorTests.swift
3
+ // PROJECT
4
+ //
5
+ // Created by AUTHOR on DATE.
6
+ // Copyright © YEAR COMPANY. All rights reserved.
7
+ //
8
+
9
+ import XCTest
10
+
11
+ class VIPERInteractorTests: XCTestCase {
12
+
13
+ override func setUp() {
14
+ super.setUp()
15
+ // Put setup code here. This method is called before the invocation of each test method in the class.
16
+ }
17
+
18
+ override func tearDown() {
19
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
20
+ super.tearDown()
21
+ }
22
+
23
+ func testExample() {
24
+ // This is an example of a functional test case.
25
+ // Use XCTAssert and related functions to verify your tests produce the correct results.
26
+ }
27
+
28
+ func testPerformanceExample() {
29
+ // This is an example of a performance test case.
30
+ self.measureBlock {
31
+ // Put the code you want to measure the time of here.
32
+ }
33
+ }
34
+
35
+ }
@@ -0,0 +1,35 @@
1
+ //
2
+ // VIPERPresenterTests.swift
3
+ // PROJECT
4
+ //
5
+ // Created by AUTHOR on DATE.
6
+ // Copyright © YEAR COMPANY. All rights reserved.
7
+ //
8
+
9
+ import XCTest
10
+
11
+ class VIPERPresenterTests: XCTestCase {
12
+
13
+ override func setUp() {
14
+ super.setUp()
15
+ // Put setup code here. This method is called before the invocation of each test method in the class.
16
+ }
17
+
18
+ override func tearDown() {
19
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
20
+ super.tearDown()
21
+ }
22
+
23
+ func testExample() {
24
+ // This is an example of a functional test case.
25
+ // Use XCTAssert and related functions to verify your tests produce the correct results.
26
+ }
27
+
28
+ func testPerformanceExample() {
29
+ // This is an example of a performance test case.
30
+ self.measureBlock {
31
+ // Put the code you want to measure the time of here.
32
+ }
33
+ }
34
+
35
+ }
@@ -0,0 +1,35 @@
1
+ //
2
+ // VIPERViewTests.swift
3
+ // PROJECT
4
+ //
5
+ // Created by AUTHOR on DATE.
6
+ // Copyright © YEAR COMPANY. All rights reserved.
7
+ //
8
+
9
+ import XCTest
10
+
11
+ class VIPERViewTests: XCTestCase {
12
+
13
+ override func setUp() {
14
+ super.setUp()
15
+ // Put setup code here. This method is called before the invocation of each test method in the class.
16
+ }
17
+
18
+ override func tearDown() {
19
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
20
+ super.tearDown()
21
+ }
22
+
23
+ func testExample() {
24
+ // This is an example of a functional test case.
25
+ // Use XCTAssert and related functions to verify your tests produce the correct results.
26
+ }
27
+
28
+ func testPerformanceExample() {
29
+ // This is an example of a performance test case.
30
+ self.measureBlock {
31
+ // Put the code you want to measure the time of here.
32
+ }
33
+ }
34
+
35
+ }
@@ -0,0 +1,4 @@
1
+ author: afnan
2
+ author_email: afnanahmad@live.com
3
+ template_description: custom VIPER testing template
4
+ updated_at: 2015-01-06
@@ -16,7 +16,7 @@
16
16
  @protocol VIPERLocalDataManagerInputProtocol;
17
17
  @protocol VIPERAPIDataManagerInputProtocol;
18
18
 
19
-
19
+ @class VIPERView;
20
20
  @class VIPERWireFrame;
21
21
 
22
22
  @protocol VIPERViewProtocol
@@ -29,6 +29,7 @@
29
29
 
30
30
  @protocol VIPERWireFrameProtocol
31
31
  @required
32
+ @property (nonatomic, strong) VIPERView *view;
32
33
  + (void)presentVIPERModuleFrom:(id)fromView;
33
34
  /**
34
35
  * Add here your methods for communication PRESENTER -> WIREFRAME
@@ -17,5 +17,6 @@
17
17
  #import <UIKit/UIKit.h>
18
18
 
19
19
  @interface VIPERWireFrame : NSObject <VIPERWireFrameProtocol>
20
+ @property (nonatomic, strong) VIPERView *view;
20
21
 
21
22
  @end
@@ -28,6 +28,7 @@
28
28
  interactor.presenter = presenter;
29
29
  interactor.APIDataManager = APIDataManager;
30
30
  interactor.localDataManager = localDataManager;
31
+ wireFrame.view = view;
31
32
 
32
33
  //TODO: - New view controller presentation (present, push, pop, .. )
33
34
  }
@@ -1,4 +1,4 @@
1
1
  author: afnan
2
2
  author_email: afnanahmad@live.com
3
- template_description: cutom VIPER template
3
+ template_description: custom VIPER template
4
4
  updated_at: 2015-10-07
@@ -1,4 +1,4 @@
1
1
  module Vipergen
2
2
  NAME = "vipergen"
3
- VERSION = "0.2.7"
3
+ VERSION = "0.2.8"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vipergen-afnan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Piñera
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-07 00:00:00.000000000 Z
12
+ date: 2016-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -93,6 +93,13 @@ files:
93
93
  - LICENSE
94
94
  - README.md
95
95
  - bin/vipergen
96
+ - lib/templates/MAU-tests/objc/VIPERInteractorTests.m
97
+ - lib/templates/MAU-tests/objc/VIPERPresenterTests.m
98
+ - lib/templates/MAU-tests/objc/VIPERViewTests.m
99
+ - lib/templates/MAU-tests/swift/VIPERInteractorTests.swift
100
+ - lib/templates/MAU-tests/swift/VIPERPresenterTests.swift
101
+ - lib/templates/MAU-tests/swift/VIPERViewTests.swift
102
+ - lib/templates/MAU-tests/viperspec.yml
96
103
  - lib/templates/MAU/objc/Application Logic/DataManager/API/VIPERAPIDataManager.h
97
104
  - lib/templates/MAU/objc/Application Logic/DataManager/API/VIPERAPIDataManager.m
98
105
  - lib/templates/MAU/objc/Application Logic/DataManager/Local/VIPERLocalDataManager.h