running 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/running.rb +15 -9
- data/running.gemspec +1 -1
- metadata +1 -1
data/lib/running.rb
CHANGED
@@ -8,15 +8,15 @@ module Running
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def ruby_18?
|
11
|
-
ruby? &&
|
11
|
+
ruby? && ruby_version_matches(1.8)
|
12
12
|
end
|
13
13
|
|
14
14
|
def ruby_19?
|
15
|
-
ruby? &&
|
15
|
+
ruby? && ruby_version_matches(1.9)
|
16
16
|
end
|
17
17
|
|
18
18
|
def ruby_20?
|
19
|
-
ruby? &&
|
19
|
+
ruby? && ruby_version_matches(2.0)
|
20
20
|
end
|
21
21
|
|
22
22
|
def mri?
|
@@ -24,11 +24,11 @@ module Running
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def mri_18?
|
27
|
-
mri? &&
|
27
|
+
mri? && ruby_version_matches(1.8)
|
28
28
|
end
|
29
29
|
|
30
30
|
def mri_19?
|
31
|
-
mri? &&
|
31
|
+
mri? && ruby_version_matches(1.9)
|
32
32
|
end
|
33
33
|
|
34
34
|
def rbx?
|
@@ -52,19 +52,25 @@ module Running
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def mingw_18?
|
55
|
-
mingw? &&
|
55
|
+
mingw? && ruby_version_matches(1.8)
|
56
56
|
end
|
57
57
|
|
58
58
|
def mingw_19?
|
59
|
-
mingw? &&
|
59
|
+
mingw? && ruby_version_matches(1.9)
|
60
60
|
end
|
61
61
|
|
62
62
|
def mingw_20?
|
63
|
-
mingw? &&
|
63
|
+
mingw? && ruby_version_matches(2.0)
|
64
64
|
end
|
65
65
|
|
66
66
|
def from_the_police?
|
67
67
|
true
|
68
68
|
end
|
69
|
+
|
70
|
+
private
|
71
|
+
|
72
|
+
def ruby_version_matches(version)
|
73
|
+
!(RUBY_VERSION =~ /^#{version}/).nil?
|
74
|
+
end
|
69
75
|
end
|
70
|
-
end
|
76
|
+
end
|
data/running.gemspec
CHANGED