cint 0.2.5 → 0.3.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.
- checksums.yaml +4 -4
- data/bin/cint +7 -5
- data/lib/cint/carthage_files.rb +6 -2
- data/lib/cint/project.rb +2 -2
- data/lib/cint/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e030fbb49ecfacdcf2e8d6c6c7a8a2338cb9d484a4ba2a58312cc57a3e0b026b
|
4
|
+
data.tar.gz: 7bbe253c545a121158a98b0c8808c78c348a5569c9edf65e9345f9fe74622144
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fb2ac5ac2a36fef65b8fcb04bd5f90dca55b11a8fb3f98f9a2d3f6e4466210f8dcd762652e45fe337d010b2f9c8ab7715085a0bb7c14d06d8e3252b52ec867f
|
7
|
+
data.tar.gz: e83ee69c7020acabb718f1be3efef0415c41b456fe89c8cdce842c00a5c3afaf559923b23e315240f75c5ffbe901356a472f644785fe839ec1d98188706019ee
|
data/bin/cint
CHANGED
@@ -94,8 +94,8 @@ def get_project_name(args)
|
|
94
94
|
project_name
|
95
95
|
end
|
96
96
|
|
97
|
-
def intergate_frameworks(target, project)
|
98
|
-
platform = SDK_TO_PLATFORM[target.sdk]
|
97
|
+
def intergate_frameworks(target, project, use_platform)
|
98
|
+
platform = use_platform ? SDK_TO_PLATFORM[target.sdk] : ''
|
99
99
|
frameworks = Cint::CarthageFiles.frameworks(platform)
|
100
100
|
|
101
101
|
if frameworks.empty?
|
@@ -107,7 +107,7 @@ def intergate_frameworks(target, project)
|
|
107
107
|
added_frameworks = project.add_missing_frameworks_to_target(target, frameworks)
|
108
108
|
|
109
109
|
# Add Frameworks Search Path (FRAMEWORK_SEARCH_PATHS)
|
110
|
-
fw_search_path = "$(PROJECT_DIR)/Carthage/Build/#{platform}"
|
110
|
+
fw_search_path = "$(PROJECT_DIR)/Carthage/Build" + (platform.empty? ? '' : "/#{platform}")
|
111
111
|
project.add_path(fw_search_path)
|
112
112
|
|
113
113
|
# Integrate Shell Script
|
@@ -128,7 +128,9 @@ end
|
|
128
128
|
command :install do |c|
|
129
129
|
c.syntax = 'cint install <project_name>'
|
130
130
|
c.description = 'Adds frameworks built by Carthage into a project'
|
131
|
-
c.
|
131
|
+
c.option '--no-platform', 'Do not search in platform sub-directory'
|
132
|
+
c.action do |args, options|
|
133
|
+
use_platform = options.no_platform == nil
|
132
134
|
error 'Carthage build folder does not exists' unless Cint::CarthageFiles.exists
|
133
135
|
|
134
136
|
# Choose Project
|
@@ -142,7 +144,7 @@ command :install do |c|
|
|
142
144
|
target = project.target_by_name(choice)
|
143
145
|
|
144
146
|
# integrate
|
145
|
-
intergate_frameworks(target, project)
|
147
|
+
intergate_frameworks(target, project, use_platform)
|
146
148
|
|
147
149
|
# Save Project
|
148
150
|
project.save
|
data/lib/cint/carthage_files.rb
CHANGED
@@ -6,8 +6,12 @@ module Cint
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def self.frameworks(platform)
|
9
|
-
|
10
|
-
|
9
|
+
if platform.empty?
|
10
|
+
pattern = "./Carthage/Build/*.{framework,xcframework}"
|
11
|
+
else
|
12
|
+
return [] unless PLATFORMS.include?(platform)
|
13
|
+
pattern = "./Carthage/Build/#{platform}/*.{framework,xcframework}"
|
14
|
+
end
|
11
15
|
Dir.glob(pattern)
|
12
16
|
end
|
13
17
|
end
|
data/lib/cint/project.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
module Cint
|
3
2
|
|
4
3
|
# Project
|
@@ -22,8 +21,9 @@ module Cint
|
|
22
21
|
end
|
23
22
|
|
24
23
|
def add_missing_frameworks_to_target(target, frameworks)
|
24
|
+
|
25
25
|
fs = _fix_frameworks_paths(frameworks)
|
26
|
-
fs -= target.frameworks_build_phase.files.map { |f| f.
|
26
|
+
fs -= target.frameworks_build_phase.files.map(&:file_ref).select { |ref| !ref.nil? }.map { |f| f.path }
|
27
27
|
|
28
28
|
added_frameworks = []
|
29
29
|
files = fs.map do |f|
|
data/lib/cint/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Antonyuk
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xcodeproj
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description:
|
97
|
+
description:
|
98
98
|
email:
|
99
99
|
- alex@antonyuk.me
|
100
100
|
executables:
|
@@ -115,7 +115,7 @@ homepage: https://github.com/dev4dev/cint
|
|
115
115
|
licenses:
|
116
116
|
- MIT
|
117
117
|
metadata: {}
|
118
|
-
post_install_message:
|
118
|
+
post_install_message:
|
119
119
|
rdoc_options: []
|
120
120
|
require_paths:
|
121
121
|
- lib
|
@@ -130,8 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
134
|
-
signing_key:
|
133
|
+
rubygems_version: 3.3.12
|
134
|
+
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Simplifies all routines with adding Frameworks built with Carthage into a
|
137
137
|
project and creating Shell Script Build Phase
|