ruby-miradore 4.1.5 → 4.2.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: '081650d498cce7202921e4949ba0ee278cb284b6658009966e6fedab7d299ea4'
4
- data.tar.gz: 43b9195fbd99ebcfd8cbd7619aff167cbc34189f9ef52c77fd5cb6c0aa6fdf3e
3
+ metadata.gz: fb518a8a63cfa4e58056095564a1ec19bc9e813dba11ac741ecefbf0fede3fb4
4
+ data.tar.gz: 88da70493a33e3a06c815f85c9eaf5d8532021e8a7df7020c1422ee53b6c992f
5
5
  SHA512:
6
- metadata.gz: 2d48752483909e478ad752dfefe64ee2c2325b6d6edbc215568d2a7b54322057c8dfaf5e808473c1da8ff9bf1efb96f7684867d9cb41211d62b1e26ac70ca0e9
7
- data.tar.gz: 63b4391dc8c10e99b3bbc1b5c72c35bf2df735606fadc4b0793e2c53d3fb752545a25bc21f14c5f9c3e75b76a7231af47dbf606af19ea8bded5889c975c8b7f0
6
+ metadata.gz: 4912e132150438b5a08fe30b5c3b6c2c968b6f0514816b9c25f50e764be78522d5bb740c155ca68309f87b2cb5ab61cec65584ee4ba0b8a52346a92d70f51033
7
+ data.tar.gz: 352544d524d5dec3b94fe4aeb13fe56c60965dd42cad8bd95c2a546c1de5ac3149468452ab826d21e72999218122e6ebc596a8fb3260c07435b6ed49ee8ee548
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.0
1
+ 3.1.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-miradore (4.1.5)
4
+ ruby-miradore (4.2.0)
5
5
  activesupport (~> 7.0)
6
6
  builder (~> 3.1)
7
7
  crack (~> 0.4)
@@ -14,7 +14,7 @@ PATH
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- activesupport (7.0.2.2)
17
+ activesupport (7.0.2.3)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 1.6, < 2)
20
20
  minitest (>= 5.1)
@@ -60,13 +60,13 @@ GEM
60
60
  diff-lcs (>= 1.2.0, < 2.0)
61
61
  rspec-support (~> 3.11.0)
62
62
  rspec-support (3.11.0)
63
- rubocop (1.25.1)
63
+ rubocop (1.26.0)
64
64
  parallel (~> 1.10)
65
65
  parser (>= 3.1.0.0)
66
66
  rainbow (>= 2.2.2, < 4.0)
67
67
  regexp_parser (>= 1.8, < 3.0)
68
68
  rexml
69
- rubocop-ast (>= 1.15.1, < 2.0)
69
+ rubocop-ast (>= 1.16.0, < 2.0)
70
70
  ruby-progressbar (~> 1.7)
71
71
  unicode-display_width (>= 1.4.0, < 3.0)
72
72
  rubocop-ast (1.16.0)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = "4.1.5"
5
+ VERSION = "4.2.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|
@@ -134,6 +136,10 @@ module Ruby
134
136
  http_method(**args.merge(method: :post, action: __method__))
135
137
  end
136
138
 
139
+ def retire(**args)
140
+ http_method(**args.merge(method: :delete, id: id, action: nil))
141
+ end
142
+
137
143
  def device_serial_number
138
144
  invdevice.serial_number || invdevice.hardware_serial_number
139
145
  end
@@ -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.0.1")
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.1.1")
16
16
 
17
17
  spec.metadata["allowed_push_host"] = "https://rubygems.org/"
18
18
 
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.1.5
4
+ version: 4.2.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-02-24 00:00:00.000000000 Z
11
+ date: 2022-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -188,14 +188,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
188
  requirements:
189
189
  - - ">="
190
190
  - !ruby/object:Gem::Version
191
- version: 3.0.1
191
+ version: 3.1.1
192
192
  required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  requirements:
194
194
  - - ">="
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  requirements: []
198
- rubygems_version: 3.3.3
198
+ rubygems_version: 3.3.7
199
199
  signing_key:
200
200
  specification_version: 4
201
201
  summary: Miradore is a MSP providing an API to get devices information as well s perform