ccios 4.1.0 → 5.0.0

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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +187 -56
  5. data/ccios.gemspec +1 -1
  6. data/lib/ccios/argument_template_parameter.rb +33 -0
  7. data/lib/ccios/code_templater.rb +24 -8
  8. data/lib/ccios/config.rb +41 -91
  9. data/lib/ccios/file_creator.rb +24 -22
  10. data/lib/ccios/file_template_definition.rb +94 -0
  11. data/lib/ccios/flag_template_parameter.rb +17 -0
  12. data/lib/ccios/group_template_definition.rb +54 -0
  13. data/lib/ccios/pbxproj_parser.rb +3 -54
  14. data/lib/ccios/snippet_template_definition.rb +27 -0
  15. data/lib/ccios/template_definition.rb +116 -0
  16. data/lib/ccios/templates/Coordinator/template.yml +20 -0
  17. data/lib/ccios/templates/Interactor/template.yml +25 -0
  18. data/lib/ccios/templates/Presenter/template.yml +49 -0
  19. data/lib/ccios/templates/Repository/template.yml +26 -0
  20. data/lib/ccios/templates_loader.rb +31 -0
  21. data/lib/ccios.rb +65 -43
  22. data/templates_library/async/Coordinator/template.yml +20 -0
  23. data/templates_library/async/Presenter/template.yml +49 -0
  24. metadata +35 -32
  25. data/lib/ccios/coordinator_generator.rb +0 -18
  26. data/lib/ccios/interactor_generator.rb +0 -33
  27. data/lib/ccios/presenter_generator.rb +0 -71
  28. data/lib/ccios/repository_generator.rb +0 -44
  29. data/templates_library/async/interactor.mustache +0 -13
  30. data/templates_library/async/interactor_assembly.mustache +0 -5
  31. data/templates_library/async/interactor_implementation.mustache +0 -22
  32. data/templates_library/async/repository.mustache +0 -13
  33. data/templates_library/async/repository_assembly.mustache +0 -6
  34. data/templates_library/async/repository_implementation.mustache +0 -20
  35. /data/lib/ccios/templates/{coordinator.mustache → Coordinator/coordinator.mustache} +0 -0
  36. /data/lib/ccios/templates/{interactor.mustache → Interactor/interactor.mustache} +0 -0
  37. /data/lib/ccios/templates/{interactor_assembly.mustache → Interactor/interactor_assembly.mustache} +0 -0
  38. /data/lib/ccios/templates/{interactor_implementation.mustache → Interactor/interactor_implementation.mustache} +0 -0
  39. /data/lib/ccios/templates/{dependency_provider.mustache → Presenter/dependency_provider.mustache} +0 -0
  40. /data/lib/ccios/templates/{presenter.mustache → Presenter/presenter.mustache} +0 -0
  41. /data/lib/ccios/templates/{presenter_assembly.mustache → Presenter/presenter_assembly.mustache} +0 -0
  42. /data/lib/ccios/templates/{presenter_implementation.mustache → Presenter/presenter_implementation.mustache} +0 -0
  43. /data/lib/ccios/templates/{view_contract.mustache → Presenter/view_contract.mustache} +0 -0
  44. /data/lib/ccios/templates/{view_controller.mustache → Presenter/view_controller.mustache} +0 -0
  45. /data/lib/ccios/templates/{repository.mustache → Repository/repository.mustache} +0 -0
  46. /data/lib/ccios/templates/{repository_assembly.mustache → Repository/repository_assembly.mustache} +0 -0
  47. /data/lib/ccios/templates/{repository_implementation.mustache → Repository/repository_implementation.mustache} +0 -0
  48. /data/templates_library/async/{coordinator.mustache → Coordinator/coordinator.mustache} +0 -0
  49. /data/templates_library/async/{dependency_provider.mustache → Presenter/dependency_provider.mustache} +0 -0
  50. /data/templates_library/async/{presenter.mustache → Presenter/presenter.mustache} +0 -0
  51. /data/templates_library/async/{presenter_assembly.mustache → Presenter/presenter_assembly.mustache} +0 -0
  52. /data/templates_library/async/{presenter_implementation.mustache → Presenter/presenter_implementation.mustache} +0 -0
  53. /data/templates_library/async/{view_contract.mustache → Presenter/view_contract.mustache} +0 -0
  54. /data/templates_library/async/{view_controller.mustache → Presenter/view_controller.mustache} +0 -0
