1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[bundler/bundler] Remove development dependencies from gemspec

And refactor development setup.

https://github.com/bundler/bundler/commit/f288806d02
This commit is contained in:
David Rodríguez 2019-07-08 15:32:18 +02:00 committed by Hiroshi SHIBATA
parent 7255f55dba
commit 452516f50f
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
2 changed files with 35 additions and 9 deletions

View file

@ -34,13 +34,6 @@ Gem::Specification.new do |s|
s.required_ruby_version = ">= 2.3.0" s.required_ruby_version = ">= 2.3.0"
s.required_rubygems_version = ">= 2.5.2" s.required_rubygems_version = ">= 2.5.2"
s.add_development_dependency "automatiek", "~> 0.1.0"
s.add_development_dependency "rake", "~> 12.0"
s.add_development_dependency "ronn", "~> 0.7.3"
s.add_development_dependency "rspec", "~> 3.6"
s.add_development_dependency "rubocop", "= 0.72.0"
s.add_development_dependency "rubocop-performance", "= 1.4.0"
# s.files = Dir.glob("{lib,exe}/**/*", File::FNM_DOTMATCH).reject {|f| File.directory?(f) } # s.files = Dir.glob("{lib,exe}/**/*", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
# we don't check in man pages, but we need to ship them because # we don't check in man pages, but we need to ship them because

View file

@ -1,11 +1,20 @@
# frozen_string_literal: true # frozen_string_literal: true
require "rubygems/user_interaction" require "rubygems/user_interaction"
require "support/path" require_relative "path"
require "fileutils" require "fileutils"
module Spec module Spec
module Rubygems module Rubygems
DEV_DEPS = {
"automatiek" => "~> 0.1.0",
"rake" => "~> 12.0",
"ronn" => "~> 0.7.3",
"rspec" => "~> 3.6",
"rubocop" => "= 0.72.0",
"rubocop-performance" => "= 1.4.0",
}.freeze
DEPS = { DEPS = {
# artifice doesn't support rack 2.x now. # artifice doesn't support rack 2.x now.
"rack" => "< 2.0", "rack" => "< 2.0",
@ -17,9 +26,33 @@ module Spec
"rake" => "12.3.2", "rake" => "12.3.2",
"builder" => "~> 3.2", "builder" => "~> 3.2",
# ruby-graphviz is used by the viz tests # ruby-graphviz is used by the viz tests
"ruby-graphviz" => nil, "ruby-graphviz" => ">= 0.a",
}.freeze }.freeze
def self.dev_setup
deps = DEV_DEPS
# JRuby can't build ronn, so we skip that
deps.delete("ronn") if RUBY_ENGINE == "jruby"
install_gems(deps)
end
def self.gem_load(gem_name, bin_container)
gem_activate(gem_name)
load Gem.bin_path(gem_name, bin_container)
end
def self.gem_activate(gem_name)
gem_requirement = DEV_DEPS[gem_name]
gem gem_name, gem_requirement
end
def self.gem_require(gem_name)
gem_activate(gem_name)
require gem_name
end
def self.setup def self.setup
Gem.clear_paths Gem.clear_paths