File: default.mspec

package info (click to toggle)
ruby-backports 3.25.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,912 kB
  • sloc: ruby: 11,759; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 827 bytes parent folder | download | duplicates (2)
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