generamba 0.7.5 → 0.7.6

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: 42e0536cf5d817ae13ea91bae5486c78bf904105
4
- data.tar.gz: 968e719a76cdf580d9e0a7e9778cec1632c5ce45
3
+ metadata.gz: 04129f5e6777daf44ff8abc73838ae0faa4d4143
4
+ data.tar.gz: 8deecaf4017ca3f9260625254b20847de3788356
5
5
  SHA512:
6
- metadata.gz: c05b963e09b56a990cf53f6a1cd913207755a49f8dae728d2a993034c1f917b7ea1463d6cab24d81eeed0082a730970c7c7aeae49a00cffca9bfd4fdad994dfa
7
- data.tar.gz: 24a00a2acaaa7f1d69d6f4b64e6321b7bb7b63871083286cc3b86ce0f821bce15f72288d4020b44fd69b103fa5a2a0d5aa6696739c0610239f53287f8b3771bb
6
+ metadata.gz: d39bf225fadf01ff2edd26de5d808fe35e3efea4294bce452df27ebe4f9b46d3582e8091c05f2a67c1ba24ac0d51a8e851b5e7359f6dabdb46642c5531d9dc37
7
+ data.tar.gz: 4824dbce92c86b7c53816fe89487661b048f307558964c6e6b3f151633473258f7142b98442460bb69b64eeda482d4d557591978c825fced3e8d44a7a9a74383
data/.travis.yml CHANGED
@@ -2,4 +2,4 @@ os:
2
2
  - osx
3
3
  language: ruby
4
4
  rvm:
5
- - 2.1.6
5
+ - 2.2.1
data/CHANGELOG.md CHANGED
@@ -1,11 +1,35 @@
1
1
  # Change Log
2
2
 
