{"id":20156531,"url":"https://github.com/luccifer/ramba","last_synced_at":"2025-04-09T22:24:23.863Z","repository":{"id":75897960,"uuid":"83368710","full_name":"Luccifer/ramba","owner":"Luccifer","description":"Generamba VIPER Swift 3 - 4 Templates","archived":false,"fork":false,"pushed_at":"2017-04-14T10:05:29.000Z","size":12,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T00:23:01.428Z","etag":null,"topics":["generamba","ios","modules","swift","viper"],"latest_commit_sha":null,"homepage":"https://luccifer.github.io/ramba/","language":"Liquid","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Luccifer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-27T23:44:58.000Z","updated_at":"2023-11-24T05:35:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"539e980c-6cd1-429a-8c3b-91dc6149203d","html_url":"https://github.com/Luccifer/ramba","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luccifer%2Framba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luccifer%2Framba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luccifer%2Framba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luccifer%2Framba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Luccifer","download_url":"https://codeload.github.com/Luccifer/ramba/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248121115,"owners_count":21051077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generamba","ios","modules","swift","viper"],"created_at":"2024-11-13T23:39:05.949Z","updated_at":"2025-04-09T22:24:23.845Z","avatar_url":"https://github.com/Luccifer.png","language":"Liquid","funding_links":[],"categories":[],"sub_categories":[],"readme":"https://luccifer.github.io/ramba/\n\n![](https://img.shields.io/badge/swift-3.0.1-green.svg)\n![](https://img.shields.io/badge/VIPER-generamba-orange.svg)\n\n\n# HOWTO:\n\n\n1) [Install Generamba](https://github.com/rambler-digital-solutions/Generamba)\n\n2) [Initialize Generamba](https://github.com/rambler-digital-solutions/Generamba/wiki/Available-Commands#basic-generamba-configuration) in your project's folder and install templates from this repo\n\n3) open terminal and execute this in the same project's folder: \n```bash\n$ generamba gen Module swifty_viper\n```\n\nThe new VIPER Module/Submodule(whatever) will be generated in your project's folder with structure:\n\n\u003c!-- AUTO-GENERATED-CONTENT:START (DIRTREE:dir=./) --\u003e\n```\nModule\n  ├── View\n  │    └── ModuleViewController.swift\n  ├── Presenter\n  │    └── ModulePresenter.swift\n  ├── Interactor\n  │    └── ModuleInteractor.swift\n  ├── Router\n  │    └── ModuleRouter.swift\n  ├── Configurator\n  │    ├── ModuleConfigurator.swift \n  │    └── ModuleInitializer.swift\n  └── Protocols\n       └── ModuleProtocols.swift\n```\n\u003c!-- AUTO-GENERATED-CONTENT:END --\u003e\n\n# Example Content:\n\n```bash\ngeneramba gen Test swifty_viper\n``` \n\n### View -\u003e TestViewController.swift:\n\n```Swift\nimport UIKit\n\nclass TestViewController: UIViewController, TestViewInput {\n\n    var output: TestViewOutput!\n\n    // MARK: Life cycle\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        TestModuleConfigurator().configureModuleForViewInput(self)\n        output.viewIsReady()\n    }\n\n\n    // MARK: TestViewInput\n    func setupInitialState() {\n    }\n}\n```\n\n### Presenter -\u003e TestPresenter.swift:\n\n```Swift\nclass TestPresenter: TestModuleInput, TestViewOutput, TestInteractorOutput{\n\n    weak var view: TestViewInput!\n    var interactor: TestInteractorInput!\n    var router: TestRouterInput!\n\n    func viewIsReady() {\n\n    }\n}\n```\n\n### Interactor -\u003e TestInteractor.swift:\n\n```Swift\nclass TestInteractor: TestInteractorInput {\n\n    weak var output: TestInteractorOutput!\n\n}\n```\n\n### Router -\u003e TestRouter.swift:\n\n```Swift\nimport UIKit\n\nclass TestRouter: TestRouterInput {\n\n\tweak var view: UIViewController?\n}\n```\n\n### Configurator -\u003e TestConfigurator.swift:\n\n```Swift\nimport UIKit\n\nclass TestModuleConfigurator {\n\n    func configureModuleForViewInput\u003cUIViewController\u003e(_ viewInput: UIViewController) {\n\n        if let viewController = viewInput as? TestViewController {\n            configure(viewController)\n        }\n    }\n\n    private func configure(_ viewController: TestViewController) {\n\n        let router = TestRouter()\n        router.view = viewController\n\n        let presenter = TestPresenter()\n        presenter.view = viewController\n        presenter.router = router\n\n        let interactor = TestInteractor()\n        interactor.output = presenter\n\n        presenter.interactor = interactor\n        viewController.output = presenter\n    }\n\n}\n```\n\n### Configurator -\u003e TestInitializer.swift:\n\n```Swift\nimport UIKit\n\nclass TestModuleInitializer: NSObject {\n\n    //Connect with object on storyboard\n    @IBOutlet weak var viewController: TestViewController!\n\n    override func awakeFromNib() {\n\n        let configurator = TestModuleConfigurator()\n        configurator.configureModuleForViewInput(viewController)\n    }\n\n}\n```\n\n### Protocols -\u003e TestProtocols.swift:\n\n```Swift\nprotocol TestViewInput: class {\n\n    func setupInitialState()\n}\n\nprotocol TestViewOutput {\n\n    func viewIsReady()\n}\n\nprotocol TestModuleInput: class {\n\n}\n\nprotocol TestInteractorInput {\n\n}\n\nprotocol TestInteractorOutput: class {\n\n}\n\nprotocol TestRouterInput {\n\n}\n```\n\nRussian Federation, Moscow, 2017\nKarpushkin G.A\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluccifer%2Framba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluccifer%2Framba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluccifer%2Framba/lists"}