ruby-miradore 4.4.1 → 4.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -8
- data/lib/ruby/miradore/version.rb +1 -1
- data/lib/ruby/miradore.rb +3 -2
- 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: c3966923afe8342fe94ceaa1e6e10239eaad50307923e7780023b6c6af1824b0
|
4
|
+
data.tar.gz: 83b089745b8d959986bacf5e7e0bd4ae4330a4a1724cb23ad266271076c2ee32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3671cf3e70e176a35ac87d57f0b050731706d29f2b76a1d59b890de5b5864eeeb3bceb65f56b0eb56b1e60d100f498c814bc90ea636bc36e45f27c2519f7c50
|
7
|
+
data.tar.gz: f4bfedcb6e728e05eaba3165562c7020df6d39aa6f643820b2cfb83dc65395acb0c6f9fecc04b9b8e6fe28e41d3e0c8d64ca07f146d618cebc83c2abe1136059
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruby-miradore (4.4.
|
4
|
+
ruby-miradore (4.4.3)
|
5
5
|
activesupport (~> 7.0)
|
6
6
|
builder (~> 3.1)
|
7
7
|
crack (~> 0.4)
|
@@ -23,7 +23,7 @@ GEM
|
|
23
23
|
public_suffix (>= 2.0.2, < 6.0)
|
24
24
|
ast (2.4.2)
|
25
25
|
builder (3.2.4)
|
26
|
-
concurrent-ruby (1.2.
|
26
|
+
concurrent-ruby (1.2.2)
|
27
27
|
crack (0.4.5)
|
28
28
|
rexml
|
29
29
|
diff-lcs (1.5.0)
|
@@ -36,10 +36,10 @@ GEM
|
|
36
36
|
concurrent-ruby (~> 1.0)
|
37
37
|
json (2.6.3)
|
38
38
|
mini_mime (1.1.2)
|
39
|
-
minitest (5.
|
39
|
+
minitest (5.18.0)
|
40
40
|
multi_xml (0.6.0)
|
41
41
|
parallel (1.22.1)
|
42
|
-
parser (3.2.1.
|
42
|
+
parser (3.2.1.1)
|
43
43
|
ast (~> 2.4.1)
|
44
44
|
public_suffix (5.0.1)
|
45
45
|
rainbow (3.1.1)
|
@@ -59,19 +59,19 @@ GEM
|
|
59
59
|
diff-lcs (>= 1.2.0, < 2.0)
|
60
60
|
rspec-support (~> 3.12.0)
|
61
61
|
rspec-support (3.12.0)
|
62
|
-
rubocop (1.
|
62
|
+
rubocop (1.48.0)
|
63
63
|
json (~> 2.3)
|
64
64
|
parallel (~> 1.10)
|
65
65
|
parser (>= 3.2.0.0)
|
66
66
|
rainbow (>= 2.2.2, < 4.0)
|
67
67
|
regexp_parser (>= 1.8, < 3.0)
|
68
68
|
rexml (>= 3.2.5, < 4.0)
|
69
|
-
rubocop-ast (>= 1.
|
69
|
+
rubocop-ast (>= 1.26.0, < 2.0)
|
70
70
|
ruby-progressbar (~> 1.7)
|
71
71
|
unicode-display_width (>= 2.4.0, < 3.0)
|
72
|
-
rubocop-ast (1.
|
72
|
+
rubocop-ast (1.27.0)
|
73
73
|
parser (>= 3.2.1.0)
|
74
|
-
ruby-progressbar (1.
|
74
|
+
ruby-progressbar (1.13.0)
|
75
75
|
tzinfo (2.0.6)
|
76
76
|
concurrent-ruby (~> 1.0)
|
77
77
|
unicode-display_width (2.4.2)
|
data/lib/ruby/miradore.rb
CHANGED
@@ -16,6 +16,7 @@ module Ruby
|
|
16
16
|
v1: 'https://%<subdomain>s.online.miradore.com/API/%<item>s/%<id>s?auth=%<auth>s&select=*,%<attribute>s&filters=%<filter>s&options=%<options>s',
|
17
17
|
v2: 'https://%<subdomain>s.online.miradore.com/API/v2/Device/%<id>s/%<method>s'
|
18
18
|
}
|
19
|
+
mattr_accessor :select_attributes, default: '*'
|
19
20
|
mattr_accessor :phone_types, default: %w[Android iOS WindowsPhone]
|
20
21
|
mattr_accessor :commands, default: {
|
21
22
|
mobile: {
|
@@ -81,7 +82,7 @@ module Ruby
|
|
81
82
|
auth: args.fetch(:auth, @auth),
|
82
83
|
id: args.fetch(:id, nil),
|
83
84
|
item: self.class.to_s.split('::').last,
|
84
|
-
attribute: args.fetch(:attribute,
|
85
|
+
attribute: args.fetch(:attribute, Miradore.select_attributes),
|
85
86
|
filter: args.fetch(:filter, nil),
|
86
87
|
options: args.fetch(:options, nil)&.to_query&.sub('&', ',')
|
87
88
|
)
|
@@ -89,7 +90,7 @@ module Ruby
|
|
89
90
|
end
|
90
91
|
|
91
92
|
def transform(res, args = {})
|
92
|
-
return res if args.fetch(:skip_transform, false)
|
93
|
+
return res if args.fetch(:skip_transform, false) || res.is_a?(Net::HTTPClientError)
|
93
94
|
|
94
95
|
args.merge!({ subdomain: args.fetch(:subdomain, @subdomain), auth: args.fetch(:auth, @auth) })
|
95
96
|
if res.values.first.is_a?(Array)
|
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.4.
|
4
|
+
version: 4.4.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: 2023-
|
11
|
+
date: 2023-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|