generamba-udf 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +10 -0
  3. data/.gitignore +4 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +17 -0
  6. data/CHANGELOG.md +191 -0
  7. data/Gemfile +6 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +62 -0
  10. data/Rakefile +6 -0
  11. data/VISION.md +41 -0
  12. data/bin/console +14 -0
  13. data/bin/generamba +5 -0
  14. data/bin/setup +7 -0
  15. data/docs/2.x/roadmap.md +365 -0
  16. data/generamba-1.6.0.gem +0 -0
  17. data/generamba-2.0.0.gem +0 -0
  18. data/generamba.gemspec +38 -0
  19. data/lib/generamba/cli/cli.rb +16 -0
  20. data/lib/generamba/cli/gen_command.rb +119 -0
  21. data/lib/generamba/cli/setup_command.rb +127 -0
  22. data/lib/generamba/cli/setup_username_command.rb +21 -0
  23. data/lib/generamba/cli/template/template_create_command.rb +40 -0
  24. data/lib/generamba/cli/template/template_group.rb +14 -0
  25. data/lib/generamba/cli/template/template_install_command.rb +21 -0
  26. data/lib/generamba/cli/template/template_list_command.rb +25 -0
  27. data/lib/generamba/cli/template/template_search_command.rb +30 -0
  28. data/lib/generamba/cli/thor_extension.rb +47 -0
  29. data/lib/generamba/cli/version_command.rb +25 -0
  30. data/lib/generamba/code_generation/Rambafile.liquid +44 -0
  31. data/lib/generamba/code_generation/code_module.rb +123 -0
  32. data/lib/generamba/code_generation/content_generator.rb +43 -0
  33. data/lib/generamba/code_generation/module_template.rb +31 -0
  34. data/lib/generamba/code_generation/rambafile_generator.rb +23 -0
  35. data/lib/generamba/configuration/user_preferences.rb +50 -0
  36. data/lib/generamba/constants/constants.rb +12 -0
  37. data/lib/generamba/constants/rambafile_constants.rb +41 -0
  38. data/lib/generamba/constants/rambaspec_constants.rb +22 -0
  39. data/lib/generamba/constants/user_preferences_constants.rb +5 -0
  40. data/lib/generamba/helpers/dependency_checker.rb +54 -0
  41. data/lib/generamba/helpers/gen_command_table_parameters_formatter.rb +41 -0
  42. data/lib/generamba/helpers/module_info_generator.rb +35 -0
  43. data/lib/generamba/helpers/module_validator.rb +85 -0
  44. data/lib/generamba/helpers/print_table.rb +17 -0
  45. data/lib/generamba/helpers/rambafile_validator.rb +18 -0
  46. data/lib/generamba/helpers/template_helper.rb +30 -0
  47. data/lib/generamba/helpers/xcodeproj_helper.rb +262 -0
  48. data/lib/generamba/module_generator.rb +148 -0
  49. data/lib/generamba/template/creator/new_template/Code/Service/service.h.liquid +11 -0
  50. data/lib/generamba/template/creator/new_template/Code/Service/service.m.liquid +13 -0
  51. data/lib/generamba/template/creator/new_template/Tests/Service/service_tests.m.liquid +35 -0
  52. data/lib/generamba/template/creator/new_template/template.rambaspec.liquid +20 -0
  53. data/lib/generamba/template/creator/template_creator.rb +39 -0
  54. data/lib/generamba/template/helpers/catalog_downloader.rb +58 -0
  55. data/lib/generamba/template/helpers/catalog_template_list_helper.rb +23 -0
  56. data/lib/generamba/template/helpers/catalog_template_search_helper.rb +27 -0
  57. data/lib/generamba/template/helpers/catalog_terminator.rb +21 -0
  58. data/lib/generamba/template/helpers/rambaspec_validator.rb +52 -0
  59. data/lib/generamba/template/installer/abstract_installer.rb +9 -0
  60. data/lib/generamba/template/installer/catalog_installer.rb +73 -0
  61. data/lib/generamba/template/installer/local_installer.rb +32 -0
  62. data/lib/generamba/template/installer/remote_installer.rb +50 -0
  63. data/lib/generamba/template/installer/template_installer_factory.rb +22 -0
  64. data/lib/generamba/template/processor/template_declaration.rb +36 -0
  65. data/lib/generamba/template/processor/template_processor.rb +75 -0
  66. data/lib/generamba/tools/string-colorize.rb +23 -0
  67. data/lib/generamba/version.rb +5 -0
  68. data/lib/generamba.rb +16 -0
  69. metadata +288 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 72175531705d96ad1dce3d2eb9af9a1eca8c261dd7dfe91ac0c17a593cc340b4
