fluent-plugin-specinfra_inventory 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: 3c9298f6319f6d53a76d0df249610c062c8f943c
4
- data.tar.gz: 8c9ec9f5d57893d19f15e70500781bc765f5ac9d
3
+ metadata.gz: 4d769fc4785bae5e9fb1eb018ea939ff99692074
4
+ data.tar.gz: a561ced203709b9e2a38266f5e1fd4bdbb878605
5
5
  SHA512:
6
- metadata.gz: 45ed2d49b08f0172b6c9af7a93a667566503cfd66a12b3f9e5ff7f5b8eff63cc3ff5ebd9f7bb613acc37fa2c19fe915b9cb64a8aedbf8ce73807e3cebe0bd2f0
7
- data.tar.gz: d1b88e2d21aa0e83f8120dd36716da03fb255b6f9f33b03cbe50c110ab9984289f33b981c8ec6c5990abeed86a1ec71ef4238b0b0f7c3043aa7e945aba74faa1
6
+ metadata.gz: 002a491c838f02020aa747ab68eadee955988217855de1beb5a8bc4bf29fd92dba49a15aa9ac4ad3e31f9499bb5f8f2ff973d00ea88db1a94d113ce2c69d262c
7
+ data.tar.gz: ce340754872b1e544cd96c2b15ab9a332c5763932176373e75e06a3121a1719efeac17206ec696f34343640126233e17714fc53a1c23c70ea59145a3b0e8534d
@@ -1,3 +1,7 @@
1
+ ## 0.2.1
2
+
3
+ * Bug fix
4
+
1
5
  ## 0.2.0
2
6
 
3
7
  * Add `cast_num` option
@@ -125,7 +125,7 @@ module Fluent
125
125
 
126
126
  def _cast_byte(v)
127
127
  m = v.match(/^(\d+)(kb|KB)$/)
128
- m.nil? ? v : m[0].to_i * 1000
128
+ m.nil? ? v : m[0].to_i * 1024
129
129
  end
130
130
 
131
131
  def _cast_percent(v)
@@ -1,7 +1,7 @@
1
1
  module Fluent
2
2
  module Plugin
3
3
  module SpecinfraInventory
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
6
6
  end
7
7
  end
@@ -66,7 +66,7 @@ describe Fluent::SpecinfraInventoryInput do
66
66
 
67
67
  describe "record on nested hash" do
68
68
  example { expect(@d.instance.record("cpu.0")['cpu.0']).to include('vendor_id' => 1) }
69
- example { expect(@d.instance.record("cpu.0")['cpu.0']).to include('cache_size' => 512000) }
69
+ example { expect(@d.instance.record("cpu.0")['cpu.0']).to include('cache_size' => 524288) }
70
70
  end
71
71
 
72
72
  describe "cast_num" do
@@ -80,7 +80,7 @@ describe Fluent::SpecinfraInventoryInput do
80
80
  describe "cast_byte" do
81
81
  example { expect(@d.instance._cast_byte("12")).to eq "12" }
82
82
  example { expect(@d.instance._cast_byte("0kb")).to eq 0 }
83
- example { expect(@d.instance._cast_byte("99kb")).to eq 99000 }
83
+ example { expect(@d.instance._cast_byte("99kb")).to eq 101376 }
84
84
  example { expect(@d.instance._cast_byte("akb")).to eq "akb" }
85
85
  example { expect(@d.instance._cast_byte("1%")).to eq "1%" }
86
86
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-specinfra_inventory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masashi Terui