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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rubygems_plugin.rb +26 -26
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 162a16812ef22ef82242d2b7311772f34254e65ad6920cf84389679fc0dc77d0
4
- data.tar.gz: 96b24a6620b7e6c67bf937cf655737e95485284fe337bfe59c902c36756e4f12
3
+ metadata.gz: f161edd302be777d8c790dce56a7b7aad461d6d599cd57e76e3ffa8e16555e39
4
+ data.tar.gz: 3cb0a40372b4b738b086a5c1976b07b526d4e49a97c7cc5700e3a86e4ea7a813
5
5
  SHA512:
6
- metadata.gz: da8cdf3d3c5095047f854c31d8d8fa688075a0ce2c72d08ae593730d16dbecdb6a4a3df4c9af09cddf5f6b31ca14fa2bd76f04b406d91ac96fe2cbc3040e3b73
7
- data.tar.gz: 4dedfb2c56795bce082c06ce61f72c832174190bae6f37de859a3f83f99417eba66812a0b959a566d824abaf3885fbc9905b6307214237955fe009716653710f
6
+ metadata.gz: 89a2fd64f0f9884da3c3bf868de9940ca20b0970530357f232c125d6a2be42630cd49de6a53b8d7d546df47b5938af93705953bd835064f9b576aa24361cc6d0
7
+ data.tar.gz: 32aaf1d1ba6a2b5aec3ca99ca0d6f9face9fb9a100d6109f1dd3a2dedcc3f5be7fca0571b49da723a1d835c6be326cd850b11041f275cd35273b2cd0740c3657
@@ -1,11 +1,11 @@
1
1
 
2
2
  require 'pathname'
3
3
 
4
- Lldb_init_path = File.expand_path('~')+'/.lldbinit'
5
- Lldb_init_path_temp = File.expand_path('~')+'/.lldbinit_temp'
6
- Lldb_source_path = File.expand_path('~')+'/.subclass_lldb'
7
- Lldb_file_path = File.expand_path('~')+'/.subclass_lldb/subclass_lldb.py'
8
- Commond_str = 'command script import '+Lldb_file_path
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?(Lldb_init_path)
17
- f=File.new(Lldb_init_path,"a+")
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?Commond_str
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 Commond_str
27
+ f.puts Commond_str_subclass
28
28
  f.close
29
29
  end
30
30
  else
31
- f=File.new(Lldb_init_path,"w+")
31
+ f=File.new(Lldb_init_path_subclass,"w+")
32
32
  f.puts ''
33
- f.puts Commond_str
33
+ f.puts Commond_str_subclass
34
34
  f.close
35
35
  end
36
- File.chmod(0775,Lldb_init_path)
36
+ File.chmod(0775,Lldb_init_path_subclass)
37
37
 
38
- if !File.exist?(Lldb_source_path)
39
- Dir.mkdir(Lldb_source_path)
38
+ if !File.exist?(Lldb_source_path_subclass)
39
+ Dir.mkdir(Lldb_source_path_subclass)
40
40
  end
41
41
 
42
- File.chmod(0775,Lldb_source_path)
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', Lldb_file_path
47
- File.chmod(0775,Lldb_file_path)
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(Lldb_init_path_temp,"w")
68
- f = File.new(Lldb_init_path, 'r')
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?Commond_str
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(Lldb_init_path)
78
- File.rename Lldb_init_path_temp, Lldb_init_path
79
- File.chmod(0664,Lldb_init_path)
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?(Lldb_source_path)
89
- remove_dir(Lldb_source_path)
88
+ if File.exist?(Lldb_source_path_subclass)
89
+ remove_dir(Lldb_source_path_subclass)
90
90
  end
91
91
 
92
- if File.exist?(Lldb_init_path)
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.0
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-21 00:00:00.000000000 Z
11
+ date: 2021-06-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: An plugin of LLDB.
14
14
  email: