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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53f92f6691a68ed285f5fd2a9f917c361ebf291a68177e86063804c0dd364d77
4
- data.tar.gz: fb1dcd2a753b36379c840c22fb33cc2542e455d6c528b7bc05504dfd3df4d1b8
3
+ metadata.gz: de14a43356ef83a12de8ed67d690e64273797a8c2fe5e720248e5dae02f5d00e
4
+ data.tar.gz: 572b69db42737d92b3018e94bba2b5323e20d669f120adcea6608365a9102ed6
5
5
  SHA512:
6
- metadata.gz: 9614e307beb251a22efbfa42051cb1eaf436925dbfdba7adc2e18ee26b95728a5c034d6b398d548ae3566bf33d294ec31f57cd7ca6c98c35faff074fe00a712f
7
- data.tar.gz: 217096830d6e21a0d7b11295eace1309ff935df07443f5072760d380566f19a180de1b769d0f195b025a89ad239abd660b057ce125d4709dd67c7a201f9c9591
6
+ metadata.gz: 2627eab887cb5d005d338e36247e95579d8b90835cd85b12e769bf83fad091a80d8f2b414eed10c066f5892ecf0d3d5e0dff4bc65c82d978316744f660f9972d
7
+ data.tar.gz: b643795350b673ae9440e01fe50e24debda9e9c4f6e517bcf010a9941defcd90b7ed3d2614138e1b877f94d1f1dbfb5cdbc251dde5543af00d82a179ee6c5a16
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [4.0.1]
8
+
9
+ ### Fixed
10
+
11
+ - Do not generate new groups with name if using folder references
12
+
7
13
  ## [4.0.0]
8
14
 
9
15
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ccios (4.0.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.2)
13
- activesupport (6.0.3.3)
12
+ CFPropertyList (3.0.3)
13
+ activesupport (6.1.1)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
- i18n (>= 0.7, < 2)
16
- minitest (~> 5.1)
17
- tzinfo (~> 1.1)
18
- zeitwerk (~> 2.2, >= 2.2.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.7)
23
- i18n (1.8.5)
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
- thread_safe (0.3.6)
30
- tzinfo (1.2.7)
31
- thread_safe (~> 0.1)
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.0)
37
+ zeitwerk (2.4.2)
39
38
 
40
39
  PLATFORMS
41
40
  ruby
data/ccios.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ccios'
3
- s.version = '4.0.0'
3
+ s.version = '4.0.1'
4
4
  s.executables << 'ccios'
5
5
  s.date = '2016-08-03'
6
6
  s.summary = "Clean Code iOS Generator"
@@ -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.new_group(new_group_name, associate_path_to_group ? new_group_path : nil)
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.new_group(presenter_name, associate_path_to_group ? new_group_path : nil)
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.new_group("UI", associate_path_to_group ? ui_group_path : nil)
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.new_group("View", associate_path_to_group ? view_group_path : nil)
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.new_group("ViewController", associate_path_to_group ? view_controller_group_path : nil)
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.new_group("Presenter", associate_path_to_group ? presenter_group_path : nil)
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.new_group("Model", associate_path_to_group ? model_group_path : nil)
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.new_group(repository_name, associate_path_to_group ? core_data_new_group_path : nil)
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.new_group(repository_name, associate_path_to_group ? data_new_group_path : nil)
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
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.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Felgines