censorius 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/censorius/version.rb +1 -1
- data/lib/censorius.rb +19 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a47cbd15d4e63e04b07457800cf38f13059f896eed12dbb678364a5e40bb4c30
|
4
|
+
data.tar.gz: a68cdd14b0d02771bf8f02ffc53554038c07fbc7fc57933ac7cff160c857035e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf8adf0ad09797ebfd8b8b0ead0452f8436341d474d908b8a986dc764882338460d32918bf07a2d12868738b682e24c173ddfcd7da0c695a56dc9785c20b54ad
|
7
|
+
data.tar.gz: d280c392ca3ed7e3b58b13443437680e8234115434829d725383e50e45c06f67ad1788c67b59fdac4b3d4bba089be7b7acecab511401fa0ae3217570ec3590ff
|
data/lib/censorius/version.rb
CHANGED
data/lib/censorius.rb
CHANGED
@@ -47,7 +47,7 @@ module Censorius
|
|
47
47
|
when Xcodeproj::Project::Object::XCLocalSwiftPackageReference
|
48
48
|
generate_paths_local_swift_package_reference(object, parent_path)
|
49
49
|
when Xcodeproj::Project::Object::XCSwiftPackageProductDependency
|
50
|
-
|
50
|
+
generate_paths_swift_package_product_dependency(object, parent_path)
|
51
51
|
else
|
52
52
|
raise "Unrecognized: #{object.class}, at: #{parent_path}"
|
53
53
|
end
|
@@ -59,12 +59,12 @@ module Censorius
|
|
59
59
|
@paths_by_object[project] = path = "PBXProject(#{project.name})"
|
60
60
|
generate_paths(project.main_group, path)
|
61
61
|
generate_paths(project.build_configuration_list, path)
|
62
|
-
project.targets.each do |target|
|
63
|
-
generate_paths(target, path)
|
64
|
-
end
|
65
62
|
project.package_references.each do |package_reference|
|
66
63
|
generate_paths(package_reference, path)
|
67
64
|
end
|
65
|
+
project.targets.each do |target|
|
66
|
+
generate_paths(target, path)
|
67
|
+
end
|
68
68
|
end
|
69
69
|
|
70
70
|
def generate_paths_configuration_list(configuration_list, parent_path)
|
@@ -80,6 +80,11 @@ module Censorius
|
|
80
80
|
|
81
81
|
def generate_paths_target(target, parent_path)
|
82
82
|
@paths_by_object[target] = path = "#{parent_path}/#{target.class.name.split('::').last}(#{target.name})"
|
83
|
+
if target.respond_to?(:package_product_dependencies)
|
84
|
+
target.package_product_dependencies.each do |dependency|
|
85
|
+
generate_paths(dependency, path)
|
86
|
+
end
|
87
|
+
end
|
83
88
|
target.build_phases.each do |phase|
|
84
89
|
generate_paths(phase, path)
|
85
90
|
end
|
@@ -92,11 +97,6 @@ module Censorius
|
|
92
97
|
target.dependencies.each do |dependency|
|
93
98
|
generate_paths(dependency, path)
|
94
99
|
end
|
95
|
-
if target.respond_to?(:package_product_dependencies)
|
96
|
-
target.package_product_dependencies.each do |dependency|
|
97
|
-
generate_paths(dependency, path)
|
98
|
-
end
|
99
|
-
end
|
100
100
|
end
|
101
101
|
|
102
102
|
def generate_paths_phase(phase, parent_path)
|
@@ -111,7 +111,8 @@ module Censorius
|
|
111
111
|
file_ref_path = generate_paths(build_file.file_ref)
|
112
112
|
@paths_by_object[build_file] = "#{parent_path}/PBXBuildFile(#{file_ref_path})"
|
113
113
|
elsif build_file.product_ref
|
114
|
-
|
114
|
+
@paths_by_object[build_file.product_ref] ||= generate_paths(dependency.product_ref, parent_path)
|
115
|
+
product_ref_path = @paths_by_object[build_file.product_ref]
|
115
116
|
@paths_by_object[build_file] = "#{parent_path}/PBXBuildFile(#{product_ref_path})"
|
116
117
|
else
|
117
118
|
raise "Unsupported: #{build_file}"
|
@@ -149,7 +150,8 @@ module Censorius
|
|
149
150
|
@paths_by_object[dependency] = path = "#{parent_path}/PBXTargetDependency(#{dependency.name})"
|
150
151
|
generate_paths(dependency.target_proxy, path)
|
151
152
|
elsif dependency.product_ref
|
152
|
-
|
153
|
+
@paths_by_object[dependency.product_ref] ||= generate_paths(dependency.product_ref, parent_path)
|
154
|
+
product_ref_path = @paths_by_object[dependency.product_ref]
|
153
155
|
@paths_by_object[dependency] = "#{parent_path}/PBXTargetDependency(#{product_ref_path})"
|
154
156
|
else
|
155
157
|
raise "Unsupported: #{dependency}"
|
@@ -185,8 +187,12 @@ module Censorius
|
|
185
187
|
@paths_by_object[reference] = "#{parent_path}/XCLocalSwiftPackageReference(#{params.join(', ')})"
|
186
188
|
end
|
187
189
|
|
188
|
-
def
|
189
|
-
|
190
|
+
def generate_paths_swift_package_product_dependency(dependency, parent_path)
|
191
|
+
params = [
|
192
|
+
@paths_by_object[dependency.package],
|
193
|
+
dependency.product_name
|
194
|
+
]
|
195
|
+
@paths_by_object[dependency] = "#{parent_path}/XCSwiftPackageProductDependency(#{params.join(', ')})"
|
190
196
|
end
|
191
197
|
|
192
198
|
def write_debug_paths
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: censorius
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Makarov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|