import_remotecontrol 0.0.7 → 0.0.9

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 +8 -8
  2. data/lib/import_remotecontrol.rb +18 -12
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGQyODlmYzliNWY2N2ExNmRhNWM2M2IzZTliNzU0NzJjMzUyNWI1NA==
4
+ NTU0YWFlZjFmOGEyYzc5OTgzOTBjMTdmNDA0OTQ1ZDQ4M2IxMTNkMw==
5
5
  data.tar.gz: !binary |-
6
- ZGEwNTRhNWFmNTBjZGZiZWE5MGVlZjJmMDg1MDhlZDM5MGJiOTk0Mg==
6
+ ZDFlYmM1YTE2MzA1MjMzODk1MmU4Y2YzYzUxZjAxN2IwZTJmODY2Zg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NWUwOTZhYTZhNTI0YWQ0ODZiYTUwZTM5MDBhYjdkMjY4NjRjNWRiZTY0YzI5
10
- MDljODY4MTljYjIyMWMwNTJkYjBiNzVhZDA3YzlmY2IwOTVhZjNmOTc5Yjk2
11
- ZGE4YjQ3YTVkZmEwZTkwOWM2OTVhNzJjZjIxZWQxN2QzYzk4MmU=
9
+ ZmU5MzAxMjZlYzkxOTQ4ZGYzMGZhYTQ0YTYwZjk4NjAxOGE1YzkyZGY3MjAw
10
+ OTEyMjFjN2UyMWY5ZTdkNTY4MzQ4NmQ4YTkyNzkzNTYyYmYzMjRmZDE3ZDYz
11
+ YzRjNjMzYTA5NWQ4NDFmMjM2YmU2YjEwZjhmMjM2NzQzNjNhODY=
12
12
  data.tar.gz: !binary |-
13
- NDYzNzcxNzkxNjc5MzcyNjZlY2M1OTMzNjljYTQ3MzA5OTgxMTAwYmVkOGU1
14
- NTRmZDIyNjU4NWJjZTY3Y2ZhY2U3NWY5NTU2MTY0OWFkNjNlM2E2ZWIxY2E0
15
- YWMxNjlhZjUyZmZkNjUyYmE1YmY1ODg4NjViZThiZjU5NzVjYzA=
13
+ OWFlNjYxNGI1ODkzOWY4Yjc5OTRlNmE0ZGRjMGI1ZTAxZDI1ZTA3YTU5NjBk
14
+ NzcyZDBjMzAxOWYzYWM4YzYwOTAyZDc4ODQ0N2Y0YmJhYzlkYzllYjIyZTdm
15
+ OGJjOTg2OTRhNmQxMjY1ODUxYmFkYTM1MWNhODA0NDgzNTg0ODU=
@@ -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","Remote control descripe","Device","Brand","Model","Button's counts"]
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
- ret={key => i[1]}
82
+ p "IN no procolcode"
83
+ ret.merge!({key => i[1]})
81
84
  else
82
85
  codehash = disposeProtocolCode(i[1],brand)
83
- ret={key=>codehash}
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
- 2.upto(codelist.size-1).each do |index|
119
- other_code = codelist[index] + ":"
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,user_code:protocol_user_code,other_code:other_code}
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
- if file_path
134
- remote_code_hash.merge!(getHashRemoteCode(file_path))
135
- else
139
+ if file_path
140
+ remote_code_hash.merge!(getHashRemoteCode(file_path))
141
+ else
136
142
 
137
- end
143
+ end
138
144
  end
139
145
  rescue => err
140
146
  raise ArgumentError, get_error_msg(err,{METHOD_NAME => "importRemoteCode"})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: import_remotecontrol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - zql