mpatch 1.0.2 → 1.1.0
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 +8 -8
- data/VERSION +1 -1
- data/lib/mpatch/process.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2FjYWNhOTlmZTViNTY1NjI2OTEzMTViYjgyOTgxZTA2YzRmODdkNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTI2NDg2YzAwNTViZTcyNGFiNGMyNzcyODlhODI2ODZhNTRiZmIxYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTY2MDU1YThmYzUyMzkyMjhmMzQxZGEzODNmNDJkODkzN2QzOTg1ZmU5NTQ3
|
10
|
+
N2YwNThkOTBkYzRmY2YyMmQ4YWRhYjI3MTcyN2MzNjI4MTIwMjNhNDU5NjE5
|
11
|
+
MDFhZjQ3YmVhMzc2YWZiMDc4MWFiNGRhOWQ4ZTViMDkzMGUyMjI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmY3ZGM1NWIyYmYyZTY3MTkzM2IyOTFhNjRhOWQwMGFhZjU4NTgzMjA4ODg1
|
14
|
+
OGJmYTY1MjJmMDVkZmFlZjY2ZjJmMmMyMDUwNjE3NzVmMDVjMWQyYjVjZDAw
|
15
|
+
MjUyYWE2OWY0OTcwYjA3ZTI0YzI2NTc4YWIwMTlkMTEzYWRiYzA=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
1
|
+
1.1.0
|
data/lib/mpatch/process.rb
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
module Process
|
2
|
+
|
3
|
+
# return a string obj that include the memory usage info
|
4
|
+
def self.memory_usage
|
5
|
+
|
6
|
+
begin
|
7
|
+
return `pmap #{self.pid}`.lines.to_a(
|
8
|
+
).last.chomp.scan(/ *\w* *(\w+)/)[0][0]
|
9
|
+
rescue NoMethodError
|
10
|
+
return nil
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
|
2
16
|
def self.daemonize
|
3
17
|
File.create Application.pid,'a+'
|
4
18
|
File.create Application.log,'a+'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mpatch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Luzsi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a collection of my Ruby monkey patches for making easer to use
|
14
14
|
the basic classes
|