data/lib/ccios.rb CHANGED
@@ -2,67 +2,89 @@ require 'date'
2
2
  require 'xcodeproj'
3
3
  require 'optparse'
4
4
  require 'active_support'
5
- require 'ccios/presenter_generator'
6
- require 'ccios/coordinator_generator'
7
- require 'ccios/interactor_generator'
8
- require 'ccios/repository_generator'
9
5
  require 'ccios/config'
6
+ require 'ccios/template_definition'
7
+ require 'ccios/templates_loader'
10
8
 
9
+ config = Config.parse ".ccios.yml"
10
+ source_path = Dir.pwd
11
+
12
+ templates = TemplatesLoader.new.get_templates(config)
13
+
14
+ subcommands = {}
11
15
  options = {}
12
- OptionParser.new do |opts|
13
- opts.banner = "Usage: ccios [options]"
16
+
17
+ templates.values.each do |template|
18
+ subcommands[template.name] = OptionParser.new do |opts|
19
+
20
+ arguments = template.parameters.select { |p| p.is_a?(ArgumentTemplateParameter) }
21
+ flags = template.parameters.select { |p| p.is_a?(FlagTemplateParameter) }
22
+
23
+ arguments_line = arguments.map { |argument| "<#{argument.name}>" }.join(" ")
24
+
25
+ opts.banner = "Usage: ccios #{template.name} #{arguments_line} [options]"
26
+
27
+ flags.each do |flagParameter|
28
+ if flagParameter.short_name != nil
29
+ opts.on("-#{flagParameter.short_name}", "--#{flagParameter.name}", flagParameter.description) do |v|
30
+ options[flagParameter.template_variable_name] = v
31
+ end
32
+ else
33
+ opts.on("--#{flagParameter.name}", flagParameter.description) do |v|
34
+ options[flagParameter.template_variable_name] = v
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+
41
+ global_cli = OptionParser.new do |opts|
42
+ opts.banner = "Usage: ccios <template> [options]"
14
43
  opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
15
44
  options[:verbose] = v
16
45
  end
17
- opts.on("-pName", "--presenter=Name", "Generate NamePresenter, NamePresenterImplementation, NameViewContract and NameViewController") do |name|
18
- options[:presenter] = name
19
- end
20
- opts.on("-cName", "--coordinator=Name", "Generate NameCoordinator") do |name|
21
- options[:coordinator] = name
22
- end
23
- opts.on("-iName", "--interactor=Name", "Generate NameInteractor and NameInteractorImplementation") do |name|
24
- options[:interactor] = name
25
- end
26
- opts.on("-rName", "--repository=Name", "Generate NameRepository and NameRepositoryImplementation") do |name|
27
- options[:repository] = name
28
- end
29
- opts.on("-d", "--delegate", "Add delegate for curent generation") do |add_delegate|
30
- options[:generate_delegate] = add_delegate
31
- end
32
46
  opts.on("-h", "--help", "Print this help") do
33
47
  puts opts
48
+ puts "Available templates: #{subcommands.keys.sort.join(", ")}"
34
49
  exit
35
50
  end
36
- end.parse!
51
+ end
37
52
 
38
- source_path = Dir.pwd
39
- config = Config.parse ".ccios.yml"
40
- parser = PBXProjParser.new(source_path, config)
53
+ global_cli.order!
54
+ template_name = ARGV.shift
41
55
 
42
- if options[:presenter]
43
- presenter_name = options[:presenter]
44
- presenter_generator = PresenterGenerator.new(parser, config)
45
- generator_options = {generate_delegate: options[:generate_delegate]}
46
- presenter_generator.generate(presenter_name, generator_options)
56
+ if template_name.nil?
57
+ puts "Error: Missing template name"
58
+ puts global_cli
59
+ exit(1)
47
60
  end
48
61
 
49
- if options[:coordinator]
50
- coordinator_name = options[:coordinator]
51
- coordinator_generator = CoordinatorGenerator.new(parser, config)
52
- generator_options = {generate_delegate: options[:generate_delegate]}
53
- coordinator_generator.generate(coordinator_name, generator_options)
62
+ if subcommands[template_name].nil?
63
+ puts "Error: Unknown template \"#{template_name}\""
64
+ puts global_cli
65
+ exit(1)
54
66
  end
55
67
 
56
- if options[:interactor]
57
- interactor_name = options[:interactor]
58
- interactor_generator = InteractorGenerator.new(parser, config)
59
- interactor_generator.generate(interactor_name)
68
+ template = templates[template_name]
69
+ expected_remaining_arguments = template.parameters.select { |p| p.is_a?(ArgumentTemplateParameter) }
70
+
71
+ subcommands[template_name].order! do |argument|
72
+ expected_argument = expected_remaining_arguments.shift
73
+ if expected_argument.nil?
74
+ puts "Unexpected argument: #{argument}"
75
+ exit 1
76
+ end
77
+ options[expected_argument.template_variable_name] = argument
60
78
  end
61
79
 
62
- if options[:repository]
63
- repository_name = options[:repository]
64
- repository_generator = RepositoryGenerator.new(parser, config)
65
- repository_generator.generate(repository_name)
80
+ if !expected_remaining_arguments.empty?
81
+ puts "Missing arguments: #{expected_remaining_arguments.map { |p| p.name }.join(", ")}"
82
+ exit 1
66
83
  end
67
84
 
85
+ parser = PBXProjParser.new(source_path, config)
86
+
87
+ template.validate(parser, options, config)
88
+ template.generate(parser, options, config)
89
+
68
90
  parser.save
@@ -0,0 +1,20 @@
1
+ name: "coordinator"
2
+ description: "Generate NameCoordinator"
3
+ variables:
4
+ project: "*.xcodeproj"
5
+ base_path: "Coordinator"
6
+ target: ""
7
+ parameters:
8
+ - argument: "name"
9
+ removeSuffix: "Coordinator"
10
+ - flag: "delegate"
11
+ short_name: "d"
12
+ template_variable_name: "generate_delegate"
13
+ description: "Generate delegate protocols when provided"
14
+ generated_elements:
15
+ - name: "coordinator"
16
+ file: "{{ name }}Coordinator.swift"
17
+ template: "coordinator"
18
+ variables: {}
19
+ template_file_source:
20
+ coordinator: "coordinator.mustache"
@@ -0,0 +1,49 @@
1
+ name: "presenter"
2
+ description: "Generate NamePresenter, NamePresenterImplementation, NameViewContract and NameViewController"
3
+ parameters:
4
+ - argument: "name"
5
+ removeSuffix: "Presenter"
6
+ lowercased_variable_name: "lowercased_name"
7
+ - flag: "delegate"
8
+ short_name: "d"
9
+ template_variable_name: "generate_delegate"
10
+ description: "Generate delegate protocols when provided"
11
+ variables:
12
+ project: "*.xcodeproj"
13
+ base_path: "App"
14
+ target: ""
15
+ generated_elements:
16
+ - name: "ui_view_group"
17
+ group: "{{ name }}/UI/View"
18
+ variables: {}
19
+ - name: "view_controller"
20
+ file: "{{ name }}/UI/ViewController/{{ name }}ViewController.swift"
21
+ template: "view_controller"
22
+ variables: {}
23
+ - name: "view_contract"
24
+ file: "{{ name }}/UI/{{ name }}ViewContract.swift"
25
+ template: "view_contract"
26
+ variables: {}
27
+ - name: "presenter"
28
+ file: "{{ name }}/Presenter/{{ name }}Presenter.swift"
29
+ template: "presenter"
30
+ variables: {}
31
+ - name: "presenter_implementation"
32
+ file: "{{ name }}/Presenter/{{ name }}PresenterImplementation.swift"
33
+ template: "presenter_implementation"
34
+ variables: {}
35
+ - name: "model_group"
36
+ group: "{{ name }}/Model"
37
+ variables: {}
38
+ code_snippets:
39
+ - name: DependencyProvider
40
+ template: "dependency_provider"
41
+ - name: PresenterAssembly
42
+ template: "presenter_assembly"
43
+ template_file_source:
44
+ view_controller: "view_controller.mustache"
45
+ view_contract: "view_contract.mustache"
46
+ presenter: "presenter.mustache"
47
+ presenter_implementation: "presenter_implementation.mustache"
48
+ dependency_provider: "dependency_provider.mustache"
49
+ presenter_assembly: "presenter_assembly.mustache"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ccios
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Felgines
@@ -99,40 +99,43 @@ files:
99
99
  - bin/ccios
100
100
  - ccios.gemspec
101
101
  - lib/ccios.rb
102
+ - lib/ccios/argument_template_parameter.rb
102
103
  - lib/ccios/code_templater.rb
103
104
  - lib/ccios/config.rb
