vipergeng 0.2.13 → 0.2.14
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6aa877d8942a8418e6db650eab3aa2485622ed7
|
4
|
+
data.tar.gz: ae67ee8263c8a02ed62a10fc9229476b6f7e35f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ce6e7e6cd4f8572f8404614f6211e1528a26a18fe7febc77253bce64baa767b907d8b9e687743884f1e5f4ddfce86a701e18171a24113391aca51de2fd69cca
|
7
|
+
data.tar.gz: 5ff4d42253907e8553f93a60380ca271bb29b01987d79f71026f7b7c9606baa7b4c67fa7d722ba5982c3e2b5bf513f1352299a25aa5de1ba4f36fdb5be350fe9
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Viper Module Generator G version
|
|
8
8
|
|
9
9
|

|
10
10
|
|
11
|
-
Gem to generate VIPER modules to use them in your
|
11
|
+
Gem to generate VIPER modules to use them in your Swift projects
|
12
12
|
The implementation scheme returned by this generator is hardly inspired in the example and post of Objc.io, http://www.objc.io/issue-13/viper.html .
|
13
13
|
|
14
14
|
- [Features](#features)
|
@@ -23,7 +23,7 @@ The implementation scheme returned by this generator is hardly inspired in the e
|
|
23
23
|
- [Resources](#resources)
|
24
24
|
|
25
25
|
## Features
|
26
|
-
- Generates the module in Swift
|
26
|
+
- Generates the module in Swift
|
27
27
|
- Ready to be installed as a gem https://rubygems.org/gems/VIPERGen
|
28
28
|
|
29
29
|
### Changelog 0.1.6
|
@@ -42,29 +42,11 @@ The implementation scheme returned by this generator is hardly inspired in the e
|
|
42
42
|
- Add `COMPANY` parameter to set the company name on the files header
|
43
43
|
- Set Swift as the default language
|
44
44
|
|
45
|
-
### Changelog 0.2.
|
45
|
+
### Changelog 0.2.13
|
46
46
|
- Add `PROJECT` parameter to set the company name on the files header
|
47
47
|
|
48
48
|
## Viper files structure
|
49
49
|
```bash
|
50
|
-
.objc
|
51
|
-
+-- DataManager
|
52
|
-
| +-- VIPERDataManager.h
|
53
|
-
| +-- VIPERDataManager.m
|
54
|
-
+-- Interactor
|
55
|
-
| +-- VIPERInteractor.h
|
56
|
-
| +-- VIPERInteractor.m
|
57
|
-
+-- Presenter
|
58
|
-
| +-- VIPERPresenter.h
|
59
|
-
| +-- VIPERPresenter.m
|
60
|
-
+-- ViewController
|
61
|
-
| +-- VIPERViewController.h
|
62
|
-
| +-- VIPERViewController.m
|
63
|
-
+-- WireFrame
|
64
|
-
| +-- VIPERWireFrame.h
|
65
|
-
| +-- VIPERWireFrame.m
|
66
|
-
+-- Protocols
|
67
|
-
| +-- VIPERProtocols.h
|
68
50
|
.swift
|
69
51
|
+-- DataManager
|
70
52
|
| +-- VIPERDataManager.swift
|
@@ -93,7 +75,7 @@ vipergeng generate MyFirstViperModule --path=~/myproject/shared
|
|
93
75
|
```
|
94
76
|
Another example:
|
95
77
|
```bash
|
96
|
-
vipergeng generate MySecondViperModule --path=~/myproject/shared --author='My Name' --company='My Company' --
|
78
|
+
vipergeng generate MySecondViperModule --path=~/myproject/shared --author='My Name' --company='My Company' --project='project name'
|
97
79
|
```
|
98
80
|
|
99
81
|
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
|
@@ -111,7 +93,7 @@ Then you'll be asked for your credentials in order to make the update in the rep
|
|
111
93
|
### Add a new template
|
112
94
|
Are you interested in VIPER and you would like to contribute with this gem adding new templates? Feel free to do it. It's pretty easy. You've just to:
|
113
95
|
- Create a folder inside `templates` with the name of your template
|
114
|
-
- You'll have to create inside the templates in
|
96
|
+
- You'll have to create inside the templates in Swift (get inspired from existing templates)
|
115
97
|
- Use the word VIPER where you want the name to be replaced in.
|
116
98
|
- Remember to add the file viperspec.yml with the description of your template as below:
|
117
99
|
```yaml
|
data/lib/vipergen/version.rb
CHANGED
data/lib/vipergen/viperthor.rb
CHANGED
@@ -4,14 +4,14 @@ require 'vipergen'
|
|
4
4
|
module Vipergen
|
5
5
|
class ViperThor < Thor
|
6
6
|
desc "generate MODULE", "Generate a VIPER module"
|
7
|
-
option :language, :required => false, :default => 'swift', :type => :string, :desc => "The language of the generated module (swift, objc)"
|
7
|
+
# option :language, :required => false, :default => 'swift', :type => :string, :desc => "The language of the generated module (swift, objc)"
|
8
8
|
option :template, :required => false, :default => 'default', :type => :string , :desc => "Template for the generation"
|
9
9
|
option :path, :required => true, :type => :string , :desc => "Path where the output module is going to be saved"
|
10
10
|
option :author, :required => false, :default => 'VIPER', :type => :string , :desc => "Author to be specified on the file's header. Otherwise VIPER will be used"
|
11
11
|
option :company, :required => false, :default => 'Company', :type => :string, :desc => "Company to be specified on the file's header. Otherwise Company will be used"
|
12
12
|
option :project, :required => false, :default => 'Project', :type => :string, :desc => "Project to be specified on the file's header. Otherwise Project will be used"
|
13
13
|
def generate(name)
|
14
|
-
Vipergen::Generator.generate_viper(options[:template],
|
14
|
+
Vipergen::Generator.generate_viper(options[:template], 'swift', name, options[:path], options[:author], options[:company], options[:project])
|
15
15
|
end
|
16
16
|
|
17
17
|
desc "templates", "Get a list of available templates"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vipergeng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pedro Piñera
|
@@ -113,7 +113,7 @@ files:
|
|
113
113
|
- lib/templates/default/swift/Interactor/VIPERItem.swift
|
114
114
|
- lib/templates/default/swift/Presenter/VIPERPresenter.swift
|
115
115
|
- lib/templates/default/swift/Protocols/VIPERProtocols.swift
|
116
|
-
- lib/templates/default/swift/
|
116
|
+
- lib/templates/default/swift/ViewController/VIPERViewController.swift
|
117
117
|
- lib/templates/default/swift/WireFrame/VIPERWireFrame.swift
|
118
118
|
- lib/templates/default/viperspec.yml
|
119
119
|
- lib/templates/naja/swift/Interactor/VIPERInteractor.swift
|
File without changes
|