import_remotecontrol 0.0.7 → 0.0.9
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 +18 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTU0YWFlZjFmOGEyYzc5OTgzOTBjMTdmNDA0OTQ1ZDQ4M2IxMTNkMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDFlYmM1YTE2MzA1MjMzODk1MmU4Y2YzYzUxZjAxN2IwZTJmODY2Zg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmU5MzAxMjZlYzkxOTQ4ZGYzMGZhYTQ0YTYwZjk4NjAxOGE1YzkyZGY3MjAw
|
10
|
+
OTEyMjFjN2UyMWY5ZTdkNTY4MzQ4NmQ4YTkyNzkzNTYyYmYzMjRmZDE3ZDYz
|
11
|
+
YzRjNjMzYTA5NWQ4NDFmMjM2YmU2YjEwZjhmMjM2NzQzNjNhODY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWFlNjYxNGI1ODkzOWY4Yjc5OTRlNmE0ZGRjMGI1ZTAxZDI1ZTA3YTU5NjBk
|
14
|
+
NzcyZDBjMzAxOWYzYWM4YzYwOTAyZDc4ODQ0N2Y0YmJhYzlkYzllYjIyZTdm
|
15
|
+
OGJjOTg2OTRhNmQxMjY1ODUxYmFkYTM1MWNhODA0NDgzNTg0ODU=
|
data/lib/import_remotecontrol.rb
CHANGED
@@ -6,7 +6,7 @@ module ImportRemotecontrol
|
|
6
6
|
attr_accessor :remote_code_array
|
7
7
|
attr_accessor :protocol_hash
|
8
8
|
|
9
|
-
DEFAULT_UNCLUDE = ["FileFormat","
|
9
|
+
DEFAULT_UNCLUDE = ["FileFormat","Remotecontroldescripe","Device","Brand","Model","Button'scounts"]
|
10
10
|
|
11
11
|
METHOD_NAME = "method_name"
|
12
12
|
|
@@ -76,12 +76,17 @@ module ImportRemotecontrol
|
|
76
76
|
if i[0]
|
77
77
|
if(i[0].split(",").count > 1)
|
78
78
|
key = i[0].split(",")[1]
|
79
|
+
p "************************************"
|
80
|
+
p ({key=> i[1]})
|
79
81
|
unless isProcolCode?(key)
|
80
|
-
|
82
|
+
p "IN no procolcode"
|
83
|
+
ret.merge!({key => i[1]})
|
81
84
|
else
|
82
85
|
codehash = disposeProtocolCode(i[1],brand)
|
83
|
-
ret
|
86
|
+
ret.merge!({key=>codehash})
|
84
87
|
end
|
88
|
+
else
|
89
|
+
ret.merge!({key=>i[1]})
|
85
90
|
end
|
86
91
|
end
|
87
92
|
end
|
@@ -113,12 +118,13 @@ module ImportRemotecontrol
|
|
113
118
|
protocol = @protocol_hash[brand][protocol_name] if @protocol_hash[brand][protocol_name]
|
114
119
|
else
|
115
120
|
end
|
116
|
-
protocol_user_code = codelist[1]
|
117
|
-
other_code = ""
|
118
|
-
|
119
|
-
|
121
|
+
#protocol_user_code = codelist[1]
|
122
|
+
#other_code = ""
|
123
|
+
code = ""
|
124
|
+
1.upto(codelist.size-1).each do |index|
|
125
|
+
code = codelist[index] + ":"
|
120
126
|
end
|
121
|
-
{protocol_name:protocol,
|
127
|
+
{protocol_name:protocol,code:code}
|
122
128
|
end
|
123
129
|
|
124
130
|
|
@@ -130,11 +136,11 @@ module ImportRemotecontrol
|
|
130
136
|
file_path = file_msg["file_path"]
|
131
137
|
file_name = nil
|
132
138
|
file_name = file_msg["file_name"]
|
133
|
-
|
134
|
-
|
135
|
-
|
139
|
+
if file_path
|
140
|
+
remote_code_hash.merge!(getHashRemoteCode(file_path))
|
141
|
+
else
|
136
142
|
|
137
|
-
|
143
|
+
end
|
138
144
|
end
|
139
145
|
rescue => err
|
140
146
|
raise ArgumentError, get_error_msg(err,{METHOD_NAME => "importRemoteCode"})
|