imperituroard 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84beb64e487d828317872eeeac09c4c3201597c4
|
4
|
+
data.tar.gz: 181ae04e40a8a401727884b7681d9f8efe0388b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 417bd36e8ff9cb214c6b6d7046c3e8d4c3e359e52efc0636940a3ba54de2643176a057f71b4e7193a6405c1f53f4dcb65f04052586a4bd38c022df6c3768a985
|
7
|
+
data.tar.gz: e93a89ecf954a45df334149404853f012ae31a08cde511e9576efab73022bdfa102c678fb722a3f3160c33883949c65514c3862baec2425a29e9f590a4acb126
|
@@ -65,6 +65,7 @@ class InternalFunc
|
|
65
65
|
else
|
66
66
|
output_params = {:code => 200, :result => "if_digit_or_string: Request processed. Its string", :body => {:string => true}}
|
67
67
|
end
|
68
|
+
printer_texter({:input_params => input_params, :output_params => output_params}, "debug")
|
68
69
|
output_params
|
69
70
|
|
70
71
|
end
|
@@ -76,7 +77,6 @@ class InternalFunc
|
|
76
77
|
|
77
78
|
output_info = {}
|
78
79
|
begin
|
79
|
-
|
80
80
|
if output_answer[:code] != 200
|
81
81
|
deviceserr = []
|
82
82
|
failednum = input_params[:imei_list].length
|
@@ -151,7 +151,7 @@ class InternalFunc
|
|
151
151
|
else
|
152
152
|
answer = {:code => 400, :result => "Invalid IMEI. Data is not integer", :checked => false}
|
153
153
|
end
|
154
|
-
printer_texter({:answer => answer, :input => input}, "debug")
|
154
|
+
printer_texter({:answer => answer, :input => input, :fun => "imei_validate"}, "debug")
|
155
155
|
answer
|
156
156
|
end
|
157
157
|
|
@@ -166,13 +166,17 @@ class InternalFunc
|
|
166
166
|
|
167
167
|
#delete one key from hash
|
168
168
|
def delete_key_hash(hash_f, delete_key)
|
169
|
+
inp_fun = {:hash_f => hash_f, :delete_key => delete_key}
|
170
|
+
out_data = {}
|
169
171
|
res = {}
|
170
172
|
hash_f.each do |ggg|
|
171
173
|
if ggg[0].to_s != delete_key.to_s
|
172
174
|
res[ggg[0]] = ggg[1]
|
173
175
|
end
|
174
176
|
end
|
175
|
-
res
|
177
|
+
out_data = res
|
178
|
+
printer_texter({:out_data => out_data, :inp_fun => inp_fun, :fun => "delete_key_hash" }, "debug")
|
179
|
+
out_data
|
176
180
|
end
|
177
181
|
|
178
182
|
|
@@ -555,6 +555,7 @@ class MongoIot
|
|
555
555
|
|
556
556
|
#universal procedure. Use id or name
|
557
557
|
def get_device_type_info_universal(device_model)
|
558
|
+
input_fun = {:device_model => device_model}
|
558
559
|
out_resp = {}
|
559
560
|
begin
|
560
561
|
as = internal_func.if_digit_or_string(device_model)
|
@@ -588,7 +589,7 @@ class MongoIot
|
|
588
589
|
rescue
|
589
590
|
out_resp = {:code => 500, :result => "get_device_type_info_universal: procedure error", :body => {"model" => device_model, "ManufacturerID" => "unknown", "ManufacturerNAME" => "unknown", "device_type" => "unknown"}}
|
590
591
|
end
|
591
|
-
internal_func.printer_texter(out_resp, "debug")
|
592
|
+
internal_func.printer_texter({:input_fun => input_fun, :out_resp => out_resp, :fun => "get_device_type_info_universal"}, "debug")
|
592
593
|
out_resp
|
593
594
|
end
|
594
595
|
|
@@ -687,6 +688,8 @@ class MongoIot
|
|
687
688
|
|
688
689
|
#universal procedure. put there profile name or id in string or int
|
689
690
|
def get_profile_universal(profile)
|
691
|
+
input_inf = {:profile => profile}
|
692
|
+
out = {}
|
690
693
|
inn = internal_func.if_digit_or_string(profile)
|
691
694
|
out = {}
|
692
695
|
if inn[:body][:string]
|
@@ -694,10 +697,12 @@ class MongoIot
|
|
694
697
|
else
|
695
698
|
out = self.get_profile_name_by_id(profile.to_i)
|
696
699
|
end
|
700
|
+
internal_func.printer_texter({:input_inf => input_inf, :out => out, :fun => "get_profile_universal"}, "debug")
|
697
701
|
out
|
698
702
|
end
|
699
703
|
|
700
704
|
def modify_attr_mongo_universal(imei, attribute)
|
705
|
+
input_add = {:imei => imei, :attribute => attribute}
|
701
706
|
out_resp = {}
|
702
707
|
begin
|
703
708
|
collection = client[:device_imei]
|
@@ -710,7 +715,7 @@ class MongoIot
|
|
710
715
|
rescue
|
711
716
|
out_resp = {:code => 507, :result => "modify_attr_mongo_universal: Unknown SDK error"}
|
712
717
|
end
|
713
|
-
internal_func.printer_texter(out_resp, "debug")
|
718
|
+
internal_func.printer_texter({:input_add => input_add, :out_resp => out_resp, :fun => "modify_attr_mongo_universal"}, "debug")
|
714
719
|
out_resp
|
715
720
|
end
|
716
721
|
|