4
+ data.tar.gz: 7946692f09b2aef41e9f19c4552055c615847a3880797f4e6aa9a9e86ec73c42
5
+ SHA512:
6
+ metadata.gz: 313917272a8b6d5efdfb6f62edfbc1233859ed8446ce2b190159438505366dc6c1b838b7dad15c7527fc1f2aab9923428fb94e4eb9f2457c75759659f073d296
7
+ data.tar.gz: 7330e93890cae4ebb78e7d62de5d5f97090a70df6056217260ade2de77d09d9ad305026fbd43712e128464dee2214a22e0cad2bba2d43a470cfa2524ef55b888
data/.codeclimate.yml ADDED
@@ -0,0 +1,10 @@
1
+ engines:
2
+ rubocop:
3
+ enabled: true
4
+
5
+ ratings:
6
+ paths:
7
+ - "**.rb"
8
+
9
+ exclude_paths:
10
+ - spec/**/*
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ .idea/*
2
+ .rakeTasks
3
+ encodings.xml
4
+ Gemfile.lock
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,17 @@
1
+ language: objective-c
2
+ osx_image: xcode7.3
3
+
4
+ cache:
5
+ bundler: true
6
+
7
+ bundler_args: --jobs 3 --retry 3
8
+
9
+ rvm:
10
+ - 2.2.1
11
+ - 2.3.1
12
+
13
+ before_install:
14
+ - gem update --system --no-document
15
+ - gem install bundler -v 1.17.3 --no-document
16
+
17
+ script: bundle exec rake
data/CHANGELOG.md ADDED
@@ -0,0 +1,191 @@
1
+ # Change Log
2
+
3
+ ## [1.5.0](https://github.com/rambler-digital-solutions/Generamba/tree/1.5.0) (2019-04-29)
4
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/1.4.1...1.5.0)
5
+
6
+ **Merged pull requests:**
7
+
8
+ * Resolve Cocoapods Dependency hell [\#230](https://github.com/strongself/Generamba/pull/230)
9
+ * Update xcodeproj & cocoapods-core dependencies [\#222](https://github.com/strongself/Generamba/pull/222)
10
+ * Bump gems versions [\#201](https://github.com/strongself/Generamba/pull/201)
11
+ * Remove the author-specific information from Rambafile [\#1](https://github.com/strongself/Generamba/issues/1)
12
+ * Grammar fixes [\#1](https://github.com/strongself/Generamba/pull/198)
13
+
14
+ ## [1.4.1](https://github.com/rambler-digital-solutions/Generamba/tree/1.4.1) (2017-09-04)
15
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/1.4.0...1.4.1)
16
+
17
+ **Merged pull requests:**
18
+
19
+ * Do not clear tests group if **test\_group\_path** is the same as **project\_group\_path** [\#193](https://github.com/rambler-digital-solutions/Generamba/pull/193) ([RamTararam](https://github.com/RamTararam))
20
+
21
+ ## [1.2.2](https://github.com/rambler-digital-solutions/Generamba/tree/1.2.2) (2016-09-27)
22
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/1.2.1...1.2.2)
23
+
24
+ ## [1.2.1](https://github.com/rambler-digital-solutions/Generamba/tree/1.2.1) (2016-09-26)
25
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/1.2.0...1.2.1)
26
+
27
+ **Fixed bugs:**
28
+
29
+ - Crashes for multiple project targets [\#150](https://github.com/rambler-digital-solutions/Generamba/issues/150)
30
+
31
+ **Closed issues:**
32
+
33
+ - Can I create a template to generate swift-like structure objects for ObjC? [\#157](https://github.com/rambler-digital-solutions/Generamba/issues/157)
34
+ - Error generate module with option :exclusive=\>true in Podfile [\#154](https://github.com/rambler-digital-solutions/Generamba/issues/154)
35
+ - Module Generation Settings with project\_targets [\#151](https://github.com/rambler-digital-solutions/Generamba/issues/151)
36
+
37
+ ## [1.2.0](https://github.com/rambler-digital-solutions/Generamba/tree/1.2.0) (2016-09-05)
38
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/1.1.0...1.2.0)
39
+
40
+ **Fixed bugs:**
41
+
42
+ - Файлы в корне модуля [\#147](https://github.com/rambler-digital-solutions/Generamba/issues/147)
43
+
44
+ **Merged pull requests:**
45
+
46
+ - Bug fixes and refactoring [\#148](https://github.com/rambler-digital-solutions/Generamba/pull/148) ([Beniamiiin](https://github.com/Beniamiiin))
47
+
48
+ ## [1.1.0](https://github.com/rambler-digital-solutions/Generamba/tree/1.1.0) (2016-09-05)
49
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/1.0.0...1.1.0)
50
+
51
+ **Implemented enhancements:**
52
+
53
+ - Refactoring rambafile and module validation [\#144](https://github.com/rambler-digital-solutions/Generamba/issues/144)
54
+ - Update gen command parameters table [\#142](https://github.com/rambler-digital-solutions/Generamba/issues/142)
55
+ - If statement in .rambaspec [\#128](https://github.com/rambler-digital-solutions/Generamba/issues/128)
56
+ - Ask user, he want create all modules by one path? [\#126](https://github.com/rambler-digital-solutions/Generamba/issues/126)
57
+
58
+ **Fixed bugs:**
59
+
60
+ - Generates files with a wrongs paths. [\#138](https://github.com/rambler-digital-solutions/Generamba/issues/138)
61
+ - Install templates from git repo is broken? [\#135](https://github.com/rambler-digital-solutions/Generamba/issues/135)
62
+ - Error creating the Xcode group path to new modules [\#129](https://github.com/rambler-digital-solutions/Generamba/issues/129)
63
+ - If statement in .rambaspec [\#128](https://github.com/rambler-digital-solutions/Generamba/issues/128)
64
+
65
+ **Closed issues:**
66
+
67
+ - Error: `parse': \(Rambafile\): block sequence entries are not allowed [\#127](https://github.com/rambler-digital-solutions/Generamba/issues/127)
68
+
69
+ **Merged pull requests:**
70
+
71
+ - \[RESOLVED\] Added question in setup command \#126 [\#146](https://github.com/rambler-digital-solutions/Generamba/pull/146) ([Beniamiiin](https://github.com/Beniamiiin))
72
+ - \[RESOLVED\] Updated logic of rambafile and module validation \#144 [\#145](https://github.com/rambler-digital-solutions/Generamba/pull/145) ([Beniamiiin](https://github.com/Beniamiiin))
73
+ - \[RESOLVED\] Updated gen command parameters table \#142 [\#143](https://github.com/rambler-digital-solutions/Generamba/pull/143) ([Beniamiiin](https://github.com/Beniamiiin))
74
+ - \[RESOLVED\] Added ability use custom parameters in rambaspec \#128 [\#141](https://github.com/rambler-digital-solutions/Generamba/pull/141) ([Beniamiiin](https://github.com/Beniamiiin))
75
+ - \[FIXED\] Fixed bug \#138 [\#140](https://github.com/rambler-digital-solutions/Generamba/pull/140) ([Beniamiiin](https://github.com/Beniamiiin))
76
+ - Added product\_module\_name to code\_module [\#139](https://github.com/rambler-digital-solutions/Generamba/pull/139) ([mogol](https://github.com/mogol))
77
+ - A little refactoring [\#137](https://github.com/rambler-digital-solutions/Generamba/pull/137) ([Beniamiiin](https://github.com/Beniamiiin))
78
+ - Support Ruby 2.3.1 [\#134](https://github.com/rambler-digital-solutions/Generamba/pull/134) ([ivaravko](https://github.com/ivaravko))
79
+ - Helpers code style [\#133](https://github.com/rambler-digital-solutions/Generamba/pull/133) ([ivaravko](https://github.com/ivaravko))
80
+ - Adds Code Climate config [\#132](https://github.com/rambler-digital-solutions/Generamba/pull/132) ([ivaravko](https://github.com/ivaravko))
81
+
82
+ ## [1.0.0](https://github.com/rambler-digital-solutions/Generamba/tree/1.0.0) (2016-07-23)
83
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.7.8...1.0.0)
84
+
85
+ **Implemented enhancements:**
86
+
87
+ - Add more info to `generamba version` command [\#122](https://github.com/rambler-digital-solutions/Generamba/issues/122)
88
+ - Empty group in Xcode structure [\#118](https://github.com/rambler-digital-solutions/Generamba/issues/118)
89
+ - Gem dependency of cocoapods-core-0.39.0 [\#114](https://github.com/rambler-digital-solutions/Generamba/issues/114)
90
+ - Remove adding module name in module\_group\_path if it set from cli [\#98](https://github.com/rambler-digital-solutions/Generamba/issues/98)
91
+ - Check for missing Carthage dependencies [\#83](https://github.com/rambler-digital-solutions/Generamba/issues/83)
92
+ - Automatic tests generation based on protocols and class interfaces [\#71](https://github.com/rambler-digital-solutions/Generamba/issues/71)
93
+ - Track all modules created by Generamba [\#70](https://github.com/rambler-digital-solutions/Generamba/issues/70)
94
+
95
+ **Fixed bugs:**
96
+
97
+ - Can't add file with type . Only 'source' and 'resource' are acceptable [\#116](https://github.com/rambler-digital-solutions/Generamba/issues/116)
98
+ - If option --module-group-path starts with '/' Generamba add folder with empty name in root folder [\#99](https://github.com/rambler-digital-solutions/Generamba/issues/99)
99
+
100
+ ## [0.7.8](https://github.com/rambler-digital-solutions/Generamba/tree/0.7.8) (2016-05-16)
101
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.7.7...0.7.8)
102
+
103
+ ## [0.7.7](https://github.com/rambler-digital-solutions/Generamba/tree/0.7.7) (2016-05-10)
104
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.7.6...0.7.7)
105
+
106
+ **Implemented enhancements:**
107
+
108
+ - Project target name in module\_info [\#110](https://github.com/rambler-digital-solutions/Generamba/issues/110)
109
+ - Give a user more information about templates during `generamba setup` [\#86](https://github.com/rambler-digital-solutions/Generamba/issues/86)
110
+
111
+ ## [0.7.6](https://github.com/rambler-digital-solutions/Generamba/tree/0.7.6) (2016-04-30)
112
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.7.5...0.7.6)
113
+
114
+ **Fixed bugs:**
115
+
116
+ - Failed adding files to project [\#96](https://github.com/rambler-digital-solutions/Generamba/issues/96)
117
+
118
+ ## [0.7.5](https://github.com/rambler-digital-solutions/Generamba/tree/0.7.5) (2016-04-24)
119
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.7.4...0.7.5)
120
+
121
+ **Implemented enhancements:**
122
+
123
+ - Get templates from git by specific a branch [\#104](https://github.com/rambler-digital-solutions/Generamba/issues/104)
124
+
125
+ **Fixed bugs:**
126
+
127
+ - Non human exception when wrong template name or catalog [\#77](https://github.com/rambler-digital-solutions/Generamba/issues/77)
128
+
129
+ **Closed issues:**
130
+
131
+ - Module Name in .rambaspec support [\#102](https://github.com/rambler-digital-solutions/Generamba/issues/102)
132
+ - Generate with project and tests targets in command line [\#97](https://github.com/rambler-digital-solutions/Generamba/issues/97)
133
+ - Easy setup template path to local templates in Rambafile [\#94](https://github.com/rambler-digital-solutions/Generamba/issues/94)
134
+
135
+ ## [0.7.4](https://github.com/rambler-digital-solutions/Generamba/tree/0.7.4) (2016-02-21)
136
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.7.3...0.7.4)
137
+
138
+ **Implemented enhancements:**
139
+
140
+ - Asks the user if he needed tests in `generamba setup` command [\#85](https://github.com/rambler-digital-solutions/Generamba/issues/85)
141
+ - Improve the visualization of commands with parameters [\#69](https://github.com/rambler-digital-solutions/Generamba/issues/69)
142
+ - Can we introduce something similar to view partials in rails \(for duplicated parts of views\) [\#62](https://github.com/rambler-digital-solutions/Generamba/issues/62)
143
+
144
+ **Fixed bugs:**
145
+
146
+ - Add resources\(xib, storyboard and etc\) in project bundle resources. [\#84](https://github.com/rambler-digital-solutions/Generamba/issues/84)
147
+
148
+ **Closed issues:**
149
+
150
+ - Get "Liquid error: This liquid context does not allow includes." on all files in just generated module [\#93](https://github.com/rambler-digital-solutions/Generamba/issues/93)
151
+
152
+ ## [0.7.3](https://github.com/rambler-digital-solutions/Generamba/tree/0.7.3) (2016-01-24)
153
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.7.2...0.7.3)
154
+
155
+ **Implemented enhancements:**
156
+
157
+ - Enhance `generamba template search` to search templates in custom catalogs [\#75](https://github.com/rambler-digital-solutions/Generamba/issues/75)
158
+ - Enhance `generamba template list` to browse custom catalogs [\#74](https://github.com/rambler-digital-solutions/Generamba/issues/74)
159
+
160
+ **Closed issues:**
161
+
162
+ - Can we use constants from rambafile in templates? [\#81](https://github.com/rambler-digital-solutions/Generamba/issues/81)
163
+
164
+ ## [0.7.2](https://github.com/rambler-digital-solutions/Generamba/tree/0.7.2) (2016-01-10)
165
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.7.1...0.7.2)
166
+
167
+ **Fixed bugs:**
168
+
169
+ - Don't set target in swift projects [\#65](https://github.com/rambler-digital-solutions/Generamba/issues/65)
170
+ - Errors if default path is empty [\#64](https://github.com/rambler-digital-solutions/Generamba/issues/64)
171
+ - Default template set can not be used [\#60](https://github.com/rambler-digital-solutions/Generamba/issues/60)
172
+
173
+ ## [0.7.1](https://github.com/rambler-digital-solutions/Generamba/tree/0.7.1) (2015-12-20)
174
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.7.0...0.7.1)
175
+
176
+ ## [0.7.0](https://github.com/rambler-digital-solutions/Generamba/tree/0.7.0) (2015-12-13)
177
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.6.2...0.7.0)
178
+
179
+ ## [0.6.2](https://github.com/rambler-digital-solutions/Generamba/tree/0.6.2) (2015-11-25)
180
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.6.1...0.6.2)
181
+
182
+ ## [0.6.1](https://github.com/rambler-digital-solutions/Generamba/tree/0.6.1) (2015-11-21)
183
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.6.0...0.6.1)
184
+
185
+ ## [0.6.0](https://github.com/rambler-digital-solutions/Generamba/tree/0.6.0) (2015-11-15)
186
+ [Full Changelog](https://github.com/rambler-digital-solutions/Generamba/compare/0.5.0...0.6.0)
187
+
188
+ ## [0.5.0](https://github.com/rambler-digital-solutions/Generamba/tree/0.5.0) (2015-11-01)
189
+
190
+
191
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in generamba.gemspec
4
+ gemspec
5
+
6
+ gem 'rspec', '~> 3.0'
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Egor Tolstoy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,62 @@
1
+ <p align="center">
2
+ <img src="http://i.imgur.com/1AwoVaN.png"/>
3
+ </p>
4
+
5
+ [![Build Status](https://travis-ci.org/rambler-digital-solutions/Generamba.svg)](https://travis-ci.org/rambler-digital-solutions/Generamba)
6
+ [![Gem Version](https://badge.fury.io/rb/generamba.svg)](https://badge.fury.io/rb/generamba)
7
+ [![Code Climate](https://codeclimate.com/github/rambler-digital-solutions/Generamba/badges/gpa.svg)](https://codeclimate.com/github/rambler-digital-solutions/Generamba)
8
+
9
+ **Generamba** is a code generator made for working with Xcode. Primarily it is designed to generate VIPER modules but it is quite easy to customize it for generation of any other classes (both in Objective-C and Swift).
10
+
11
+ *We keep evolving Generamba:*
12
+ - [Vision](https://github.com/rambler-digital-solutions/Generamba/blob/develop/VISION.md),
13
+ - [Changelog](https://github.com/rambler-digital-solutions/Generamba/blob/develop/CHANGELOG.md),
14
+ - [Release notes](https://github.com/rambler-digital-solutions/Generamba/releases).
15
+
16
+ Besides, we started working on 2.0 version with powerful DSL and plugins. Check the [release roadmap](https://github.com/rambler-digital-solutions/Generamba/blob/develop/docs/2.x/roadmap.md)!
17
+
18
+ ![Generamba Screenshot](https://habrastorage.org/files/b98/770/b37/b98770b37dc54de98daf0e22fea38478.gif)
19
+
20
+ ### Key features
21
+
22
+ - Supports work with *.xcodeproj* files out of the box. All generated class files are automatically placed to specific folders and groups of Xcode project.
23
+ - Can generate both code itself and tests adding them to right targets.
24
+ - Based on work with [liquid-templates](https://github.com/Shopify/liquid) that have plain and readable syntax in comparison with templates for Xcode.
25
+ - It is very easy to create a new module: `generamba gen [MODULE_NAME] [TEMPLATE_NAME]`. You do not need to input a bunch of data each time because each project corresponds to only one configuration file that holds standard file system and Xcode-project pathes, names of targets, information about the author.
26
+
27
+ ### Installation
28
+
29
+ > Ruby 2.2 or later version is required. To check your current Ruby version run this command in terminal:
30
+ ```bash
31
+ $ ruby --version
32
+ ```
33
+ When necessary you can install the required Ruby version with the help of [`rvm`](http://octopress.org/docs/setup/rvm/) or [`rbenv`](http://octopress.org/docs/setup/rbenv/).
34
+
35
+ Run the command `gem install generamba`.
36
+
37
+ ### Usage
38
+ 1. Run [`generamba setup`](https://github.com/rambler-digital-solutions/Generamba/wiki/Available-Commands#basic-generamba-configuration) in the project root folder. This command helps to create [Rambafile](https://github.com/rambler-digital-solutions/Generamba/wiki/Rambafile-Structure) that define all configuration needed to generate code. You can modify this file directly in future.
39
+ 2. Add all templates planned to use in the project to the generated [Rambafile](https://github.com/rambler-digital-solutions/Generamba/wiki/Rambafile-Structure). You can begin with one of the templates from our catalog: `{name: 'rviper_controller'}`.
40
+ 3. Run [`generamba template install`](https://github.com/rambler-digital-solutions/Generamba/wiki/Available-Commands#template-installation). All the templates will be placed in the '/Templates' folder of your current project.
41
+ 4. Run [`generamba gen [MODULE_NAME] [TEMPLATE_NAME]`](https://github.com/rambler-digital-solutions/Generamba/wiki/Available-Commands#module-generation) - It creates module with specific name from specific template.
42
+
43
+ ### Additional info
44
+
45
+ Run `generamba help` to learn more about each of the Generamba features.
46
+
47
+ **Wiki:**
48
+ - [Command list](https://github.com/rambler-digital-solutions/Generamba/wiki/Available-Commands)
49
+ - [Understanding the Rambafile](https://github.com/rambler-digital-solutions/Generamba/wiki/Rambafile-Structure)
50
+ - [Understanding templates](https://github.com/rambler-digital-solutions/Generamba/wiki/Template-Structure)
51
+
52
+ **Other materials:**
53
+ - [Russian] Rambler.iOS V: Generamba and Code Generation ([Slides](http://www.slideshare.net/Rambler-iOS/viper-56423582) | [Video](http://www.youtube.com/watch?v=NXNiN9FaUnY))
54
+ - [Introduction to Generamba](http://etolstoy.com/2016/02/10/generamba/)
55
+
56
+ ### Authors
57
+
58
+ - Egor Tolstoy, Beniamin Sarkisyan, Andrey Zarembo and the rest of [Rambler.iOS team](https://github.com/orgs/rambler-digital-solutions/teams/ios-team).
59
+
60
+ ### License
61
+
62
+ MIT
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/VISION.md ADDED
@@ -0,0 +1,41 @@
1
+ # Vision
2
+
3
+ Generamba is a tool with one primary role:
4
+
5
+ > Routine tasks automation through code generation.
6
+
7
+ At first it was designed to work only with Xcode - IDE for iOS/macOS, but as time passed we saw a lot of opportunities to use it in other circumstances, e.g. in frontend, Android and backend development.
8
+
9
+ ### What Is Generamba
10
+
11
+ The Generamba core is a simple generator that takes a [liquid](https://shopify.github.io/liquid/) template and a set of parameters as an input and produces a text snippet as an output. Everything else is built upon this simple concept.
12
+
13
+ There are a lot of IDE's, package managers and other stuff which is related to creating new code modules. We try to keep the core small but provide rich opportunities for integration with all these tools via plugins *(in development)* and templates *(ready to use)* systems.
14
+
15
+ ### General Aim
16
+
17
+ Our general aim is to provide a simple yet extensible way to generate any piece of code. The beginner should be able to create new code modules without complex configuration process. Generamba capabilities should grow as fast as the user needs, providing ways to validate the environment status, integrations with different file systems and IDEs, complex statements inside templates and so on.
18
+
19
+ ### Templates
20
+
21
+ Code templates are the fuel for Generamba. We use a [liquid](https://shopify.github.io/liquid/) markup, because of its beautiful syntax and the ability to implement really complex logic.
22
+
23
+ Templates may be private as well as adopted for public. We provide a number of ways to install them - using local paths, remote git repository, public or private catalogs.
24
+
25
+ We also maintain a [public catalog](https://github.com/rambler-digital-solutions/generamba-catalog) which has some popular templates for iOS/macOS projects.
26
+
27
+ ### Communication
28
+
29
+ We try to keep all the discussion about Generamba within [GitHub issues](https://github.com/rambler-digital-solutions/Generamba/issues). This attitude allows us to keep our processes and intentions transparent.
30
+
31
+ Besides it there is a private Telegram channel where maintainers discuss work questions. We are considering moving to Slack or Gitter at some point in the future - but we haven't grown big enough yet.
32
+
33
+ ### Contributions
34
+
35
+ Despite main maintainers are engineers from Rambler&Co team, we are glad to welcome external contributors. Generamba has evolved a lot since the first alpha release thanks to a lot of ideas from its users that came in the form of issues and pull requests.
36
+
37
+ The aim of our core team is to adopt Generamba possibilities to each user needs and provide him a way to extend its functionality himself.
38
+
39
+ ### ...
40
+
41
+ The structure and idea of *VISION.md* file was taken from the [Danger](https://github.com/danger/danger) project and [@orta](https://github.com/orta).
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "generamba"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/generamba ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'generamba'
4
+
5
+ Generamba::CLI::Application.start(ARGV)
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here