ruby-miradore 3.3.15 → 4.0.0

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: 1bd3404518b59b883223a286aa8cb2b3f586367f0209678ca22414c003ebe1e2
4
- data.tar.gz: e37515c3faadfb46a5ddbb275c68509a3e72304fb4971e0e8b36aef567e5a8da
3
+ metadata.gz: c027ad1477e2316caac059f9da6093af4f82fdd563feb87e8ccce2d038a89472
4
+ data.tar.gz: 16b0f361cc09dde8f90196863e086b0389f2b8f0885a35040995109e7b8b6fe0
5
5
  SHA512:
6
- metadata.gz: c50711bc929570b9b483c4d55686aa5c4d75dfcfa14a8f67f30f27d03199fb1554fb27699be7df86d0f54eabd26336c4724fc993fd4ea41d4017ca8d764861a3
7
- data.tar.gz: 2744e5bdf3dc2d79140320da1bc0846487fe1e46d40dc5f0794035f9f9da26ed111e36fa8fb5f4580ee799ac09cdf9b6a02088d6459b3edd19385349f245f0a9
6
+ metadata.gz: 0a38b3e792d939a1dd48ee5d2aa5e1fb673cc7b94a569a9d60070e95a033d7f9254814d6864abf18f36c2f6d6efc8431acff61e7cb7c0b3e4181436c42555dad
7
+ data.tar.gz: 242a15782f82924f2a386f2739f824f6cfc4111d4c6a92059c7ad75249467ce811a27b08d6e4222056dfe9abb408fc685def5c3b02a8cf9294bca9e07aaef4a3
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.1.0
data/.travis.yml CHANGED
@@ -3,4 +3,4 @@ language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
5
  - 2.7.4
6
- before_install: gem install bundler -v 2.2.15
6
+ before_install: gem install bundler
data/Gemfile.lock CHANGED
@@ -1,25 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-miradore (3.3.14)
5
- activesupport (~> 6.1)
4
+ ruby-miradore (4.0.0)
5
+ activesupport (~> 7.0)
6
6
  builder (~> 3.1)
7
7
  crack (~> 0.4)
8
8
  finest-builder (~> 1.0)
9
- httparty (~> 0.18)
9
+ httparty (~> 0.20)
10
10
  rake (~> 13.0)
11
- rspec (~> 3.0)
12
- rubocop (~> 1.7)
11
+ rspec (~> 3.10)
12
+ rubocop (~> 1.24)
13
13
 
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- activesupport (6.1.4.1)
17
+ activesupport (7.0.1)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 1.6, < 2)
20
20
  minitest (>= 5.1)
21
21
  tzinfo (~> 2.0)
22
- zeitwerk (~> 2.3)
23
22
  addressable (2.8.0)
24
23
  public_suffix (>= 2.0.2, < 5.0)
25
24
  ast (2.4.2)
@@ -27,7 +26,7 @@ GEM
27
26
  concurrent-ruby (1.1.9)
28
27
  crack (0.4.5)
29
28
  rexml
30
- diff-lcs (1.4.4)
29
+ diff-lcs (1.5.0)
31
30
  finest-builder (1.1.1)
32
31
  hashdiff (1.0.1)
33
32
  httparty (0.20.0)
@@ -35,18 +34,18 @@ GEM
35
34
  multi_xml (>= 0.5.2)
36
35
  i18n (1.8.11)
37
36
  concurrent-ruby (~> 1.0)
38
- mime-types (3.3.1)
37
+ mime-types (3.4.1)
39
38
  mime-types-data (~> 3.2015)
40
- mime-types-data (3.2021.0901)
41
- minitest (5.14.4)
39
+ mime-types-data (3.2022.0105)
40
+ minitest (5.15.0)
42
41
  multi_xml (0.6.0)
43
42
  parallel (1.21.0)
44
- parser (3.0.2.0)
43
+ parser (3.1.0.0)
45
44
  ast (~> 2.4.1)
46
45
  public_suffix (4.0.6)
47
46
  rainbow (3.0.0)
48
47
  rake (13.0.6)
49
- regexp_parser (2.1.1)
48
+ regexp_parser (2.2.0)
50
49
  rexml (3.2.5)
51
50
  rspec (3.10.0)
52
51
  rspec-core (~> 3.10.0)
@@ -61,16 +60,16 @@ GEM
61
60
  diff-lcs (>= 1.2.0, < 2.0)
62
61
  rspec-support (~> 3.10.0)
63
62
  rspec-support (3.10.3)
64
- rubocop (1.22.3)
63
+ rubocop (1.24.1)
65
64
  parallel (~> 1.10)
66
65
  parser (>= 3.0.0.0)
67
66
  rainbow (>= 2.2.2, < 4.0)
68
67
  regexp_parser (>= 1.8, < 3.0)
69
68
  rexml
70
- rubocop-ast (>= 1.12.0, < 2.0)
69
+ rubocop-ast (>= 1.15.1, < 2.0)
71
70
  ruby-progressbar (~> 1.7)
72
71
  unicode-display_width (>= 1.4.0, < 3.0)
73
- rubocop-ast (1.13.0)
72
+ rubocop-ast (1.15.1)
74
73
  parser (>= 3.0.1.1)
75
74
  ruby-progressbar (1.11.0)
76
75
  tzinfo (2.0.4)
@@ -81,7 +80,6 @@ GEM
81
80
  addressable (>= 2.8.0)
82
81
  crack (>= 0.3.2)
83
82
  hashdiff (>= 0.4.0, < 2.0.0)
84
- zeitwerk (2.5.1)
85
83
 
86
84
  PLATFORMS
87
85
  x86_64-darwin-20
@@ -93,4 +91,4 @@ DEPENDENCIES
93
91
  webmock
94
92
 
95
93
  BUNDLED WITH
96
- 2.2.15
94
+ 2.3.3
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
+
1
2
  # Ruby::Miradore
3
+ [![Build Status](https://app.travis-ci.com/eddygarcas/ruby-miradore.svg?token=2DpdDoxUEbWoSkTi3EyK&branch=main)](https://app.travis-ci.com/eddygarcas/ruby-miradore) [![Gem Version](https://badge.fury.io/rb/ruby-miradore.svg)](https://badge.fury.io/rb/ruby-miradore)
4
+
2
5
 
3
6
  Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ruby/miradore`. To experiment with that code, run `bin/console` for an interactive prompt.
4
7
 
data/Rakefile CHANGED
@@ -4,9 +4,4 @@ require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
-
8
- require "rubocop/rake_task"
9
-
10
- RuboCop::RakeTask.new
11
-
12
- task default: %i[spec rubocop]
7
+ task default: %i[spec]
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%20C76TLUEMHG7F)&select=*,*
5
+ uri: https://rzilient.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%20G7F)&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -45,7 +45,7 @@ http_interactions:
45
45
  body:
46
46
  encoding: ASCII-8BIT
47
47
  string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><Device><ID>1</ID><User><ID>1</ID></User><Category><ID>1</ID></Category><Enrollment><ID>5</ID><User><ID>2</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>29.10.2021
48
- 13:34:19</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>0</LastReportedHours><LastReportedMinutes>3</LastReportedMinutes><IPAddress>46.25.75.22</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><OSVersionName>iOS
48
+ 13:34:19</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>0</LastReportedHours><LastReportedMinutes>3</LastReportedMinutes><IPAddress>46.22</IPAddress><MACAddress>6:09:be</MACAddress><Platform>iOS</Platform><OSVersionName>iOS
49
49
  14.4.2</OSVersionName><Client><ID>1</ID></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>2</ID><ConfigProfile><ID>6</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><Status>AutoGenerated</Status><Created>22.04.2021
50
50
  06:33:20</Created><Modified>22.10.2021 13:09:20</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
51
51
  recorded_at: Fri, 29 Oct 2021 13:37:39 GMT
@@ -54,21 +54,21 @@ http_interactions:
54
54
  /><Status>Deleted</Status><Created>13.08.2021 13:19:37</Created><Modified>04.10.2021
55
55
  09:58:05</Modified><Source>MiradoreOnline</Source><InvDevice><Model>Dell Inc.
56
56
  Latitude 7480</Model><Manufacturer>Dell Inc.</Manufacturer><ProductName>Latitude
57
- 7480</ProductName><SoftwareVersion>Windows 10 Pro (20H2)</SoftwareVersion><SerialNumber>87DB6H2</SerialNumber><DeviceName>DESKTOP-C0UJL16</DeviceName><InventoryTime>24.09.2021
57
+ 7480</ProductName><SoftwareVersion>Windows 10 Pro (20H2)</SoftwareVersion><SerialNumber>6H2</SerialNumber><DeviceName>DESKTOP-C0UJL16</DeviceName><InventoryTime>24.09.2021
58
58
  19:01:06</InventoryTime></InvDevice></Device><Device><ID>3</ID><Enrollment><ID>13</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>04.10.2021
59
59
  10:10:00</LastReported><LastReportedDays>36</LastReportedDays><LastReportedHours>866</LastReportedHours><LastReportedMinutes>51955</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
60
60
  10 Professionnel (20H2)</OSVersionName><Client><ID>3</ID></Client><ConfigProfileDeployments
61
61
  /><Status>Deleted</Status><Created>04.10.2021 10:07:03</Created><Modified>05.10.2021
62
62
  16:16:52</Modified><Source>MiradoreOnline</Source><InvDevice><Model>Dell Inc.
63
63
  Latitude 7480</Model><Manufacturer>Dell Inc.</Manufacturer><ProductName>Latitude
64
- 7480</ProductName><SoftwareVersion>Windows 10 Professionnel (20H2)</SoftwareVersion><SerialNumber>87DB6H2</SerialNumber><DeviceName>DESKTOP-C0UJL16</DeviceName><InventoryTime>04.10.2021
64
+ 7480</ProductName><SoftwareVersion>Windows 10 Professionnel (20H2)</SoftwareVersion><SerialNumber>6H2</SerialNumber><DeviceName>DESKTOP-C0UJL16</DeviceName><InventoryTime>04.10.2021
65
65
  10:09:05</InventoryTime></InvDevice></Device><Device><ID>4</ID><Enrollment><ID>17</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>12.10.2021
66
66
  10:51:10</LastReported><LastReportedDays>28</LastReportedDays><LastReportedHours>674</LastReportedHours><LastReportedMinutes>40394</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.16</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
67
67
  10 Pro (20H2)</OSVersionName><Client><ID>4</ID></Client><ConfigProfileDeployments
68
68
  /><Status>Deleted</Status><Created>04.10.2021 10:26:25</Created><Modified>12.10.2021
69
69
  10:50:17</Modified><Source>MiradoreOnline</Source><InvDevice><Model>Dell Inc.
70
70
  Latitude 7480</Model><Manufacturer>Dell Inc.</Manufacturer><ProductName>Latitude
71
- 7480</ProductName><SoftwareVersion>Windows 10 Pro (20H2)</SoftwareVersion><SerialNumber>87DB6H2</SerialNumber><DeviceName>DESKTOP-C0UJL16</DeviceName><InventoryTime>07.10.2021
71
+ 7480</ProductName><SoftwareVersion>Windows 10 Pro (20H2)</SoftwareVersion><SerialNumber>6H2</SerialNumber><DeviceName>DESKTOP-C0UJL16</DeviceName><InventoryTime>07.10.2021
72
72
  15:22:13</InventoryTime></InvDevice></Device><Device><ID>5</ID><User><ID>2</ID></User><Enrollment><ID>19</ID></Enrollment><OnlineStatus>Unknown</OnlineStatus><LastReported>14.10.2021
73
73
  14:00:25</LastReported><LastReportedDays>26</LastReportedDays><LastReportedHours>622</LastReportedHours><LastReportedMinutes>37325</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><LocalIPAddress>10.0.2.15</LocalIPAddress><MACAddress>08:00:27:DE:21:3E</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
74
74
  10 Professionnel (21H1)</OSVersionName><Client><ID>5</ID></Client><ConfigProfileDeployments
@@ -102,7 +102,7 @@ http_interactions:
102
102
  00:00:00</PurchaseDate><OSVersionName>Windows 10 Professionnel (20H2)</OSVersionName><Client><ID>9</ID></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>1</ID><ConfigProfile><ID>7</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><Status>Active</Status><Created>27.10.2021
103
103
  08:10:37</Created><Modified>08.11.2021 16:55:18</Modified><Source>MiradoreOnline</Source><InvDevice><Model>Dell
104
104
  Inc. Latitude 7480</Model><Manufacturer>Dell Inc.</Manufacturer><ProductName>Latitude
105
- 7480</ProductName><SoftwareVersion>Windows 10 Professionnel (20H2)</SoftwareVersion><SerialNumber>87DB6H2</SerialNumber><DeviceName>DESKTOP-C0UJL16</DeviceName><InventoryTime>04.11.2021
105
+ 7480</ProductName><SoftwareVersion>Windows 10 Professionnel (20H2)</SoftwareVersion><SerialNumber>6H2</SerialNumber><DeviceName>DESKTOP-C0UJL16</DeviceName><InventoryTime>04.11.2021
106
106
  11:45:25</InventoryTime></InvDevice></Device><Device><ID>10</ID><User><ID>4</ID></User><Category><ID>1</ID></Category><OnlineStatus>Unavailable</OnlineStatus><Platform>Other</Platform><Client><ID>10</ID></Client><ConfigProfileDeployments
107
107
  /><Status>Deleted</Status><Created>28.10.2021 08:37:40</Created><Modified>02.11.2021
108
108
  15:06:04</Modified><Source>MiradoreOnline</Source><InvDevice><Model>HP\r\n
@@ -120,7 +120,7 @@ http_interactions:
120
120
  14.4.2</OSVersionName><Client><ID>13</ID></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>5</ID><ConfigProfile><ID>11</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><Status>AutoGenerated</Status><Created>03.11.2021
121
121
  10:19:53</Created><Modified>08.11.2021 16:45:40</Modified><Source>MiradoreOnline</Source><InvDevice><Model>Apple
122
122
  iPhone9,3</Model><Manufacturer>Apple</Manufacturer><MarketingName>iPhone 7</MarketingName><ProductName>iPhone9,3</ProductName><SoftwareVersion>iOS
123
- 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
123
+ 14.4.2</SoftwareVersion><SerialNumber>G7F</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
124
124
  de: Eduard</DeviceName><InventoryTime>08.11.2021 17:09:20</InventoryTime></InvDevice></Device><Device><ID>14</ID><User><ID>2</ID></User><Category><ID>4</ID></Category><OnlineStatus>Unavailable</OnlineStatus><Platform>Other</Platform><Client><ID>14</ID></Client><ConfigProfileDeployments
125
125
  /><Status>Deleted</Status><Created>05.11.2021 10:49:54</Created><Modified>05.11.2021
126
126
  15:09:02</Modified><Source>MiradoreOnline</Source><InvDevice><Model>te TEste</Model><Manufacturer>te</Manufacturer><ProductName>TEste</ProductName><DeviceName>ds</DeviceName></InvDevice></Device><Device><ID>15</ID><User><ID>2</ID></User><Category><ID>5</ID></Category><Organization><ID>2</ID></Organization><OnlineStatus>Unavailable</OnlineStatus><Platform>Other</Platform><Client><ID>15</ID></Client><ConfigProfileDeployments
@@ -45,57 +45,57 @@ http_interactions:
45
45
  body:
46
46
  encoding: ASCII-8BIT
47
47
  string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="15"><Device><ID>1</ID><User><ID>1</ID></User><Category><ID>1</ID></Category><Enrollment><ID>5</ID><User><ID>2</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>29.10.2021
48
- 13:34:19</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>0</LastReportedHours><LastReportedMinutes>3</LastReportedMinutes><IPAddress>46.25.75.22</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><OSVersionName>iOS
48
+ 13:34:19</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>0</LastReportedHours><LastReportedMinutes>3</LastReportedMinutes><IPAddress>46.25.75.22</IPAddress><MACAddress>d6:09:be</MACAddress><Platform>iOS</Platform><OSVersionName>iOS
49
49
  14.4.2</OSVersionName><Client><ID>1</ID></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>2</ID><ConfigProfile><ID>6</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><Status>AutoGenerated</Status><Created>22.04.2021
50
50
  06:33:20</Created><Modified>22.10.2021 13:09:20</Modified><Source>MiradoreOnline</Source></Device><Device><ID>2</ID><User><ID>3</ID></User><Enrollment><ID>9</ID><User><ID>3</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>29.10.2021
51
- 07:55:57</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>6</LastReportedHours><LastReportedMinutes>342</LastReportedMinutes><IPAddress>149.62.159.244</IPAddress><MACAddress>DC:71:96:FB:8A:56</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
51
+ 07:55:57</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>6</LastReportedHours><LastReportedMinutes>342</LastReportedMinutes><IPAddress>149.159.244</IPAddress><MACAddress>FB:8A:56</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
52
52
  10 Home (20H2)</OSVersionName><Client><ID>2</ID></Client><ConfigProfileDeployments
53
53
  /><Status>AutoGenerated</Status><Created>29.04.2021 13:01:04</Created><Modified>28.09.2021
54
54
  15:32:10</Modified><Source>MiradoreOnline</Source></Device><Device><ID>3</ID><User><ID>20</ID></User><OnlineStatus>Active</OnlineStatus><LastReported>29.10.2021
55
- 13:26:47</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>0</LastReportedHours><LastReportedMinutes>11</LastReportedMinutes><IPAddress>37.223.39.77</IPAddress><MACAddress>f0:18:98:24:b4:66</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
55
+ 13:26:47</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>0</LastReportedHours><LastReportedMinutes>11</LastReportedMinutes><IPAddress>37.39.77</IPAddress><MACAddress>b4:66</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
56
56
  11.6</OSVersionName><Client><ID>3</ID></Client><ConfigProfileDeployments /><Status>AutoGenerated</Status><Created>14.05.2021
57
57
  11:17:12</Created><Modified>22.10.2021 11:50:24</Modified><Source>MiradoreOnline</Source></Device><Device><ID>4</ID><User><ID>6</ID></User><Organization><ID>1</ID></Organization><Enrollment><ID>12</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>28.09.2021
58
- 09:44:08</LastReported><LastReportedDays>31</LastReportedDays><LastReportedHours>748</LastReportedHours><LastReportedMinutes>44873</LastReportedMinutes><IPAddress>92.154.14.188</IPAddress><LocalIPAddress>192.168.1.36</LocalIPAddress><MACAddress>D4:6D:6D:65:0C:DE</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
58
+ 09:44:08</LastReported><LastReportedDays>31</LastReportedDays><LastReportedHours>748</LastReportedHours><LastReportedMinutes>44873</LastReportedMinutes><IPAddress>92.14.188</IPAddress><LocalIPAddress>192.168.1.36</LocalIPAddress><MACAddress>:0C:DE</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
59
59
  10 Professionnel (1909)</OSVersionName><Client><ID>4</ID></Client><ConfigProfileDeployments
60
60
  /><Status>Deleted</Status><Created>17.05.2021 08:16:11</Created><Modified>25.10.2021
61
61
  15:50:30</Modified><Source>MiradoreOnline</Source></Device><Device><ID>5</ID><User><ID>21</ID></User><Enrollment><ID>15</ID><User><ID>9</ID></User></Enrollment><OnlineStatus>Unknown</OnlineStatus><LastReported>11.10.2021
62
- 15:41:46</LastReported><LastReportedDays>18</LastReportedDays><LastReportedHours>430</LastReportedHours><LastReportedMinutes>25796</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><MACAddress>f0:18:98:1e:60:ec</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
62
+ 15:41:46</LastReported><LastReportedDays>18</LastReportedDays><LastReportedHours>430</LastReportedHours><LastReportedMinutes>25796</LastReportedMinutes><IPAddress>185.21.63</IPAddress><MACAddress>60:ec</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
63
63
  11.6</OSVersionName><Client><ID>5</ID></Client><ConfigProfileDeployments /><Status>AutoGenerated</Status><Created>26.05.2021
64
64
  08:21:23</Created><Modified>01.10.2021 16:33:10</Modified><Source>MiradoreOnline</Source></Device><Device><ID>6</ID><User><ID>16</ID></User><Enrollment><ID>28</ID><User><ID>22</ID></User></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>05.10.2021
65
- 08:57:14</LastReported><LastReportedDays>24</LastReportedDays><LastReportedHours>581</LastReportedHours><LastReportedMinutes>34840</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><MACAddress>30:35:ad:b5:5e:be</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
65
+ 08:57:14</LastReported><LastReportedDays>24</LastReportedDays><LastReportedHours>581</LastReportedHours><LastReportedMinutes>34840</LastReportedMinutes><IPAddress>185.21.63</IPAddress><MACAddress>b5:5e:be</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
66
66
  11.6</OSVersionName><Client><ID>6</ID></Client><ConfigProfileDeployments /><Status>Deleted</Status><Created>20.07.2021
67
67
  08:50:34</Created><Modified>25.10.2021 16:06:19</Modified><Source>MiradoreOnline</Source></Device><Device><ID>7</ID><User><ID>6</ID></User><Enrollment><ID>26</ID><User><ID>6</ID></User></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>04.10.2021
68
- 08:07:09</LastReported><LastReportedDays>25</LastReportedDays><LastReportedHours>605</LastReportedHours><LastReportedMinutes>36330</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><MACAddress>8c:85:90:1f:24:29</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
68
+ 08:07:09</LastReported><LastReportedDays>25</LastReportedDays><LastReportedHours>605</LastReportedHours><LastReportedMinutes>36330</LastReportedMinutes><IPAddress>185.21.63</IPAddress><MACAddress>24:29</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
69
69
  11.6</OSVersionName><Client><ID>7</ID></Client><ConfigProfileDeployments /><Status>Deleted</Status><Created>01.10.2021
70
70
  10:42:00</Created><Modified>04.10.2021 08:07:07</Modified><Source>MiradoreOnline</Source></Device><Device><ID>8</ID><User><ID>22</ID></User><Enrollment><ID>27</ID><User><ID>22</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>29.10.2021
71
- 10:55:51</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>3</LastReportedHours><LastReportedMinutes>162</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><MACAddress>f0:18:98:28:7e:8e</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
71
+ 10:55:51</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>3</LastReportedHours><LastReportedMinutes>162</LastReportedMinutes><IPAddress>185.21.34</IPAddress><MACAddress>7e:8e</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
72
72
  11.6</OSVersionName><Client><ID>8</ID></Client><ConfigProfileDeployments /><Status>AutoGenerated</Status><Created>01.10.2021
73
73
  12:46:46</Created><Modified>01.10.2021 12:46:46</Modified><Source>MiradoreOnline</Source></Device><Device><ID>9</ID><User><ID>16</ID></User><Enrollment><ID>29</ID><User><ID>22</ID></User></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>26.10.2021
74
- 16:55:10</LastReported><LastReportedDays>3</LastReportedDays><LastReportedHours>69</LastReportedHours><LastReportedMinutes>4122</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><MACAddress>d0:81:7a:ba:a9:96</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
74
+ 16:55:10</LastReported><LastReportedDays>3</LastReportedDays><LastReportedHours>69</LastReportedHours><LastReportedMinutes>4122</LastReportedMinutes><IPAddress>185.21.34</IPAddress><MACAddress>a9:96</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
75
75
  11.5.2</OSVersionName><Client><ID>9</ID></Client><ConfigProfileDeployments
76
76
  /><Status>Unmanaged</Status><Created>05.10.2021 09:05:33</Created><Modified>26.10.2021
77
77
  16:55:10</Modified><Source>MiradoreOnline</Source></Device><Device><ID>10</ID><User><ID>24</ID></User><Enrollment><ID>32</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>11.10.2021
78
- 14:42:14</LastReported><LastReportedDays>18</LastReportedDays><LastReportedHours>431</LastReportedHours><LastReportedMinutes>25855</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.252.20</LocalIPAddress><MACAddress>FC:F8:AE:98:29:5C</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
78
+ 14:42:14</LastReported><LastReportedDays>18</LastReportedDays><LastReportedHours>431</LastReportedHours><LastReportedMinutes>25855</LastReportedMinutes><IPAddress>185.21.63</IPAddress><LocalIPAddress>172.252.20</LocalIPAddress><MACAddress>29:5C</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
79
79
  10 Pro</OSVersionName><Client><ID>10</ID></Client><ConfigProfileDeployments
80
80
  /><Status>Deleted</Status><Created>08.10.2021 11:18:05</Created><Modified>12.10.2021
81
81
  14:43:15</Modified><Source>MiradoreOnline</Source></Device><Device><ID>11</ID><User><ID>23</ID></User><Enrollment><ID>31</ID><User><ID>23</ID></User></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>21.10.2021
82
- 13:11:01</LastReported><LastReportedDays>8</LastReportedDays><LastReportedHours>192</LastReportedHours><LastReportedMinutes>11546</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><MACAddress>3C:91:80:D1:D5:A5</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
82
+ 13:11:01</LastReported><LastReportedDays>8</LastReportedDays><LastReportedHours>192</LastReportedHours><LastReportedMinutes>11546</LastReportedMinutes><IPAddress>185.21.34</IPAddress><MACAddress>D5:A5</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
83
83
  10 Home (20H2)</OSVersionName><Client><ID>11</ID></Client><ConfigProfileDeployments
84
84
  /><Status>Deleted</Status><Created>08.10.2021 13:43:31</Created><Modified>25.10.2021
85
85
  15:51:06</Modified><Source>MiradoreOnline</Source></Device><Device><ID>12</ID><User><ID>6</ID></User><Enrollment><ID>33</ID><User><ID>22</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>29.10.2021
86
- 11:55:17</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>102</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><MACAddress>a4:5e:60:c2:80:a1</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
86
+ 11:55:17</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>102</LastReportedMinutes><IPAddress>185.21.34</IPAddress><MACAddress>80:a1</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
87
87
  11.6</OSVersionName><Client><ID>12</ID></Client><ConfigProfileDeployments
88
88
  /><Status>AutoGenerated</Status><Created>21.10.2021 08:12:35</Created><Modified>21.10.2021
89
89
  08:19:01</Modified><Source>MiradoreOnline</Source></Device><Device><ID>13</ID><User><ID>23</ID></User><Enrollment><ID>35</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>21.10.2021
90
- 15:12:16</LastReported><LastReportedDays>8</LastReportedDays><LastReportedHours>190</LastReportedHours><LastReportedMinutes>11425</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><LocalIPAddress>172.18.193.27</LocalIPAddress><MACAddress>80:CE:62:39:57:98</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
90
+ 15:12:16</LastReported><LastReportedDays>8</LastReportedDays><LastReportedHours>190</LastReportedHours><LastReportedMinutes>11425</LastReportedMinutes><IPAddress>185.21.34</IPAddress><LocalIPAddress>172.18.193.27</LocalIPAddress><MACAddress>57:98</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
91
91
  10 Professionnel (21H1)</OSVersionName><Client><ID>13</ID></Client><ConfigProfileDeployments
92
92
  /><Status>Deleted</Status><Created>21.10.2021 11:16:10</Created><Modified>25.10.2021
93
93
  15:51:06</Modified><Source>MiradoreOnline</Source></Device><Device><ID>14</ID><User><ID>24</ID></User><Enrollment><ID>36</ID><User><ID>22</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>29.10.2021
94
- 11:05:52</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>152</LastReportedMinutes><IPAddress>62.57.96.140</IPAddress><MACAddress>8c:85:90:58:9e:d8</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
94
+ 11:05:52</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>152</LastReportedMinutes><IPAddress>62.96.140</IPAddress><MACAddress>9e:d8</MACAddress><Platform>macOS</Platform><OSVersionName>macOS
95
95
  11.6</OSVersionName><Client><ID>14</ID></Client><ConfigProfileDeployments
96
96
  /><Status>AutoGenerated</Status><Created>22.10.2021 10:51:25</Created><Modified>22.10.2021
97
97
  10:58:26</Modified><Source>MiradoreOnline</Source></Device><Device><ID>15</ID><User><ID>25</ID></User><Enrollment><ID>38</ID></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>29.10.2021
98
- 12:09:03</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>1</LastReportedHours><LastReportedMinutes>88</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><LocalIPAddress>172.18.193.23</LocalIPAddress><MACAddress>80:3F:5D:2A:D9:77</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
98
+ 12:09:03</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>1</LastReportedHours><LastReportedMinutes>88</LastReportedMinutes><IPAddress>185.21.34</IPAddress><LocalIPAddress>172.18.193.23</LocalIPAddress><MACAddress>D9:77</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
99
99
  10 Pro</OSVersionName><Client><ID>15</ID></Client><ConfigProfileDeployments
100
100
  /><Status>Active</Status><Created>25.10.2021 15:39:32</Created><Modified>29.10.2021
101
101
  07:45:34</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
@@ -43,7 +43,7 @@ http_interactions:
43
43
  body:
44
44
  encoding: ASCII-8BIT
45
45
  string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><Device><ID>37</ID><User><ID>2</ID></User><Enrollment><ID>49</ID><User><ID>2</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>15.11.2021
46
- 19:21:33</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>1</LastReportedHours><LastReportedMinutes>40</LastReportedMinutes><IPAddress>46.25.9.62</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><OSVersionName>iOS
46
+ 19:21:33</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>1</LastReportedHours><LastReportedMinutes>40</LastReportedMinutes><IPAddress>46</IPAddress><MACAddress>d4:d6:09:be</MACAddress><Platform>iOS</Platform><OSVersionName>iOS
47
47
  14.4.2</OSVersionName><Client><ID>37</ID></Client><ConfigProfileDeployments
48
48
  /><Status>AutoGenerated</Status><Created>15.11.2021 19:21:35</Created><Modified>15.11.2021
49
49
  19:21:35</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
@@ -43,7 +43,7 @@ http_interactions:
43
43
  body:
44
44
  encoding: ASCII-8BIT
45
45
  string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><Device><ID>37</ID><User><ID>2</ID></User><Category><ID>8</ID></Category><Enrollment><ID>49</ID><User><ID>2</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>16.11.2021
46
- 08:31:26</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>1</LastReportedHours><LastReportedMinutes>32</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><OSVersionName>iOS
46
+ 08:31:26</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>1</LastReportedHours><LastReportedMinutes>32</LastReportedMinutes><IPAddress>185.21.34</IPAddress><MACAddress>d4:d6:09:be</MACAddress><Platform>iOS</Platform><OSVersionName>iOS
47
47
  14.4.2</OSVersionName><Client><ID>37</ID></Client><ConfigProfileDeployments
48
48
  /><Status>AutoGenerated</Status><Created>15.11.2021 19:21:35</Created><Modified>16.11.2021
49
49
  09:01:30</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://test634.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%2087DB6H2)&select=*,*
5
+ uri: https://test634.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%206H2)&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -45,19 +45,19 @@ http_interactions:
45
45
  body:
46
46
  encoding: ASCII-8BIT
47
47
  string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="4"><Device><ID>2</ID><User><ID>1</ID></User><Enrollment><ID>6</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>04.10.2021
48
- 10:00:00</LastReported><LastReportedDays>42</LastReportedDays><LastReportedHours>1018</LastReportedHours><LastReportedMinutes>61103</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>D4:81:D7:F8:52:85</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
48
+ 10:00:00</LastReported><LastReportedDays>42</LastReportedDays><LastReportedHours>1018</LastReportedHours><LastReportedMinutes>61103</LastReportedMinutes><IPAddress>185.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>D4:81:52:85</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
49
49
  10 Pro (20H2)</OSVersionName><Client><ID>2</ID></Client><ConfigProfileDeployments
50
50
  /><Status>Deleted</Status><Created>13.08.2021 13:19:37</Created><Modified>04.10.2021
51
51
  09:58:05</Modified><Source>MiradoreOnline</Source></Device><Device><ID>3</ID><Enrollment><ID>13</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>04.10.2021
52
- 10:10:00</LastReported><LastReportedDays>42</LastReportedDays><LastReportedHours>1018</LastReportedHours><LastReportedMinutes>61093</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
52
+ 10:10:00</LastReported><LastReportedDays>42</LastReportedDays><LastReportedHours>1018</LastReportedHours><LastReportedMinutes>61093</LastReportedMinutes><IPAddress>185.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>F8:5981:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
53
53
  10 Professionnel (20H2)</OSVersionName><Client><ID>3</ID></Client><ConfigProfileDeployments
54
54
  /><Status>Deleted</Status><Created>04.10.2021 10:07:03</Created><Modified>05.10.2021
55
55
  16:16:52</Modified><Source>MiradoreOnline</Source></Device><Device><ID>4</ID><Enrollment><ID>17</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>12.10.2021
56
- 10:51:10</LastReported><LastReportedDays>34</LastReportedDays><LastReportedHours>826</LastReportedHours><LastReportedMinutes>49532</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.16</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
56
+ 10:51:10</LastReported><LastReportedDays>34</LastReportedDays><LastReportedHours>826</LastReportedHours><LastReportedMinutes>49532</LastReportedMinutes><IPAddress>18.21.63</IPAddress><LocalIPAddress>172.18.254.16</LocalIPAddress><MACAddress>F8:5:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
57
57
  10 Pro (20H2)</OSVersionName><Client><ID>4</ID></Client><ConfigProfileDeployments
58
58
  /><Status>Deleted</Status><Created>04.10.2021 10:26:25</Created><Modified>12.10.2021
59
59
  10:50:17</Modified><Source>MiradoreOnline</Source></Device><Device><ID>9</ID><Location><ID>1</ID></Location><Category><ID>3</ID></Category><Enrollment><ID>36</ID></Enrollment><OnlineStatus>Unknown</OnlineStatus><LastReported>04.11.2021
60
- 14:31:00</LastReported><LastReportedDays>11</LastReportedDays><LastReportedHours>270</LastReportedHours><LastReportedMinutes>16192</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><LocalIPAddress>172.18.193.32</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><PurchaseDate>08.11.2021
60
+ 14:31:00</LastReported><LastReportedDays>11</LastReportedDays><LastReportedHours>270</LastReportedHours><LastReportedMinutes>16192</LastReportedMinutes><IPAddress>185.21.34</IPAddress><LocalIPAddress>172.18.193.32</LocalIPAddress><MACAddress>F8:5:81:CF</MACAddress><Platform>WindowsDesktop</Platform><PurchaseDate>08.11.2021
61
61
  00:00:00</PurchaseDate><OSVersionName>Windows 10 Professionnel (20H2)</OSVersionName><Client><ID>9</ID></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>1</ID><ConfigProfile><ID>7</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><Status>Active</Status><Created>27.10.2021
62
62
  08:10:37</Created><Modified>15.11.2021 19:55:20</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
63
63
  recorded_at: Mon, 15 Nov 2021 20:23:34 GMT
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%20K8N0CV07315233B)&select=*,*
5
+ uri: https://rzilient.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%20233B)&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = "3.3.15"
5
+ VERSION = "4.0.0"
6
6
  end
7
7
  end
data/lib/ruby/miradore.rb CHANGED
@@ -1,11 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "miradore/version"
4
- require "active_support/core_ext/hash/conversions"
5
- require "httparty"
6
- require "json"
7
- require "crack/xml"
8
- require "finest/builder"
3
+ require_relative 'miradore/version'
4
+ require 'active_support/isolated_execution_state'
5
+ require 'active_support/core_ext/hash/conversions'
6
+ require 'httparty'
7
+ require 'json'
8
+ require 'crack/xml'
9
+ require 'finest/builder'
9
10
 
10
11
 
11
12
  module Ruby
@@ -13,9 +14,9 @@ module Ruby
13
14
 
14
15
  def self.url
15
16
  {
16
- item_v1: "https://%<subdomain>s.online.miradore.com/API/%<item>s/%<id>s?auth=%<auth>s&select=*,%<attribute>s&filters=%<filter>s",
17
- request_v1: "https://%<subdomain>s.online.miradore.com/API/Device?auth=%<auth>s&select=*,Category.*,InvDevice.*,InvStorage.*,InvOS.*,Enrollment.*,Client.*,User.*,Location.*,Security.*,ReportedLocation.*&filters=%<filter>s",
18
- v2: "https://%<subdomain>s.online.miradore.com/API/v2/Device/%<id>s/%<method>s"
17
+ item_v1: 'https://%<subdomain>s.online.miradore.com/API/%<item>s/%<id>s?auth=%<auth>s&select=*,%<attribute>s&filters=%<filter>s',
18
+ request_v1: 'https://%<subdomain>s.online.miradore.com/API/Device?auth=%<auth>s&select=*,Category.*,InvDevice.*,InvStorage.*,InvOS.*,Enrollment.*,Client.*,User.*,Location.*,Security.*,ReportedLocation.*&filters=%<filter>s',
19
+ v2: 'https://%<subdomain>s.online.miradore.com/API/v2/Device/%<id>s/%<method>s'
19
20
  }
20
21
  end
21
22
 
@@ -44,16 +45,16 @@ module Ruby
44
45
  def all(**args)
45
46
  transform(
46
47
  Crack::XML.parse(
47
- http_method_v1(args).body
48
- ).dig("Content", "Items"), args
48
+ http_method_v1(**args).body
49
+ ).dig('Content', 'Items'), args
49
50
  )
50
51
  end
51
52
 
52
53
  def call(**args)
53
54
  transform(
54
55
  Crack::XML.parse(
55
- http_method_v1(args.merge( attribute: "ID")).body
56
- )["Content"]
56
+ http_method_v1(**args.merge( attribute: 'ID')).body
57
+ )['Content']
57
58
  )
58
59
  end
59
60
 
@@ -65,18 +66,16 @@ module Ruby
65
66
  superclass == Object ? :request_v1 : :item_v1
66
67
  end
67
68
 
68
- private
69
-
70
69
  def http_method_v1(**args)
71
70
  url = Miradore.url[api_version] % args.merge(
72
71
  subdomain: @subdomain || args[:subdomain],
73
72
  auth: args.fetch(:auth, @auth),
74
73
  id: args.fetch(:id, nil),
75
- item: self.class.to_s.split("::").last,
76
- attribute: args.fetch(:attribute, "*"),
74
+ item: self.class.to_s.split('::').last,
75
+ attribute: args.fetch(:attribute, '*'),
77
76
  filter: args.fetch(:filter, nil)
78
77
  )
79
- self.class.method(args.fetch(:method, :get)).call(url, body: args.fetch(:body, nil)&.to_xml(root: "Content", skip_types: true))
78
+ self.class.method(args.fetch(:method, :get)).call(url, body: args.fetch(:body, nil)&.to_xml(root: 'Content', skip_types: true))
80
79
  end
81
80
 
82
81
  def transform(res, args = {})
@@ -96,47 +95,47 @@ module Ruby
96
95
  class Device < Request
97
96
  include HTTParty
98
97
  format :json
99
- headers "Content-Type": "application/json"
100
- headers "Accept": "application/json"
98
+ headers "Content-Type": 'application/json'
99
+ headers "Accept": 'application/json'
101
100
 
102
101
  def initialize(json = {})
103
102
  super json
104
103
  end
105
104
 
106
105
  def lock(**args)
107
- http_method(args.merge(method: :post, id: id, action: __method__))
106
+ http_method(**args.merge(method: :post, id: id, action: __method__))
108
107
  end
109
108
 
110
109
  def lostmode(**args)
111
110
  if args[0]
112
- http_method(args.merge(method: :post, id: id, action: __method__))
111
+ http_method(**args.merge(method: :post, id: id, action: __method__))
113
112
  else
114
- http_method(args.merge(method: :delete, id: id, action: __method__))
113
+ http_method(**args.merge(method: :delete, id: id, action: __method__))
115
114
  end
116
115
  end
117
116
 
118
117
  def reboot(**args)
119
- http_method(args.merge(method: :post, id: id, action: __method__))
118
+ http_method(**args.merge(method: :post, id: id, action: __method__))
120
119
  end
121
120
 
122
121
  def wipe(**args)
123
- http_method(args.merge(method: :post, id: id, action: __method__))
122
+ http_method(**args.merge(method: :post, id: id, action: __method__))
124
123
  end
125
124
 
126
125
  def location(**args)
127
- http_method(args.merge(method: :get, action: __method__))
126
+ http_method(**args.merge(method: :get, action: __method__))
128
127
  end
129
128
 
130
129
  def family(**args)
131
- http_method(args.merge(method: :put, action: :category))
130
+ http_method(**args.merge(method: :put, action: :category))
132
131
  end
133
132
 
134
133
  def model(**args)
135
- http_method(args.merge(method: :put, action: __method__))
134
+ http_method(**args.merge(method: :put, action: __method__))
136
135
  end
137
136
 
138
137
  def activate(**args)
139
- http_method(args.merge(method: :post, action: __method__))
138
+ http_method(**args.merge(method: :post, action: __method__))
140
139
  end
141
140
 
142
141
  def device_serial_number
@@ -156,13 +155,13 @@ module Ruby
156
155
  end
157
156
 
158
157
  def call(**args)
159
- http_method(args)
158
+ http_method(**args)
160
159
  end
161
160
 
162
161
  private
163
162
 
164
163
  def http_method(**args)
165
- self.class.headers "X-API-Key" => @auth || args[:auth]
164
+ self.class.headers 'X-API-Key' => @auth || args[:auth]
166
165
  url = Miradore.url[:v2] % {
167
166
  subdomain: @subdomain || args[:subdomain],
168
167
  id: args.fetch(:id, id),
@@ -170,7 +169,7 @@ module Ruby
170
169
  }
171
170
  self.class.method(args.fetch(:method, nil)).call(url, body: args.fetch(:body, {}).to_json)
172
171
  rescue StandardError => e
173
- { error: e&.message || "Error connecting to manager service provider", status: :not_found }
172
+ { error: e&.message || 'Error connecting to manager service provider', status: :not_found }
174
173
  end
175
174
 
176
175
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "Miradore MSP Ruby Gem"
13
13
  spec.homepage = "https://github.com/eddygarcas/ruby-miradore"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = Gem::Requirement.new(">= 2.7.4")
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.0.1")
16
16
 
17
17
  spec.metadata["allowed_push_host"] = "https://rubygems.org/"
18
18
 
@@ -31,14 +31,14 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  # Uncomment to register a new dependency of your gem
33
33
  # spec.add_dependency "example-gem", "~> 1.0"
34
- spec.add_dependency "activesupport", "~> 6.1"
34
+ spec.add_dependency "activesupport", "~> 7.0"
35
35
  spec.add_dependency 'builder', '~> 3.1'
36
36
  spec.add_dependency "crack", "~> 0.4"
37
37
  spec.add_dependency "finest-builder", "~> 1.0"
38
- spec.add_dependency "httparty", "~> 0.18"
38
+ spec.add_dependency "httparty", "~> 0.20"
39
39
  spec.add_dependency "rake", "~> 13.0"
40
- spec.add_dependency "rspec", "~> 3.0"
41
- spec.add_dependency "rubocop", "~> 1.7"
40
+ spec.add_dependency "rspec", "~> 3.10"
41
+ spec.add_dependency "rubocop", "~> 1.24"
42
42
 
43
43
  # For more information and examples about making a new gem, checkout our
44
44
  # guide at: https://bundler.io/guides/creating_gem.html
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-miradore
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.15
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduard Garcia Castelló
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-24 00:00:00.000000000 Z
11
+ date: 2022-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.1'
19
+ version: '7.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '6.1'
26
+ version: '7.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: builder
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.18'
75
+ version: '0.20'
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.18'
82
+ version: '0.20'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '3.0'
103
+ version: '3.10'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '3.0'
110
+ version: '3.10'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubocop
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '1.7'
117
+ version: '1.24'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '1.7'
124
+ version: '1.24'
125
125
  description: Miradore MSP Ruby Gem
126
126
  email:
127
127
  - edugarcas@gmail.com
@@ -132,7 +132,7 @@ extra_rdoc_files: []
132
132
  files:
133
133
  - ".gitignore"
134
134
  - ".rspec"
135
- - ".rubocop.yml"
135
+ - ".ruby-version"
136
136
  - ".travis.yml"
137
137
  - CHANGELOG.md
138
138
  - CODE_OF_CONDUCT.md
@@ -188,14 +188,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
188
  requirements:
189
189
  - - ">="
190
190
  - !ruby/object:Gem::Version
191
- version: 2.7.4
191
+ version: 3.0.1
192
192
  required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  requirements:
194
194
  - - ">="
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  requirements: []
198
- rubygems_version: 3.1.6
198
+ rubygems_version: 3.3.3
199
199
  signing_key:
200
200
  specification_version: 4
201
201
  summary: Miradore is a MSP providing an API to get devices information as well s perform
data/.rubocop.yml DELETED
@@ -1,14 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.7.3
3
- NewCops: disable
4
-
5
- Style/StringLiterals:
6
- Enabled: true
7
- EnforcedStyle: double_quotes
8
-
9
- Style/StringLiteralsInInterpolation:
10
- Enabled: true
11
- EnforcedStyle: double_quotes
12
-
13
- Layout/LineLength:
14
- Max: 120