Permalink
Browse files

Added bundler as default gems. Revisit [Feature #12733]

  * bin/*, lib/bundler/*, lib/bundler.rb, spec/bundler, man/*:
    Merge from latest stable branch of bundler/bundler repository and
    added workaround patches. I will backport them into upstream.
  * common.mk, defs/gmake.mk: Added `test-bundler` task for test suite
    of bundler.
  * tool/sync_default_gems.rb: Added sync task for bundler.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
hsbt committed Nov 2, 2018
1 parent 7deb377 commit 59c8d50653480bef3f24517296e6ddf937fdf6bc
Showing 855 changed files with 83,604 additions and 1 deletion.
30 LEGAL
@@ -848,3 +848,33 @@ test/rubygems:
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
lib/bundler:
lib/bundler.rb:
lib/bundler.gemspec:
spec/bundler:
man/bundle-*,gemfile.*:
Portions copyright (c) 2010 Andre Arko
Portions copyright (c) 2009 Engine Yard
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 NEWS
@@ -391,6 +391,12 @@ sufficient information, see the ChangeLog file or Redmine
* Add URI::File to handle file URI scheme. [Feature #14035]
[Bundler]
* Add Bundler to Standard Library. [Feature #12733]
* Use 1.17.1. It's latest stable version.
=== Compatibility issues (excluding feature bug fixes)
[File]
@@ -0,0 +1,31 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
# Exit cleanly from an early interrupt
Signal.trap("INT") do
Bundler.ui.debug("\n#{caller.join("\n")}") if defined?(Bundler)
exit 1
end
require "bundler"
# Check if an older version of bundler is installed
$LOAD_PATH.each do |path|
next unless path =~ %r{/bundler-0\.(\d+)} && $1.to_i < 9
err = String.new
err << "Looks like you have a version of bundler that's older than 0.9.\n"
err << "Please remove your old versions.\n"
err << "An easy way to do this is by running `gem cleanup bundler`."
abort(err)
end
require "bundler/friendly_errors"
Bundler.with_friendly_errors do
require "bundler/cli"
# Allow any command to use --help flag to show help for that command
help_flags = %w[--help -h]
help_flag_used = ARGV.any? {|a| help_flags.include? a }
args = help_flag_used ? Bundler::CLI.reformatted_help_args(ARGV) : ARGV
Bundler::CLI.start(args, :debug => true)
end
@@ -0,0 +1,60 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
require "bundler/shared_helpers"
Bundler::SharedHelpers.major_deprecation(2, "the bundle_ruby executable has been removed in favor of `bundle platform --ruby`")
Signal.trap("INT") { exit 1 }
require "bundler/errors"
require "bundler/ruby_version"
require "bundler/ruby_dsl"
module Bundler
class Dsl
include RubyDsl
attr_accessor :ruby_version
def initialize
@ruby_version = nil
end
def eval_gemfile(gemfile, contents = nil)
contents ||= File.open(gemfile, "rb", &:read)
instance_eval(contents, gemfile.to_s, 1)
rescue SyntaxError => e
bt = e.message.split("\n")[1..-1]
raise GemfileError, ["Gemfile syntax error:", *bt].join("\n")
rescue ScriptError, RegexpError, NameError, ArgumentError => e
e.backtrace[0] = "#{e.backtrace[0]}: #{e.message} (#{e.class})"
STDERR.puts e.backtrace.join("\n ")
raise GemfileError, "There was an error in your Gemfile," \
" and Bundler cannot continue."
end
def source(source, options = {})
end
def gem(name, *args)
end
def group(*args)
end
end
end
dsl = Bundler::Dsl.new
begin
dsl.eval_gemfile(Bundler::SharedHelpers.default_gemfile)
ruby_version = dsl.ruby_version
if ruby_version
puts ruby_version
else
puts "No ruby version specified"
end
rescue Bundler::GemfileError => e
puts e.message
exit(-1)
end
@@ -0,0 +1,4 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
load File.expand_path("../bundle", __FILE__)
@@ -1232,6 +1232,21 @@ yes-test-bundled-gems: test-bundled-gems-run
no-test-bundled-gems:
test-bundled-gems-run: $(PREPARE_BUNDLED_GEMS)
test-bundler-precheck: $(arch)-fake.rb programs
yes-test-bundler-prepare: test-bundler-precheck
$(XRUBY) -C "$(srcdir)" bin/gem install --no-document \
--install-dir .bundle --conservative "rspec:~> 3.5"
RSPECOPTS = --format progress
BUNDLER_SPECS =
test-bundler: $(TEST_RUNNABLE)-test-bundler
yes-test-bundler: yes-test-bundler-prepare
$(gnumake_recursive)$(Q) \
$(XRUBY) -C $(srcdir) -Ispec/bundler .bundle/bin/rspec \
--require spec_helper $(RSPECOPTS) spec/bundler/$(BUNDLER_SPECS)
no-test-bundler:
UNICODE_FILES = $(UNICODE_SRC_DATA_DIR)/UnicodeData.txt \
$(UNICODE_SRC_DATA_DIR)/CompositionExclusions.txt \
$(UNICODE_SRC_DATA_DIR)/NormalizationTest.txt \
@@ -1403,6 +1418,7 @@ help: PHONY
" test-all: all ruby tests [TESTOPTS=-j4 TESTS=<test files>]" \
" test-spec: run the Ruby spec suite" \
" test-rubyspec: same as test-spec" \
" test-bundler: run the Bundler spec" \
" test-bundled-gems: run the test suite of bundled gems" \
" up: update local copy and autogenerated files" \
" benchmark: benchmark this ruby and COMPARE_RUBY." \
@@ -64,7 +64,7 @@ endif
ORDERED_TEST_TARGETS := $(filter $(TEST_TARGETS), \
btest-ruby test-knownbug test-basic \
test-testframework test-ruby test-almost test-all \
test-spec \
test-spec test-bundler-prepare test-bundler \
)
prev_test := $(if $(filter test-spec,$(ORDERED_TEST_TARGETS)),test-spec-precheck)
$(foreach test,$(ORDERED_TEST_TARGETS), \
@@ -178,6 +178,9 @@ Zachary Scott (zzak)
=== Libraries
[lib/bundler.rb, lib/bundler/*]
Hiroshi SHIBATA (hsbt)
https://github.com/bundler/bundler
[lib/cmath.rb]
_unmaintained_
https://github.com/ruby/cmath
@@ -0,0 +1,55 @@
# coding: utf-8
# frozen_string_literal: true
begin
require File.expand_path("../lib/bundler/version", __FILE__)
rescue LoadError
# for Ruby core repository
require File.expand_path("../bundler/version", __FILE__)
end
require "shellwords"
Gem::Specification.new do |s|
s.name = "bundler"
s.version = Bundler::VERSION
s.license = "MIT"
s.authors = [
"André Arko", "Samuel Giddins", "Colby Swandale", "Hiroshi Shibata",
"David Rodríguez", "Grey Baker", "Stephanie Morillo", "Chris Morris", "James Wen", "Tim Moore",
"André Medeiros", "Jessica Lynn Suttles", "Terence Lee", "Carl Lerche",
"Yehuda Katz"
]
s.email = ["team@bundler.io"]
s.homepage = "http://bundler.io"
s.summary = "The best way to manage your application's dependencies"
s.description = "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably"
if s.respond_to?(:metadata=)
s.metadata = {
"bug_tracker_uri" => "http://github.com/bundler/bundler/issues",
"changelog_uri" => "https://github.com/bundler/bundler/blob/master/CHANGELOG.md",
"homepage_uri" => "https://bundler.io/",
"source_code_uri" => "http://github.com/bundler/bundler/",
}
end
if s.version >= Gem::Version.new("2.a".dup)
s.required_ruby_version = ">= 2.3.0"
s.required_rubygems_version = ">= 2.5.0"
else
s.required_ruby_version = ">= 1.8.7"
s.required_rubygems_version = ">= 1.3.6"
end
s.add_development_dependency "automatiek", "~> 0.1.0"
s.add_development_dependency "mustache", "0.99.6"
s.add_development_dependency "rake", "~> 10.0"
s.add_development_dependency "rdiscount", "~> 2.2"
s.add_development_dependency "ronn", "~> 0.7.3"
s.add_development_dependency "rspec", "~> 3.6"
s.files += %w[bundler.gemspec]
s.require_paths = ["lib"]
end
Oops, something went wrong.

0 comments on commit 59c8d50

Please sign in to comment.