activesupport 7.1.0.rc1 → 7.1.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 680e4677ad9c5c80f0e8ca9b8fe7e4df0706ff259937be2547ba2e73fefc2c59
4
- data.tar.gz: 80dbd580c5d1ff3f342599ca0162c20845a7b0ea6a8fa0c88abea51643569ae3
3
+ metadata.gz: 5e7c1720f83cebc94a181cd94c65ea558ed9e10a4635545893dd5e1bf054f27a
4
+ data.tar.gz: f61b99bf85b449f9b5262fd32388bf378e5ecd949e9f35da00569025d9c4edda
5
5
  SHA512:
6
- metadata.gz: a3dca2799c3af8ac3a5298a5a67061cf4225bdc388972908f072c877d0c5108b714576db0b550b967c54526c785dd9f601fbc6a4b3720d90bd016ed200088227
7
- data.tar.gz: 53b99d38845de0067923c74518c21f2a370f8595e0eb6ad37a0beb5d3c8f2685e774a4aabb361e63aff7b699922fed4615db9e94c36db08f9e7acebff10ab26d
6
+ metadata.gz: a363047116d2e984f879cbc39b674faa1deac4791ee325eb616aeb0b482c8c06ab134cabff46ddd6449fb768ff4ca2b06d5f7bf722eb7cb210d6f7c364d94980
7
+ data.tar.gz: 47ca432654c35b2d8359c42d76e9dc517b8b797a5eac8efb74f5ae59fbcbbedef636a1c3df3891667bd2aefe0db7dd09ef1d1eab855438cef9c03d309f8f97e5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## Rails 7.1.0.rc2 (October 01, 2023) ##
2
+
3
+ * Fix `AS::MessagePack` with `ENV["RAILS_MAX_THREADS"]`.
4
+
5
+ *Jonathan Hefner*
6
+
7
+
1
8
  ## Rails 7.1.0.rc1 (September 27, 2023) ##
2
9
 
3
10
  * Add a new public API for broadcasting logs
@@ -202,5 +202,17 @@ module ActiveSupport
202
202
  def dispatch(&block)
203
203
  @broadcasts.each { |logger| block.call(logger) }
204
204
  end
205
+
206
+ def method_missing(name, *args)
207
+ loggers = @broadcasts.select { |logger| logger.respond_to?(name) }
208
+
209
+ if loggers.none?
210
+ super(name, *args)
211
+ elsif loggers.one?
212
+ loggers.first.send(name, *args)
213
+ else
214
+ loggers.map { |logger| logger.send(name, *args) }
215
+ end
216
+ end
205
217
  end
206
218
  end
@@ -10,7 +10,7 @@ module ActiveSupport
10
10
  MAJOR = 7
11
11
  MINOR = 1
12
12
  TINY = 0
13
- PRE = "rc1"
13
+ PRE = "rc2"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -14,9 +14,16 @@ module ActiveSupport
14
14
  # ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT)
15
15
  # # => true
16
16
  def self.logger_outputs_to?(logger, *sources)
17
- logdev = logger.instance_variable_get(:@logdev)
18
- logger_source = logdev.dev if logdev.respond_to?(:dev)
19
- sources.any? { |source| source == logger_source }
17
+ loggers = if logger.is_a?(BroadcastLogger)
18
+ logger.broadcasts
19
+ else
20
+ [logger]
21
+ end
22
+
23
+ logdevs = loggers.map { |logger| logger.instance_variable_get(:@logdev) }
24
+ logger_sources = logdevs.filter_map { |logdev| logdev.dev if logdev.respond_to?(:dev) }
25
+
26
+ (sources & logger_sources).any?
20
27
  end
21
28
 
22
29
  def initialize(*args, **kwargs)
@@ -51,7 +51,7 @@ module ActiveSupport
51
51
  install_unregistered_type_handler
52
52
  message_pack_factory.freeze
53
53
  end
54
- message_pack_factory.pool(ENV.fetch("RAILS_MAX_THREADS") { 5 })
54
+ message_pack_factory.pool(ENV.fetch("RAILS_MAX_THREADS", 5).to_i)
55
55
  end
56
56
  end
57
57
 
@@ -88,7 +88,7 @@ module ActiveSupport
88
88
  initializer "active_support.initialize_time_zone" do |app|
89
89
  begin
90
90
  TZInfo::DataSource.get
91
- rescue TZInfo::DataSourceNotFound, TZInfo::ZoneinfoDirectoryNotFound => e
91
+ rescue TZInfo::DataSourceNotFound => e
92
92
  raise e.exception "tzinfo-data is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle install"
93
93
  end
94
94
  require "active_support/core_ext/time/zones"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.0.rc1
4
+ version: 7.1.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-27 00:00:00.000000000 Z
11
+ date: 2023-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -446,10 +446,10 @@ licenses:
446
446
  - MIT
447
447
  metadata:
448
448
  bug_tracker_uri: https://github.com/rails/rails/issues
449
- changelog_uri: https://github.com/rails/rails/blob/v7.1.0.rc1/activesupport/CHANGELOG.md
450
- documentation_uri: https://api.rubyonrails.org/v7.1.0.rc1/
449
+ changelog_uri: https://github.com/rails/rails/blob/v7.1.0.rc2/activesupport/CHANGELOG.md
450
+ documentation_uri: https://api.rubyonrails.org/v7.1.0.rc2/
451
451
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
452
- source_code_uri: https://github.com/rails/rails/tree/v7.1.0.rc1/activesupport
452
+ source_code_uri: https://github.com/rails/rails/tree/v7.1.0.rc2/activesupport
453
453
  rubygems_mfa_required: 'true'
454
454
  post_install_message:
455
455
  rdoc_options: