ruby-miradore 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: 0a0d9f16881d0084b790f716f147d30a6c83ccd5e61c41aac6c3f4de3d5b9011
4
- data.tar.gz: c1df3a2b189804ce4786bde6d7642560b84c337fa363a8de619815f4b8eb2deb
3
+ metadata.gz: 6979f506ee2d6cb79c84d293e6b23d3f070fd2b6dce994ccca8e56200370aa36
4
+ data.tar.gz: 9c4140d50011ac5e14068b2904b0ee83d728e498fc28e14616ee0de12ac3b1f5
5
5
  SHA512:
6
- metadata.gz: ea9c4d455b6f4c17a5bc5c8145814e0d56b44353df5e74a2bef1179491c48dad7772b61ecac59af134b528b530493c86279ea1078ce3681e5af909cb583b4ffc
7
- data.tar.gz: 23f81ab6559b89e6728ff29b228fd514a489a843819dc1482d8f9f67eacccb3e6c83c5f3b81296d9079bf77a5b99db84c1d951b565bd97978a428e4922dcb9f7
6
+ metadata.gz: 81714a69059bdbee40054b73ec081ba1f9dbfb0fbe4827e604ebc604ba8f82372062578099b39e7054d9f78a1bf2a0494e8f398f7a0f8d63b41afc163ee2f393
7
+ data.tar.gz: c5d74b1042dc1d941dfe0a1d58d852879c0c0771025370637996029d9457f56b22640b48556043b5acbc9a0867e09c816e548cb87d7259498b6e92291d984cde
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-miradore (1.1.0)
4
+ ruby-miradore (1.1.1)
5
5
  crack (~> 0.4.5)
6
- finest-builder (~> 0.0.4)
6
+ finest-builder (~> 0.0.5)
7
7
  httparty (~> 0.18.1)
8
8
  rake (~> 13.0)
9
9
  rspec (~> 3.0)
@@ -17,9 +17,6 @@ GEM
17
17
  ast (2.4.2)
18
18
  crack (0.4.5)
19
19
  rexml
20
- debase (2.3.2)
21
- debase-ruby_core_source (~> 0.10.11)
22
- debase-ruby_core_source (0.10.11)
23
20
  diff-lcs (1.4.4)
24
21
  finest-builder (0.0.5)
25
22
  hashdiff (1.0.1)
@@ -75,8 +72,6 @@ PLATFORMS
75
72
  x86_64-linux
76
73
 
77
74
  DEPENDENCIES
78
- debase
79
- debase-ruby_core_source
80
75
  ruby-miradore!
81
76
  vcr
82
77
  webmock
@@ -35,18 +35,18 @@ http_interactions:
35
35
  X-Frame-Options:
36
36
  - SAMEORIGIN
37
37
  Date:
38
- - Wed, 12 May 2021 14:31:33 GMT
38
+ - Thu, 13 May 2021 15:14:47 GMT
39
39
  Content-Length:
40
- - '1165'
40
+ - '1166'
41
41
  body:
42
42
  encoding: UTF-8
43
43
  string: '<?xml version="1.0" encoding="utf-8"?><Content><Items count="2"><Device><ID>1</ID><InvDevice><Model>Apple
44
44
  iPhone9,3</Model><Manufacturer>Apple</Manufacturer><ProductName>iPhone9,3</ProductName><SoftwareVersion>iOS
