ccios 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +13 -14
- data/ccios.gemspec +1 -1
- data/lib/ccios/file_creator.rb +12 -0
- data/lib/ccios/interactor_generator.rb +5 -1
- data/lib/ccios/presenter_generator.rb +30 -6
- data/lib/ccios/repository_generator.rb +10 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de14a43356ef83a12de8ed67d690e64273797a8c2fe5e720248e5dae02f5d00e
|
4
|
+
data.tar.gz: 572b69db42737d92b3018e94bba2b5323e20d669f120adcea6608365a9102ed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2627eab887cb5d005d338e36247e95579d8b90835cd85b12e769bf83fad091a80d8f2b414eed10c066f5892ecf0d3d5e0dff4bc65c82d978316744f660f9972d
|
7
|
+
data.tar.gz: b643795350b673ae9440e01fe50e24debda9e9c4f6e517bcf010a9941defcd90b7ed3d2614138e1b877f94d1f1dbfb5cdbc251dde5543af00d82a179ee6c5a16
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ccios (4.0.
|
4
|
+
ccios (4.0.1)
|
5
5
|
activesupport (> 4)
|
6
6
|
mustache (~> 1.0)
|
7
7
|
xcodeproj (~> 1.4)
|
@@ -9,33 +9,32 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
CFPropertyList (3.0.
|
13
|
-
activesupport (6.
|
12
|
+
CFPropertyList (3.0.3)
|
13
|
+
activesupport (6.1.1)
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
|
-
i18n (>=
|
16
|
-
minitest (
|
17
|
-
tzinfo (~>
|
18
|
-
zeitwerk (~> 2.
|
15
|
+
i18n (>= 1.6, < 2)
|
16
|
+
minitest (>= 5.1)
|
17
|
+
tzinfo (~> 2.0)
|
18
|
+
zeitwerk (~> 2.3)
|
19
19
|
atomos (0.1.3)
|
20
20
|
claide (1.0.3)
|
21
21
|
colored2 (3.1.2)
|
22
|
-
concurrent-ruby (1.1.
|
23
|
-
i18n (1.8.
|
22
|
+
concurrent-ruby (1.1.8)
|
23
|
+
i18n (1.8.8)
|
24
24
|
concurrent-ruby (~> 1.0)
|
25
25
|
minitest (5.14.2)
|
26
26
|
mustache (1.1.1)
|
27
27
|
nanaimo (0.3.0)
|
28
28
|
rake (12.3.3)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
xcodeproj (1.18.0)
|
29
|
+
tzinfo (2.0.4)
|
30
|
+
concurrent-ruby (~> 1.0)
|
31
|
+
xcodeproj (1.19.0)
|
33
32
|
CFPropertyList (>= 2.3.3, < 4.0)
|
34
33
|
atomos (~> 0.1.3)
|
35
34
|
claide (>= 1.0.2, < 2.0)
|
36
35
|
colored2 (~> 3.1)
|
37
36
|
nanaimo (~> 0.3.0)
|
38
|
-
zeitwerk (2.4.
|
37
|
+
zeitwerk (2.4.2)
|
39
38
|
|
40
39
|
PLATFORMS
|
41
40
|
ruby
|
data/ccios.gemspec
CHANGED
data/lib/ccios/file_creator.rb
CHANGED
@@ -2,6 +2,18 @@ require_relative 'code_templater'
|
|
2
2
|
require 'fileutils'
|
3
3
|
require 'logger'
|
4
4
|
|
5
|
+
class Xcodeproj::Project::Object::PBXGroup
|
6
|
+
|
7
|
+
def pf_new_group(associate_path_to_group:, name:, path:)
|
8
|
+
# When using "Group with folder" we only provide a path
|
9
|
+
# When using "Group without folder" we only provide a name
|
10
|
+
new_group(
|
11
|
+
associate_path_to_group ? nil : name,
|
12
|
+
associate_path_to_group ? path : nil
|
13
|
+
)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
5
17
|
class FileCreator
|
6
18
|
|
7
19
|
def self.logger
|
@@ -16,7 +16,11 @@ class InteractorGenerator
|
|
16
16
|
|
17
17
|
raise "[Error] Group #{new_group_name} already exists in #{app_group.display_name}" if interactor_group[new_group_name]
|
18
18
|
new_group_path = File.join(interactor_group.real_path, new_group_name)
|
19
|
-
new_group = interactor_group.
|
19
|
+
new_group = interactor_group.pf_new_group(
|
20
|
+
associate_path_to_group: associate_path_to_group,
|
21
|
+
name: new_group_name,
|
22
|
+
path: new_group_path
|
23
|
+
)
|
20
24
|
|
21
25
|
file_creator = FileCreator.new(options)
|
22
26
|
target = @parser.core_target
|
@@ -15,22 +15,46 @@ class PresenterGenerator
|
|
15
15
|
|
16
16
|
raise "[Error] Group #{presenter_name} already exists in #{app_group.display_name}" if app_group[presenter_name]
|
17
17
|
new_group_path = File.join(app_group.real_path, presenter_name)
|
18
|
-
new_group = app_group.
|
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
|
+
)
|
19
23
|
|
20
24
|
ui_group_path = File.join(new_group_path, "UI")
|
21
|
-
ui_group = new_group.
|
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
|
+
)
|
22
30
|
|
23
31
|
view_group_path = File.join(ui_group_path, "View")
|
24
|
-
view_group = ui_group.
|
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
|
+
)
|
25
37
|
|
26
38
|
view_controller_group_path = File.join(ui_group_path, "ViewController")
|
27
|
-
view_controller_group = ui_group.
|
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
|
+
)
|
28
44
|
|
29
45
|
presenter_group_path = File.join(new_group_path, "Presenter")
|
30
|
-
presenter_group = new_group.
|
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
|
+
)
|
31
51
|
|
32
52
|
model_group_path = File.join(new_group_path, "Model")
|
33
|
-
model_group = new_group.
|
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
|
+
)
|
34
58
|
|
35
59
|
file_creator = FileCreator.new(options)
|
36
60
|
target = @parser.app_target
|
@@ -15,12 +15,20 @@ class RepositoryGenerator
|
|
15
15
|
raise "[Error] Group #{repository_name} already exists in #{core_group.display_name}" if core_group[repository_name]
|
16
16
|
associate_path_to_group = !core_group.path.nil?
|
17
17
|
core_data_new_group_path = File.join(core_group.real_path, repository_name)
|
18
|
-
core_data_new_group = core_group.
|
18
|
+
core_data_new_group = core_group.pf_new_group(
|
19
|
+
associate_path_to_group: associate_path_to_group,
|
20
|
+
name: repository_name,
|
21
|
+
path: core_data_new_group_path
|
22
|
+
)
|
19
23
|
|
20
24
|
raise "[Error] Group #{repository_name} already exists in #{data_group.display_name}" if data_group[repository_name]
|
21
25
|
associate_path_to_group = !data_group.path.nil?
|
22
26
|
data_new_group_path = File.join(data_group.real_path, repository_name)
|
23
|
-
data_new_group = data_group.
|
27
|
+
data_new_group = data_group.pf_new_group(
|
28
|
+
associate_path_to_group: associate_path_to_group,
|
29
|
+
name: repository_name,
|
30
|
+
path: data_new_group_path
|
31
|
+
)
|
24
32
|
|
25
33
|
file_creator = FileCreator.new(options)
|
26
34
|
core_target = @parser.core_target
|