rps 0.0.1 → 0.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 (5) hide show
  1. data/README.rdoc +6 -1
  2. data/bin/rps +3 -0
  3. data/lib/rps.rb +11 -1
  4. data/lib/rps/version.rb +1 -1
  5. metadata +2 -2
@@ -6,7 +6,12 @@ ps for Ruby processes. Linux only at the moment.
6
6
 
7
7
  $ rps
8
8
 
9
- = Description
9
+ = TODO:
10
+
11
+ * BSD/OS X ?
12
+ - FFI
13
+ - kvm_getprocs() http://www.manpages.info/macosx/kvm_getprocs.3.html
14
+ - http://www.opensource.apple.com/source/adv_cmds/adv_cmds-138.1/ps/
10
15
 
11
16
  == Note on Patches/Pull Requests
12
17
 
data/bin/rps CHANGED
@@ -1,4 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "rps"
4
+
5
+ RPS.check_platform
6
+
4
7
  RPS::CLI.new(ARGV).run
data/lib/rps.rb CHANGED
@@ -1,5 +1,15 @@
1
+ require "rbconfig"
2
+
1
3
  module RPS
2
- # Your code goes here...
4
+ def self.os
5
+ @os ||= RbConfig::CONFIG['host_os']
6
+ end
7
+
8
+ def self.check_platform
9
+ unless os =~ /linux/i
10
+ abort "rps only works on linux at the moment"
11
+ end
12
+ end
3
13
  end
4
14
 
5
15
  require "rps/cli"
@@ -1,3 +1,3 @@
1
1
  module RPS
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jari Bakken