-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bundler to standard libraries.
rubygems 2.7.x depends bundler-1.15.x. This is preparation for rubygems and bundler migration. * lib/bundler.rb, lib/bundler/*: files of bundler-1.15.4 * spec/bundler/*: rspec examples of bundler-1.15.4. I applied patches. * rubygems/bundler#6007 * Exclude not working examples on ruby repository. * Fake ruby interpriter instead of installed ruby. * Makefile.in: Added test task named `test-bundler`. This task is only working macOS/linux yet. I'm going to support Windows environment later. * tool/sync_default_gems.rb: Added sync task for bundler. [Feature #12733][ruby-core:77172] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- Loading branch information
Showing
409 changed files
with
60,699 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
load File.expand_path("../bundle", __FILE__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,251 @@ | ||
# coding: utf-8 | ||
# frozen_string_literal: true | ||
lib = File.expand_path("../lib/", __FILE__) | ||
$:.unshift lib unless $:.include?(lib) | ||
require "bundler/version" | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "bundler" | ||
s.version = Bundler::VERSION | ||
s.license = "MIT" | ||
s.authors = [ | ||
"André Arko", "Samuel Giddins", "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 | ||
|
||
s.required_ruby_version = ">= 1.8.7" | ||
s.required_rubygems_version = ">= 1.3.6" | ||
|
||
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.5" | ||
|
||
s.files = [ | ||
"lib/bundler.gemspec", | ||
"bin/bundle", | ||
"bin/bundle_ruby", | ||
"bin/bundler", | ||
"lib/bundler.rb", | ||
"lib/bundler/capistrano.rb", | ||
"lib/bundler/cli.rb", | ||
"lib/bundler/cli/add.rb", | ||
"lib/bundler/cli/binstubs.rb", | ||
"lib/bundler/cli/cache.rb", | ||
"lib/bundler/cli/check.rb", | ||
"lib/bundler/cli/clean.rb", | ||
"lib/bundler/cli/common.rb", | ||
"lib/bundler/cli/config.rb", | ||
"lib/bundler/cli/console.rb", | ||
"lib/bundler/cli/doctor.rb", | ||
"lib/bundler/cli/exec.rb", | ||
"lib/bundler/cli/gem.rb", | ||
"lib/bundler/cli/info.rb", | ||
"lib/bundler/cli/init.rb", | ||
"lib/bundler/cli/inject.rb", | ||
"lib/bundler/cli/install.rb", | ||
"lib/bundler/cli/issue.rb", | ||
"lib/bundler/cli/lock.rb", | ||
"lib/bundler/cli/open.rb", | ||
"lib/bundler/cli/outdated.rb", | ||
"lib/bundler/cli/package.rb", | ||
"lib/bundler/cli/platform.rb", | ||
"lib/bundler/cli/plugin.rb", | ||
"lib/bundler/cli/pristine.rb", | ||
"lib/bundler/cli/show.rb", | ||
"lib/bundler/cli/update.rb", | ||
"lib/bundler/cli/viz.rb", | ||
"lib/bundler/compact_index_client.rb", | ||
"lib/bundler/compact_index_client/cache.rb", | ||
"lib/bundler/compact_index_client/updater.rb", | ||
"lib/bundler/constants.rb", | ||
"lib/bundler/current_ruby.rb", | ||
"lib/bundler/definition.rb", | ||
"lib/bundler/dep_proxy.rb", | ||
"lib/bundler/dependency.rb", | ||
"lib/bundler/deployment.rb", | ||
"lib/bundler/deprecate.rb", | ||
"lib/bundler/dsl.rb", | ||
"lib/bundler/endpoint_specification.rb", | ||
"lib/bundler/env.rb", | ||
"lib/bundler/environment_preserver.rb", | ||
"lib/bundler/errors.rb", | ||
"lib/bundler/feature_flag.rb", | ||
"lib/bundler/fetcher.rb", | ||
"lib/bundler/fetcher/base.rb", | ||
"lib/bundler/fetcher/compact_index.rb", | ||
"lib/bundler/fetcher/dependency.rb", | ||
"lib/bundler/fetcher/downloader.rb", | ||
"lib/bundler/fetcher/index.rb", | ||
"lib/bundler/friendly_errors.rb", | ||
"lib/bundler/gem_helper.rb", | ||
"lib/bundler/gem_helpers.rb", | ||
"lib/bundler/gem_remote_fetcher.rb", | ||
"lib/bundler/gem_tasks.rb", | ||
"lib/bundler/gem_version_promoter.rb", | ||
"lib/bundler/gemdeps.rb", | ||
"lib/bundler/graph.rb", | ||
"lib/bundler/index.rb", | ||
"lib/bundler/injector.rb", | ||
"lib/bundler/inline.rb", | ||
"lib/bundler/installer.rb", | ||
"lib/bundler/installer/gem_installer.rb", | ||
"lib/bundler/installer/parallel_installer.rb", | ||
"lib/bundler/installer/standalone.rb", | ||
"lib/bundler/lazy_specification.rb", | ||
"lib/bundler/lockfile_parser.rb", | ||
"lib/bundler/match_platform.rb", | ||
"lib/bundler/mirror.rb", | ||
"lib/bundler/plugin.rb", | ||
"lib/bundler/plugin/api.rb", | ||
"lib/bundler/plugin/api/source.rb", | ||
"lib/bundler/plugin/dsl.rb", | ||
"lib/bundler/plugin/index.rb", | ||
"lib/bundler/plugin/installer.rb", | ||
"lib/bundler/plugin/installer/git.rb", | ||
"lib/bundler/plugin/installer/rubygems.rb", | ||
"lib/bundler/plugin/source_list.rb", | ||
"lib/bundler/psyched_yaml.rb", | ||
"lib/bundler/remote_specification.rb", | ||
"lib/bundler/resolver.rb", | ||
"lib/bundler/retry.rb", | ||
"lib/bundler/ruby_dsl.rb", | ||
"lib/bundler/ruby_version.rb", | ||
"lib/bundler/rubygems_ext.rb", | ||
"lib/bundler/rubygems_gem_installer.rb", | ||
"lib/bundler/rubygems_integration.rb", | ||
"lib/bundler/runtime.rb", | ||
"lib/bundler/settings.rb", | ||
"lib/bundler/setup.rb", | ||
"lib/bundler/shared_helpers.rb", | ||
"lib/bundler/similarity_detector.rb", | ||
"lib/bundler/source.rb", | ||
"lib/bundler/source/gemspec.rb", | ||
"lib/bundler/source/git.rb", | ||
"lib/bundler/source/git/git_proxy.rb", | ||
"lib/bundler/source/path.rb", | ||
"lib/bundler/source/path/installer.rb", | ||
"lib/bundler/source/rubygems.rb", | ||
"lib/bundler/source/rubygems/remote.rb", | ||
"lib/bundler/source_list.rb", | ||
"lib/bundler/spec_set.rb", | ||
"lib/bundler/ssl_certs/.document", | ||
"lib/bundler/ssl_certs/certificate_manager.rb", | ||
"lib/bundler/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem", | ||
"lib/bundler/ssl_certs/rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem", | ||
"lib/bundler/ssl_certs/rubygems.org/AddTrustExternalCARoot.pem", | ||
"lib/bundler/stub_specification.rb", | ||
"lib/bundler/templates/Executable", | ||
"lib/bundler/templates/Executable.standalone", | ||
"lib/bundler/templates/Gemfile", | ||
"lib/bundler/templates/newgem/.travis.yml.tt", | ||
"lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt", | ||
"lib/bundler/templates/newgem/Gemfile.tt", | ||
"lib/bundler/templates/newgem/LICENSE.txt.tt", | ||
"lib/bundler/templates/newgem/README.md.tt", | ||
"lib/bundler/templates/newgem/Rakefile.tt", | ||
"lib/bundler/templates/newgem/bin/console.tt", | ||
"lib/bundler/templates/newgem/bin/setup.tt", | ||
"lib/bundler/templates/newgem/exe/newgem.tt", | ||
"lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt", | ||
"lib/bundler/templates/newgem/ext/newgem/newgem.c.tt", | ||
"lib/bundler/templates/newgem/ext/newgem/newgem.h.tt", | ||
"lib/bundler/templates/newgem/gitignore.tt", | ||
"lib/bundler/templates/newgem/lib/newgem.rb.tt", | ||
"lib/bundler/templates/newgem/lib/newgem/version.rb.tt", | ||
"lib/bundler/templates/newgem/newgem.gemspec.tt", | ||
"lib/bundler/templates/newgem/rspec.tt", | ||
"lib/bundler/templates/newgem/spec/newgem_spec.rb.tt", | ||
"lib/bundler/templates/newgem/spec/spec_helper.rb.tt", | ||
"lib/bundler/templates/newgem/test/newgem_test.rb.tt", | ||
"lib/bundler/templates/newgem/test/test_helper.rb.tt", | ||
"lib/bundler/ui.rb", | ||
"lib/bundler/ui/rg_proxy.rb", | ||
"lib/bundler/ui/shell.rb", | ||
"lib/bundler/ui/silent.rb", | ||
"lib/bundler/uri_credentials_filter.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/action.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/log.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/errors.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/gem_metadata.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/modules/specification_provider.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/resolver.rb", | ||
"lib/bundler/vendor/molinillo/lib/molinillo/state.rb", | ||
"lib/bundler/vendor/net-http-persistent/lib/net/http/faster.rb", | ||
"lib/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb", | ||
"lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/ssl_reuse.rb", | ||
"lib/bundler/vendor/thor/lib/thor.rb", | ||
"lib/bundler/vendor/thor/lib/thor/actions.rb", | ||
"lib/bundler/vendor/thor/lib/thor/actions/create_file.rb", | ||
"lib/bundler/vendor/thor/lib/thor/actions/create_link.rb", | ||
"lib/bundler/vendor/thor/lib/thor/actions/directory.rb", | ||
"lib/bundler/vendor/thor/lib/thor/actions/empty_directory.rb", | ||
"lib/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb", | ||
"lib/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb", | ||
"lib/bundler/vendor/thor/lib/thor/base.rb", | ||
"lib/bundler/vendor/thor/lib/thor/command.rb", | ||
"lib/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb", | ||
"lib/bundler/vendor/thor/lib/thor/core_ext/io_binary_read.rb", | ||
"lib/bundler/vendor/thor/lib/thor/core_ext/ordered_hash.rb", | ||
"lib/bundler/vendor/thor/lib/thor/error.rb", | ||
"lib/bundler/vendor/thor/lib/thor/group.rb", | ||
"lib/bundler/vendor/thor/lib/thor/invocation.rb", | ||
"lib/bundler/vendor/thor/lib/thor/line_editor.rb", | ||
"lib/bundler/vendor/thor/lib/thor/line_editor/basic.rb", | ||
"lib/bundler/vendor/thor/lib/thor/line_editor/readline.rb", | ||
"lib/bundler/vendor/thor/lib/thor/parser.rb", | ||
"lib/bundler/vendor/thor/lib/thor/parser/argument.rb", | ||
"lib/bundler/vendor/thor/lib/thor/parser/arguments.rb", | ||
"lib/bundler/vendor/thor/lib/thor/parser/option.rb", | ||
"lib/bundler/vendor/thor/lib/thor/parser/options.rb", | ||
"lib/bundler/vendor/thor/lib/thor/rake_compat.rb", | ||
"lib/bundler/vendor/thor/lib/thor/runner.rb", | ||
"lib/bundler/vendor/thor/lib/thor/shell.rb", | ||
"lib/bundler/vendor/thor/lib/thor/shell/basic.rb", | ||
"lib/bundler/vendor/thor/lib/thor/shell/color.rb", | ||
"lib/bundler/vendor/thor/lib/thor/shell/html.rb", | ||
"lib/bundler/vendor/thor/lib/thor/util.rb", | ||
"lib/bundler/vendor/thor/lib/thor/version.rb", | ||
"lib/bundler/vendored_molinillo.rb", | ||
"lib/bundler/vendored_persistent.rb", | ||
"lib/bundler/vendored_thor.rb", | ||
"lib/bundler/version.rb", | ||
"lib/bundler/version_ranges.rb", | ||
"lib/bundler/vlad.rb", | ||
"lib/bundler/worker.rb", | ||
"lib/bundler/yaml_serializer.rb" | ||
] | ||
|
||
s.bindir = "exe" | ||
s.executables = %w(bundle bundler) | ||
s.require_paths = ["lib"] | ||
end |
Oops, something went wrong.