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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 350303dbe86ebf35940bf3d1106bf667294ed5b2dc9a8a37ed17fdd9b0bf3edb
4
- data.tar.gz: 7df68e120ca9ae4860721d280b3d63bb1858e6ae338716bfad4401061b9359f1
3
+ metadata.gz: b67706d256c07a1a294abfdcbf61b900ddd15af6c37a6e1f7ec6ed2a3c996a8b
4
+ data.tar.gz: 0a88f24156690bab22c4ba353fb9db5c32a9191a405bd76d6bb647e2f482bddd
5
5
  SHA512:
6
- metadata.gz: '091de63eb19ea8be48064261655fd624e4ad1ccdd729cccc8006fab217b0ce4c91d01c188a97a63ab6d2eeccfbfe84ad74570cd59df7836aa009fc9f9a36f549'
7
- data.tar.gz: 63d08861e11394b95cd63ab3d3a868300212792669344b59341c4ac48aa2840f7b3d07d0cb9c4a62628e551fdad261bbc44c608a86e57934dd47345de9207794
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
- ### Changed
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
- - Minimum Ruby version raised from `2.5.0` to `2.7.0`; Ruby 2.5 and 2.6 reached end-of-life in March 2021 and March 2022 respectively
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
 
@@ -12,10 +12,10 @@ module ToTimezone
12
12
  end
13
13
  end
14
14
 
15
- # DateTime#in_time_zone requires a prior to_time conversion.
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}") { to_time.in_time_zone(timezone) }
18
+ define_method(:"to_#{abbr}") { in_time_zone(timezone) }
19
19
  end
20
20
  end
21
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ToTimezone
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_timezone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nujian Den Mark Meralpis