cocoapods-ppbuild 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0872502eb555dfc4a1d28584aa8d2ac7322e9705aa61c5c46cbb42a6bee0fa02'
4
- data.tar.gz: 4d1cb064a399e57fab64d0342ce952fd12801f4c1979a7a67b358e13d42142e7
3
+ metadata.gz: cdb6eea00fe407b9d03e07a467e994d7dd4a59121b48c20b313fc60998440d73
4
+ data.tar.gz: e4c6bab172b8eec9691595d99e2d63e04d0823d1dea2f1156c30fbcb06f3a565
5
5
  SHA512:
6
- metadata.gz: 9a627c3c6f7378283d8972849fff4b09194d0d2dd2bc917dfcfb981d834529842bbee73aa2a8162be37dc7aaf876dcaed3fcbc1e86d0ddd2b1edd8702c515ad6
7
- data.tar.gz: acf304936d1f43f0476c99a5ddd2fb1142107ca4ab6d5db1100505c6fec26c67735de43c982148e6bc3a6cbc1848ff6f9afa063a7cc4185f54f93aaef96fecea
6
+ metadata.gz: 557ad1a8434a62ac16cbc9a1ca75bea951b949185023572d6285be90916afaf3c2b67c4ea71257c85d8eda8ebac8578bb32b286d079d26b13bdf01d5fc7549e3
7
+ data.tar.gz: f6d10243bf7567a4488e54dea8e141786779d0b06011471cfdca24962c9de3ea24dcd146ed30105892531e7a409ccbb71efd0a7604b00d448046437db45e6ed3
@@ -135,24 +135,27 @@ module Pod
135
135
  else
136
136
  # resource_paths is Hash{String=>Array<String>} on 1.6 and above
137
137
  # (use AFNetworking to generate a demo data)
138
+ # https://github.com/leavez/cocoapods-binary/issues/50
138
139
  target.resource_paths.values.flatten
139
140
  end
140
141
  end
141
142
  raise "Wrong type: #{resources}" unless resources.kind_of? Array
142
-
143
- path_objects = resources.flat_map do |path|
144
- real_path = framework_path + File.basename(path)
143
+ path_objects = resources.map do |path|
144
+ object = Prebuild::Passer::ResourcePath.new
145
+ object.real_file_path = framework_path + File.basename(path)
145
146
  # 静态库资源目录处理
146
147
  if use_static_framework
147
- real_bundle_path = sandbox.real_bundle_path_for_pod(path)
148
- if File.exists?(real_bundle_path)
149
- FileUtils.cp_r(real_bundle_path, framework_path, :remove_destination => true)
148
+ object.real_file_path = path.gsub('${PODS_ROOT}', existed_framework_folder.to_s) if path.start_with? '${PODS_ROOT}'
149
+ object.real_file_path = path.gsub("${PODS_CONFIGURATION_BUILD_DIR}", existed_framework_folder.to_s) if path.start_with? "${PODS_CONFIGURATION_BUILD_DIR}"
150
+ real_bundle_path = path.gsub('${PODS_ROOT}', sandbox_path.to_s) if path.start_with? '${PODS_ROOT}'
151
+ real_bundle_path = path.gsub('${PODS_CONFIGURATION_BUILD_DIR}', sandbox_path.to_s) if path.start_with? '${PODS_CONFIGURATION_BUILD_DIR}'
152
+ real_origin_path = Pathname.new(real_bundle_path)
153
+ if real_origin_path.exist?
154
+ temp_path = Pathname.new(object.real_file_path)
155
+ temp_path.parent.mkpath unless temp_path.parent.exist?
156
+ FileUtils.cp_r(real_origin_path, temp_path, :remove_destination => true)
150
157
  end
151
158
  end
152
- object = Prebuild::Passer::ResourcePath.new
153
- if File.exists?(real_path)
154
- object.real_file_path = real_path
155
- end
156
159
  object.target_file_path = path.gsub('${PODS_ROOT}', standard_sandbox_path.to_s) if path.start_with? '${PODS_ROOT}'
157
160
  object.target_file_path = path.gsub("${PODS_CONFIGURATION_BUILD_DIR}", standard_sandbox_path.to_s) if path.start_with? "${PODS_CONFIGURATION_BUILD_DIR}"
158
161
  object
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPpbuild
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-ppbuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 彭懂
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-18 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler