os 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3 -0
- data/LICENSE +8 -0
- data/README.rdoc +3 -1
- data/VERSION +1 -1
- data/lib/os.rb +2 -2
- metadata +62 -53
data/ChangeLog
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
Copyright (c) 2012 Roger Pack
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
5
|
+
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
7
|
+
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
CHANGED
@@ -68,4 +68,6 @@ the facets gem (has a class similar to rubygems, above)
|
|
68
68
|
|
69
69
|
the "platform" gem, itself (a different gem)
|
70
70
|
|
71
|
-
The reason Gem::Platform.local felt wrong to me is that it treated cygwin as windows--which for most build environments, is wrong. Hence the creation of this.
|
71
|
+
The reason Gem::Platform.local felt wrong to me is that it treated cygwin as windows--which for most build environments, is wrong. Hence the creation of this.
|
72
|
+
|
73
|
+
License: MIT (see LICENSE file)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.6
|
data/lib/os.rb
CHANGED
@@ -228,8 +228,8 @@ class OS
|
|
228
228
|
if RbConfig::CONFIG['host_os'] =~ /darwin/
|
229
229
|
(hwprefs_available? ? `hwprefs thread_count` : `sysctl -n hw.ncpu`).to_i
|
230
230
|
elsif self.windows?
|
231
|
-
# counts hyper threaded...not good.
|
232
|
-
|
231
|
+
# ENV counts hyper threaded...not good.
|
232
|
+
# out = ENV['NUMBER_OF_PROCESSORS'].to_i
|
233
233
|
require 'win32ole'
|
234
234
|
wmi = WIN32OLE.connect("winmgmts://")
|
235
235
|
cpu = wmi.ExecQuery("select NumberOfCores from Win32_Processor") # don't count hyper-threaded in this
|
metadata
CHANGED
@@ -1,73 +1,82 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: os
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.5
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.9.6
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
- rdp
|
9
|
-
- David McCullars
|
7
|
+
authors:
|
8
|
+
- rdp
|
9
|
+
- David McCullars
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
13
|
+
|
14
|
+
date: 2012-02-17 00:00:00 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: rspec
|
18
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "2.0"
|
24
|
+
requirement: *id001
|
25
|
+
prerelease: false
|
26
|
+
type: :development
|
27
|
+
description: The OS gem allows for some useful and easy functions, like OS.windows? (=> true or false) OS.bits ( => 32 or 64) etc"
|
28
28
|
email: rogerpack2005@gmail.com
|
29
29
|
executables: []
|
30
|
+
|
30
31
|
extensions: []
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
-
|
35
|
-
- .
|
36
|
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
-
|
40
|
-
-
|
41
|
-
-
|
42
|
-
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
-
|
46
|
-
-
|
47
|
-
-
|
32
|
+
|
33
|
+
extra_rdoc_files:
|
34
|
+
- ChangeLog
|
35
|
+
- LICENSE
|
36
|
+
- README.rdoc
|
37
|
+
files:
|
38
|
+
- .autotest
|
39
|
+
- .document
|
40
|
+
- ChangeLog
|
41
|
+
- Gemfile
|
42
|
+
- Gemfile.lock
|
43
|
+
- LICENSE
|
44
|
+
- README.rdoc
|
45
|
+
- Rakefile
|
46
|
+
- VERSION
|
47
|
+
- autotest/discover.rb
|
48
|
+
- lib/os.rb
|
49
|
+
- os.gemspec
|
50
|
+
- spec/linux_spec.rb
|
51
|
+
- spec/os_spec.rb
|
52
|
+
- spec/osx_spec.rb
|
53
|
+
- spec/spec_helper.rb
|
48
54
|
homepage: http://github.com/rdp/os
|
49
55
|
licenses: []
|
56
|
+
|
50
57
|
post_install_message:
|
51
58
|
rdoc_options: []
|
52
|
-
|
53
|
-
|
54
|
-
|
59
|
+
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
55
63
|
none: false
|
56
|
-
requirements:
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: "0"
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
69
|
none: false
|
62
|
-
requirements:
|
63
|
-
|
64
|
-
|
65
|
-
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0"
|
66
74
|
requirements: []
|
75
|
+
|
67
76
|
rubyforge_project:
|
68
|
-
rubygems_version: 1.8.
|
77
|
+
rubygems_version: 1.8.13
|
69
78
|
signing_key:
|
70
79
|
specification_version: 3
|
71
|
-
summary: Simple and easy way to know if you're on windows or not (reliably), as well
|
72
|
-
as how many bits the OS is, etc.
|
80
|
+
summary: Simple and easy way to know if you're on windows or not (reliably), as well as how many bits the OS is, etc.
|
73
81
|
test_files: []
|
82
|
+
|