-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathdefault.mspec
25 lines (22 loc) · 827 Bytes
/
default.mspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
if (Backports::TARGET_VERSION rescue false) # Conf loaded at different times, not sure why
FrozenError ||= RuntimeError
class MSpecScript
# The set of substitutions to transform a spec filename
# into a tag filename.
main_version = RUBY_VERSION
unless File.exist?(File.expand_path("../lib/backports/#{main_version}.rb", __FILE__))
main_version = main_version.sub(/\.\d+$/, '.0')
end
set :tags_patterns, [ [%r(rubyspec/), "tags/#{main_version}/"] ]
end
if Backports::TARGET_VERSION > RUBY_VERSION
if SpecGuard.respond_to? :ruby_version_override=
SpecGuard.ruby_version_override = Backports::TARGET_VERSION
else
class VersionGuard
remove_const :FULL_RUBY_VERSION
FULL_RUBY_VERSION = SpecVersion.new Backports::TARGET_VERSION
end
end
end
end