45
- 14.4.2</SoftwareVersion><SerialNumber>C76TLUEMHG7F</SerialNumber><IMEI>355332088433360</IMEI><WiFiMAC>d4:dc:cd:d6:09:be</WiFiMAC><BluetoothMAC>d4:dc:cd:d6:09:e1</BluetoothMAC><UDID>84c87a9edf0c577227b96dcbe7bf45713c358ede</UDID><StoreAccountActive>True</StoreAccountActive><DoNotDisturbActive>True</DoNotDisturbActive><DeviceType>MN8X2QL</DeviceType><EASIdentifier>LU1R1J5V0H73JCTEJ2A732LI8G</EASIdentifier><DeviceName>iPhone
46
- de: Eduard</DeviceName><InventoryTime>11.05.2021 22:04:19</InventoryTime></InvDevice></Device><Device><ID>2</ID><InvDevice><Model>ASUSTeK
45
+ 14.4.2</SoftwareVersion><SerialNumber>C76TLUEMHG7F</SerialNumber><IMEI>355332088433360</IMEI><WiFiMAC>d4:dc:cd:d6:09:be</WiFiMAC><BluetoothMAC>d4:dc:cd:d6:09:e1</BluetoothMAC><UDID>84c87a9edf0c577227b96dcbe7bf45713c358ede</UDID><StoreAccountActive>True</StoreAccountActive><DoNotDisturbActive>False</DoNotDisturbActive><DeviceType>MN8X2QL</DeviceType><EASIdentifier>LU1R1J5V0H73JCTEJ2A732LI8G</EASIdentifier><DeviceName>iPhone
46
+ de: Eduard</DeviceName><InventoryTime>13.05.2021 14:18:41</InventoryTime></InvDevice></Device><Device><ID>2</ID><InvDevice><Model>ASUSTeK
47
47
  COMPUTER INC. VivoBook_ASUSLaptop X712FA_X712FA</Model><Manufacturer>ASUSTeK
48
48
  COMPUTER INC.</Manufacturer><ProductName>VivoBook_ASUSLaptop X712FA_X712FA</ProductName><SoftwareVersion>Windows
49
49
  10 Home (20H2)</SoftwareVersion><SerialNumber>K8N0CV07315233B</SerialNumber><DeviceName>QUENTIN</DeviceName><InventoryTime>12.05.2021
50
50
  12:30:16</InventoryTime></InvDevice></Device></Items></Content>'
51
- recorded_at: Wed, 12 May 2021 14:31:34 GMT
51
+ recorded_at: Thu, 13 May 2021 15:14:48 GMT
52
52
  recorded_with: VCR 6.0.0