104
- - lib/ccios/coordinator_generator.rb
105
105
  - lib/ccios/file_creator.rb
106
- - lib/ccios/interactor_generator.rb
106
+ - lib/ccios/file_template_definition.rb
107
+ - lib/ccios/flag_template_parameter.rb
108
+ - lib/ccios/group_template_definition.rb
107
109
  - lib/ccios/pbxproj_parser.rb
108
- - lib/ccios/presenter_generator.rb
109
- - lib/ccios/repository_generator.rb
110
- - lib/ccios/templates/coordinator.mustache
111
- - lib/ccios/templates/dependency_provider.mustache
112
- - lib/ccios/templates/interactor.mustache
113
- - lib/ccios/templates/interactor_assembly.mustache
114
- - lib/ccios/templates/interactor_implementation.mustache
115
- - lib/ccios/templates/presenter.mustache
116
- - lib/ccios/templates/presenter_assembly.mustache
117
- - lib/ccios/templates/presenter_implementation.mustache
118
- - lib/ccios/templates/repository.mustache
119
- - lib/ccios/templates/repository_assembly.mustache
120
- - lib/ccios/templates/repository_implementation.mustache
121
- - lib/ccios/templates/view_contract.mustache
122
- - lib/ccios/templates/view_controller.mustache
123
- - templates_library/async/coordinator.mustache
124
- - templates_library/async/dependency_provider.mustache
125
- - templates_library/async/interactor.mustache
126
- - templates_library/async/interactor_assembly.mustache
127
- - templates_library/async/interactor_implementation.mustache
128
- - templates_library/async/presenter.mustache
129
- - templates_library/async/presenter_assembly.mustache
130
- - templates_library/async/presenter_implementation.mustache
131
- - templates_library/async/repository.mustache
132
- - templates_library/async/repository_assembly.mustache
133
- - templates_library/async/repository_implementation.mustache
134
- - templates_library/async/view_contract.mustache
135
- - templates_library/async/view_controller.mustache
110
+ - lib/ccios/snippet_template_definition.rb
111
+ - lib/ccios/template_definition.rb
112
+ - lib/ccios/templates/Coordinator/coordinator.mustache
113
+ - lib/ccios/templates/Coordinator/template.yml
114
+ - lib/ccios/templates/Interactor/interactor.mustache
115
+ - lib/ccios/templates/Interactor/interactor_assembly.mustache
116
+ - lib/ccios/templates/Interactor/interactor_implementation.mustache
117
+ - lib/ccios/templates/Interactor/template.yml
118
+ - lib/ccios/templates/Presenter/dependency_provider.mustache
119
+ - lib/ccios/templates/Presenter/presenter.mustache
120
+ - lib/ccios/templates/Presenter/presenter_assembly.mustache
121
+ - lib/ccios/templates/Presenter/presenter_implementation.mustache
122
+ - lib/ccios/templates/Presenter/template.yml
123
+ - lib/ccios/templates/Presenter/view_contract.mustache
124
+ - lib/ccios/templates/Presenter/view_controller.mustache
125
+ - lib/ccios/templates/Repository/repository.mustache
126
+ - lib/ccios/templates/Repository/repository_assembly.mustache
127
+ - lib/ccios/templates/Repository/repository_implementation.mustache
128
+ - lib/ccios/templates/Repository/template.yml
129
+ - lib/ccios/templates_loader.rb
130
+ - templates_library/async/Coordinator/coordinator.mustache
131
+ - templates_library/async/Coordinator/template.yml
132
+ - templates_library/async/Presenter/dependency_provider.mustache
133
+ - templates_library/async/Presenter/presenter.mustache
134
+ - templates_library/async/Presenter/presenter_assembly.mustache
135
+ - templates_library/async/Presenter/presenter_implementation.mustache
136
+ - templates_library/async/Presenter/template.yml
137
+ - templates_library/async/Presenter/view_contract.mustache
138
+ - templates_library/async/Presenter/view_controller.mustache
136
139
  - templates_library/default/README.md
137
140
  homepage: http://rubygems.org/gems/hola
138
141
  licenses:
@@ -153,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
156
  - !ruby/object:Gem::Version
154
157
  version: '0'
155
158
  requirements: []
156
- rubygems_version: 3.4.10
159
+ rubygems_version: 3.5.6
157
160
  signing_key:
158
161
  specification_version: 4
159
162
  summary: Clean Code iOS Generator
