to_timezone 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -5
- data/lib/to_timezone/tz_ext.rb +2 -2
- data/lib/to_timezone/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b67706d256c07a1a294abfdcbf61b900ddd15af6c37a6e1f7ec6ed2a3c996a8b
|
|
4
|
+
data.tar.gz: 0a88f24156690bab22c4ba353fb9db5c32a9191a405bd76d6bb647e2f482bddd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 894a78cac2ee9c885e789ae81089e25ce1f8eb061df2395fab5d0cca1fd31eda595e2e86463f310b0c07aa1766afb35a359a0571e78e36c1b63f4d4b88907eba
|
|
7
|
+
data.tar.gz: 8f52381189887ce9e5bb1088460fc3715756100aa6f91f30480867cad8835a9f66daba7ac08cbe3542d68a050b6d3bcb45a266c1b9b87ea77f050787183fe4a5
|
data/CHANGELOG.md
CHANGED
|
@@ -7,13 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
- Split `TzExt` into two modules — `TzExt` (Time, String, ActiveSupport::TimeWithZone) and `TzExtDateTime` (DateTime) — eliminating the `is_a?(DateTime)` runtime branch from every method call
|
|
12
|
-
- Replaced `require 'active_support'` + `require 'active_support/core_ext/time'` with the targeted `require 'active_support/time'`, reducing load overhead in standalone (non-Rails) usage
|
|
13
|
-
- Method names in `define_method` now use symbols (`:"to_#{abbr}"`) instead of strings, skipping the string-to-symbol intern step at load time
|
|
10
|
+
## [0.4.1] - 2026-06-26
|
|
14
11
|
|
|
15
12
|
### Fixed
|
|
16
|
-
-
|
|
13
|
+
- Replaced `to_time.in_time_zone(timezone)` with `in_time_zone(timezone)` in `TzExtDateTime` to resolve `NoMethodError: undefined method 'deprecator' for ActiveSupport:Module` raised by ActiveSupport 7.2, which deprecated `DateTime#to_time`
|
|
17
14
|
|
|
18
15
|
## [0.4.0] - 2026-06-26
|
|
19
16
|
|
data/lib/to_timezone/tz_ext.rb
CHANGED
|
@@ -12,10 +12,10 @@ module ToTimezone
|
|
|
12
12
|
end
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
# DateTime
|
|
15
|
+
# DateTime supports in_time_zone directly in ActiveSupport 7.x+.
|
|
16
16
|
module TzExtDateTime
|
|
17
17
|
ToTimezone::Tzs::TIMEZONES.each do |abbr, timezone|
|
|
18
|
-
define_method(:"to_#{abbr}") {
|
|
18
|
+
define_method(:"to_#{abbr}") { in_time_zone(timezone) }
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
end
|
data/lib/to_timezone/version.rb
CHANGED