os 1.1.1 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +15 -0
- data/Gemfile.lock +0 -9
- data/Rakefile +7 -2
- data/VERSION +1 -1
- data/lib/os.rb +3 -3
- data/os.gemspec +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ceda108b09b3210f4cab0b411d8fe76bb69c74b3054a86e15ba533074086ffe
|
4
|
+
data.tar.gz: c59bede2a6e772a83b13543951b7824a1811c376c1e313e16ec20e96a37f7986
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b574706218e68b4ce5d9d9c82abb967032ec5fa1d4363c268cbd89e3261955de0d8e0c56834d6e813c06b23900cade81087b86ff52f166418ab339d03ced7197
|
7
|
+
data.tar.gz: 6a692f3db11e912c795a66450a1e2ae70e9819c2f079b956584339f0be0b7241204cacf10153dd8e57e2b9ab4eb9730603d323ddfa801509774f24279435733c
|
data/ChangeLog
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
1.1.4
|
2
|
+
Fix circular dependency
|
3
|
+
|
4
|
+
1.1.2
|
5
|
+
Make rss_bytes return bytes in linux/OS X, like it always should have
|
6
|
+
|
7
|
+
1.1.1
|
8
|
+
fix skip blank lines in OS#parse_os_release
|
9
|
+
|
10
|
+
1.1.0
|
11
|
+
Add app_config_path method
|
12
|
+
Cleans up dev dependency specs
|
13
|
+
Detect underlying Docker containers method
|
14
|
+
Add Linux-specific OS#parse_os_release method
|
15
|
+
|
1
16
|
1.0.1
|
2
17
|
add within docker method
|
3
18
|
|
data/Gemfile.lock
CHANGED
@@ -9,14 +9,6 @@ GEM
|
|
9
9
|
diff-lcs (1.1.3)
|
10
10
|
power_assert (1.0.2)
|
11
11
|
rake (0.9.6)
|
12
|
-
rspec (2.5.0)
|
13
|
-
rspec-core (~> 2.5.0)
|
14
|
-
rspec-expectations (~> 2.5.0)
|
15
|
-
rspec-mocks (~> 2.5.0)
|
16
|
-
rspec-core (2.5.2)
|
17
|
-
rspec-expectations (2.5.0)
|
18
|
-
diff-lcs (~> 1.1.2)
|
19
|
-
rspec-mocks (2.5.0)
|
20
12
|
test-unit (3.2.3)
|
21
13
|
power_assert
|
22
14
|
|
@@ -25,7 +17,6 @@ PLATFORMS
|
|
25
17
|
x86-mingw32
|
26
18
|
|
27
19
|
DEPENDENCIES
|
28
|
-
os!
|
29
20
|
rake (~> 0.8)
|
30
21
|
rspec (~> 2.5.0)
|
31
22
|
test-unit (~> 3)
|
data/Rakefile
CHANGED
@@ -1,9 +1,14 @@
|
|
1
1
|
require 'rubygems' if RUBY_VERSION < '1.9.0'
|
2
2
|
|
3
|
+
# HOW TO DEPLOY
|
4
|
+
# bump VERSION file manually
|
5
|
+
# rake release seems all messed up, doesn't publish it anyway...
|
3
6
|
# Don't forget to run rake gemspec with each release! ... I think...
|
4
|
-
# then manually edit os.gemspec remove duplicatee rspecs, circular dependency? HUH?
|
7
|
+
# then manually edit os.gemspec remove duplicatee rspecs, circular dependency on os? HUH?
|
5
8
|
# # then gem build os.gemspec
|
6
9
|
# rake build doesn't work???
|
10
|
+
# sooo...
|
11
|
+
# ...gem push os-1.1.2.gem
|
7
12
|
|
8
13
|
begin
|
9
14
|
require 'jeweler'
|
@@ -17,7 +22,7 @@ begin
|
|
17
22
|
gem.license = "MIT"
|
18
23
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
19
24
|
# gem.add_development_dependency "fast_require"
|
20
|
-
gem.add_development_dependency "rspec", ">= 2.0"
|
25
|
+
# gem.add_development_dependency "rspec", ">= 2.0"
|
21
26
|
end
|
22
27
|
rescue LoadError => e
|
23
28
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler #{e}"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.4
|
data/lib/os.rb
CHANGED
@@ -155,15 +155,15 @@ class OS
|
|
155
155
|
end
|
156
156
|
processes = wmi.ExecQuery("select * from win32_process where ProcessId = #{Process.pid}")
|
157
157
|
memory_used = nil
|
158
|
-
# only allow for one...
|
158
|
+
# only allow for one process...
|
159
159
|
for process in processes
|
160
|
-
raise if memory_used
|
160
|
+
raise "multiple processes same pid?" if memory_used
|
161
161
|
memory_used = process.WorkingSetSize.to_i
|
162
162
|
end
|
163
163
|
memory_used
|
164
164
|
end
|
165
165
|
elsif OS.posix? # linux [though I've heard it works in OS X]
|
166
|
-
`ps -o rss= -p #{Process.pid}`.to_i # in
|
166
|
+
`ps -o rss= -p #{Process.pid}`.to_i * 1024 # in kiloBytes
|
167
167
|
else
|
168
168
|
raise 'unknown rss for this platform'
|
169
169
|
end
|
data/os.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: os 1.1.
|
5
|
+
# stub: os 1.1.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "os".freeze
|
9
|
-
s.version = "1.1.
|
9
|
+
s.version = "1.1.4"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["rdp".freeze, "David McCullars".freeze]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2021-11-07"
|
15
15
|
s.description = "The OS gem allows for some useful and easy functions, like OS.windows? (=> true or false) OS.bits ( => 32 or 64) etc\"".freeze
|
16
16
|
s.email = "rogerpack2005@gmail.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: os
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rdp
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-11-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
101
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.7.6
|
102
|
+
rubygems_version: 2.7.6
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: Simple and easy way to know if you're on windows or not (reliably), as well
|