@@ -0,0 +1,42 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://rzilient.online.miradore.com/API/v2/Device/1/lock
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ X-Api-Key:
11
+ - 3_IHBPttQ.ub[OG27
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Server:
26
+ - Microsoft-IIS/10.0
27
+ X-Powered-By:
28
+ - ARR/3.0
29
+ - ASP.NET
30
+ - ASP.NET
31
+ X-Frame-Options:
32
+ - SAMEORIGIN
33
+ - SAMEORIGIN
34
+ Date:
35
+ - Thu, 13 May 2021 15:14:48 GMT
36
+ Content-Length:
37
+ - '2'
38
+ body:
39
+ encoding: UTF-8
40
+ string: '""'
41
+ recorded_at: Thu, 13 May 2021 15:14:48 GMT
42
+ recorded_with: VCR 6.0.0
@@ -35,28 +35,28 @@ http_interactions:
35
35
  X-Frame-Options:
36
36
  - SAMEORIGIN
37
37
  Date:
38
- - Wed, 12 May 2021 14:00:01 GMT
38
+ - Thu, 13 May 2021 15:14:48 GMT
39
39
  Content-Length:
40
- - '4612'
40
+ - '4613'
41
41
  body:
42
42
  encoding: UTF-8
43
43
  string: '<?xml version="1.0" encoding="utf-8"?><Content><Items count="2"><Device><ID>1</ID><User><ID>2</ID><Email>edugarcas@gmail.com</Email><Source>GUI</Source><Status>Active</Status><Created>22.04.2021
44
44
  06:32:00</Created><Modified>22.04.2021 06:32:00</Modified></User><Category><ID>1</ID><Name>Smartphone</Name></Category><Enrollment><ID>5</ID><User><ID>2</ID></User><Created>22.04.2021
45
- 06:32:00</Created><Completed>22.04.2021 06:33:20</Completed><Type>Email</Type><Sender>eduard@rzilient.club</Sender></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>12.05.2021
46
- 12:25:30</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>95</LastReportedMinutes><IPAddress>31.4.148.80</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><Client><ID>1</ID><ManagementType>iOSUnsupervised</ManagementType></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>1</ID><ConfigProfile><ID>5</ID></ConfigProfile></ConfigProfileDeployment><ConfigProfileDeployment><ID>2</ID><ConfigProfile><ID>6</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><OSVersionName>iOS
45
+ 06:32:00</Created><Completed>22.04.2021 06:33:20</Completed><Type>Email</Type><Sender>eduard@rzilient.club</Sender></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>13.05.2021
46
+ 15:14:15</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>0</LastReportedHours><LastReportedMinutes>0</LastReportedMinutes><IPAddress>46.25.48.185</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><Client><ID>1</ID><ManagementType>iOSUnsupervised</ManagementType></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>1</ID><ConfigProfile><ID>5</ID></ConfigProfile></ConfigProfileDeployment><ConfigProfileDeployment><ID>2</ID><ConfigProfile><ID>6</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><OSVersionName>iOS
47
47
  14.4.2</OSVersionName><Status>AutoGenerated</Status><Created>22.04.2021 06:33:20</Created><Modified>27.04.2021
48
48
  09:20:21</Modified><Source>MiradoreOnline</Source><InvDevice><Model>Apple
49
49
  iPhone9,3</Model><Manufacturer>Apple</Manufacturer><ProductName>iPhone9,3</ProductName><SoftwareVersion>iOS
50
- 14.4.2</SoftwareVersion><SerialNumber>C76TLUEMHG7F</SerialNumber><IMEI>355332088433360</IMEI><WiFiMAC>d4:dc:cd:d6:09:be</WiFiMAC><BluetoothMAC>d4:dc:cd:d6:09:e1</BluetoothMAC><UDID>84c87a9edf0c577227b96dcbe7bf45713c358ede</UDID><StoreAccountActive>True</StoreAccountActive><DoNotDisturbActive>True</DoNotDisturbActive><DeviceType>MN8X2QL</DeviceType><EASIdentifier>LU1R1J5V0H73JCTEJ2A732LI8G</EASIdentifier><DeviceName>iPhone
51
- de: Eduard</DeviceName><InventoryTime>11.05.2021 22:04:19</InventoryTime></InvDevice><InvStorages><InvStorage><Type>Internal</Type><FreeSpace>16347488304</FreeSpace><TotalSpace>34359738368</TotalSpace><InventoryTime>11.05.2021
52
- 22:04:19</InventoryTime></InvStorage></InvStorages><InvOS><Platform>iOS</Platform><Version>14.4.2</Version><Build>18D70</Build><InventoryTime>11.05.2021
53
- 22:04:19</InventoryTime></InvOS><Security><PasscodeSet>Yes</PasscodeSet><EncryptionStatus>Enabled</EncryptionStatus></Security><ReportedLocation><Latitude>41.39850887104272</Latitude><Longitude>2.163043615588689</Longitude><Provider>Unknown</Provider><FixTime>29.04.2021
50
+ 14.4.2</SoftwareVersion><SerialNumber>C76TLUEMHG7F</SerialNumber><IMEI>355332088433360</IMEI><WiFiMAC>d4:dc:cd:d6:09:be</WiFiMAC><BluetoothMAC>d4:dc:cd:d6:09:e1</BluetoothMAC><UDID>84c87a9edf0c577227b96dcbe7bf45713c358ede</UDID><StoreAccountActive>True</StoreAccountActive><DoNotDisturbActive>False</DoNotDisturbActive><DeviceType>MN8X2QL</DeviceType><EASIdentifier>LU1R1J5V0H73JCTEJ2A732LI8G</EASIdentifier><DeviceName>iPhone
51
+ de: Eduard</DeviceName><InventoryTime>13.05.2021 14:18:41</InventoryTime></InvDevice><InvStorages><InvStorage><Type>Internal</Type><FreeSpace>16310157685</FreeSpace><TotalSpace>34359738368</TotalSpace><InventoryTime>13.05.2021
52
+ 14:18:41</InventoryTime></InvStorage></InvStorages><InvOS><Platform>iOS</Platform><Version>14.4.2</Version><Build>18D70</Build><InventoryTime>13.05.2021
53
+ 14:18:41</InventoryTime></InvOS><Security><PasscodeSet>Yes</PasscodeSet><EncryptionStatus>Enabled</EncryptionStatus></Security><ReportedLocation><Latitude>41.39850887104272</Latitude><Longitude>2.163043615588689</Longitude><Provider>Unknown</Provider><FixTime>29.04.2021
54
54
  13:55:02</FixTime><InventoryTime>29.04.2021 13:55:20</InventoryTime></ReportedLocation></Device><Device><ID>2</ID><User><ID>3</ID><Name>de
55
55
  Lambert Quentin</Name><Email>quentin@rzilient.club</Email><Firstname>Quentin</Firstname><Lastname>de
56
56
  Lambert</Lastname><Source>GUI</Source><Status>Active</Status><Created>22.04.2021
57
57
  06:51:53</Created><Modified>22.04.2021 06:51:53</Modified></User><Enrollment><ID>9</ID><User><ID>3</ID></User><Created>29.04.2021
58
- 12:22:31</Created><Completed>29.04.2021 13:01:04</Completed><Type>Email</Type><Sender>eduard@rzilient.club</Sender></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>12.05.2021
59
- 12:30:15</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>90</LastReportedMinutes><IPAddress>37.223.114.163</IPAddress><MACAddress>DC:71:96:FB:8A:56</MACAddress><Platform>WindowsDesktop</Platform><Client><ID>2</ID><ManagementType>BuiltInMDM</ManagementType></Client><ConfigProfileDeployments
58
+ 12:22:31</Created><Completed>29.04.2021 13:01:04</Completed><Type>Email</Type><Sender>eduard@rzilient.club</Sender></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>13.05.2021
59
+ 12:30:02</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>3</LastReportedHours><LastReportedMinutes>164</LastReportedMinutes><IPAddress>46.27.180.174</IPAddress><MACAddress>DC:71:96:FB:8A:56</MACAddress><Platform>WindowsDesktop</Platform><Client><ID>2</ID><ManagementType>BuiltInMDM</ManagementType></Client><ConfigProfileDeployments
60
60
  /><OSVersionName>Windows 10 Home (20H2)</OSVersionName><Status>AutoGenerated</Status><Created>29.04.2021
61
61
  13:01:04</Created><Modified>29.04.2021 13:01:04</Modified><Source>MiradoreOnline</Source><InvDevice><Model>ASUSTeK
62
62
  COMPUTER INC. VivoBook_ASUSLaptop X712FA_X712FA</Model><Manufacturer>ASUSTeK
@@ -66,5 +66,5 @@ http_interactions:
66
66
  OS</Volume><FreeSpace>382347399168</FreeSpace><TotalSpace>511137091584</TotalSpace><InventoryTime>12.05.2021
67
67
  12:30:16</InventoryTime></InvStorage></InvStorages><InvOS><Platform>WindowsDesktop</Platform><Version>10.0.19042.928</Version><Language>fr-FR</Language><InventoryTime>12.05.2021
68
68
  12:30:16</InventoryTime></InvOS><Security><PasscodeSet>Unknown</PasscodeSet><EncryptionStatus>Disabled</EncryptionStatus></Security></Device></Items></Content>'
69
- recorded_at: Wed, 12 May 2021 14:00:02 GMT
69
+ recorded_at: Thu, 13 May 2021 15:14:48 GMT
70
70
  recorded_with: VCR 6.0.0
@@ -35,17 +35,17 @@ http_interactions:
35
35
  X-Frame-Options:
36
36
  - SAMEORIGIN
37
37
  Date:
38
- - Wed, 12 May 2021 14:31:33 GMT
38
+ - Thu, 13 May 2021 15:14:48 GMT
39
39
  Content-Length:
40
- - '2047'
40
+ - '2046'
41
41
  body:
42
42
  encoding: UTF-8
43
43
  string: '<?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><Device><ID>2</ID><User><ID>3</ID><Name>de
44
44
  Lambert Quentin</Name><Email>quentin@rzilient.club</Email><Firstname>Quentin</Firstname><Lastname>de
45
45
  Lambert</Lastname><Source>GUI</Source><Status>Active</Status><Created>22.04.2021
46
46
  06:51:53</Created><Modified>22.04.2021 06:51:53</Modified></User><Enrollment><ID>9</ID><User><ID>3</ID></User><Created>29.04.2021
47
- 12:22:31</Created><Completed>29.04.2021 13:01:04</Completed><Type>Email</Type><Sender>eduard@rzilient.club</Sender></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>12.05.2021
48
- 12:30:15</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>121</LastReportedMinutes><IPAddress>37.223.114.163</IPAddress><MACAddress>DC:71:96:FB:8A:56</MACAddress><Platform>WindowsDesktop</Platform><Client><ID>2</ID><ManagementType>BuiltInMDM</ManagementType></Client><ConfigProfileDeployments
47
+ 12:22:31</Created><Completed>29.04.2021 13:01:04</Completed><Type>Email</Type><Sender>eduard@rzilient.club</Sender></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>13.05.2021
48
+ 12:30:02</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>3</LastReportedHours><LastReportedMinutes>164</LastReportedMinutes><IPAddress>46.27.180.174</IPAddress><MACAddress>DC:71:96:FB:8A:56</MACAddress><Platform>WindowsDesktop</Platform><Client><ID>2</ID><ManagementType>BuiltInMDM</ManagementType></Client><ConfigProfileDeployments
49
49
  /><OSVersionName>Windows 10 Home (20H2)</OSVersionName><Status>AutoGenerated</Status><Created>29.04.2021
50
50
  13:01:04</Created><Modified>29.04.2021 13:01:04</Modified><Source>MiradoreOnline</Source><InvDevice><Model>ASUSTeK
51
51
  COMPUTER INC. VivoBook_ASUSLaptop X712FA_X712FA</Model><Manufacturer>ASUSTeK
@@ -55,5 +55,5 @@ http_interactions:
55
55
  OS</Volume><FreeSpace>382347399168</FreeSpace><TotalSpace>511137091584</TotalSpace><InventoryTime>12.05.2021
56
56
  12:30:16</InventoryTime></InvStorage></InvStorages><InvOS><Platform>WindowsDesktop</Platform><Version>10.0.19042.928</Version><Language>fr-FR</Language><InventoryTime>12.05.2021
57
57
  12:30:16</InventoryTime></InvOS><Security><PasscodeSet>Unknown</PasscodeSet><EncryptionStatus>Disabled</EncryptionStatus></Security></Device></Items></Content>'
58
- recorded_at: Wed, 12 May 2021 14:31:34 GMT
58
+ recorded_at: Thu, 13 May 2021 15:14:48 GMT
59
59
  recorded_with: VCR 6.0.0
data/lib/ruby/miradore.rb CHANGED
@@ -62,13 +62,13 @@ module Ruby
62
62
  include HTTParty
63
63
  format :json
64
64
 
65
- attr_reader :subdomain, :auth
65
+ attr_writer :subdomain, :auth
66
66
 
67
67
  def initialize(json = nil, args = {})
68
68
  super json
69
69
  @subdomain = args[:subdomain]
70
70
  @auth = args[:auth]
71
- remove_instance_variable(:@subdomain) if subdomain.nil?
71
+ remove_instance_variable(:@subdomain) if @subdomain.nil?
72
72
  end
73
73
 
74
74
  def lock(*args)
@@ -94,8 +94,8 @@ module Ruby
94
94
  private
95
95
 
96
96
  def http_method(*args)
97
- self.class.headers "X-API-Key" => auth || Miradore.api_key
98
- url = Miradore.url[:v2] % { subdomain: subdomain, id: args[1], method: args[2] }
97
+ self.class.headers "X-API-Key" => @auth || Miradore.api_key
98
+ url = Miradore.url[:v2] % { subdomain: @subdomain, id: args[1], method: args[2] }
99
99
  self.class.method(args[0]).call(url)
100
100
  rescue StandardError
101
101
  raise MspConnectionError, "Error connecting to manager service provider"
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = "1.1.0"
5
+ VERSION = "1.1.1"
6
6
  end
7
7
  end
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
35
35
  spec.add_dependency "rspec", "~> 3.0"
36
36
  spec.add_dependency "rubocop", "~> 1.7"
37
37
  spec.add_dependency "httparty", "~> 0.18.1"
38
- spec.add_dependency "finest-builder", "~> 0.0.4"
38
+ spec.add_dependency "finest-builder", "~> 0.0.5"
39
39
  spec.add_dependency "crack", "~> 0.4.5"
40
40
 
41
41
  # For more information and examples about making a new gem, checkout our
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-miradore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduard
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.0.4
75
+ version: 0.0.5
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.0.4
82
+ version: 0.0.5
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: crack
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -115,6 +115,7 @@ files:
115
115
  - bin/console
116
116
  - bin/setup
117
117
  - fixtures/vcr_cassettes/InvDevice.yml
118
+ - fixtures/vcr_cassettes/LockDevice.yml
118
119
  - fixtures/vcr_cassettes/all_criteria.yml
119
120
  - fixtures/vcr_cassettes/search_by_serial_number.yml
120
121
  - lib/ruby/miradore.rb