mackerel-client 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/ci.yml +22 -0
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/VERSION +1 -1
- data/example/03_host.rb +0 -15
- data/lib/mackerel/host.rb +2 -2
- data/lib/mackerel/version.rb +1 -1
- data/spec/mackerel/client_spec.rb +2 -2
- metadata +8 -8
- data/.dependabot/config.yml +0 -5
- data/.travis.yml +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: defff3c3d0b9980e41b4fc6d9cc38c89a28f0093617a3f9bc32b5dc02307b7c3
|
4
|
+
data.tar.gz: 8d72678528c3f43c2c9772b7583fccc40abbe021afb67a89d14214f895542a40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08d0ea5a016ae5cdda43fddfbf57fa9868f05fb42b1ab8cd0f3f630fd4b2eb80e94d19856b4746c215b26784e95e90fcca320fcae7a092b625534319c781f8a0'
|
7
|
+
data.tar.gz: b2e3ca3de0d0e95dfc302a808d4648ed0ded2ebe2445980b4aa6f20007bcb359e6d8d0fcc372e403471892d9ae9481a2448e9ada6e97c8a2da3a3b600db0cd5d
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
pull_request:
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
os: ['ubuntu-20.04', 'macOS-10.15']
|
13
|
+
# See https://github.com/actions/runner/issues/849 for quoting '3.0'
|
14
|
+
ruby: [2.6, 2.7, '3.0']
|
15
|
+
runs-on: ${{ matrix.os }}
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
- uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
22
|
+
- run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v0.10.0 (2021-03-15)
|
4
|
+
|
5
|
+
## Breaking change
|
6
|
+
|
7
|
+
Previously `Host` has `type` attribute, but it is removed.
|
8
|
+
|
9
|
+
* Drop `type` attribute from `Host` and introduce `size` instead #58 (astj)
|
10
|
+
|
3
11
|
## v0.9.0 (2020-01-23)
|
4
12
|
|
5
13
|
* Use Faraday v1.0 #54 (onk)
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# mackerel-client [![
|
1
|
+
# mackerel-client [![CI](https://github.com/mackerelio/mackerel-client-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/mackerelio/mackerel-client-ruby/actions/workflows/ci.yml) [![Gem Version](https://badge.fury.io/rb/mackerel-client.svg)](https://badge.fury.io/rb/mackerel-client)
|
2
2
|
|
3
3
|
mackerel-client is a ruby library to access Mackerel (https://mackerel.io/).
|
4
4
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.10.0
|
data/example/03_host.rb
CHANGED
@@ -14,11 +14,7 @@ pp mc.post_host({
|
|
14
14
|
'agent-revision' => 'bc2f9f6',
|
15
15
|
'agent-version' => '0.6.1',
|
16
16
|
},
|
17
|
-
'type' => 'unknown',
|
18
|
-
'status' => 'working',
|
19
17
|
'memo' => 'test web host',
|
20
|
-
'isRetired' => false,
|
21
|
-
'createdAt' => '1401291970',
|
22
18
|
'roleFullnames' => [
|
23
19
|
'mackerel:web'
|
24
20
|
],
|
@@ -35,11 +31,7 @@ pp mc.post_host({
|
|
35
31
|
'agent-revision' => 'bc2f9f6',
|
36
32
|
'agent-version' => '0.6.1',
|
37
33
|
},
|
38
|
-
'type' => 'unknown',
|
39
|
-
'status' => 'working',
|
40
34
|
'memo' => 'test db host',
|
41
|
-
'isRetired' => false,
|
42
|
-
'createdAt' => '1401291976',
|
43
35
|
'roleFullnames' => [
|
44
36
|
'mackerel:db'
|
45
37
|
],
|
@@ -75,12 +67,7 @@ pp mc.update_host(target_host.id,{
|
|
75
67
|
'agent-revision' => 'bc2f9f6',
|
76
68
|
'agent-version' => '0.6.1',
|
77
69
|
},
|
78
|
-
'type' => 'unknown',
|
79
|
-
'status' => 'working',
|
80
70
|
'memo' => 'test host',
|
81
|
-
'isRetired' => false,
|
82
|
-
'createdAt' => '1401291976',
|
83
|
-
'id' => target_host.id,
|
84
71
|
'roleFullnames' => [
|
85
72
|
'mackerel:db'
|
86
73
|
],
|
@@ -93,5 +80,3 @@ pp mc.update_host(target_host.id,{
|
|
93
80
|
|
94
81
|
# retire the host
|
95
82
|
pp mc.retire_host(target_host.id)
|
96
|
-
|
97
|
-
|
data/lib/mackerel/host.rb
CHANGED
@@ -3,13 +3,13 @@ module Mackerel
|
|
3
3
|
class Host
|
4
4
|
|
5
5
|
MACKEREL_INTERFACE_NAME_PATTERN = /^eth\d/
|
6
|
-
attr_accessor :name, :
|
6
|
+
attr_accessor :name, :size, :status, :memo, :isRetired, :id, :createdAt, :roles, :interfaces, :customIdentifier
|
7
7
|
|
8
8
|
def initialize(args = {})
|
9
9
|
@hash = args
|
10
10
|
@name = args["name"]
|
11
11
|
@meta = args["meta"]
|
12
|
-
@
|
12
|
+
@size = args["size"]
|
13
13
|
@status = args["status"]
|
14
14
|
@memo = args["memo"]
|
15
15
|
@isRetired = args["isRetired"]
|
data/lib/mackerel/version.rb
CHANGED
@@ -125,7 +125,7 @@ RSpec.describe Mackerel::Client do
|
|
125
125
|
'agent-revision' => 'bc2f9f6',
|
126
126
|
'agent-version' => '0.6.1',
|
127
127
|
},
|
128
|
-
'
|
128
|
+
'size' => 'standard',
|
129
129
|
'status' => 'working',
|
130
130
|
'memo' => 'test host',
|
131
131
|
'isRetired' => false,
|
@@ -354,7 +354,7 @@ RSpec.describe Mackerel::Client do
|
|
354
354
|
'agent-revision' => 'bc2f9f6',
|
355
355
|
'agent-version' => '0.6.1',
|
356
356
|
},
|
357
|
-
'
|
357
|
+
'size' => 'standard',
|
358
358
|
'status' => 'working',
|
359
359
|
'memo' => 'test host',
|
360
360
|
'isRetired' => false,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mackerel-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mackerel developer team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -73,10 +73,10 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
-
- ".dependabot
|
76
|
+
- ".github/dependabot.yml"
|
77
|
+
- ".github/workflows/ci.yml"
|
77
78
|
- ".gitignore"
|
78
79
|
- ".rspec"
|
79
|
-
- ".travis.yml"
|
80
80
|
- CHANGELOG.md
|
81
81
|
- Gemfile
|
82
82
|
- LICENSE.txt
|
@@ -136,7 +136,7 @@ homepage: https://mackerel.io/
|
|
136
136
|
licenses:
|
137
137
|
- Apache 2
|
138
138
|
metadata: {}
|
139
|
-
post_install_message:
|
139
|
+
post_install_message:
|
140
140
|
rdoc_options: []
|
141
141
|
require_paths:
|
142
142
|
- lib
|
@@ -151,8 +151,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
155
|
-
signing_key:
|
154
|
+
rubygems_version: 3.2.10
|
155
|
+
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: Mackerel client implemented by Ruby.
|
158
158
|
test_files:
|
data/.dependabot/config.yml
DELETED