cocoapods-anker-ar 1.2.0 → 1.2.1
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/lib/cocoapods_anker_ar.rb +1 -1
- data/lib/cocoapods_plugin.rb +53 -48
- 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: 53d87b175c6ad2c28fd275fca7d098217545acc5132fcccf89084e5725c1b0fa
|
|
4
|
+
data.tar.gz: 1ec89fbaadae87a458ce6390f7f7b47a9fc4117b5d7142eb9661ce78233a0523
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0951275ac2c303879914b1f3e09bffaaf4d1bcddaf6e1dae3e3e85fa35d2fe55befa9cca7dfcfbce9eba578fee064f6f3e34e83d28fefd42ef03c4673f9eae20'
|
|
7
|
+
data.tar.gz: 0e9df006388d9261d60647d7ee1b3b32bb38ccada256d1e167eff558efe9a339515f2c2abb273b4331f5f56e81b6ec2e67ea3dd2cfa37ee42301d4660fa7b620
|
data/lib/cocoapods_anker_ar.rb
CHANGED
data/lib/cocoapods_plugin.rb
CHANGED
|
@@ -9,30 +9,32 @@ module Pod
|
|
|
9
9
|
[:type, :flatten, :sha1, :sha256, :indexDownload]
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
alias_method
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
# Use prepend instead of alias_method to safely monkey-patch without
|
|
13
|
+
# infinite recursion when the plugin is loaded more than once.
|
|
14
|
+
module AnkerArExtensions
|
|
15
|
+
def download_file(full_filename)
|
|
16
|
+
if url.to_s.include?('codingcorp-cocoapods.pkg.coding.anker-in.com')
|
|
17
|
+
CodingArUtil.download(url, full_filename)
|
|
18
|
+
else
|
|
19
|
+
super
|
|
20
|
+
end
|
|
21
21
|
end
|
|
22
|
-
end
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
def should_flatten?
|
|
24
|
+
if options.key?(:indexDownload) && options[:indexDownload] == true
|
|
25
|
+
true
|
|
26
|
+
elsif url.to_s.include?('codingcorp-cocoapods.pkg.coding.anker-in.com')
|
|
27
|
+
# For CODING-AR packages, preserve directory structure to maintain .xcframework layout
|
|
28
|
+
# Use indexDownload: true in podspec if flattening is needed
|
|
29
|
+
puts "🔧 [CocoaPods-Anker-AR] Preserving directory structure for CODING-AR package"
|
|
30
|
+
false
|
|
31
|
+
else
|
|
32
|
+
super
|
|
33
|
+
end
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
|
+
|
|
37
|
+
prepend AnkerArExtensions
|
|
36
38
|
end
|
|
37
39
|
end
|
|
38
40
|
end
|
|
@@ -40,40 +42,43 @@ end
|
|
|
40
42
|
module Pod
|
|
41
43
|
class Source
|
|
42
44
|
class Manager
|
|
43
|
-
alias_method
|
|
44
|
-
|
|
45
|
+
# Use prepend instead of alias_method to safely monkey-patch without
|
|
46
|
+
# infinite recursion when the plugin is loaded more than once.
|
|
47
|
+
module AnkerArExtensions
|
|
48
|
+
def source_from_path(path)
|
|
49
|
+
@sources_by_path ||= Hash.new do |hash, key|
|
|
50
|
+
hash[key] = case
|
|
51
|
+
when key.basename.to_s == Pod::TrunkSource::TRUNK_REPO_NAME
|
|
52
|
+
TrunkSource.new(key)
|
|
53
|
+
when (key + '.url').exist?
|
|
54
|
+
CDNSource.new(key)
|
|
55
|
+
when (key + '.coding_ar_url').exist?
|
|
56
|
+
CodingArSource.new(key)
|
|
57
|
+
else
|
|
58
|
+
Source.new(key)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
45
61
|
|
|
46
|
-
|
|
47
|
-
@sources_by_path ||= Hash.new do |hash, key|
|
|
48
|
-
hash[key] = case
|
|
49
|
-
when key.basename.to_s == Pod::TrunkSource::TRUNK_REPO_NAME
|
|
50
|
-
TrunkSource.new(key)
|
|
51
|
-
when (key + '.url').exist?
|
|
52
|
-
CDNSource.new(key)
|
|
53
|
-
when (key + '.coding_ar_url').exist?
|
|
54
|
-
CodingArSource.new(key)
|
|
55
|
-
else
|
|
56
|
-
Source.new(key)
|
|
57
|
-
end
|
|
62
|
+
@sources_by_path[path]
|
|
58
63
|
end
|
|
59
64
|
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
def create_source_with_url(url)
|
|
66
|
+
require 'coding_ar_util'
|
|
62
67
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
else
|
|
70
|
-
orig_create_source_with_url(url)
|
|
71
|
-
end
|
|
68
|
+
name = name_for_url(url)
|
|
69
|
+
if CodingArUtil.coding_ar_service?(url)
|
|
70
|
+
Command::Repo::AddCodingAr.parse([name, url]).run
|
|
71
|
+
else
|
|
72
|
+
super
|
|
73
|
+
end
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
source = source_with_url(url)
|
|
76
|
+
raise "Unable to create a source with URL #{url}" unless source
|
|
77
|
+
source
|
|
78
|
+
end
|
|
76
79
|
end
|
|
80
|
+
|
|
81
|
+
prepend AnkerArExtensions
|
|
77
82
|
end
|
|
78
83
|
end
|
|
79
84
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cocoapods-anker-ar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dark Liu
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|