ruby-miradore 4.0.0 → 4.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Gemfile.lock +21 -21
- data/lib/ruby/miradore/version.rb +1 -1
- data/lib/ruby/miradore.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e2ddc5b671777f92cf2dae606c3788cc82cd8c59bcb2d9aa266ef911998cc73
|
4
|
+
data.tar.gz: 743d7cf0f220861b171b509799ae4f3a527270ebd2e407fe645d0848d3da787d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f965ae1fdcbb916aa3a15ff8972861465a9a21955c5197ae9ddb436486086137fad7e6b88df4ca64dcf87bf9ae46f6ab5fac6155536c60dbeeb41f89cbe6130
|
7
|
+
data.tar.gz: 5857a443b1466e8ab8326f6081ca1de388458c54bec1834e9a8489aab79513a3c7cf2cf443714e8c498567d4dada10f8d2da6d61a7b071756f116ebd6eb0897f
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruby-miradore (4.0.
|
4
|
+
ruby-miradore (4.0.3)
|
5
5
|
activesupport (~> 7.0)
|
6
6
|
builder (~> 3.1)
|
7
7
|
crack (~> 0.4)
|
@@ -14,7 +14,7 @@ PATH
|
|
14
14
|
GEM
|
15
15
|
remote: https://rubygems.org/
|
16
16
|
specs:
|
17
|
-
activesupport (7.0.
|
17
|
+
activesupport (7.0.2.2)
|
18
18
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
19
|
i18n (>= 1.6, < 2)
|
20
20
|
minitest (>= 5.1)
|
@@ -32,7 +32,7 @@ GEM
|
|
32
32
|
httparty (0.20.0)
|
33
33
|
mime-types (~> 3.0)
|
34
34
|
multi_xml (>= 0.5.2)
|
35
|
-
i18n (1.
|
35
|
+
i18n (1.10.0)
|
36
36
|
concurrent-ruby (~> 1.0)
|
37
37
|
mime-types (3.4.1)
|
38
38
|
mime-types-data (~> 3.2015)
|
@@ -40,37 +40,37 @@ GEM
|
|
40
40
|
minitest (5.15.0)
|
41
41
|
multi_xml (0.6.0)
|
42
42
|
parallel (1.21.0)
|
43
|
-
parser (3.1.
|
43
|
+
parser (3.1.1.0)
|
44
44
|
ast (~> 2.4.1)
|
45
45
|
public_suffix (4.0.6)
|
46
|
-
rainbow (3.
|
46
|
+
rainbow (3.1.1)
|
47
47
|
rake (13.0.6)
|
48
|
-
regexp_parser (2.2.
|
48
|
+
regexp_parser (2.2.1)
|
49
49
|
rexml (3.2.5)
|
50
|
-
rspec (3.
|
51
|
-
rspec-core (~> 3.
|
52
|
-
rspec-expectations (~> 3.
|
53
|
-
rspec-mocks (~> 3.
|
54
|
-
rspec-core (3.
|
55
|
-
rspec-support (~> 3.
|
56
|
-
rspec-expectations (3.
|
50
|
+
rspec (3.11.0)
|
51
|
+
rspec-core (~> 3.11.0)
|
52
|
+
rspec-expectations (~> 3.11.0)
|
53
|
+
rspec-mocks (~> 3.11.0)
|
54
|
+
rspec-core (3.11.0)
|
55
|
+
rspec-support (~> 3.11.0)
|
56
|
+
rspec-expectations (3.11.0)
|
57
57
|
diff-lcs (>= 1.2.0, < 2.0)
|
58
|
-
rspec-support (~> 3.
|
59
|
-
rspec-mocks (3.
|
58
|
+
rspec-support (~> 3.11.0)
|
59
|
+
rspec-mocks (3.11.0)
|
60
60
|
diff-lcs (>= 1.2.0, < 2.0)
|
61
|
-
rspec-support (~> 3.
|
62
|
-
rspec-support (3.
|
63
|
-
rubocop (1.
|
61
|
+
rspec-support (~> 3.11.0)
|
62
|
+
rspec-support (3.11.0)
|
63
|
+
rubocop (1.25.1)
|
64
64
|
parallel (~> 1.10)
|
65
|
-
parser (>= 3.
|
65
|
+
parser (>= 3.1.0.0)
|
66
66
|
rainbow (>= 2.2.2, < 4.0)
|
67
67
|
regexp_parser (>= 1.8, < 3.0)
|
68
68
|
rexml
|
69
69
|
rubocop-ast (>= 1.15.1, < 2.0)
|
70
70
|
ruby-progressbar (~> 1.7)
|
71
71
|
unicode-display_width (>= 1.4.0, < 3.0)
|
72
|
-
rubocop-ast (1.
|
73
|
-
parser (>= 3.
|
72
|
+
rubocop-ast (1.16.0)
|
73
|
+
parser (>= 3.1.1.0)
|
74
74
|
ruby-progressbar (1.11.0)
|
75
75
|
tzinfo (2.0.4)
|
76
76
|
concurrent-ruby (~> 1.0)
|
data/lib/ruby/miradore.rb
CHANGED
@@ -8,14 +8,13 @@ require 'json'
|
|
8
8
|
require 'crack/xml'
|
9
9
|
require 'finest/builder'
|
10
10
|
|
11
|
-
|
12
11
|
module Ruby
|
13
12
|
module Miradore
|
14
13
|
|
15
14
|
def self.url
|
16
15
|
{
|
17
16
|
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',
|
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&options=%<options>s',
|
19
18
|
v2: 'https://%<subdomain>s.online.miradore.com/API/v2/Device/%<id>s/%<method>s'
|
20
19
|
}
|
21
20
|
end
|
@@ -53,7 +52,7 @@ module Ruby
|
|
53
52
|
def call(**args)
|
54
53
|
transform(
|
55
54
|
Crack::XML.parse(
|
56
|
-
http_method_v1(**args.merge(
|
55
|
+
http_method_v1(**args.merge(attribute: 'ID')).body
|
57
56
|
)['Content']
|
58
57
|
)
|
59
58
|
end
|
@@ -73,7 +72,8 @@ module Ruby
|
|
73
72
|
id: args.fetch(:id, nil),
|
74
73
|
item: self.class.to_s.split('::').last,
|
75
74
|
attribute: args.fetch(:attribute, '*'),
|
76
|
-
filter: args.fetch(:filter, nil)
|
75
|
+
filter: args.fetch(:filter, nil),
|
76
|
+
options: args.fetch(:options, nil)
|
77
77
|
)
|
78
78
|
self.class.method(args.fetch(:method, :get)).call(url, body: args.fetch(:body, nil)&.to_xml(root: 'Content', skip_types: true))
|
79
79
|
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: 4.0.
|
4
|
+
version: 4.0.3
|
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: 2022-
|
11
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|