cocoapods-ybin 0.0.1 → 0.0.2

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: 5f1f6223b5c5c46f4b4d4a8c9e9f719021748aae3d1c82dcb7fad73cac20df87
4
- data.tar.gz: ec6dd6b52a577f0f0d2678da3bf66865fe6bcd81768101f50d06bf9d9292e2fb
3
+ metadata.gz: '0956fbf69eeb9ae7c39bc7f954a4fbdeb3b30ce0ebb8cb16c8fdf9b7fe00e233'
4
+ data.tar.gz: 8e43d906a2418b1f42bdc147312cbefa4ae4cb34e968d0db1f96f49cf2d83fbc
5
5
  SHA512:
6
- metadata.gz: cf8f987c7cf3d67ec46b0cab7f5d1eb14089e725ba3e69bf02d456c78cdf248735729e65600cf49f602f7c26707db596838f6b5d5c3edeb1c7405ec8589c0449
7
- data.tar.gz: abc5d9345614640b4ca7ca33ef878563efd56f0bd6b893d854450978b4822f73b68af40e46d3f13d8bea983aa934e722d82979e6aa98bafe32e93b6d9c63888e
6
+ metadata.gz: 26e76f4cc63e0156a16ee35503906378cd04e3960bd0905ec2c594f975217ad749c691bd13c17761f5ccd6a0985a6dd8c1ec675e0b050a8dc27d550619d85750
7
+ data.tar.gz: 6257cfdb02d6b936280258955596922d4923de54936cc0a5b0ba252643001d434d68e529b1661da0a2a3bf971c76a1c1fcd4ae3ea55c28422d0d1deaa289885e
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
+ [![Gem Version](https://badge.fury.io/rb/cocoapods-ybin.svg)](https://badge.fury.io/rb/cocoapods-ybin)
2
+
1
3
  # cocoapods-ybin
2
4
 
3
- A description of cocoapods-ybin.
5
+ The binary library and source code mapping, to achieve breakpoints automatically jump into the corresponding source code for debugging the application.
4
6
 
5
7
  ## Installation
6
8
 
@@ -8,4 +10,6 @@ A description of cocoapods-ybin.
8
10
 
9
11
  ## Usage
10
12
 
11
- $ pod spec ybin POD_NAME
13
+ $ pod ybin --help
14
+
15
+
@@ -7,7 +7,7 @@ module Pod
7
7
  self.summary = '二进制库源码映射工具'
8
8
 
9
9
  self.description = <<-DESC
10
- 二进制库源码映射工具. 作者: houmanager@qq.com
10
+ 二进制库源码映射工具.
11
11
  DESC
12
12
 
13
13
  self.arguments = [
@@ -216,10 +216,14 @@ module Pod
216
216
  # 查询映射列表
217
217
  def linked_list
218
218
 
219
- records = JSON.parse(File.read(source_record_file_path))
220
- if records.count > 0
221
- records.each.with_index(1) do |record, index|
222
- UI.puts "#{index}. #{record["lib_name"]}(#{record["lib_version"]}) ".green "Source: #{record["source_path"]}".yellow
219
+ if File.exist?(source_record_file_path)
220
+ records = JSON.parse(File.read(source_record_file_path))
221
+ if records.count > 0
222
+ records.each.with_index(1) do |record, index|
223
+ UI.puts "#{index}. #{record["lib_name"]}(#{record["lib_version"]}) ".green "Source: #{record["source_path"]}".yellow
224
+ end
225
+ else
226
+ UI.puts "无记录".green
223
227
  end
224
228
  else
225
229
  UI.puts "无记录".green
@@ -233,11 +237,13 @@ module Pod
233
237
  def linked_list_contain(lib_name)
234
238
 
235
239
  is_contain_lib = false
236
- records = JSON.parse(File.read(source_record_file_path))
237
- records.each.with_index(1) do |record, index|
238
- if record["lib_name"] == lib_name
239
- is_contain_lib = true
240
- break
240
+ if File.exist?(source_record_file_path)
241
+ records = JSON.parse(File.read(source_record_file_path))
242
+ records.each.with_index(1) do |record, index|
243
+ if record["lib_name"] == lib_name
244
+ is_contain_lib = true
245
+ break
246
+ end
241
247
  end
242
248
  end
243
249
  is_contain_lib
@@ -339,7 +345,7 @@ module Pod
339
345
  podfile_lock = File.join(Pathname.pwd, "Podfile.lock")
340
346
  if File.exist?(podfile_lock)
341
347
  else
342
- UI.puts "[!] 未匹配到 Podfile.lock 文件, 无法获取 Pod 管理信息".red
348
+ UI.puts "\n[!] 未匹配到 Podfile.lock 文件, 无法获取 Pod 管理信息\n".red
343
349
  return
344
350
  end
345
351
  @lockfile ||= Lockfile.from_file(Pathname.new(podfile_lock))
@@ -391,12 +397,15 @@ module Pod
391
397
  end
392
398
 
393
399
  def get_lib_linked_path(lib_name)
394
- records = JSON.parse(File.read(source_record_file_path))
400
+
395
401
  lib_linked_path = ""
396
- records.each do |record|
397
- if record["lib_name"] == lib_name
398
- lib_linked_path = record["source_path"]
399
- break
402
+ if File.exist?(source_record_file_path)
403
+ records = JSON.parse(File.read(source_record_file_path))
404
+ records.each do |record|
405
+ if record["lib_name"] == lib_name
406
+ lib_linked_path = record["source_path"]
407
+ break
408
+ end
400
409
  end
401
410
  end
402
411
  lib_linked_path
@@ -1,3 +1,3 @@
1
1
  module CocoapodsYbin
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-ybin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - monetking
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-03 00:00:00.000000000 Z
11
+ date: 2020-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler