os 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +12 -0
- data/Rakefile +3 -0
- data/VERSION +1 -1
- data/lib/os.rb +3 -3
- data/os.gemspec +6 -3
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e51d0e016a516f4655c222b1642e9877ea2023bae66321507f3786ebc6b73c78
|
4
|
+
data.tar.gz: 6983e6945cf17c37dd164b78894f4b3c9d5126585300908353bd9b7a67009cd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 072112d14a3a675a82dc0099af50a2764f282c002b9a67f89d3fcda3b2f0a9e1c86439430a017fb5abf528618163d3f00d576dd801b470deb6e4fd5529976c63
|
7
|
+
data.tar.gz: e6bfa4bebca4fbec6f9f4a43482980787fdc504d3182e90042bccfe141a8565f5e1a531aaa3773d817c2162d2700acfdbf463f34806039e6e07cdc43bae81b53
|
data/ChangeLog
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
1.1.2
|
2
|
+
Make rss_bytes return bytes in linux/OS X, like it always should have
|
3
|
+
|
4
|
+
1.1.1
|
5
|
+
fix skip blank lines in OS#parse_os_release
|
6
|
+
|
7
|
+
1.1.0
|
8
|
+
Add app_config_path method
|
9
|
+
Cleans up dev dependency specs
|
10
|
+
Detect underlying Docker containers method
|
11
|
+
Add Linux-specific OS#parse_os_release method
|
12
|
+
|
1
13
|
1.0.1
|
2
14
|
add within docker method
|
3
15
|
|
data/Rakefile
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
require 'rubygems' if RUBY_VERSION < '1.9.0'
|
2
2
|
|
3
|
+
# HOW TO DEPLOY
|
3
4
|
# Don't forget to run rake gemspec with each release! ... I think...
|
4
5
|
# then manually edit os.gemspec remove duplicatee rspecs, circular dependency? HUH?
|
5
6
|
# # then gem build os.gemspec
|
6
7
|
# rake build doesn't work???
|
8
|
+
# sooo...
|
9
|
+
# basically these days just adjust this file, and VERSION, push it...
|
7
10
|
|
8
11
|
begin
|
9
12
|
require 'jeweler'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2
|
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.2 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.2"
|
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 = [
|
@@ -46,15 +46,18 @@ Gem::Specification.new do |s|
|
|
46
46
|
s.specification_version = 4
|
47
47
|
|
48
48
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
49
|
+
s.add_runtime_dependency(%q<os>.freeze, [">= 0"])
|
49
50
|
s.add_development_dependency(%q<rake>.freeze, ["~> 0.8"])
|
50
51
|
s.add_development_dependency(%q<test-unit>.freeze, ["~> 3"])
|
51
52
|
s.add_development_dependency(%q<rspec>.freeze, [">= 2.0"])
|
52
53
|
else
|
54
|
+
s.add_dependency(%q<os>.freeze, [">= 0"])
|
53
55
|
s.add_dependency(%q<rake>.freeze, ["~> 0.8"])
|
54
56
|
s.add_dependency(%q<test-unit>.freeze, ["~> 3"])
|
55
57
|
s.add_dependency(%q<rspec>.freeze, [">= 2.0"])
|
56
58
|
end
|
57
59
|
else
|
60
|
+
s.add_dependency(%q<os>.freeze, [">= 0"])
|
58
61
|
s.add_dependency(%q<rake>.freeze, ["~> 0.8"])
|
59
62
|
s.add_dependency(%q<test-unit>.freeze, ["~> 3"])
|
60
63
|
s.add_dependency(%q<rspec>.freeze, [">= 2.0"])
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rdp
|
@@ -9,8 +9,22 @@ 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
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: os
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
14
28
|
- !ruby/object:Gem::Dependency
|
15
29
|
name: rake
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
113
|
version: '0'
|
100
114
|
requirements: []
|
101
115
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.7.6
|
116
|
+
rubygems_version: 2.7.6
|
103
117
|
signing_key:
|
104
118
|
specification_version: 4
|
105
119
|
summary: Simple and easy way to know if you're on windows or not (reliably), as well
|