rails/activesupport/activesupport.gemspec

46 lines
1.8 KiB
Ruby
Raw Normal View History

# frozen_string_literal: true
version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = "activesupport"
s.version = version
s.summary = "A toolkit of support libraries and Ruby core extensions extracted from the Rails framework."
s.description = "A toolkit of support libraries and Ruby core extensions extracted from the Rails framework. Rich support for multibyte strings, internationalization, time zones, and testing."
2010-04-02 04:46:04 +08:00
s.required_ruby_version = ">= 3.1.0"
s.license = "MIT"
s.author = "David Heinemeier Hansson"
s.email = "david@loudthinking.com"
s.homepage = "https://rubyonrails.org"
s.files = Dir["CHANGELOG.md", "MIT-LICENSE", "README.rdoc", "lib/**/*"]
s.require_path = "lib"
s.rdoc_options.concat ["--encoding", "UTF-8"]
s.metadata = {
"bug_tracker_uri" => "https://github.com/rails/rails/issues",
"changelog_uri" => "https://github.com/rails/rails/blob/v#{version}/activesupport/CHANGELOG.md",
"documentation_uri" => "https://api.rubyonrails.org/v#{version}/",
"mailing_list_uri" => "https://discuss.rubyonrails.org/c/rubyonrails-talk",
"source_code_uri" => "https://github.com/rails/rails/tree/v#{version}/activesupport",
2021-11-16 05:06:21 +08:00
"rubygems_mfa_required" => "true",
}
# NOTE: Please read our dependency guidelines before updating versions:
# https://edgeguides.rubyonrails.org/security.html#dependency-management-and-cves
2019-11-22 03:59:22 +08:00
s.add_dependency "i18n", ">= 1.6", "< 2"
s.add_dependency "tzinfo", "~> 2.0", ">= 2.0.5"
s.add_dependency "concurrent-ruby", "~> 1.0", ">= 1.3.1"
s.add_dependency "connection_pool", ">= 2.2.5"
2024-02-08 19:41:04 +08:00
s.add_dependency "minitest", ">= 5.1"
Add `drb`, `mutex_m` and `base64` that are bundled gem candidates for Ruby 3.4 This commit adds `drb`, `mutex_m` and `base64` to `activesupport/activesupport.gemspec` because 3.3.0dev shows warnings if bundled gem candidates are required like `mutex_m will be not part of the default gems since Ruby 3.4.0. Add it to your Gemfile.` - Example ``` $ ruby -v ; ruby generic_main.rb ruby 3.3.0dev (2023-08-07T23:09:02Z master 0e5da05a32) [x86_64-linux] Fetching https://github.com/rails/rails.git Resolving dependencies... Fetching gem metadata from https://rubygems.org/....... /home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.3.0+0/bundler/gems/rails-2942958827f1/activesupport/lib/active_support/notifications/fanout.rb:3: warning: mutex_m will be not part of the default gems since Ruby 3.4.0. Add it to your Gemfile. /home/yahonda/.rbenv/versions/trunk/lib/ruby/gems/3.3.0+0/bundler/gems/rails-2942958827f1/activesupport/lib/active_support/message_encryptor.rb:4: warning: base64 will be not part of the default gems since Ruby 3.4.0. Add it to your Gemfile. generic_main.rb:16: warning: drb will be not part of the default gems since Ruby 3.4.0. Add it to your inline Gemfile. $ ``` - generic_main.rb ``` require "bundler/inline" gemfile(true) do source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem "rails", github: "rails/rails", branch: "main" end require "active_support" require "minitest/autorun" require "drb" require "base64" require "mutex_m" ``` These gems are chosen as follows. - Bundled gems candidates for Ruby 3.4 ```ruby $ ruby -v ; ruby -e 'pp Gem::BUNDLED_GEMS::SINCE.select { |k,v| v == "3.4.0" }' ruby 3.3.0dev (2023-08-07T23:09:02Z master 0e5da05a32) [x86_64-linux] {"abbrev"=>"3.4.0", "observer"=>"3.4.0", "getoptlong"=>"3.4.0", "resolv-replace"=>"3.4.0", "rinda"=>"3.4.0", "nkf"=>"3.4.0", "syslog"=>"3.4.0", "drb"=>"3.4.0", "mutex_m"=>"3.4.0", "csv"=>"3.4.0", "base64"=>"3.4.0"} $ ``` - `drb`, `mutex_m` and `base64` are required by Rails - "drb" ```ruby $ git grep 'require "drb"' activesupport/lib/active_support/testing/parallelization.rb:require "drb" activesupport/lib/active_support/testing/parallelization/server.rb:require "drb" ``` - "mutex_m" ```ruby $ git grep 'require "mutex_m"' actionpack/lib/action_controller/metal/params_wrapper.rb: require "mutex_m" activerecord/lib/active_record/attribute_methods.rb:require "mutex_m" activerecord/lib/active_record/relation/delegation.rb:require "mutex_m" activesupport/lib/active_support/notifications/fanout.rb:require "mutex_m" ``` - "base64" usage ```ruby $ git grep 'require "base64"' actioncable/Rakefile:require "base64" actionmailer/lib/action_mailer/inline_preview_interceptor.rb:require "base64" actionpack/lib/action_controller/metal/http_authentication.rb:require "base64" actionview/Rakefile:require "base64" activerecord/lib/active_record/encryption/message_serializer.rb:require "base64" activerecord/lib/active_record/fixture_set/render_context.rb:require "base64" activerecord/test/cases/encryption/message_serializer_test.rb:require "base64" activesupport/lib/active_support/message_encryptor.rb:require "base64" activesupport/lib/active_support/message_verifier.rb:require "base64" activesupport/lib/active_support/xml_mini.rb:require "base64" railties/test/application/mailer_previews_test.rb:require "base64" ``` - Dependency between Rails related modules - "drb" is only required by Active Support - "mutex_m" is required by Action Pack, Active Record and Active Support Action Pack and Active Record depend on Active Support. Therefore, adding dependency to Active Support is fine. https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actionpack/actionpack.gemspec#L36 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/activerecord/activerecord.gemspec#L38 - "base64" is required by Action Cable, Action Mailer, Action Pack, Action View, Active Record, Active Support and Raillties. Action Cable, Action Mailer, Action Pack, Action View and Active Record and Railties depend on Active Support. Therefore, adding dependency to Active Support is fine. https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actioncable/actioncable.gemspec#L35 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actionmailer/actionmailer.gemspec#L36 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actionpack/actionpack.gemspec#L36 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actionview/actionview.gemspec#L36 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/actionpack/actionpack.gemspec#L36 https://github.com/rails/rails/blob/2942958827f1934dfcba284d074e6d61104d3e7c/railties/railties.gemspec#L40 Refer to: https://bugs.ruby-lang.org/issues/19776 https://github.com/ruby/ruby/pull/8126 https://github.com/rubygems/rubygems/pull/6840
2023-08-08 15:46:50 +08:00
s.add_dependency "base64"
s.add_dependency "drb"
s.add_dependency "bigdecimal"
end