Skip to content

Commit

Permalink
Merge branch 'release/0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Egor Tolstoy committed Nov 15, 2015
2 parents 5d86e2c + 45abdeb commit 1bfb2f6
Show file tree
Hide file tree
Showing 170 changed files with 2,482 additions and 1,525 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea/.name
.idea/Generamba.iml
.idea/misc.xml
.idea/modules.xml
.idea/vcs.xml
.idea/workspace.xml
270 changes: 133 additions & 137 deletions GenerambaSandbox/GenerambaSandbox.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
// AuthorizationAssembly.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

#import <Typhoon/Typhoon.h>
#import <RamblerTyphoonUtils/AssemblyCollector.h>

/**
@author Egor Tolstoy
Authorization module
*/
@interface AuthorizationAssembly : TyphoonAssembly
@interface AuthorizationAssembly : TyphoonAssembly <RamblerInitialAssembly>

@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationAssembly.m
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand All @@ -27,6 +27,14 @@ - (AuthorizationViewController *)viewAuthorizationModule {
}];
}

- (AuthorizationInteractor *)interactorAuthorizationModule {
return [TyphoonDefinition withClass:[AuthorizationInteractor class]
configuration:^(TyphoonDefinition *definition) {
[definition injectProperty:@selector(output)
with:[self presenterAuthorizationModule]];
}];
}

- (AuthorizationPresenter *)presenterAuthorizationModule {
return [TyphoonDefinition withClass:[AuthorizationPresenter class]
configuration:^(TyphoonDefinition *definition) {
Expand All @@ -39,14 +47,6 @@ - (AuthorizationPresenter *)presenterAuthorizationModule {
}];
}

- (AuthorizationInteractor *)interactorAuthorizationModule {
return [TyphoonDefinition withClass:[AuthorizationInteractor class]
configuration:^(TyphoonDefinition *definition) {
[definition injectProperty:@selector(output)
with:[self presenterAuthorizationModule]];
}];
}

- (AuthorizationRouter *)routerAuthorizationModule {
return [TyphoonDefinition withClass:[AuthorizationRouter class]
configuration:^(TyphoonDefinition *definition) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationInteractor.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationInteractor.m
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationInteractorInput.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationInteractorOutput.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationModuleInput.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand All @@ -15,6 +15,6 @@
Метод инициирует стартовую конфигурацию текущего модуля
*/
- (void)configureCurrentModule;
- (void)configureModule;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationPresenter.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationPresenter.m
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand All @@ -16,12 +16,16 @@ @implementation AuthorizationPresenter

#pragma mark - Методы AuthorizationModuleInput

- (void)configureCurrentModule {
[self.view setupInitialState];
- (void)configureModule {
// Стартовая конфигурация модуля, не привязанная к состоянию view
}

#pragma mark - Методы AuthorizationInteractorOutput

#pragma mark - Методы AuthorizationViewOutput

- (void)didTriggerViewReadyEvent {
[self.view setupInitialState];
}

#pragma mark - Методы AuthorizationInteractorOutput

@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationRouter.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationRouter.m
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationRouterInput.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationViewController.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand All @@ -14,6 +14,6 @@

@interface AuthorizationViewController : UIViewController <AuthorizationViewInput>

@property (strong, nonatomic) id<AuthorizationViewOutput> output;
@property (nonatomic, strong) id<AuthorizationViewOutput> output;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationViewController.m
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand All @@ -12,10 +12,18 @@

@implementation AuthorizationViewController

#pragma mark - Методы жизненного цикла

- (void)viewDidLoad {
[super viewDidLoad];

[self.output didTriggerViewReadyEvent];
}

#pragma mark - Методы AuthorizationViewInput

- (void)setupInitialState {

// В этом методе происходит настройка параметров view, зависящих от ее жизненого цикла (создание элементов, анимации и пр.)
}

@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationViewInput.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand All @@ -13,7 +13,7 @@
/**
@author Egor Tolstoy
Метод настраивает начальный стейт экрана
Метод настраивает начальный стейт view
*/
- (void)setupInitialState;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
// AuthorizationViewOutput.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol AuthorizationViewOutput <NSObject>

/**
@author Egor Tolstoy
Метод сообщает презентеру о том, что view готова к работе
*/
- (void)didTriggerViewReadyEvent;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// AuthorizationAssemblyTests.m
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

#import <RamblerMcFlurry/Testing.h>
#import <RamblerTyphoonUtils/AssemblyTesting.h>
#import <Typhoon/Typhoon.h>

#import "AuthorizationAssembly.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationAssembly_Testable.h
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand All @@ -13,7 +13,7 @@
@class AuthorizationPresenter;
@class AuthorizationRouter;

@interface AuthorizationAssembly()
@interface AuthorizationAssembly ()

- (AuthorizationViewController *)viewAuthorizationModule;
- (AuthorizationPresenter *)presenterAuthorizationModule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationInteractorTests.m
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationPresenterTests.m
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down Expand Up @@ -55,19 +55,19 @@ - (void)tearDown {

#pragma mark - Тестирование методов AuthorizationModuleInput

- (void)testThatPresenterConfiguresModule {
#pragma mark - Тестирование методов AuthorizationViewOutput

- (void)testThatPresenterHandlesViewReadyEvent {
// given


// when
[self.presenter configureCurrentModule];
[self.presenter didTriggerViewReadyEvent];

// then
OCMVerify([self.mockView setupInitialState]);
}

#pragma mark - Тестирование методов AuthorizationViewOutput

#pragma mark - Тестирование методов AuthorizationInteractorOutput

@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationRouterTests.m
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AuthorizationViewControllerTests.m
// GenerambaSandbox
//
// Created by Egor Tolstoy on 01/11/2015.
// Created by Egor Tolstoy on 15/11/2015.
// Copyright 2015 Rambler&Co. All rights reserved.
//

Expand Down Expand Up @@ -45,6 +45,16 @@ - (void)tearDown {

#pragma mark - Тестирование жизненного цикла

- (void)testThatViewNotifiesPresenterOnDidLoad {
// given

// when
[self.controller viewDidLoad];

// then
OCMVerify([self.mockOutput didTriggerViewReadyEvent]);
}

#pragma mark - Тестирование методов интерфейса

#pragma mark - Тестирование методов AuthorizationViewInput
Expand Down
Loading

0 comments on commit 1bfb2f6

Please sign in to comment.