3
+ ## [0.7.5](https://github.com/rambler-ios/Generamba/tree/0.7.5) (2016-04-24)
4
+ [Full Changelog](https://github.com/rambler-ios/Generamba/compare/0.7.4...0.7.5)
5
+
6
+ **Implemented enhancements:**
7
+
8
+ - Get templates from git by specific a branch [\#104](https://github.com/rambler-ios/Generamba/issues/104)
9
+
10
+ **Fixed bugs:**
11
+
12
+ - Generamba generator: Could not find 'generamba' [\#103](https://github.com/rambler-ios/Generamba/issues/103)
13
+ - Layout issue in "Summary for gen module" [\#95](https://github.com/rambler-ios/Generamba/issues/95)
14
+
15
+ **Closed issues:**
16
+
17
+ - Module Name in .rambaspec support [\#102](https://github.com/rambler-ios/Generamba/issues/102)
18
+ - Generate with project and tests targets in command line [\#97](https://github.com/rambler-ios/Generamba/issues/97)
19
+ - Easy setup template path to local templates in Rambafile [\#94](https://github.com/rambler-ios/Generamba/issues/94)
20
+
21
+ **Merged pull requests:**
22
+
23
+ - Fixed \#104 [\#106](https://github.com/rambler-ios/Generamba/pull/106) ([Beniamiiin](https://github.com/Beniamiiin))
24
+ - Fixed \#95 [\#105](https://github.com/rambler-ios/Generamba/pull/105) ([Beniamiiin](https://github.com/Beniamiiin))
25
+
3
26
  ## [0.7.4](https://github.com/rambler-ios/Generamba/tree/0.7.4) (2016-02-21)
4
27
  [Full Changelog](https://github.com/rambler-ios/Generamba/compare/0.7.3...0.7.4)
5
28
 
6
29
  **Implemented enhancements:**
7
30
 
8
31
  - Asks the user if he needed tests in `generamba setup` command [\#85](https://github.com/rambler-ios/Generamba/issues/85)
32
+ - Improve the visualization of commands with parameters [\#69](https://github.com/rambler-ios/Generamba/issues/69)
9
33
  - Can we introduce something similar to view partials in rails \(for duplicated parts of views\) [\#62](https://github.com/rambler-ios/Generamba/issues/62)
10
34
 
11
35
  **Fixed bugs:**
@@ -23,7 +47,6 @@
23
47
 
24
48
  - Enhance `generamba template search` to search templates in custom catalogs [\#75](https://github.com/rambler-ios/Generamba/issues/75)
25
49
  - Enhance `generamba template list` to browse custom catalogs [\#74](https://github.com/rambler-ios/Generamba/issues/74)
26
- - Warn the user if template contains missing dependencies [\#17](https://github.com/rambler-ios/Generamba/issues/17)
27
50
 
28
51
  **Closed issues:**
29
52
 
@@ -42,6 +65,8 @@
42
65
  **Fixed bugs:**
43
66
 
44
67
  - Don't set target in swift projects [\#65](https://github.com/rambler-ios/Generamba/issues/65)
68
+ - Errors if default path is empty [\#64](https://github.com/rambler-ios/Generamba/issues/64)
69
+ - Default template set can not be used [\#60](https://github.com/rambler-ios/Generamba/issues/60)
45
70
  - Incorrect behavior when generate module which already exists [\#52](https://github.com/rambler-ios/Generamba/issues/52)
46
71
 
47
72
  **Closed issues:**
@@ -50,7 +75,6 @@
50
75
  - Git 1.2.9.1 [\#57](https://github.com/rambler-ios/Generamba/issues/57)
51
76
  - Clarify generamba parameters usage [\#51](https://github.com/rambler-ios/Generamba/issues/51)
52
77
  - Add documentation for liquid templates [\#48](https://github.com/rambler-ios/Generamba/issues/48)
53
- - The documentation is not translated into English [\#13](https://github.com/rambler-ios/Generamba/issues/13)
54
78
 
55
79
  ## [0.7.1](https://github.com/rambler-ios/Generamba/tree/0.7.1) (2015-12-20)
56
80
  [Full Changelog](https://github.com/rambler-ios/Generamba/compare/0.7.0...0.7.1)
@@ -78,7 +102,6 @@
78
102
  - Add a `generamba template search` command [\#26](https://github.com/rambler-ios/Generamba/issues/26)
79
103
  - Add a `generamba template list` command [\#25](https://github.com/rambler-ios/Generamba/issues/25)
80
104
  - Add the if statements to the Rambafile.liquid [\#22](https://github.com/rambler-ios/Generamba/issues/22)
81
- - Target membership for module sources [\#11](https://github.com/rambler-ios/Generamba/issues/11)
82
105
 
83
106
  **Fixed bugs:**
84
107
 
@@ -91,6 +114,7 @@
91
114
  **Fixed bugs:**
92
115
 
93
116
  - Can't install template from git repo [\#36](https://github.com/rambler-ios/Generamba/issues/36)
117
+ - Can't find template by local fullpath [\#35](https://github.com/rambler-ios/Generamba/issues/35)
94
118
 
95
119
  **Closed issues:**
96
120
 
@@ -99,10 +123,6 @@
99
123
  ## [0.6.1](https://github.com/rambler-ios/Generamba/tree/0.6.1) (2015-11-21)
100
124
  [Full Changelog](https://github.com/rambler-ios/Generamba/compare/0.6.0...0.6.1)
101
125
 
102
- **Implemented enhancements:**
103
-
104
- - Add Rambafile validation [\#10](https://github.com/rambler-ios/Generamba/issues/10)
105
-
106
126
  **Fixed bugs:**
107
127
 
108
128
  - The author name should be configured without `generamba setup` [\#31](https://github.com/rambler-ios/Generamba/issues/31)
@@ -112,7 +132,6 @@
112
132
  **Closed issues:**
113
133
 
114
134
  - Add a documentation for a .rambaspec file and overall template structure [\#24](https://github.com/rambler-ios/Generamba/issues/24)
115
- - Rambafile format is not documented [\#9](https://github.com/rambler-ios/Generamba/issues/9)
116
135
 
117
136
  ## [0.6.0](https://github.com/rambler-ios/Generamba/tree/0.6.0) (2015-11-15)
118
137
  [Full Changelog](https://github.com/rambler-ios/Generamba/compare/0.5.0...0.6.0)
@@ -121,15 +140,10 @@
121
140
 
122
141
  - Add a podfile\_path/cartfile\_path fields to a Rambafile [\#19](https://github.com/rambler-ios/Generamba/issues/19)
123
142
  - Add a dependencies field to the .rambaspec [\#18](https://github.com/rambler-ios/Generamba/issues/18)
124
- - Move the hardcoded keys to the constants [\#15](https://github.com/rambler-ios/Generamba/issues/15)
125
- - Implement automatic template creation [\#8](https://github.com/rambler-ios/Generamba/issues/8)
126
- - Change some of the questions of `generamba setup` [\#7](https://github.com/rambler-ios/Generamba/issues/7)
127
143
 
128
144
  **Fixed bugs:**
129
145
 
130
- - Rambafile uses absolute filepath to xcodeproj file [\#21](https://github.com/rambler-ios/Generamba/issues/21)
131
146
  - Duplicate file reference in project.pbxproj [\#20](https://github.com/rambler-ios/Generamba/issues/20)
132
- - Move the rambler\_viper\_controller template to the generamba-catalog [\#16](https://github.com/rambler-ios/Generamba/issues/16)
133
147
 
134
148
  ## [0.5.0](https://github.com/rambler-ios/Generamba/tree/0.5.0) (2015-11-01)
135
149
 
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/rambler-ios/Generamba.svg)](https://travis-ci.org/rambler-ios/Generamba)
4
4
  [![Gem Version](https://badge.fury.io/rb/generamba.svg)](https://badge.fury.io/rb/generamba)
5
+ [![Code Climate](https://codeclimate.com/github/rambler-ios/Generamba/badges/gpa.svg)](https://codeclimate.com/github/rambler-ios/Generamba)
5
6
 
6
7
  **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).
7
8
 
data/generamba.gemspec CHANGED
@@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'bundler', '~> 1.10'
31
31
  spec.add_development_dependency 'rake', '~> 10.0'
32
32
  spec.add_development_dependency 'rspec', '~> 3.4'
33
- spec.add_development_dependency 'fakefs', '~> 0.6'
33
+ spec.add_development_dependency 'fakefs', '~> 0.6.1'
34
34
  end
@@ -12,6 +12,7 @@ module Generamba::CLI
12
12
 
13
13
  desc 'gen [MODULE_NAME] [TEMPLATE_NAME]', 'Creates a new VIPER module with a given name from a specific template'
14
14
  method_option :description, :aliases => '-d', :desc => 'Provides a full description to the module'
15
+ method_option :author, :desc => 'Specifies the author name for generated module'
15
16
  method_option :module_targets, :desc => 'Specifies project targets for adding new module files'
16
17
  method_option :module_file_path, :desc => 'Specifies a location in the filesystem for new files'
17
18
  method_option :module_group_path, :desc => 'Specifies a location in Xcode groups for new files'
@@ -70,6 +70,15 @@ module Generamba::CLI
70
70
  'Cartfile')
71
71
  end
72
72
 
73
+ should_add_templates = yes?('Do you want to add some well known templates to the Rambafile? (yes/no)')
74
+ if should_add_templates
75
+ properties[TEMPLATES_KEY] = [
76
+ '{name: rviper_controller}',
77
+ '{name: mvvm_controller}',
78
+ '{name: swifty_viper}'
79
+ ]
80
+ end
81
+
73
82
  properties[PROJECT_TARGET_KEY] = project_target.name
74
83
  properties[PROJECT_FILE_PATH_KEY] = project_file_path
75
84
  properties[PROJECT_GROUP_PATH_KEY] = project_group_path
@@ -88,11 +97,16 @@ module Generamba::CLI
88
97
 
89
98
  PrintTable.print_values(
90
99
  values: properties,
91
- title: "Summary for generamba setup"
100
+ title: 'Summary for generamba setup'
92
101
  )
93
102
 
94
103
  Generamba::RambafileGenerator.create_rambafile(properties)
95
- puts('Rambafile successfully created! Now add some templates to the Rambafile and run `generamba template install`.'.green)
104
+ if should_add_templates
105
+ puts('Rambafile successfully created! Now run `generamba template install`.'.green)
106
+ else
107
+ puts('Rambafile successfully created!\n Go on and find some templates in our catalog using `generamba template list` command.\n Add any of them to the Rambafile and run `generamba template install`.'.green)
108
+ end
109
+
96
110
  end
97
111
  end
98
112
  end
@@ -33,6 +33,8 @@ test_group_path: {{ test_group_path }}{% endif %}
33
33
 
34
34
  ### Templates
35
35
  templates:
36
- #- {name: local_template_name, local: 'absolute/file/path'}
36
+ {% if templates.size > 0 %}{% for item in templates %}- {{ item }}
37
+ {% endfor %}{% else %}#- {name: local_template_name, local: 'absolute/file/path'}
37
38
  #- {name: remote_template_name, git: 'https://github.com/igrekde/remote_template'}
38
- #- {name: catalog_template_name}
39
+ #- {name: catalog_template_name}
40
+ {% endif %}
@@ -23,7 +23,12 @@ module Generamba
23
23
  @name = name
24
24
  @description = description
25
25
 
26
- @author = UserPreferences.obtain_username
26
+ if rambafile[AUTHOR_NAME_KEY] != nil
27
+ @author = rambafile[AUTHOR_NAME_KEY]
28
+ else
29
+ @author = UserPreferences.obtain_username
30
+ end
31
+
27
32
  @company = rambafile[COMPANY_KEY]
28
33
  @year = Time.now.year.to_s
29
34
 
@@ -44,6 +49,7 @@ module Generamba
44
49
  @test_targets = rambafile[TEST_TARGETS_KEY] if rambafile[TEST_TARGETS_KEY] != nil
45
50
 
46
51
  # Options adaptation
52
+ @author = options[:author] if options[:author]
47
53
  @project_targets = options[:module_targets].split(',') if options[:module_targets]
48
54
  @test_targets = options[:test_targets].split(',') if options[:test_targets]
49
55
 
@@ -22,7 +22,9 @@ module Generamba
22
22
  'name' => code_module.name,
23
23
  'file_name' => file_name,
24
24
  'description' => code_module.description,
25
- 'project_name' => code_module.project_name
25
+ 'project_name' => code_module.project_name,
26
+ 'project_targets' => code_module.project_targets,
27
+ 'test_targets' => code_module.test_targets
26
28
  }
27
29
 
28
30
  developer = {
@@ -2,6 +2,7 @@ module Generamba
2
2
 
3
3
  # Keys of Rambafile files
4
4
  COMPANY_KEY = 'company'
5
+ AUTHOR_NAME_KEY = 'author'
5
6
  PROJECT_NAME_KEY = 'project_name'
6
7
  PROJECT_PREFIX_KEY = 'prefix'
7
8
  XCODEPROJ_PATH_KEY = 'xcodeproj_path'
@@ -1,3 +1,3 @@
1
1
  module Generamba
2
- VERSION = '0.7.5'
2
+ VERSION = '0.7.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: generamba
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Egor Tolstoy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-04-24 00:00:00.000000000 Z
13
+ date: 2016-04-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -144,14 +144,14 @@ dependencies:
144
144
  requirements:
145
145
  - - "~>"
146
146
  - !ruby/object:Gem::Version
147
- version: '0.6'
147
+ version: 0.6.1
148
148
  type: :development
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - "~>"
153
153
  - !ruby/object:Gem::Version
154
- version: '0.6'
154
+ version: 0.6.1
155
155
  description: Generamba is a powerful and easy-to-use Xcode code generator. It provides
156
156
  a project-based configuration, flexible templates system, the ability to generate
157
157
  code and tests simultaneously.
@@ -166,7 +166,6 @@ files:
166
166
  - ".travis.yml"
167
167
  - CHANGELOG.md
168
168
  - Gemfile
169
- - Gemfile.lock
170
169
  - LICENSE.txt
171
170
  - README.md
172
171
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,71 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- generamba (0.7.4)
5
- cocoapods-core (= 0.39.0)
6
- git (= 1.2.9.1)
7
- liquid (= 3.0.6)
8
- terminal-table (= 1.4.5)
9
- thor (= 0.19.1)
10
- xcodeproj (= 0.28.2)
11
-
12
- GEM
13
- remote: https://rubygems.org/
14
- specs:
15
- activesupport (4.2.5)
16
- i18n (~> 0.7)
17
- json (~> 1.7, >= 1.7.7)
18
- minitest (~> 5.1)
19
- thread_safe (~> 0.3, >= 0.3.4)
20
- tzinfo (~> 1.1)
21
- claide (0.9.1)
22
- cocoapods-core (0.39.0)
23
- activesupport (>= 4.0.2)
24
- fuzzy_match (~> 2.0.4)
25
- nap (~> 1.0)
26
- colored (1.2)
27
- diff-lcs (1.2.5)
28
- fakefs (0.6.7)
29
- fuzzy_match (2.0.4)
30
- git (1.2.9.1)
31
- i18n (0.7.0)
32
- json (1.8.3)
33
- liquid (3.0.6)
34
- minitest (5.8.4)
35
- nap (1.0.0)
36
- rake (10.4.2)
37
- rspec (3.3.0)
38
- rspec-core (~> 3.3.0)
39
- rspec-expectations (~> 3.3.0)
40
- rspec-mocks (~> 3.3.0)
41
- rspec-core (3.3.2)
42
- rspec-support (~> 3.3.0)
43
- rspec-expectations (3.3.1)
44
- diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.3.0)
46
- rspec-mocks (3.3.2)
47
- diff-lcs (>= 1.2.0, < 2.0)
48
- rspec-support (~> 3.3.0)
49
- rspec-support (3.3.0)
50
- terminal-table (1.4.5)
51
- thor (0.19.1)
52
- thread_safe (0.3.5)
53
- tzinfo (1.2.2)
54
- thread_safe (~> 0.1)
55
- xcodeproj (0.28.2)
56
- activesupport (>= 3)
57
- claide (~> 0.9.1)
58
- colored (~> 1.2)
59
-
60
- PLATFORMS
61
- ruby
62
-
63
- DEPENDENCIES
64
- bundler (~> 1.10)
65
- fakefs (~> 0.6)
66
- generamba!
67
- rake (~> 10.0)
68
- rspec (~> 3.0)
69
-
70
- BUNDLED WITH
71
- 1.11.2