diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-22 23:08:05 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-22 23:08:05 +0000 |
commit | 7825e8363d4b2ccad8e2d3f5eeba9e26f6656911 (patch) | |
tree | 83cbcf419e0feeb2ab0fd063ed85e0776eb0081b /spec/bundler/support/platforms.rb | |
parent | 73bed0312895322e0fd18310e840356c8e6af812 (diff) | |
download | ruby-7825e8363d4b2ccad8e2d3f5eeba9e26f6656911.tar.gz |
Postponing the Bundler merge.
I faced a big issue about Bundler with ruby core.
I have no time to resolve it issue before 2.5 final release.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/support/platforms.rb')
-rw-r--r-- | spec/bundler/support/platforms.rb | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/spec/bundler/support/platforms.rb b/spec/bundler/support/platforms.rb deleted file mode 100644 index 002350114b..0000000000 --- a/spec/bundler/support/platforms.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true - -module Spec - module Platforms - include Bundler::GemHelpers - - def rb - Gem::Platform::RUBY - end - - def mac - Gem::Platform.new("x86-darwin-10") - end - - def x64_mac - Gem::Platform.new("x86_64-darwin-15") - end - - def java - Gem::Platform.new([nil, "java", nil]) - end - - def linux - Gem::Platform.new(["x86", "linux", nil]) - end - - def mswin - Gem::Platform.new(["x86", "mswin32", nil]) - end - - def mingw - Gem::Platform.new(["x86", "mingw32", nil]) - end - - def x64_mingw - Gem::Platform.new(["x64", "mingw32", nil]) - end - - def all_platforms - [rb, java, linux, mswin, mingw, x64_mingw] - end - - def local - generic_local_platform - end - - def specific_local_platform - Bundler.local_platform - end - - def not_local - all_platforms.find {|p| p != generic_local_platform } - end - - def local_tag - if RUBY_PLATFORM == "java" - :jruby - else - :ruby - end - end - - def not_local_tag - [:ruby, :jruby].find {|tag| tag != local_tag } - end - - def local_ruby_engine - ENV["BUNDLER_SPEC_RUBY_ENGINE"] || (defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby") - end - - def local_engine_version - return ENV["BUNDLER_SPEC_RUBY_ENGINE_VERSION"] if ENV["BUNDLER_SPEC_RUBY_ENGINE_VERSION"] - - case local_ruby_engine - when "ruby" - RUBY_VERSION - when "rbx" - Rubinius::VERSION - when "jruby" - JRUBY_VERSION - else - raise BundlerError, "That RUBY_ENGINE is not recognized" - end - end - - def not_local_engine_version - case not_local_tag - when :ruby - not_local_ruby_version - when :jruby - "1.6.1" - end - end - - def not_local_ruby_version - "1.12" - end - - def not_local_patchlevel - 9999 - end - - def lockfile_platforms(*platforms) - platforms = local_platforms if platforms.empty? - platforms.map(&:to_s).sort.join("\n ") - end - - def local_platforms - if Bundler::VERSION.split(".").first.to_i > 1 - [local, specific_local_platform] - else - [local] - end - end - end -end |