subclass_lldb 0.2.0 → 0.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/rubygems_plugin.rb +26 -26
- 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: f161edd302be777d8c790dce56a7b7aad461d6d599cd57e76e3ffa8e16555e39
|
4
|
+
data.tar.gz: 3cb0a40372b4b738b086a5c1976b07b526d4e49a97c7cc5700e3a86e4ea7a813
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89a2fd64f0f9884da3c3bf868de9940ca20b0970530357f232c125d6a2be42630cd49de6a53b8d7d546df47b5938af93705953bd835064f9b576aa24361cc6d0
|
7
|
+
data.tar.gz: 32aaf1d1ba6a2b5aec3ca99ca0d6f9face9fb9a100d6109f1dd3a2dedcc3f5be7fca0571b49da723a1d835c6be326cd850b11041f275cd35273b2cd0740c3657
|
data/lib/rubygems_plugin.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
require 'pathname'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
Lldb_init_path_subclass = File.expand_path('~')+'/.lldbinit'
|
5
|
+
Lldb_init_path_temp_subclass = File.expand_path('~')+'/.lldbinit_temp'
|
6
|
+
Lldb_source_path_subclass = File.expand_path('~')+'/.subclass_lldb'
|
7
|
+
Lldb_file_path_subclass = File.expand_path('~')+'/.subclass_lldb/subclass_lldb.py'
|
8
|
+
Commond_str_subclass = 'command script import '+Lldb_file_path_subclass
|
9
9
|
|
10
10
|
Gem.post_install do |installer|
|
11
11
|
if installer.spec.name != "subclass_lldb"
|
@@ -13,38 +13,38 @@ Gem.post_install do |installer|
|
|
13
13
|
end
|
14
14
|
|
15
15
|
# 配置 .lldbinit
|
16
|
-
if File.exist?(
|
17
|
-
f=File.new(
|
16
|
+
if File.exist?(Lldb_init_path_subclass)
|
17
|
+
f=File.new(Lldb_init_path_subclass,"a+")
|
18
18
|
data = f.readlines
|
19
19
|
isExist = false
|
20
20
|
data.each do |d|
|
21
|
-
if d.chomp.include?
|
21
|
+
if d.chomp.include?Commond_str_subclass
|
22
22
|
isExist = true
|
23
23
|
end
|
24
24
|
end
|
25
25
|
if isExist == false
|
26
26
|
f.puts ''
|
27
|
-
f.puts
|
27
|
+
f.puts Commond_str_subclass
|
28
28
|
f.close
|
29
29
|
end
|
30
30
|
else
|
31
|
-
f=File.new(
|
31
|
+
f=File.new(Lldb_init_path_subclass,"w+")
|
32
32
|
f.puts ''
|
33
|
-
f.puts
|
33
|
+
f.puts Commond_str_subclass
|
34
34
|
f.close
|
35
35
|
end
|
36
|
-
File.chmod(0775,
|
36
|
+
File.chmod(0775,Lldb_init_path_subclass)
|
37
37
|
|
38
|
-
if !File.exist?(
|
39
|
-
Dir.mkdir(
|
38
|
+
if !File.exist?(Lldb_source_path_subclass)
|
39
|
+
Dir.mkdir(Lldb_source_path_subclass)
|
40
40
|
end
|
41
41
|
|
42
|
-
File.chmod(0775,
|
42
|
+
File.chmod(0775,Lldb_source_path_subclass)
|
43
43
|
|
44
44
|
scriptPath = File.dirname(Pathname.new(__FILE__).realpath)
|
45
45
|
if File.exist?(scriptPath+'/setup')
|
46
|
-
File.rename scriptPath+'/setup',
|
47
|
-
File.chmod(0775,
|
46
|
+
File.rename scriptPath+'/setup', Lldb_file_path_subclass
|
47
|
+
File.chmod(0775,Lldb_file_path_subclass)
|
48
48
|
end
|
49
49
|
|
50
50
|
puts "Please use the subclass command in your Xcode LLDB."
|
@@ -64,19 +64,19 @@ def remove_dir(path)
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def remove_file()
|
67
|
-
f_temp = File.new(
|
68
|
-
f = File.new(
|
67
|
+
f_temp = File.new(Lldb_init_path_temp_subclass,"w")
|
68
|
+
f = File.new(Lldb_init_path_subclass, 'r')
|
69
69
|
f.each do |line|
|
70
|
-
if !line.chomp.include?
|
70
|
+
if !line.chomp.include?Commond_str_subclass
|
71
71
|
f_temp.puts line
|
72
72
|
end
|
73
73
|
end
|
74
74
|
f.close
|
75
75
|
f_temp.close
|
76
76
|
|
77
|
-
File.delete(
|
78
|
-
File.rename
|
79
|
-
File.chmod(0664,
|
77
|
+
File.delete(Lldb_init_path_subclass)
|
78
|
+
File.rename Lldb_init_path_temp_subclass, Lldb_init_path_subclass
|
79
|
+
File.chmod(0664,Lldb_init_path_subclass)
|
80
80
|
|
81
81
|
end
|
82
82
|
|
@@ -85,11 +85,11 @@ Gem.post_uninstall do
|
|
85
85
|
return
|
86
86
|
end
|
87
87
|
|
88
|
-
if File.exist?(
|
89
|
-
remove_dir(
|
88
|
+
if File.exist?(Lldb_source_path_subclass)
|
89
|
+
remove_dir(Lldb_source_path_subclass)
|
90
90
|
end
|
91
91
|
|
92
|
-
if File.exist?(
|
92
|
+
if File.exist?(Lldb_init_path_subclass)
|
93
93
|
remove_file()
|
94
94
|
end
|
95
95
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subclass_lldb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ningyuan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: An plugin of LLDB.
|
14
14
|
email:
|