ruby-miradore 2.2.6 → 2.3.9

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: 97151079f196820b698900c24e99ef9347ddb0af5ed6898954d0e7648e4d821d
4
- data.tar.gz: 0d387e3d389ec3109d0e7b56ff0272d3a32018f0e784f3cf5abb7f79a5532c77
3
+ metadata.gz: 3d105a9262cdf40781a3d3ba95f13a1c29a7eb763c242da1a5c2b7d20b7cdfc6
4
+ data.tar.gz: b365339169bb49d5eeef8b21fb9716b0867b7736bef1d5deebbe160d042877f5
5
5
  SHA512:
6
- metadata.gz: d64b7a84e53d415388a8899bc230340e77ecf0b2e139aea618b7f9fe22f8d852ca0b5d4a12d41cdd7e6dd05afd308d799ae427f7c847a3655ac010745a5149cf
7
- data.tar.gz: ad1a881e39d0f0f608524f2d13f348fd79d9cd2a7cd5ad852a1f1a1e6901bc446947fff1c7bb1881e9fbd9efa11cc3a672312b18685d575d5dc167698da99189
6
+ metadata.gz: 31f5262f5a999807db3ad81bcfe50438e96864d44b505c4b417793d7adad4a7cef0d1677f93225dc9b6396244010ca898f3112ccd7802e9b3d5252c3c60b2fbb
7
+ data.tar.gz: 3d3aebc88688facb5ea60ad44849b7e42dca93f36ab47ad72295f183a219184642cf65ae9d75bb0831faea999cd84d5b3fa97c920e165fe183dbbed6eb83fa01
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-miradore (2.2.6)
4
+ ruby-miradore (2.2.9)
5
5
  activesupport (~> 6.1)
6
6
  builder (~> 3.1)
7
7
  crack (~> 0.4)
@@ -28,7 +28,7 @@ GEM
28
28
  crack (0.4.5)
29
29
  rexml
30
30
  diff-lcs (1.4.4)
31
- finest-builder (1.0.1)
31
+ finest-builder (1.1.1)
32
32
  hashdiff (1.0.1)
33
33
  httparty (0.20.0)
34
34
  mime-types (~> 3.0)
@@ -70,7 +70,7 @@ GEM
70
70
  rubocop-ast (>= 1.12.0, < 2.0)
71
71
  ruby-progressbar (~> 1.7)
72
72
  unicode-display_width (>= 1.4.0, < 3.0)
73
- rubocop-ast (1.12.0)
73
+ rubocop-ast (1.13.0)
74
74
  parser (>= 3.0.1.1)
75
75
  ruby-progressbar (1.11.0)
76
76
  tzinfo (2.0.4)
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: patch
5
- uri: https://rzilient.online.miradore.com/API/v2/Device/1/
5
+ uri: https://test634.online.miradore.com/API/v2/Device/13/
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"userEmailAddress":"eduard@rzilient.club"}'
@@ -12,7 +12,7 @@ http_interactions:
12
12
  Accept:
13
13
  - application/json
14
14
  X-Api-Key:
15
- -
15
+ - 1_8,Yo-TV8QyCiBUF
16
16
  Accept-Encoding:
17
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
18
  User-Agent:
@@ -28,11 +28,11 @@ http_interactions:
28
28
  - SAMEORIGIN
29
29
  - SAMEORIGIN
30
30
  Date:
31
- - Fri, 29 Oct 2021 13:37:42 GMT
31
+ - Mon, 08 Nov 2021 17:14:13 GMT
32
32
  Content-Length:
33
33
  - '0'
34
34
  body:
35
35
  encoding: UTF-8
36
36
  string: ''
37
- recorded_at: Fri, 29 Oct 2021 13:37:40 GMT
37
+ recorded_at: Mon, 08 Nov 2021 17:14:13 GMT
38
38
  recorded_with: VCR 6.0.0
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = "2.2.6"
5
+ VERSION = "2.3.9"
6
6
  end
7
7
  end
data/lib/ruby/miradore.rb CHANGED
@@ -24,16 +24,21 @@ module Ruby
24
24
  include HTTParty
25
25
  format :json
26
26
 
27
- attr_writer :subdomain, :auth
27
+ attr_writer :subdomain, :auth, :json
28
28
 
29
29
  def initialize(json = {})
30
30
  super json
31
31
  @subdomain ||= json[:subdomain]
32
32
  @auth ||= json[:auth]
33
+ @json ||= json.to_json
33
34
  remove_instance_variable(:@subdomain) if @subdomain.nil?
34
35
  remove_instance_variable(:@auth) if @auth.nil?
35
36
  end
36
37
 
38
+ def as_json(options = nil)
39
+ @json
40
+ end
41
+
37
42
  class << self
38
43
  #
39
44
  # This call will perform all GET calls regardless the API version that it's calling.
@@ -144,12 +149,8 @@ module Ruby
144
149
  !!invdevice&.imei
145
150
  end
146
151
 
147
- def patch(**args)
148
- http_method(args.merge(method: __method__))
149
- end
150
-
151
- def post(**args)
152
- http_method(args.merge(method: __method__))
152
+ def call(**args)
153
+ http_method(args)
153
154
  end
154
155
 
155
156
  private
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: 2.2.6
4
+ version: 2.3.9
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-07 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport