imperituroard 0.2.3 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46aa713f31f0c1e5b2d3f03b38f982e3e8c81f49
4
- data.tar.gz: b467695375d37a96b7b83d367ecae06f1cee0f9a
3
+ metadata.gz: 1c0fda89d8d4dce075e1e6c585c059da9afe3782
4
+ data.tar.gz: 64255d9787029c2dda3740d9d8ad981128827ee7
5
5
  SHA512:
6
- metadata.gz: a3fbecc2ba5f4c8d2ff27596a3722ff478a2353802c7528a782fb9ba4f517b7adb1594026be032afb3e1a18706b381c9806dfc936c4e1fd7b934675433c3b62e
7
- data.tar.gz: 36a662f1bb948831b07e42d061364909bf14ada71f7eabd2ea49c7e9adda2efd55de9dae9f29906fe691b08f2f7c4a12e5e1782f303686cd5e45800b047bb041
6
+ metadata.gz: a837fc1af4aded8b465c40178af7ec517c391bbbd4d4b33a133307fdf232c35b24787769d601651f718bf7f67630538279a3a4fc85d5e60b7fb5973e9c655a8b
7
+ data.tar.gz: 7d8a3702b72ca270dc791b4d4c1c176a1dd950e705bf06aca1c5fe0f2c11e20eda63fbaa3cdfc7e9f93608d8d308c3c8a1a8bc2a498a3a74da99a484598db241
@@ -1,3 +1,3 @@
1
1
  module Imperituroard
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
data/lib/imperituroard.rb CHANGED
@@ -461,7 +461,7 @@ class Iot
461
461
  for g in device_list
462
462
  p g
463
463
 
464
- prof_name1 = mongo_client.get_profile_name_from_imei(g[:imei])
464
+ prof_name1 = mongo_client.get_profile_name_from_imei(g["imei"])
465
465
  p prof_name1
466
466
 
467
467
  if prof_name1[:code]==200
@@ -471,47 +471,47 @@ class Iot
471
471
  p permiss1
472
472
  if permiss1[:code]==200
473
473
 
474
- if g[:attributes].key?(:profile)
475
- permiss2 = mongo_client.check_login_profile_permiss(login, g[:attributes][:profile])[:code]
474
+ if g["attributes"].key?("profile")
475
+ permiss2 = mongo_client.check_login_profile_permiss(login, g["attributes"]["profile"])[:code]
476
476
 
477
477
  if permiss2==200
478
478
 
479
- attr = g[:attributes]
479
+ attr = g["attributes"]
480
480
  #mod_attr = {}
481
481
 
482
- if attr.key?(:profile)
483
- if attr[:profile].is_a? Integer
482
+ if attr.key?("profile")
483
+ if attr["profile"].is_a? Integer
484
484
  p "Ok"
485
485
  else
486
- p new = mongo_client.get_profile_id_by_name(attr[:profile])
487
- attr[:profile] = new["profile_id"]
486
+ p new = mongo_client.get_profile_id_by_name(attr["profile"])
487
+ attr["profile"] = new["profile_id"]
488
488
  end
489
489
  end
490
490
  p attr
491
491
 
492
- mongo_client.device_modify_any_attr_mongo(g[:imei], attr)
492
+ mongo_client.device_modify_any_attr_mongo(g["imei"], attr)
493
493
 
494
- processed.append(g[:imei])
494
+ processed.append(g["imei"])
495
495
 
496
496
  else
497
- not_processed.append({:imei=>g[:imei], :description=> "New profile permission error", :error=>permiss2 })
497
+ not_processed.append({:imei=>g["imei"], :description=> "New profile permission error", :error=>permiss2 })
498
498
  end
499
499
 
500
500
  else
501
- attr = g[:attributes]
502
- mongo_client.device_modify_any_attr_mongo(g[:imei], attr)
501
+ attr = g["attributes"]
502
+ mongo_client.device_modify_any_attr_mongo(g["imei"], attr)
503
503
 
504
- processed.append(g[:imei])
504
+ processed.append(g["imei"])
505
505
 
506
506
  end
507
507
 
508
508
 
509
509
  else
510
- not_processed.append({:imei=>g[:imei], :description=> "Old profile permission error", :error=>permiss1 })
510
+ not_processed.append({:imei=>g["imei"], :description=> "Old profile permission error", :error=>permiss1 })
511
511
  end
512
512
 
513
513
  else
514
- not_processed.append({:imei=>g[:imei],:error=>prof_name1})
514
+ not_processed.append({:imei=>g["imei"],:error=>prof_name1})
515
515
  end
516
516
 
517
517
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imperituroard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dzmitry Buynovskiy