ruby-miradore 4.4.0 → 4.4.1

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: 6970f265b7922dee506ea4625614c650157fa9c1205d3e411e5e70811a0f626a
4
- data.tar.gz: 31aaa50424e7d70b8e3c58349bb3a9e0954ad27441a6f7cf2f8381f851e23d3a
3
+ metadata.gz: c854cbb5ab9cac28c6e4fb8c1d913f96531c54eaf0463a5c931d48020c045b40
4
+ data.tar.gz: 16db5100e8b11468ff2da6edeb797a135a30638882b97cefb33ca18adc815c1f
5
5
  SHA512:
6
- metadata.gz: 20d16bf2aa88223b73c7964d6419407b505b7d39a1af4eca02670b06a0a893768ade53003e151453a4b1a05feaae16dbc3e9078957efeedc9dfc6d98fe215493
7
- data.tar.gz: 60d40d8faedfb94a2c8121edd0b2ec86865e17467e66736007a16e9ecaa08345d45f867aff2968e91cd3bd9509c7cf72147e219576ff21d77337e29e194eaf34
6
+ metadata.gz: 0b2e17d1750e09479355f82b4f14ced4c4273d712c6459449b71be3ec6d21482305748f75b6f3000e892cec72ac461e87145e8bf042e09bb36c798caa023d125
7
+ data.tar.gz: 944315dd81361acb3b6b283434b053a29b45499c3e947e04de03c5ae588c1a8819a6695eb75f1d72396bb11ff339f2d009ad585dbb1c2b8d92b5a69abfa28ec3
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = "4.4.0"
5
+ VERSION = '4.4.1'
6
6
  end
7
7
  end
data/lib/ruby/miradore.rb CHANGED
@@ -17,6 +17,16 @@ module Ruby
17
17
  v2: 'https://%<subdomain>s.online.miradore.com/API/v2/Device/%<id>s/%<method>s'
18
18
  }
19
19
  mattr_accessor :phone_types, default: %w[Android iOS WindowsPhone]
20
+ mattr_accessor :commands, default: {
21
+ mobile: {
22
+ lostmode: {
23
+ message: 'This device has been reported as lost and its location has been identified, please return before authorities arrive.',
24
+ phoneNumber: '',
25
+ footnote: 'Contact Support team to unlock.',
26
+ enableLocationTracking: true
27
+ }
28
+ }
29
+ }
20
30
 
21
31
  # Setup data from initializer
22
32
  def self.setup
@@ -89,7 +99,7 @@ module Ruby
89
99
  end
90
100
  self.class.new(args.merge(res.values.first&.transform_keys(&:downcase)))
91
101
  rescue StandardError
92
- { error: "#{self.class.to_s.split("::").last}(s) not found", status: :not_found }
102
+ { error: "#{self.class.to_s.split('::').last}(s) not found", status: :not_found }
93
103
  end
94
104
 
95
105
  end
@@ -109,8 +119,8 @@ module Ruby
109
119
  end
110
120
 
111
121
  def lostmode(args = {})
112
- if args[0]
113
- http_method(args.merge(method: :post, id: id, action: __method__))
122
+ if args.fetch(:enable, false)
123
+ http_method(args.merge(method: :post, id: id, action: __method__, body: Miradore.commands[:mobile][:lostmode]))
114
124
  else
115
125
  http_method(args.merge(method: :delete, id: id, action: __method__))
116
126
  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.4.0
4
+ version: 4.4.1
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-21 00:00:00.000000000 Z
11
+ date: 2023-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport