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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8069c2301665234ac12b6f03bd7a9402c39c40e021eb3684847ab00a99513b56
4
- data.tar.gz: cde3020f373af8c4a99dc56e0d4628ccef73c5984f1ce4042468d05c6a4c491d
3
+ metadata.gz: defff3c3d0b9980e41b4fc6d9cc38c89a28f0093617a3f9bc32b5dc02307b7c3
4
+ data.tar.gz: 8d72678528c3f43c2c9772b7583fccc40abbe021afb67a89d14214f895542a40
5
5
  SHA512:
6
- metadata.gz: b5a2a09b85e2fe29f0ed35be2b81bb53a3e69af68a0e70adcdd6fa928a5b24a2c46147ebe1598f76728948399ad373bde2f1d9e67f42e8c42f20b8157998543b
7
- data.tar.gz: 792c970d2230a6303830488e3537e60ecfe4c55dc6490951ed84840dfef2543dcae146b4082018e7307903b52a1ec045ecce418317aa382859f5c215172db81f
6
+ metadata.gz: '08d0ea5a016ae5cdda43fddfbf57fa9868f05fb42b1ab8cd0f3f630fd4b2eb80e94d19856b4746c215b26784e95e90fcca320fcae7a092b625534319c781f8a0'
7
+ data.tar.gz: b2e3ca3de0d0e95dfc302a808d4648ed0ded2ebe2445980b4aa6f20007bcb359e6d8d0fcc372e403471892d9ae9481a2448e9ada6e97c8a2da3a3b600db0cd5d
@@ -0,0 +1,9 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: weekly
7
+ time: "01:00"
8
+ timezone: Asia/Tokyo
9
+ open-pull-requests-limit: 10
@@ -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 [![Build Status](https://travis-ci.org/mackerelio/mackerel-client-ruby.svg?branch=master)](https://travis-ci.org/mackerelio/mackerel-client-ruby) [![Gem Version](https://badge.fury.io/rb/mackerel-client.png)](http://badge.fury.io/rb/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.9.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, :type, :status, :memo, :isRetired, :id, :createdAt, :roles, :interfaces, :customIdentifier
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
- @type = args["type"]
12
+ @size = args["size"]
13
13
  @status = args["status"]
14
14
  @memo = args["memo"]
15
15
  @isRetired = args["isRetired"]
@@ -1,3 +1,3 @@
1
1
  module Mackerel
2
- VERSION = "0.9.0"
2
+ VERSION = "0.10.0"
3
3
  end
@@ -125,7 +125,7 @@ RSpec.describe Mackerel::Client do
125
125
  'agent-revision' => 'bc2f9f6',
126
126
  'agent-version' => '0.6.1',
127
127
  },
128
- 'type' => 'unknown',
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
- 'type' => 'unknown',
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.9.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: 2020-01-23 00:00:00.000000000 Z
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/config.yml"
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.0.1
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:
@@ -1,5 +0,0 @@
1
- version: 1
2
- update_configs:
3
- - package_manager: ruby:bundler
4
- directory: /
5
- update_schedule: weekly
data/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- language: ruby
2
- before_install:
3
- # https://github.com/travis-ci/travis-ci/issues/3531
4
- - gem install bundler # -v 1.7.14 if a specific version is needed
5
- rvm:
6
- - "2.6"
7
- - "2.5"
8
- - "2.4"
9
- - "2.3"