which_osx 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -7
- data/bin/which_osx +1 -1
- data/lib/version.rb +1 -1
- data/lib/which_osx.rb +6 -6
- metadata +2 -34
data/README.md
CHANGED
@@ -19,26 +19,26 @@ By requiring which_osx, you gain access to a couple useful methods:
|
|
19
19
|
### WhichOSX.version
|
20
20
|
|
21
21
|
puts WhichOSX.version
|
22
|
-
=> 10.
|
22
|
+
=> 10.9.0
|
23
23
|
|
24
24
|
### WhichOSX.full_name
|
25
25
|
|
26
26
|
puts WhichOSX.full_name
|
27
|
-
=> Mac OS X 10.
|
27
|
+
=> Mac OS X 10.9.0
|
28
28
|
|
29
29
|
### WhichOSX.short_name
|
30
30
|
|
31
31
|
puts WhichOSX.short_name
|
32
|
-
=>
|
32
|
+
=> Mavericks
|
33
33
|
|
34
34
|
WhichOSX version 1.0.5 introduces boolean methods for checking the operating system:
|
35
35
|
|
36
|
-
### WhichOSX.
|
36
|
+
### WhichOSX.is_mavericks
|
37
37
|
|
38
|
-
WhichOSX.
|
38
|
+
WhichOSX.is_mavericks
|
39
39
|
=> true
|
40
40
|
|
41
|
-
Includes `is_mountain_lion`, `is_lion`, `is_snow_leopard`, `is_leopard`, and `is_tiger`.
|
41
|
+
Includes `is_mavericks`, `is_mountain_lion`, `is_lion`, `is_snow_leopard`, `is_leopard`, and `is_tiger`.
|
42
42
|
|
43
43
|
### Binary
|
44
44
|
|
@@ -89,4 +89,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
89
89
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
90
90
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
91
91
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
92
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
92
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/bin/which_osx
CHANGED
data/lib/version.rb
CHANGED
data/lib/which_osx.rb
CHANGED
@@ -6,15 +6,15 @@ VERSION = output
|
|
6
6
|
|
7
7
|
class WhichOSX
|
8
8
|
|
9
|
-
# Get the version of OS X currently running.
|
10
|
-
# This method returns something in the format of
|
9
|
+
# Get the version of OS X currently running.
|
10
|
+
# This method returns something in the format of
|
11
11
|
# "XX.X.X" - it is used to help the rest of the commands
|
12
12
|
# execute properly.
|
13
13
|
|
14
14
|
def self.version
|
15
15
|
short_version = VERSION
|
16
16
|
return short_version
|
17
|
-
|
17
|
+
|
18
18
|
rescue Errno::ENOENT
|
19
19
|
puts "It looks like you aren't using Mac OS X. Sorry!"
|
20
20
|
end
|
@@ -23,7 +23,7 @@ class WhichOSX
|
|
23
23
|
# Will always return "Mac OS X XX.X.X"
|
24
24
|
|
25
25
|
def self.full_name
|
26
|
-
full_name = "Mac OS X " +
|
26
|
+
full_name = "Mac OS X " + version
|
27
27
|
return full_name
|
28
28
|
end
|
29
29
|
|
@@ -32,7 +32,7 @@ class WhichOSX
|
|
32
32
|
|
33
33
|
def self.short_name
|
34
34
|
# We just want the major versions -- 10.6, 10.7, etc.
|
35
|
-
major_version =
|
35
|
+
major_version = version.chop.chop
|
36
36
|
|
37
37
|
case
|
38
38
|
when major_version == "10.4"
|
@@ -97,5 +97,5 @@ class WhichOSX
|
|
97
97
|
def self.is_tiger
|
98
98
|
self.is("Tiger")
|
99
99
|
end
|
100
|
-
|
100
|
+
|
101
101
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: which_osx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -27,38 +27,6 @@ dependencies:
|
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 1.3.2
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: yard
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
38
|
-
type: :development
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: redcarpet
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
30
|
- !ruby/object:Gem::Dependency
|
63
31
|
name: rake
|
64
32
|
requirement: !ruby/object:Gem::Requirement
|