mackerel-rb 0.4.1 → 0.5.0

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
- SHA1:
3
- metadata.gz: 32323632228dbd106d4ba454597a372d7ae190d9
4
- data.tar.gz: 6c7b1bf7ff4e1c8857fe3014ce9d46375a0211fb
2
+ SHA256:
3
+ metadata.gz: a8fbb4521a27ea681c95ee422f0b4a68dbc36f12f37fc7c3ce2e174b3069f79d
4
+ data.tar.gz: 7eb405842cc75649718381ac29ded71bbef040e6eba9b4e51b6d26d16aae01a2
5
5
  SHA512:
6
- metadata.gz: 1cfe893cf2162db2b82577da6d1efb39517b009802e65910e4bc085b796d48aace9e63904cfd43bad1d3a71d8aa42fded56f3caf775e522885192a8ae139e0f8
7
- data.tar.gz: 1fb31dbe74b5608e57ba226219b43f475c023d9926823db26e7dfc13a54073402188749db6b893ffaead835deea18ecea7fc6ec2d2f7685d4d0cb6fe12e62fcb
6
+ metadata.gz: 86c46a047c2ef7f8555930c3916febe25f32bb6efc36eb8d89822c91ec5764d07c26f18e8c737579067323f2a9c235cb32d84e5354c637d0cc5bde4449dc8b6c
7
+ data.tar.gz: de81d6fb9a1bbb495cc5d7178d2c9094cae19bd5575e59cb4471afeaaf29eb75854e9cd552c12154620bcdbc8e1c537efdfaba99d7ce44029c77d5ad3de5a963
data/README.md CHANGED
@@ -69,6 +69,7 @@ end
69
69
 
70
70
  - [ ] Register monitor configurations - `POST/api/v0/monitors`
71
71
  - [x] Get monitor configurations - `GET/api/v0/monitors`
72
+ - [x] Get monitor configurations - `GET/api/v0/monitors/<monitorId>`
72
73
  - [ ] Update monitor configurations - `PUT/api/v0/monitors/<monitorId>`
73
74
  - [ ] Delete monitor configurations - `DELETE/api/v0/monitors/<monitorId>`
74
75
 
@@ -85,6 +86,10 @@ end
85
86
  - [x] List of Alerts - `GET/api/v0/alerts`
86
87
  - [x] Closing Alert - `POST/api/v0/alerts/<alertId>/close`
87
88
 
89
+ #### Organization
90
+
91
+ - [x] Getting Organization - `GET/api/v0/org`
92
+
88
93
  ## Contributing
89
94
 
90
95
  1. Fork it ( https://github.com/pepabo/mackerel-rb/fork )
@@ -9,6 +9,7 @@ require 'mackerel/client/service'
9
9
  require 'mackerel/client/service_tsdb'
10
10
  require 'mackerel/client/monitor'
11
11
  require 'mackerel/client/monitoring_check_report'
12
+ require 'mackerel/client/org'
12
13
  require 'mackerel/client/role'
13
14
  require 'mackerel/client/alert'
14
15
  require 'mackerel/response/raise_error'
@@ -24,6 +25,7 @@ module Mackerel
24
25
  include Client::HostRoles
25
26
  include Client::Monitor
26
27
  include Client::MonitoringCheckReport
28
+ include Client::Org
27
29
  include Client::Tsdb
28
30
  include Client::Service
29
31
  include Client::ServiceTsdb
@@ -5,6 +5,11 @@ module Mackerel
5
5
  response = get 'monitors', options
6
6
  response.body.monitors
7
7
  end
8
+
9
+ def monitor(id)
10
+ response = get "monitors/#{id}"
11
+ response.body.monitor
12
+ end
8
13
  end
9
14
  end
10
15
  end
@@ -0,0 +1,10 @@
1
+ module Mackerel
2
+ class Client
3
+ module Org
4
+ def org
5
+ response = get 'org'
6
+ response.body
7
+ end
8
+ end
9
+ end
10
+ end
@@ -1,3 +1,3 @@
1
1
  module Mackerel
2
- VERSION = "0.4.1"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mackerel-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mizokami
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-22 00:00:00.000000000 Z
11
+ date: 2018-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -135,6 +135,7 @@ files:
135
135
  - lib/mackerel/client/host_status.rb
136
136
  - lib/mackerel/client/monitor.rb
137
137
  - lib/mackerel/client/monitoring_check_report.rb
138
+ - lib/mackerel/client/org.rb
138
139
  - lib/mackerel/client/role.rb
139
140
  - lib/mackerel/client/service.rb
140
141
  - lib/mackerel/client/service_tsdb.rb
@@ -168,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
169
  version: '0'
169
170
  requirements: []
170
171
  rubyforge_project:
171
- rubygems_version: 2.4.5
172
+ rubygems_version: 2.7.6
172
173
  signing_key:
173
174
  specification_version: 4
174
175
  summary: Yet another mackerel client for Ruby.