@@ -1,18 +0,0 @@
1
- require_relative 'file_creator'
2
- require_relative "pbxproj_parser"
3
-
4
- class CoordinatorGenerator
5
-
6
- def initialize(parser, config)
7
- @parser = parser
8
- @config = config
9
- end
10
-
11
- def generate(coordinator_name, options = {})
12
- coordinator_group = @parser.coordinator_group
13
- file_creator = FileCreator.new(options, @config)
14
- target = @parser.app_target
15
- coordinator_name = coordinator_name.gsub("Coordinator", "")
16
- file_creator.create_file(coordinator_name, 'Coordinator', coordinator_group, target)
17
- end
18
- end
@@ -1,33 +0,0 @@
1
- require_relative 'file_creator'
2
- require_relative "pbxproj_parser"
3
-
4
- class InteractorGenerator
5
-
6
- def initialize(parser, config)
7
- @parser = parser
8
- @config = config
9
- end
10
-
11
- def generate(interactor_name, options = {})
12
- interactor_group = @parser.interactor_group
13
- interactor_name = interactor_name.gsub("Interactor", "")
14
- new_group_name = "#{interactor_name}Interactor"
15
-
16
- associate_path_to_group = !interactor_group.path.nil?
17
-
18
- raise "[Error] Group #{new_group_name} already exists in #{app_group.display_name}" if interactor_group[new_group_name]
19
- new_group_path = File.join(interactor_group.real_path, new_group_name)
20
- new_group = interactor_group.pf_new_group(
21
- associate_path_to_group: associate_path_to_group,
22
- name: new_group_name,
23
- path: new_group_path
24
- )
25
-
26
- file_creator = FileCreator.new(options, @config)
27
- target = @parser.core_target
28
- file_creator.create_file(interactor_name, 'Interactor', new_group, target)
29
- file_creator.create_file(interactor_name, 'InteractorImplementation', new_group, target)
30
-
31
- file_creator.print_file_content(interactor_name, 'InteractorAssembly')
32
- end
33
- end
@@ -1,71 +0,0 @@
1
- require_relative 'file_creator'
2
- require_relative "pbxproj_parser"
3
-
4
- class PresenterGenerator
5
-
6
- def initialize(parser, config)
7
- @parser = parser
8
- @config = config
9
- end
10
-
11
- def generate(presenter_name, options = {})
12
- app_group = @parser.presenter_group
13
- presenter_name = presenter_name.gsub("Presenter", "")
14
- associate_path_to_group = !app_group.path.nil?
15
-
16
- raise "[Error] Group #{presenter_name} already exists in #{app_group.display_name}" if app_group[presenter_name]
17
- new_group_path = File.join(app_group.real_path, presenter_name)
18
- new_group = app_group.pf_new_group(
19
- associate_path_to_group: associate_path_to_group,
20
- name: presenter_name,
21
- path: new_group_path
22
- )
23
-
24
- ui_group_path = File.join(new_group_path, "UI")
25
- ui_group = new_group.pf_new_group(
26
- associate_path_to_group: associate_path_to_group,
27
- name: "UI",
28
- path: ui_group_path
29
- )
30
-
31
- view_group_path = File.join(ui_group_path, "View")
32
- view_group = ui_group.pf_new_group(
33
- associate_path_to_group: associate_path_to_group,
34
- name: "View",
35
- path: view_group_path
36
- )
37
-
38
- view_controller_group_path = File.join(ui_group_path, "ViewController")
39
- view_controller_group = ui_group.pf_new_group(
40
- associate_path_to_group: associate_path_to_group,
41
- name: "ViewController",
42
- path: view_controller_group_path
43
- )
44
-
45
- presenter_group_path = File.join(new_group_path, "Presenter")
46
- presenter_group = new_group.pf_new_group(
47
- associate_path_to_group: associate_path_to_group,
48
- name: "Presenter",
49
- path: presenter_group_path
50
- )
51
-
52
- model_group_path = File.join(new_group_path, "Model")
53
- model_group = new_group.pf_new_group(
54
- associate_path_to_group: associate_path_to_group,
55
- name: "Model",
56
- path: model_group_path
57
- )
58
-
59
- file_creator = FileCreator.new(options, @config)
60
- target = @parser.app_target
61
- file_creator.create_file(presenter_name, 'ViewContract', ui_group, target)
62
- file_creator.create_file(presenter_name, 'ViewController', view_controller_group, target)
63
- file_creator.create_file(presenter_name, 'Presenter', presenter_group, target)
64
- file_creator.create_file(presenter_name, 'PresenterImplementation', presenter_group, target)
65
- file_creator.create_empty_directory(model_group)
66
- file_creator.create_empty_directory(view_group)
67
-
68
- file_creator.print_file_content(presenter_name, 'DependencyProvider')
69
- file_creator.print_file_content(presenter_name, 'PresenterAssembly')
70
- end
71
- end
@@ -1,44 +0,0 @@
1
- require_relative 'file_creator'
2
- require_relative "pbxproj_parser"
3
-
4
- class RepositoryGenerator
5
-
6
- def initialize(parser, config)
7
- @parser = parser
8
- @config = config
9
- end
10
-
11
- def generate(repository_name, options = {})
12
- core_group = @parser.repository_core_group
13
- data_group = @parser.repository_data_group
14
- repository_name = repository_name.gsub("Repository", "")
15
-
16
- raise "[Error] Group #{repository_name} already exists in #{core_group.display_name}" if core_group[repository_name]
17
- associate_path_to_group = !core_group.path.nil?
18
- core_data_new_group_path = File.join(core_group.real_path, repository_name)
19
- core_data_new_group = core_group.pf_new_group(
20
- associate_path_to_group: associate_path_to_group,
21
- name: repository_name,
22
- path: core_data_new_group_path
23
- )
24
-
25
- raise "[Error] Group #{repository_name} already exists in #{data_group.display_name}" if data_group[repository_name]
26
- associate_path_to_group = !data_group.path.nil?
27
- data_new_group_path = File.join(data_group.real_path, repository_name)
28
- data_new_group = data_group.pf_new_group(
29
- associate_path_to_group: associate_path_to_group,
30
- name: repository_name,
31
- path: data_new_group_path
32
- )
33
-
34
- file_creator = FileCreator.new(options, @config)
35
- core_target = @parser.core_target
36
- file_creator.create_file(repository_name, 'Repository', core_data_new_group, core_target)
37
-
38
- file_creator = FileCreator.new(options, @config)
39
- data_target = @parser.data_target
40
- file_creator.create_file(repository_name, 'RepositoryImplementation', data_new_group, data_target)
41
-
42
- file_creator.print_file_content(repository_name, 'RepositoryAssembly')
43
- end
44
- end
@@ -1,13 +0,0 @@
1
- //
2
- // {{name}}Interactor.swift
3
- // {{project_name}}
4
- //
5
- // Created by {{full_username}} on {{date}}.
6
- //
7
- //
8
-
9
- import Foundation
10
-
11
- public protocol {{name}}Interactor {
12
- func execute() async throws
13
- }
@@ -1,5 +0,0 @@
1
- container.register({{name}}Interactor.self) { _ in
2
- {{name}}InteractorImplementation(
3
-
4
- )
5
- }
@@ -1,22 +0,0 @@
1
- //
2
- // {{name}}InteractorImplementation.swift
3
- // {{project_name}}
4
- //
5
- // Created by {{full_username}} on {{date}}.
6
- //
7
- //
8
-
9
- import Foundation
10
-
11
- public class {{name}}InteractorImplementation: {{name}}Interactor {
12
-
13
- public init() {
14
-
15
- }
16
-
17
- // MARK: - {{name}}Interactor
18
-
19
- public func execute() async throws {
20
-
21
- }
22
- }
@@ -1,13 +0,0 @@
1
- //
2
- // {{name}}Repository.swift
3
- // {{project_name}}
4
- //
5
- // Created by {{full_username}} on {{date}}.
6
- //
7
- //
8
-
9
- import Foundation
10
-
11
- public protocol {{name}}Repository {
12
-
13
- }
@@ -1,6 +0,0 @@
1
- container.register({{name}}Repository.self) { _ in
2
- {{name}}RepositoryImplementation(
3
-
4
- )
5
- }
6
- .inObjectScope(.container)
@@ -1,20 +0,0 @@
1
- //
2
- // {{name}}RepositoryImplementation.swift
3
- // {{project_name}}
4
- //
5
- // Created by {{full_username}} on {{date}}.
6
- //
7
- //
8
-
9
- import Foundation
10
- import Core
11
-
12
- public class {{name}}RepositoryImplementation: {{name}}Repository {
13
-
14
- public init() {
15
-
16
- }
17
-
18
- // MARK: - {{name}}Repository
19
-
20
- }