iosgen 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator.xcodeproj/project.pbxproj +501 -0
  3. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  4. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator.xcodeproj/xcuserdata/fran_dev.xcuserdatad/xcschemes/iOSCleanArchitectureGenerator.xcscheme +110 -0
  5. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator.xcodeproj/xcuserdata/fran_dev.xcuserdatad/xcschemes/xcschememanagement.plist +27 -0
  6. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/AppDelegate.h +17 -0
  7. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/AppDelegate.m +45 -0
  8. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Base.lproj/LaunchScreen.xib +41 -0
  9. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Base.lproj/Main.storyboard +25 -0
  10. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Images.xcassets/AppIcon.appiconset/Contents.json +68 -0
  11. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Info.plist +47 -0
  12. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Interactors/FJBNotificationsApiInteractor.h +9 -0
  13. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Interactors/FJBNotificationsApiInteractor.m +15 -0
  14. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Interactors/FJBNotificationsApiInteractorProtocol.h +9 -0
  15. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewController.h +15 -0
  16. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewController.m +27 -0
  17. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewControllers/FJBNotificationsViewController.h +8 -0
  18. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewControllers/FJBNotificationsViewController.m +31 -0
  19. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewModels/FJBNotificationsViewModel.h +9 -0
  20. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewModels/FJBNotificationsViewModel.m +18 -0
  21. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewModels/FJBNotificationsViewModelProtocol.h +17 -0
  22. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/main.m +16 -0
  23. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGeneratorTests/Info.plist +24 -0
  24. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGeneratorTests/Interactors/FJBNotificationsApiInteractorTests.m +40 -0
  25. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGeneratorTests/ViewModels/FJBNotificationsViewModelTests.m +50 -0
  26. data/Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGeneratorTests/iOSCleanArchitectureGeneratorTests.m +40 -0
  27. data/README.md +37 -20
  28. data/bin/iosgen +1 -1
  29. data/iosgen.gemspec +1 -1
  30. data/lib/ios_gen/generator/base_generator.rb +21 -9
  31. data/lib/ios_gen/generator/objc/action_formatter.rb +15 -2
  32. data/lib/ios_gen/generator/objc/interactor_formatter.rb +16 -11
  33. data/lib/ios_gen/generator/objc/objc_formatter.rb +4 -0
  34. data/lib/ios_gen/generator/objc/view_model_formatter.rb +18 -10
  35. data/lib/ios_gen/generator/objc/xctestcase_formatter.rb +45 -0
  36. data/lib/ios_gen/ios_gen_thor.rb +2 -1
  37. data/spec/ios_gen/generator/base_generator_spec.rb +38 -3
  38. data/spec/ios_gen/generator/objc/action_formatter_spec.rb +16 -1
  39. data/spec/ios_gen/generator/objc/interactor_formatter_spec.rb +1 -1
  40. data/spec/ios_gen/generator/objc/objc_formatter_spec.rb +0 -1
  41. data/spec/ios_gen/generator/objc/view_model_formatter_spec.rb +0 -1
  42. data/spec/ios_gen/generator/objc/xctestcase_formatter_spec.rb +91 -0
  43. data/templates/objc/Interactor.h.erb +1 -1
  44. data/templates/objc/InteractorProtocol.h.erb +2 -0
  45. data/templates/objc/ViewModel.h.erb +1 -1
  46. data/templates/objc/ViewModelProtocol.h.erb +1 -0
  47. data/templates/objc/XCTestCase.m.erb +32 -0
  48. metadata +31 -2
@@ -1,3 +1,4 @@
1
+ #import <Foundation/Foundation.h>
1
2
 
2
3
  @protocol <%=@formatter.view_model_formatter.protocol_name %>;
3
4
  @protocol <%=@formatter.view_model_formatter.protocol_delegate %> <NSObject>
