ruby-miradore 3.3.13 → 3.3.14

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
  SHA256:
3
- metadata.gz: b80881eb5442f4ea7a7e8e3279696a4cbf289b6d51ecdaaeb377fe882fccc2c6
4
- data.tar.gz: 1657c4b389ebd50a6971bd92b920d0643112e1d1f56c28a67db2616e4c4124bc
3
+ metadata.gz: f775ab18d79f64312336ef6ec6d15a122de52bead8b0b21da003490285631730
4
+ data.tar.gz: 31a066dac49870180da455990ffabc9e19425a54d36b387e06e4ccd0448cd06e
5
5
  SHA512:
6
- metadata.gz: '0285c18efabcc0bf982642829c77d4a18253e8329c41814ebd355133cd376827fb5bc5a4fa008db256fb269adb54719d76485fb33ad551bdc4920de7fc74ac36'
7
- data.tar.gz: bf52662c76e2805d7d41b165b2b59f770938bceae9fd72315ed3fedfb84a4b2312145fb430aea3955cfb08cd65f8968c3541b2a78d1147ac94d02c8fc42f0507
6
+ metadata.gz: 6365dc5bd2b226adedd3923c16b59df2bbd8234e47cd278918b4cf87fa2861aa2f20d9ea55105cf8d01d603a4c39658ed91467ea10b450abf66eb7e34d377b9f
7
+ data.tar.gz: 6f7afcfc6e5b133942edf9a19dce837614fec7120679c152ac34fa830ac67a20a064396def44c61ec701a93c88ac3be035ba21b5ab364c5d8b8954feb72255c0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-miradore (3.3.13)
4
+ ruby-miradore (3.3.14)
5
5
  activesupport (~> 6.1)
6
6
  builder (~> 3.1)
7
7
  crack (~> 0.4)
@@ -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=(ID%20eq%2037)&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -11,8 +11,6 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
- X-Api-Key:
15
- - ''
16
14
  Accept-Encoding:
17
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
16
  User-Agent:
@@ -39,26 +37,15 @@ http_interactions:
39
37
  X-Frame-Options:
40
38
  - SAMEORIGIN
41
39
  Date:
42
- - Wed, 03 Nov 2021 09:25:17 GMT
40
+ - Mon, 15 Nov 2021 20:01:42 GMT
43
41
  Content-Length:
44
- - '995'
42
+ - '513'
45
43
  body:
46
44
  encoding: ASCII-8BIT
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>30</LastReportedDays><LastReportedHours>719</LastReportedHours><LastReportedMinutes>43165</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
49
- 10 Pro (20H2)</OSVersionName><Client><ID>2</ID></Client><ConfigProfileDeployments
50
- /><Status>Deleted</Status><Created>13.08.2021 13:19:37</Created><Modified>04.10.2021
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>30</LastReportedDays><LastReportedHours>719</LastReportedHours><LastReportedMinutes>43155</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
53
- 10 Professionnel (20H2)</OSVersionName><Client><ID>3</ID></Client><ConfigProfileDeployments
54
- /><Status>Deleted</Status><Created>04.10.2021 10:07:03</Created><Modified>05.10.2021
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>22</LastReportedDays><LastReportedHours>527</LastReportedHours><LastReportedMinutes>31594</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
57
- 10 Pro (20H2)</OSVersionName><Client><ID>4</ID></Client><ConfigProfileDeployments
58
- /><Status>Deleted</Status><Created>04.10.2021 10:26:25</Created><Modified>12.10.2021
59
- 10:50:17</Modified><Source>MiradoreOnline</Source></Device><Device><ID>9</ID><User><ID>2</ID></User><Location><ID>1</ID></Location><Category><ID>3</ID></Category><Enrollment><ID>36</ID></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>02.11.2021
60
- 13:40:06</LastReported><LastReportedDays>1</LastReportedDays><LastReportedHours>20</LastReportedHours><LastReportedMinutes>1185</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>03.11.2021
61
- 00:00:00</PurchaseDate><OSVersionName>Windows 10 Pro (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
- 08:10:37</Created><Modified>03.11.2021 09:16:54</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
63
- recorded_at: Wed, 03 Nov 2021 09:25:18 GMT
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
47
+ 14.4.2</OSVersionName><Client><ID>37</ID></Client><ConfigProfileDeployments
48
+ /><Status>AutoGenerated</Status><Created>15.11.2021 19:21:35</Created><Modified>15.11.2021
49
+ 19:21:35</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
50
+ recorded_at: Mon, 15 Nov 2021 20:01:42 GMT
64
51
  recorded_with: VCR 6.0.0
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://test634.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%2087DB6H2)&select=*,*
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ X-Api-Key:
15
+ - ''
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-cache
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - text/xml
31
+ Expires:
32
+ - "-1"
33
+ Vary:
34
+ - Accept-Encoding
35
+ Server:
36
+ - Microsoft-IIS/10.0
37
+ X-Aspnet-Version:
38
+ - 4.0.30319
39
+ X-Frame-Options:
40
+ - SAMEORIGIN
41
+ Date:
42
+ - Mon, 15 Nov 2021 20:23:34 GMT
43
+ Content-Length:
44
+ - '993'
45
+ body:
46
+ encoding: ASCII-8BIT
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
49
+ 10 Pro (20H2)</OSVersionName><Client><ID>2</ID></Client><ConfigProfileDeployments
50
+ /><Status>Deleted</Status><Created>13.08.2021 13:19:37</Created><Modified>04.10.2021
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
53
+ 10 Professionnel (20H2)</OSVersionName><Client><ID>3</ID></Client><ConfigProfileDeployments
54
+ /><Status>Deleted</Status><Created>04.10.2021 10:07:03</Created><Modified>05.10.2021
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
57
+ 10 Pro (20H2)</OSVersionName><Client><ID>4</ID></Client><ConfigProfileDeployments
58
+ /><Status>Deleted</Status><Created>04.10.2021 10:26:25</Created><Modified>12.10.2021
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
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
+ 08:10:37</Created><Modified>15.11.2021 19:55:20</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
63
+ recorded_at: Mon, 15 Nov 2021 20:23:34 GMT
64
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,39 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: patch
5
+ uri: https://test634.online.miradore.com/API/v2/Device/9/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"category":"Laptops","friendlyName":"Eduard personal","userEmailAddress":"eduard@rzilient.club","location":["Barcelona"],"tags":["Personal"],"ownershipStartDate":"2021-11-15
9
+ 21:23:34 +0100"}'
10
+ headers:
11
+ Content-Type:
12
+ - application/json
13
+ Accept:
14
+ - application/json
15
+ X-Api-Key:
16
+ -
17
+ Accept-Encoding:
18
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
19
+ User-Agent:
20
+ - Ruby
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Server:
27
+ - Microsoft-IIS/10.0
28
+ X-Frame-Options:
29
+ - SAMEORIGIN
30
+ - SAMEORIGIN
31
+ Date:
32
+ - Mon, 15 Nov 2021 20:23:35 GMT
33
+ Content-Length:
34
+ - '0'
35
+ body:
36
+ encoding: UTF-8
37
+ string: ''
38
+ recorded_at: Mon, 15 Nov 2021 20:23:35 GMT
39
+ recorded_with: VCR 6.0.0
@@ -2,10 +2,10 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: https://test634.online.miradore.com/API/v2/Device/9/category
5
+ uri: https://test634.online.miradore.com/API/v2/Device/37/category
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '"Laptops"'
8
+ string: '"Smartphones"'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -30,11 +30,11 @@ http_interactions:
30
30
  - SAMEORIGIN
31
31
  - SAMEORIGIN
32
32
  Date:
33
- - Wed, 03 Nov 2021 10:48:33 GMT
33
+ - Mon, 15 Nov 2021 20:03:44 GMT
34
34
  Content-Length:
35
- - '81'
35
+ - '85'
36
36
  body:
37
37
  encoding: UTF-8
38
- string: '{"categoryID":3,"name":"Laptops","description":null,"deviceCount":2,"image":null}'
39
- recorded_at: Wed, 03 Nov 2021 10:48:34 GMT
38
+ string: '{"categoryID":8,"name":"Smartphones","description":null,"deviceCount":1,"image":null}'
39
+ recorded_at: Mon, 15 Nov 2021 20:03:44 GMT
40
40
  recorded_with: VCR 6.0.0
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = "3.3.13"
5
+ VERSION = "3.3.14"
6
6
  end
7
7
  end
data/lib/ruby/miradore.rb CHANGED
@@ -168,7 +168,7 @@ module Ruby
168
168
  id: args.fetch(:id, id),
169
169
  method: args.fetch(:action, nil)
170
170
  }
171
- self.class.method(args.fetch(:method, nil)).call(url, body: JSON.generate(args.fetch(:body, {})))
171
+ self.class.method(args.fetch(:method, nil)).call(url, body: args.fetch(:body, {}).to_json)
172
172
  rescue StandardError => e
173
173
  { error: e&.message || "Error connecting to manager service provider", status: :not_found }
174
174
  end
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.13
4
+ version: 3.3.14
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-10 00:00:00.000000000 Z
11
+ date: 2021-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -157,10 +157,12 @@ files:
157
157
  - fixtures/vcr_cassettes/full_list_and_details.yml
158
158
  - fixtures/vcr_cassettes/get_computer_device_to_update.yml
159
159
  - fixtures/vcr_cassettes/get_computer_device_to_update_2.yml
160
+ - fixtures/vcr_cassettes/get_computer_device_to_update_dell.yml
160
161
  - fixtures/vcr_cassettes/get_location.yml
161
162
  - fixtures/vcr_cassettes/get_user_from_miradore.yml
162
163
  - fixtures/vcr_cassettes/search_by_serial_number.yml
163
164
  - fixtures/vcr_cassettes/update_model_of_a_computer_device.yml
165
+ - fixtures/vcr_cassettes/update_model_of_a_computer_device_dell.yml
164
166
  - fixtures/vcr_cassettes/update_model_of_a_computer_device_v2.yml
165
167
  - fixtures/vcr_cassettes/update_model_of_a_computer_device_v2_2.yml
166
168
  - fixtures/vcr_cassettes/user_alredy_exist_in_miradore.yml