wazuh-rb 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55ac348cc1559633d548b387f8a3cab9a66c52b1c8396f0f6aad69d4300a168f
4
- data.tar.gz: 65d7426b5afab890dcf7d6729e971fffbc7bfaa73085002d3dd8c5d9ab06dde8
3
+ metadata.gz: d2f7fdefc6c4fed2d136b3e01930f365744ecfc3f28ef5a9d8a70a2aee1e4243
4
+ data.tar.gz: c7122389bb9f69f7f0246e5f9b3002e6a0f31ccb258f418406ce5b37cb40ac8d
5
5
  SHA512:
6
- metadata.gz: e4b3b6941ee7e112f7d39d089572f77b7520fe7ef148f89c8856bf54bf66c5034e2409f01ed49630e5ccb0466e597ccc4673e6a5f4f3a87b9bab22fc1549fdc7
7
- data.tar.gz: 19f21172d46cb99a8f1243f2e94e022a30fa701a956838df84125b1df301978d8b30ba78527b9349ab4530c5d1825bef3f6750da3f8d9dc5e50201d401ca3a6a
6
+ metadata.gz: 730e551505ddd7a7ad183825d311462071edee56822361f3699755c86ae6aac2158d22df6c1cb5cc785e40cdfae311f1608b96887587daf107d99e5f8b81f57e
7
+ data.tar.gz: cf285c41676e31911c3f7b25dbe95ae1ab2adadf321828aa7ab3a9a24f5dd2e645ac39df91b62b1b8f7ce498599413cb131bcc18c6ab386cc214b8fd4bc1a2f2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wazuh-rb (0.2.0)
4
+ wazuh-rb (0.2.1)
5
5
  faraday
6
6
  faraday_middleware
7
7
  thor
@@ -3,7 +3,12 @@ module Wazuh
3
3
  module Agents
4
4
  def agents(options = {})
5
5
  response = get 'agents', options
6
- response.body["data"]["items"]
6
+ response.body["data"]
7
+ end
8
+
9
+ def delete_agents(options = {})
10
+ response = delete 'agents', options
11
+ response.body["data"]
7
12
  end
8
13
  end
9
14
  end
@@ -22,9 +22,10 @@ module Wazuh
22
22
  end
23
23
  end
24
24
 
25
- def delete(url)
25
+ def delete(url, params = {})
26
26
  connection.delete(url) do |req|
27
27
  req.headers['Content-Type'] = 'application/json'
28
+ req.body = params.to_json
28
29
  end
29
30
  end
30
31
 
data/lib/wazuh/error.rb CHANGED
@@ -12,7 +12,7 @@ module Wazuh
12
12
  when 500..599 then ServerError
13
13
  end
14
14
 
15
- raise response.body["message"] if response.body["error"]
15
+ raise response.body["message"] if response.body["error"] != 0
16
16
  klass.new(response) if klass
17
17
  end
18
18
 
data/lib/wazuh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wazuh
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wazuh-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - pyama86
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-10 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor