machine 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cfb7c20991449ccff51f78bde3b2568dc4c277fd
4
+ data.tar.gz: 051e5c64d7076ba43e4205d4219a85bbc758e236
5
+ SHA512:
6
+ metadata.gz: 9ceb3124d8bdbb9edda0953eae07ecde0530d9f96d02d56e043bca0c03d75fccea102796d9eeef87cc3ef1429b02db145d7313eec3065559680da31b561fbfc3
7
+ data.tar.gz: ff5db3bd775af110bff27972c45e2126677c87e259da9cbbc6475a257f77eae2a22fe5d23a8c6d85c68441d2e7d5a9fe87fddd8a84fe6f9adb35730e56ccb8ae
@@ -21,5 +21,10 @@ module Machine
21
21
  end
22
22
  end
23
23
  end
24
+
25
+ module Helpers
26
+ def created_at
27
+ end
28
+ end
24
29
  end
25
30
 
@@ -21,4 +21,10 @@ module Machine
21
21
  end
22
22
  end
23
23
  end
24
+
25
+ module Helpers
26
+ def created_at
27
+ @created_at ||= File.ctime("/proc/#{pid}")
28
+ end
29
+ end
24
30
  end
@@ -5,9 +5,12 @@ require 'delegate'
5
5
  module Machine
6
6
  class ProcessStatus < SimpleDelegator
7
7
  include Sys
8
+ include Helpers
9
+
10
+ attr_reader :pid
8
11
 
9
12
  def initialize(pid)
10
- super ProcTable.ps(pid)
13
+ super ProcTable.ps(@pid = pid)
11
14
  end
12
15
 
13
16
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Machine
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
metadata CHANGED
@@ -1,30 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: machine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - chatgris
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-24 00:00:00.000000000 Z
11
+ date: 2013-03-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: sys-proctable
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  description: Machine collects some informations about cpu, memory, processes.
@@ -45,26 +42,25 @@ files:
45
42
  - lib/machine/version.rb
46
43
  homepage: http://chatgris.github.com/machine
47
44
  licenses: []
45
+ metadata: {}
48
46
  post_install_message:
49
47
  rdoc_options: []
50
48
  require_paths:
51
49
  - lib
52
50
  required_ruby_version: !ruby/object:Gem::Requirement
53
- none: false
54
51
  requirements:
55
- - - ! '>='
52
+ - - '>='
56
53
  - !ruby/object:Gem::Version
57
54
  version: '0'
58
55
  required_rubygems_version: !ruby/object:Gem::Requirement
59
- none: false
60
56
  requirements:
61
- - - ! '>='
57
+ - - '>='
62
58
  - !ruby/object:Gem::Version
63
59
  version: '0'
64
60
  requirements: []
65
61
  rubyforge_project:
66
- rubygems_version: 1.8.24
62
+ rubygems_version: 2.0.0
67
63
  signing_key:
68
- specification_version: 3
64
+ specification_version: 4
69
65
  summary: Machine collects some informations about cpu, memory, processes.
70
66
  test_files: []