activemodel 7.2.0.beta3 → 7.2.0.rc1

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: 396169eea4f8612b0db751778ec46eeed05e2fc4dfeefb5b8762a5e6e2589ae4
4
- data.tar.gz: '09d668e0a70dd17d0504dff67f5604f721afa8d513dac77d2d7cc34305218d76'
3
+ metadata.gz: 4e4af947ba350cc2f26dbd4e5b56ddecb3b9d93dd54a99834713be23726c83d1
4
+ data.tar.gz: 6929a8bb5679a900bc99a032e35b39689783ebcdd761e40373217ab7b94ad54c
5
5
  SHA512:
6
- metadata.gz: d6a9d8fd13108700abf7c304abf11096b7e18e7dcd22f4362dd408ededdc688792fd1345f611300fa6455633881c55a712d39efa265852e26a54ab543f4daaee
7
- data.tar.gz: 3f29c7beb890c1c8f364538ad3a98cd63f054bde1610bfc35258eea8af108873f9e4ab4612b13a51f82784fe5954a0ce097f1ddc581cac679901a7154b4ca245
6
+ metadata.gz: d213f2746a84034813f0f0b7d8d0fb6e234d4675114a2111ed94681c40efc3ef32a53a5eb7a9bd6cfbf7d11887bf6c048404ee3e5fc7f746c51fe48ebb084923
7
+ data.tar.gz: 4f871ca04625b04cb48b30c48c683069f90ce31ef96cb554f6c2000785325105cc2241a8ae67ad0e24181a0feebcffb8188da7c85a58e68183dc949a3ea2f137
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## Rails 7.2.0.rc1 (August 06, 2024) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 7.2.0.beta3 (July 11, 2024) ##
2
7
 
3
8
  * No changes.
@@ -10,7 +10,7 @@ module ActiveModel
10
10
  MAJOR = 7
11
11
  MINOR = 2
12
12
  TINY = 0
13
- PRE = "beta3"
13
+ PRE = "rc1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -70,18 +70,33 @@ module ActiveModel
70
70
  /x
71
71
 
72
72
  if RUBY_VERSION >= "3.2"
73
- def fast_string_to_time(string)
74
- return unless ISO_DATETIME.match?(string)
75
-
76
- if is_utc?
77
- # XXX: Wrapping the Time object with Time.at because Time.new with `in:` in Ruby 3.2.0 used to return an invalid Time object
78
- # see: https://bugs.ruby-lang.org/issues/19292
79
- ::Time.at(::Time.new(string, in: "UTC"))
80
- else
81
- ::Time.new(string)
73
+ if Time.new(2000, 1, 1, 0, 0, 0, "-00:00").yday != 1 # Early 3.2.x had a bug
74
+ # BUG: Wrapping the Time object with Time.at because Time.new with `in:` in Ruby 3.2.0
75
+ # used to return an invalid Time object
76
+ # see: https://bugs.ruby-lang.org/issues/19292
77
+ def fast_string_to_time(string)
78
+ return unless string.include?("-") # Time.new("1234") # => 1234-01-01 00:00:00
79
+
80
+ if is_utc?
81
+ ::Time.at(::Time.new(string, in: "UTC"))
82
+ else
83
+ ::Time.new(string)
84
+ end
85
+ rescue ArgumentError
86
+ nil
87
+ end
88
+ else
89
+ def fast_string_to_time(string)
90
+ return unless string.include?("-") # Time.new("1234") # => 1234-01-01 00:00:00
91
+
92
+ if is_utc?
93
+ ::Time.new(string, in: "UTC")
94
+ else
95
+ ::Time.new(string)
96
+ end
97
+ rescue ArgumentError
98
+ nil
82
99
  end
83
- rescue ArgumentError
84
- nil
85
100
  end
86
101
  else
87
102
  def fast_string_to_time(string)
@@ -7,7 +7,11 @@ module ActiveModel
7
7
  module Helpers # :nodoc: all
8
8
  module Timezone
9
9
  def is_utc?
10
- ::Time.zone_default.nil? || ::Time.zone_default.match?("UTC")
10
+ if default = ::Time.zone_default
11
+ default.name == "UTC"
12
+ else
13
+ true
14
+ end
11
15
  end
12
16
 
13
17
  def default_timezone
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.0.beta3
4
+ version: 7.2.0.rc1
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: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2024-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 7.2.0.beta3
19
+ version: 7.2.0.rc1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 7.2.0.beta3
26
+ version: 7.2.0.rc1
27
27
  description: A toolkit for building modeling frameworks like Active Record. Rich support
28
28
  for attributes, callbacks, validations, serialization, internationalization, and
29
29
  testing.
@@ -112,10 +112,10 @@ licenses:
112
112
  - MIT
113
113
  metadata:
114
114
  bug_tracker_uri: https://github.com/rails/rails/issues
115
- changelog_uri: https://github.com/rails/rails/blob/v7.2.0.beta3/activemodel/CHANGELOG.md
116
- documentation_uri: https://api.rubyonrails.org/v7.2.0.beta3/
115
+ changelog_uri: https://github.com/rails/rails/blob/v7.2.0.rc1/activemodel/CHANGELOG.md
116
+ documentation_uri: https://api.rubyonrails.org/v7.2.0.rc1/
117
117
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
118
- source_code_uri: https://github.com/rails/rails/tree/v7.2.0.beta3/activemodel
118
+ source_code_uri: https://github.com/rails/rails/tree/v7.2.0.rc1/activemodel
119
119
  rubygems_mfa_required: 'true'
120
120
  post_install_message:
121
121
  rdoc_options: []