ruby-miradore 4.2.0 → 4.3.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: c14f13d1988de125e7a13ef06bd020bb02fe01e9c52f6c82e098ef6b12353930
4
- data.tar.gz: 8ca0d9ee5b5e741042eb5837b633261e7d0f80f33a566d504a2f9ba75e3297d8
3
+ metadata.gz: e723736ca0d695530b9e1542255704218bc0393916fb2fb43594f2207da3fb79
4
+ data.tar.gz: b358ae47df701554c332186f0c9b089e0110368710cd9e41387918610ed6ea17
5
5
  SHA512:
6
- metadata.gz: ffbdf1d2de5249d6c31fb60675b91d0477640576a1a836fe64fa4636a28401d044b778a78c8482adc4b6c0b5d32785550fe9d1508f78ac5de53e8190480d115f
7
- data.tar.gz: 7ce63965c9e8706a860d510fb65cca7d1dd46afc271711f5bc9a2abbe0a38c3ef14e6b915da4712dfb56b077d3d2b36ba63927ff8a5f29a4324a79da2f14586f
6
+ metadata.gz: dc59038d193e6ad6392a327ddbf342907f05e4b805914c27c72bf71c41ac6175608cba59dcb20da2df3d1e69e8d1191af269e9f4cc3c08edb942483795616c1b
7
+ data.tar.gz: 4cb5771a916087dbbb2b924890f98117e13ad0222a890e0d225f38caa9cd23190216b90d424646c5f2d6840b16fded3bfe65e81529b250fd670d85d8e8e763a8
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.1
1
+ 3.1.2
data/.travis.yml CHANGED
@@ -2,5 +2,5 @@
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 3.1.0
5
+ - 3.1.2
6
6
  before_install: gem install bundler
data/Gemfile.lock CHANGED
@@ -1,11 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-miradore (4.2.0)
4
+ ruby-miradore (4.3.1)
5
5
  activesupport (~> 7.0)
6
6
  builder (~> 3.1)
7
7
  crack (~> 0.4)
8
- finest-builder (~> 1.0)
8
+ finest-builder (~> 2.0)
9
9
  httparty (~> 0.20)
10
10
  rake (~> 13.0)
11
11
  rspec (~> 3.10)
@@ -14,69 +14,71 @@ PATH
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- activesupport (7.0.2.3)
17
+ activesupport (7.0.4)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 1.6, < 2)
20
20
  minitest (>= 5.1)
21
21
  tzinfo (~> 2.0)
22
- addressable (2.8.0)
23
- public_suffix (>= 2.0.2, < 5.0)
22
+ addressable (2.8.1)
23
+ public_suffix (>= 2.0.2, < 6.0)
24
24
  ast (2.4.2)
25
25
  builder (3.2.4)
26
- concurrent-ruby (1.1.9)
26
+ concurrent-ruby (1.1.10)
27
27
  crack (0.4.5)
28
28
  rexml
29
29
  diff-lcs (1.5.0)
30
- finest-builder (1.1.1)
30
+ finest-builder (2.0.0)
31
31
  hashdiff (1.0.1)
32
32
  httparty (0.20.0)
33
33
  mime-types (~> 3.0)
34
34
  multi_xml (>= 0.5.2)
35
- i18n (1.10.0)
35
+ i18n (1.12.0)
36
36
  concurrent-ruby (~> 1.0)
37
+ json (2.6.2)
37
38
  mime-types (3.4.1)
38
39
  mime-types-data (~> 3.2015)
39
40
  mime-types-data (3.2022.0105)
40
- minitest (5.15.0)
41
+ minitest (5.16.3)
41
42
  multi_xml (0.6.0)
42
- parallel (1.21.0)
43
- parser (3.1.1.0)
43
+ parallel (1.22.1)
44
+ parser (3.1.2.1)
44
45
  ast (~> 2.4.1)
45
- public_suffix (4.0.6)
46
+ public_suffix (5.0.0)
46
47
  rainbow (3.1.1)