@@ -0,0 +1,32 @@
1
+ //
2
+ // <%=@test_formatter.file_name%>
3
+ // <%=@test_formatter.name%>
4
+ // <% require 'etc' %>
5
+ // Created by <%=Etc.getlogin%> on <%=Time.now.strftime("%d/%m/%Y")%>.
6
+ // Copyright (c) <%=Time.now.strftime("%Y")%>. All rights reserved.
7
+ //
8
+
9
+ #import <XCTest/XCTest.h>
10
+ #import "<%=@test_formatter.class_test_name%>"
11
+
12
+ @interface <%=@test_formatter.name%> : XCTestCase
13
+
14
+ @end
15
+
16
+ @implementation <%=@test_formatter.name%>
17
+
18
+ - (void)setUp {
19
+ [super setUp];
20
+ // Put setup code here. This method is called before the invocation of each test method in the class.
21
+ }
22
+
23
+ - (void)tearDown {
24
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
25
+ [super tearDown];
26
+ }
27
+
28
+ #pragma mark - Actions
29
+
30
+ <%=@test_formatter.actions_impl%>
31
+
32
+ @end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iosgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francisco J. Belchi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-22 00:00:00.000000000 Z
11
+ date: 2014-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -92,6 +92,31 @@ files:
92
92
  - .gitignore
93
93
  - .hound.yml
94
94
  - .rubocop.yml
95
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator.xcodeproj/project.pbxproj
96
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator.xcodeproj/project.xcworkspace/contents.xcworkspacedata
97
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator.xcodeproj/xcuserdata/fran_dev.xcuserdatad/xcschemes/iOSCleanArchitectureGenerator.xcscheme
98
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator.xcodeproj/xcuserdata/fran_dev.xcuserdatad/xcschemes/xcschememanagement.plist
99
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/AppDelegate.h
100
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/AppDelegate.m
101
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Base.lproj/LaunchScreen.xib
102
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Base.lproj/Main.storyboard
103
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Images.xcassets/AppIcon.appiconset/Contents.json
104
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Info.plist
105
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Interactors/FJBNotificationsApiInteractor.h
106
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Interactors/FJBNotificationsApiInteractor.m
107
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/Interactors/FJBNotificationsApiInteractorProtocol.h
108
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewController.h
109
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewController.m
110
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewControllers/FJBNotificationsViewController.h
111
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewControllers/FJBNotificationsViewController.m
112
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewModels/FJBNotificationsViewModel.h
113
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewModels/FJBNotificationsViewModel.m
114
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/ViewModels/FJBNotificationsViewModelProtocol.h
115
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGenerator/main.m
116
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGeneratorTests/Info.plist
117
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGeneratorTests/Interactors/FJBNotificationsApiInteractorTests.m
118
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGeneratorTests/ViewModels/FJBNotificationsViewModelTests.m
119
+ - Demo/iOSCleanArchitectureGenerator/iOSCleanArchitectureGeneratorTests/iOSCleanArchitectureGeneratorTests.m
95
120
  - Gemfile
96
121
  - Gemfile.lock
97
122
  - Guardfile
@@ -112,6 +137,7 @@ files:
112
137
  - lib/ios_gen/generator/objc/objc_formatter.rb
113
138
  - lib/ios_gen/generator/objc/view_controller_formatter.rb
114
139
  - lib/ios_gen/generator/objc/view_model_formatter.rb
140
+ - lib/ios_gen/generator/objc/xctestcase_formatter.rb
115
141
  - lib/ios_gen/ios_gen_thor.rb
116
142
  - lib/iosgen.rb
117
143
  - spec/ios_gen/base/action_spec.rb
@@ -126,6 +152,7 @@ files:
126
152
  - spec/ios_gen/generator/objc/objc_formatter_spec.rb
127
153
  - spec/ios_gen/generator/objc/view_controller_formatter_spec.rb
128
154
  - spec/ios_gen/generator/objc/view_model_formatter_spec.rb
155
+ - spec/ios_gen/generator/objc/xctestcase_formatter_spec.rb
129
156
  - spec/ios_gen/generator/spec.json
130
157
  - spec/spec_helper.rb
131
158
  - templates/objc/Interactor.h.erb
@@ -136,6 +163,7 @@ files:
136
163
  - templates/objc/ViewModel.h.erb
137
164
  - templates/objc/ViewModel.m.erb
138
165
  - templates/objc/ViewModelProtocol.h.erb
166
+ - templates/objc/XCTestCase.m.erb
139
167
  homepage: http://www.fjbelchi.com
140
168
  licenses:
141
169
  - MIT
@@ -174,5 +202,6 @@ test_files:
174
202
  - spec/ios_gen/generator/objc/objc_formatter_spec.rb
175
203
  - spec/ios_gen/generator/objc/view_controller_formatter_spec.rb
176
204
  - spec/ios_gen/generator/objc/view_model_formatter_spec.rb
205
+ - spec/ios_gen/generator/objc/xctestcase_formatter_spec.rb
177
206
  - spec/ios_gen/generator/spec.json
178
207
  - spec/spec_helper.rb