os 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/os.rb +44 -44
  3. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/lib/os.rb CHANGED
@@ -1,53 +1,53 @@
1
1
  class OS
2
2
 
3
- require 'rbconfig'
4
- host_os = RbConfig::CONFIG['host_os']
5
- if host_os =~ /mswin|mingw/
6
- WINDOZE = true
7
- else
8
- WINDOZE = false
9
- end
10
-
11
- # OS.windows?
12
- # true if on windows [and/or jruby]
13
- # false if on linux or cygwin
14
- def self.windows?
15
- WINDOZE
16
- end
17
-
18
- def self.linux?
19
- !WINDOZE
20
- end
21
-
22
- class << self
23
- alias :windoze? :windows? #the joke one
24
- end
25
-
26
- if host_os =~ /32/
27
- BITS = 32
28
- else
29
- if host_os =~ /64/
30
- BITS = 64
31
- else # cygwin
32
- if (1<<32).class == Fixnum
3
+ require 'rbconfig'
4
+ host_os = RbConfig::CONFIG['host_os']
5
+ if host_os =~ /mswin|mingw/
6
+ WINDOZE = true
7
+ else
8
+ WINDOZE = false
9
+ end
10
+
11
+ # OS.windows?
12
+ # true if on windows [and/or jruby]
13
+ # false if on linux or cygwin
14
+ def self.windows?
15
+ WINDOZE
16
+ end
17
+
18
+ def self.linux?
19
+ !WINDOZE
20
+ end
21
+
22
+ class << self
23
+ alias :windoze? :windows? #the joke one
24
+ end
25
+
26
+ if host_os =~ /32/
27
+ BITS = 32
28
+ else
29
+ if host_os =~ /64/
33
30
  BITS = 64
34
- else
35
- BITS = 32
31
+ else # cygwin
32
+ if (1<<32).class == Fixnum
33
+ BITS = 64
34
+ else
35
+ BITS = 32
36
+ end
36
37
  end
37
38
  end
38
- end
39
39
 
40
40
 
41
- def self.bits
42
- BITS
43
- end
41
+ def self.bits
42
+ BITS
43
+ end
44
44
 
45
- def self.java?
46
- if RUBY_PLATFORM =~ /java/
47
- true
48
- else
49
- false
50
- end
51
- end
45
+ def self.java?
46
+ if RUBY_PLATFORM =~ /java/
47
+ true
48
+ else
49
+ false
50
+ end
51
+ end
52
52
 
53
- end
53
+ end
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: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - rdp
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-16 00:00:00 -07:00
12
+ date: 2009-12-21 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency