import_remotecontrol 0.5.1 → 0.5.2
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 +8 -8
- data/lib/automation_code_list.rb +9 -2
- data/lib/import_code.rb +1 -27
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
Y2Q1YzJlMWUyZjcxMzM5YmY5NDc0N2Q4ZDYxYjczNTVkN2IxY2E1MQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MGJlN2QzNWU1ZjdlZTk2NzFjNjBlNDI3N2NmYzViNmYxNzEzN2FhZA==
|
|
7
7
|
!binary "U0hBNTEy":
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YzRjOWQ1NmQzY2E3ODk0YWMyNGY1NjQyM2Q0YjNlYzFhYmQ0ODNjMDU2Mjlj
|
|
10
|
+
ZTkxN2E3ZThkM2FiNWQ2ZmQ4OWYwMTA0ODY0YmRkZWIyZTE1ZDg3NGU1ZWMx
|
|
11
|
+
NmJhNzI5ZDdhOWJiZWM1MWY4YWY1OGM5Yzg4NWM5MzQyNGI0N2Y=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
YjRiMjQ0ZjNjZDRhMDMwZDFkNTIyODMwM2NhODQ1ZWFhZDgwNDdlOTBhZTY2
|
|
14
|
+
MGFkZWZhYjkxMzJmNWE4OGFhNGNiMDNmZjE4YzA0YTljYzk2MWM4MzY2MzM2
|
|
15
|
+
N2E2NDk2NzhkMmYzZTAyOWNiYTQ4MTlmMTA4NmNjYWNlNzY4YTI=
|
data/lib/automation_code_list.rb
CHANGED
|
@@ -45,6 +45,13 @@ module AutomationCodeList
|
|
|
45
45
|
if protocol_array[i][0]=="V"
|
|
46
46
|
_dispose_code = protocol_array[i].split(":")
|
|
47
47
|
@_array = _dispose_code
|
|
48
|
+
if _dispose_code.length<4
|
|
49
|
+
0.upto(3).each do |i|
|
|
50
|
+
unless _dispose_code[i]
|
|
51
|
+
_dispose_code[i]=""
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
48
55
|
@code_length = _dispose_code[2].to_i
|
|
49
56
|
_dispose_code[1]=eval("#{_dispose_code[1]}")
|
|
50
57
|
@_msg = "I= #{i} protocol = #{protocol_array[i]} "
|
|
@@ -63,8 +70,8 @@ module AutomationCodeList
|
|
|
63
70
|
end
|
|
64
71
|
end
|
|
65
72
|
return ret
|
|
66
|
-
rescue => err
|
|
67
|
-
|
|
73
|
+
#rescue => err
|
|
74
|
+
# raise RuntimeError,"Error!Msg:#{err.to_s} ********************************Use protocol #{protocol} Code:#{@_error} Msg:#{@_msg} Array:#{@_array}"
|
|
68
75
|
end
|
|
69
76
|
end
|
|
70
77
|
|
data/lib/import_code.rb
CHANGED
|
@@ -80,33 +80,7 @@ module ImportCode
|
|
|
80
80
|
@file_path_array
|
|
81
81
|
end
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
file_path_array = []
|
|
85
|
-
allre= []
|
|
86
|
-
begin
|
|
87
|
-
Dir.foreach(dir_path).each do |path|
|
|
88
|
-
allre << path
|
|
89
|
-
end
|
|
90
|
-
allre.each do |file_name|
|
|
91
|
-
full_file_name = dir_path + "/" + file_name
|
|
92
|
-
unless file_name == "."||file_name == ".."
|
|
93
|
-
if File.directory?(full_file_name)
|
|
94
|
-
fileNames = getFileNames(full_file_name)
|
|
95
|
-
if fileNames.count>0
|
|
96
|
-
file_path_array = file_path_array + fileNames
|
|
97
|
-
end
|
|
98
|
-
elsif(file_name.eql?("protocol"))
|
|
99
|
-
getProtocolList(full_file_name)
|
|
100
|
-
else
|
|
101
|
-
file_path_array << {"file_path"=>full_file_name,"file_name"=>file_name}
|
|
102
|
-
end
|
|
103
|
-
end
|
|
104
|
-
end
|
|
105
|
-
rescue => err
|
|
106
|
-
raise ArgumentError, get_error_msg(err,{METHOD_NAME => "getFileNames"})
|
|
107
|
-
end
|
|
108
|
-
file_path_array
|
|
109
|
-
end
|
|
83
|
+
|
|
110
84
|
|
|
111
85
|
#判断是否是按键编码对应的KEY
|
|
112
86
|
def self.isProcolCode?(key)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: import_remotecontrol
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- zql
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-06-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: only use import remote control code
|
|
14
14
|
email: hahazhouqunli@gmail.com
|