ruby-miradore 4.4.1 → 4.4.2

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: c854cbb5ab9cac28c6e4fb8c1d913f96531c54eaf0463a5c931d48020c045b40
4
- data.tar.gz: 16db5100e8b11468ff2da6edeb797a135a30638882b97cefb33ca18adc815c1f
3
+ metadata.gz: 7fa7bea04e363a3b0d7b478a83273c750f7e8b51d1accdc9bfc6f2e6a2363bed
4
+ data.tar.gz: 1ff8e591ee1e65adb8cb7e29e34be5a376ef179b0cebe699b5ea68c42d2125a9
5
5
  SHA512:
6
- metadata.gz: 0b2e17d1750e09479355f82b4f14ced4c4273d712c6459449b71be3ec6d21482305748f75b6f3000e892cec72ac461e87145e8bf042e09bb36c798caa023d125
7
- data.tar.gz: 944315dd81361acb3b6b283434b053a29b45499c3e947e04de03c5ae588c1a8819a6695eb75f1d72396bb11ff339f2d009ad585dbb1c2b8d92b5a69abfa28ec3
6
+ metadata.gz: fae95e829257c215c9c115cf292bca0a11b1adb64f7c84079d23912cc1115a0744bf1695eab937129595217e3b949b6752170dba8300e1fe3cb391a1fdb1cd0c
7
+ data.tar.gz: ae53294cb3b31b5c70db09e6545c946a36baa0476cb1e2a00a169c8acf04bc96353eefb7ba54462c4bbd28705dff349b7f07ff778143b13744a0beb63086dc4e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-miradore (4.4.1)
4
+ ruby-miradore (4.4.2)
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.0)
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.17.0)
39
+ minitest (5.18.0)
40
40
  multi_xml (0.6.0)
41
41
  parallel (1.22.1)
42
- parser (3.2.1.0)
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.45.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.24.1, < 2.0)
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.26.0)
72
+ rubocop-ast (1.27.0)
73
73
  parser (>= 3.2.1.0)
74
- ruby-progressbar (1.11.0)
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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = '4.4.1'
5
+ VERSION = '4.4.2'
6
6
  end
7
7
  end
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
  )
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.1
4
+ version: 4.4.2
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-02-24 00:00:00.000000000 Z
11
+ date: 2023-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport