import_remotecontrol 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/import_remotecontrol.rb +25 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDVmNDAzOTU1ZTMwMDI1MWNiYzZkODE3MGRhNThjMTk0NmVhZGVhNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDY0ZjBhMGIyZDk0Njc2ZWMzZDY5MzJhYmJjZTlhYTRlMmJlNTdhYQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTQzNTg5ODQ3ZGM1ZTQ3MTljMGU3YTA2YTNiNTBmZjQ2OTBlMDc2ZmU4Mjll
|
10
|
+
ZDAzMmJjOGRkYTcwNmNjM2Y4OTE5YzhkMDYzNmEyYTg3OTRhYmY1MjUwY2Nk
|
11
|
+
ZDJiYTdlZDIyODBkOGQxN2Q4YjE1ODhjMWNhMDdkNGVjZjcyMDA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzMwZGMzOWQ1Nzk4ZDNjMzgwYWY0MThiMmQzNzJlNjM2ZmJiNzU2NjRmYTQ0
|
14
|
+
Y2U5MDcxZTZmY2M3NjJiNTRiN2Q4YWViYWZlZDlkMTZlOTYzMjI5NjVkMjhh
|
15
|
+
MzVhNzE5ZjJmZjgxNDhhMTY0ZjQ5YzlkMjkyMDc1ZDU1YjQwODY=
|
data/lib/import_remotecontrol.rb
CHANGED
@@ -10,9 +10,18 @@ module ImportRemotecontrol
|
|
10
10
|
@file_path_array = []
|
11
11
|
Find.find(dir_path).each do |path|
|
12
12
|
if FileTest.directory?(path)
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
p path
|
14
|
+
Dir.foreach(path) do |file_path|
|
15
|
+
if(file_path != "."&&file_path!= "..")
|
16
|
+
if FileTest.directory?("#{path}/#{file_path}")
|
17
|
+
p file_path
|
18
|
+
self.getFileNames("#{path}/#{file_path}")
|
19
|
+
else
|
20
|
+
p "Where Put #{file_path}"
|
21
|
+
@file_path_array << "#{path}/#{file_path}"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
16
25
|
end
|
17
26
|
end
|
18
27
|
@file_path_array
|
@@ -21,11 +30,20 @@ module ImportRemotecontrol
|
|
21
30
|
|
22
31
|
|
23
32
|
def self.getHashRemoteCode(file_path)
|
33
|
+
p "In get HashRemoteCode"
|
24
34
|
remote_code_hash = {}
|
25
35
|
remote_code_line = File.read(file_path)
|
26
36
|
remote_code_line.split("\r\n").each do |code|
|
27
37
|
i = code.split("=")
|
28
|
-
|
38
|
+
key = i[0]
|
39
|
+
if i
|
40
|
+
if i[0]
|
41
|
+
if(i[0].split(",").count > 1)
|
42
|
+
key = i[0].split(",")[1]
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
remote_code_hash.merge!({key => i[1]})
|
29
47
|
end
|
30
48
|
remote_code_hash
|
31
49
|
end
|
@@ -34,7 +52,9 @@ module ImportRemotecontrol
|
|
34
52
|
def self.getRemoteCodeArray(dir_path)
|
35
53
|
@remote_code_array = []
|
36
54
|
if FileTest.directory?(dir_path)
|
37
|
-
|
55
|
+
filenames = getFileNames(dir_path)
|
56
|
+
filenames.each do |file_path|
|
57
|
+
p file_path
|
38
58
|
@remote_code_array << getHashRemoteCode(file_path)
|
39
59
|
end
|
40
60
|
end
|