47
48
  rake (13.0.6)
48
- regexp_parser (2.2.1)
49
+ regexp_parser (2.6.0)
49
50
  rexml (3.2.5)
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)
51
+ rspec (3.12.0)
52
+ rspec-core (~> 3.12.0)
53
+ rspec-expectations (~> 3.12.0)
54
+ rspec-mocks (~> 3.12.0)
55
+ rspec-core (3.12.0)
56
+ rspec-support (~> 3.12.0)
57
+ rspec-expectations (3.12.0)
57
58
  diff-lcs (>= 1.2.0, < 2.0)
58
- rspec-support (~> 3.11.0)
59
- rspec-mocks (3.11.0)
59
+ rspec-support (~> 3.12.0)
60
+ rspec-mocks (3.12.0)
60
61
  diff-lcs (>= 1.2.0, < 2.0)
61
- rspec-support (~> 3.11.0)
62
- rspec-support (3.11.0)
63
- rubocop (1.26.0)
62
+ rspec-support (~> 3.12.0)
63
+ rspec-support (3.12.0)
64
+ rubocop (1.39.0)
65
+ json (~> 2.3)
64
66
  parallel (~> 1.10)
65
- parser (>= 3.1.0.0)
67
+ parser (>= 3.1.2.1)
66
68
  rainbow (>= 2.2.2, < 4.0)
67
69
  regexp_parser (>= 1.8, < 3.0)
68
- rexml
69
- rubocop-ast (>= 1.16.0, < 2.0)
70
+ rexml (>= 3.2.5, < 4.0)
71
+ rubocop-ast (>= 1.23.0, < 2.0)
70
72
  ruby-progressbar (~> 1.7)
71
73
  unicode-display_width (>= 1.4.0, < 3.0)
72
- rubocop-ast (1.16.0)
74
+ rubocop-ast (1.23.0)
73
75
  parser (>= 3.1.1.0)
74
76
  ruby-progressbar (1.11.0)
75
- tzinfo (2.0.4)
77
+ tzinfo (2.0.5)
76
78
  concurrent-ruby (~> 1.0)
77
- unicode-display_width (2.1.0)
78
- vcr (6.0.0)
79
- webmock (3.14.0)
79
+ unicode-display_width (2.3.0)
80
+ vcr (6.1.0)
81
+ webmock (3.18.1)
80
82
  addressable (>= 2.8.0)
81
83
  crack (>= 0.3.2)
82
84
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -91,4 +93,4 @@ DEPENDENCIES
91
93
  webmock
92
94
 
93
95
  BUNDLED WITH
94
- 2.3.3
96
+ 2.3.25
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = "4.2.0"
5
+ VERSION = "4.3.1"
6
6
  end
7
7
  end
data/lib/ruby/miradore.rb CHANGED
@@ -52,7 +52,7 @@ module Ruby
52
52
  transform(
53
53
  Crack::XML.parse(
54
54
  http_method_v1(**args.merge(attribute: 'ID')).body
55
- )['Content']
55
+ )['Content'], args
56
56
  )
57
57
  end
58
58
 
@@ -75,6 +75,8 @@ module Ruby
75
75
  end
76
76
 
77
77
  def transform(res, args = {})
78
+ return res if args.fetch(:skip_transform, false)
79
+
78
80
  args.merge!({ subdomain: args.fetch(:subdomain, @subdomain), auth: args.fetch(:auth, @auth) })
79
81
  if res.values.first.is_a?(Array)
80
82
  return res.values.first.map! do |e|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "Miradore MSP Ruby Gem"
13
13
  spec.homepage = "https://github.com/eddygarcas/ruby-miradore"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = Gem::Requirement.new(">= 3.1.1")
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.1.2")
16
16
 
17
17
  spec.metadata["allowed_push_host"] = "https://rubygems.org/"
18
18
 
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency "activesupport", "~> 7.0"
35
35
  spec.add_dependency 'builder', '~> 3.1'
36
36
  spec.add_dependency "crack", "~> 0.4"
37
- spec.add_dependency "finest-builder", "~> 1.0"
37
+ spec.add_dependency "finest-builder", "~> 2.0"
38
38
  spec.add_dependency "httparty", "~> 0.20"
39
39
  spec.add_dependency "rake", "~> 13.0"
40
40
  spec.add_dependency "rspec", "~> 3.10"
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.2.0
4
+ version: 4.3.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: 2022-03-18 00:00:00.000000000 Z
11
+ date: 2022-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.0'
61
+ version: '2.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.0'
68
+ version: '2.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: httparty
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -143,8 +143,6 @@ files:
143
143
  - Rakefile
144
144
  - bin/console
145
145
  - bin/setup
146
- - fixtures/vcr_cassettes/Change_User_Email_Address.yml
147
- - fixtures/vcr_cassettes/Change_User_Email_Address_Error.yml
148
146
  - fixtures/vcr_cassettes/Change_User_Email_Address_Without_v1.yml
149
147
  - fixtures/vcr_cassettes/Get_Device_Location.yml
150
148
  - fixtures/vcr_cassettes/Get__Mobile_Device.yml
@@ -188,7 +186,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
186
  requirements:
189
187
  - - ">="
190
188
  - !ruby/object:Gem::Version
191
- version: 3.1.1
189
+ version: 3.1.2
192
190
  required_rubygems_version: !ruby/object:Gem::Requirement
193
191
  requirements:
194
192
  - - ">="
@@ -1,45 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: patch
5
- uri: https://test634.online.miradore.com/API/v2/Device/13/
6
- body:
7
- encoding: UTF-8
8
- string: '{"userEmailAddress":"eduard@rzilient.club"}'
9
- headers:
10
- Content-Type:
11
- - application/json
12
- Accept:
13
- - application/json
14
- X-Api-Key:
15
- - 1_8,Yo-TV8QyCiBUF
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- User-Agent:
19
- - Ruby
20
- response:
21
- status:
22
- code: 400
23
- message: Bad Request
24
- headers:
25
- Content-Type:
26
- - application/json; charset=utf-8
27
- Server:
28
- - Microsoft-IIS/10.0
29
- X-Content-Type-Options:
30
- - nosniff
31
- X-Frame-Options:
32
- - SAMEORIGIN
33
- Referrer-Policy:
34
- - same-origin
35
- Strict-Transport-Security:
36
- - max-age=31536000; includeSubDomains
37
- Date:
38
- - Thu, 24 Feb 2022 15:33:21 GMT
39
- Content-Length:
40
- - '2'
41
- body:
42
- encoding: UTF-8
43
- string: "{}"
44
- recorded_at: Thu, 24 Feb 2022 15:33:22 GMT
45
- recorded_with: VCR 6.0.0
@@ -1,40 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: patch
5
- uri: https://rzilient.online.miradore.com/API/v2/Device//
6
- body:
7
- encoding: UTF-8
8
- string: '{"userEmailAddress":"eduard@rzilient.club"}'
9
- headers:
10
- Content-Type:
11
- - application/json
12
- Accept:
13
- - application/json
14
- X-Api-Key:
15
- -
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- User-Agent:
19
- - Ruby
20
- response:
21
- status:
22
- code: 404
23
- message: Not Found
24
- headers:
25
- Content-Type:
26
- - text/plain
27
- Server:
28
- - Microsoft-IIS/10.0
29
- X-Frame-Options:
30
- - SAMEORIGIN
31
- - SAMEORIGIN
32
- Date:
33
- - Fri, 29 Oct 2021 13:37:41 GMT
34
- Content-Length:
35
- - '527'
36
- body:
37
- encoding: UTF-8
38
- string: 'Status Code: 404; Not Found '
39
- recorded_at: Fri, 29 Oct 2021 13:37:39 GMT
40
- recorded_with: VCR 6.0.0