swapus 1.0.1 → 1.0.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.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +1 -1
  4. data/VERSION +1 -1
  5. data/bin/swapus +1 -1
  6. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26e3d01060b648dbb90a40a718c9c391b662136c
4
- data.tar.gz: b870379263609bb788609cdbf35b3784186008f8
3
+ metadata.gz: a50a505a0b802b5ee8c4d06f7a8d4627fd81a6d4
4
+ data.tar.gz: 0a7925bddceb4f0f8f42ea1682db102522d7b40d
5
5
  SHA512:
6
- metadata.gz: 128538fe103af350af5fc58cbef0eafc86a3eb4d3341f3aa66b40c4e4d302bf367ac79d8e7c8d1f9e808d6ab95ec514eefc36248f8d339b81b9f324c3a2f51d5
7
- data.tar.gz: 8cf5b4465fa891581ec301352483d385475d91498d346c68b4e888242be629acae2b328835bf1281f0d4256dd98c654f64c576e54b58547081c8c2ecc7a571a0
6
+ metadata.gz: 5639d4ccf1eb57a8dc0f542c6296a7ffe6b55a03df023f7e4c85d203aa69ad9dc8c4cb5a2d469c1b05f7d0d011fcd92595b87f32081d3f8fb22b33f19414a424
7
+ data.tar.gz: 361fb57f1cb38a199e27e4abf8998db890575e9118c01220ab43fcb87fca2dabd27ef57819d58fcffc92843acf88190d4e71ea32bd5586ccc859f96c9a508043
data/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright {yyyy} {name of copyright owner}
189
+ Copyright 2017 Adrien Waksberg
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Swapus
2
- [![Version](https://img.shields.io/badge/latest_version-1.0.1-green.svg)](https://github.com/nishiki/swapus/releases)
2
+ [![Version](https://img.shields.io/badge/latest_version-1.0.2-green.svg)](https://github.com/nishiki/swapus/releases)
3
3
  [![Build Status](https://travis-ci.org/nishiki/swapus.svg?branch=master)](https://travis-ci.org/nishiki/swapus)
4
4
  [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://github.com/nishiki/swapus/blob/master/LICENSE)
5
5
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
data/bin/swapus CHANGED
@@ -24,7 +24,7 @@ class SwapUsage
24
24
  def get_processes
25
25
  Dir['/proc/[0-9]*'].map do |pid_dir|
26
26
  pid = File.basename(pid_dir).to_i
27
- cmd = File.read("#{pid_dir}/cmdline").tr('\0', ' ')
27
+ cmd = File.read("#{pid_dir}/cmdline").tr("\x00", ' ').strip
28
28
  swap = File.read("#{pid_dir}/status")[/^VmSwap:\s+([0-9]+)\s+kB$/, 1].to_i
29
29
 
30
30
  @processes[pid] = { cmd: cmd, swap: swap } if swap.positive?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swapus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Waksberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-10 00:00:00.000000000 Z
11
+ date: 2018-02-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
47
  version: '0'
48
48
  requirements: []
49
49
  rubyforge_project:
50
- rubygems_version: 2.6.12
50
+ rubygems_version: 2.6.11
51
51
  signing_key:
52
52
  specification_version: 4
53
53
  summary: Swapus is a little software to get processes who use swap.