File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 2
2
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
3
3
4
4
function is_mri {
5
- if ruby -e " exit(RUBY_ENGINE == 'ruby')" ; then
5
+ if ruby -e " exit(!defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby')" ; then
6
+ # RUBY_ENGINE only returns 'ruby' on MRI.
7
+ # MRI 1.8.7 lacks the constant but all other rubies have it (including JRuby in 1.8 mode)
6
8
return 0
7
9
else
8
10
return 1
9
11
fi ;
10
12
}
11
13
12
14
function is_jruby {
13
- if ruby -e " exit(RUBY_PLATFORM == 'java')" ; then
15
+ if ruby -e " exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')" ; then
16
+ # RUBY_ENGINE only returns 'ruby' on MRI.
17
+ # MRI 1.8.7 lacks the constant but all other rubies have it (including JRuby in 1.8 mode)
14
18
return 0
15
19
else
16
20
return 1
@@ -69,14 +73,22 @@ function rspec_rails_compatible {
69
73
fi
70
74
}
71
75
76
+ function rspec_support_compatible {
77
+ if [ " $MAINTENANCE_BRANCH " != " 2-99-maintenance" ] && [ " $MAINTENANCE_BRANCH " != " 2-14-maintenance" ]; then
78
+ return 0
79
+ else
80
+ return 1
81
+ fi
82
+ }
83
+
72
84
function additional_specs_available {
73
85
type run_additional_specs > /dev/null 2>&1
74
86
return $?
75
87
}
76
88
77
89
function documentation_enforced {
78
90
if [ -x ./bin/yard ]; then
79
- if is_mri ; then
91
+ if is_mri_2plus ; then
80
92
return 0
81
93
else
82
94
return 1
You can’t perform that action at this time.
0 commit comments