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 +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +4 -4
- data/lib/ruby/miradore/version.rb +1 -1
- data/lib/ruby/miradore.rb +7 -1
- data/ruby-miradore.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb518a8a63cfa4e58056095564a1ec19bc9e813dba11ac741ecefbf0fede3fb4
|
4
|
+
data.tar.gz: 88da70493a33e3a06c815f85c9eaf5d8532021e8a7df7020c1422ee53b6c992f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4912e132150438b5a08fe30b5c3b6c2c968b6f0514816b9c25f50e764be78522d5bb740c155ca68309f87b2cb5ab61cec65584ee4ba0b8a52346a92d70f51033
|
7
|
+
data.tar.gz: 352544d524d5dec3b94fe4aeb13fe56c60965dd42cad8bd95c2a546c1de5ac3149468452ab826d21e72999218122e6ebc596a8fb3260c07435b6ed49ee8ee548
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.
|
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.
|
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.
|
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.
|
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.
|
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)
|
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
|
data/ruby-miradore.gemspec
CHANGED
@@ -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.
|
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
|
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-
|
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.
|
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.
|
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
|