to_timezone 0.4.0 → 0.4.2

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: 89b2ab2bf2befe84717ca552f54025d1b8fdc29597c080ca0ab39fa2952c5a2d
4
+ data.tar.gz: d39ca8003726babdbd309d081cbf92039a4509070a756670619e882083342c7b
5
5
  SHA512:
6
- metadata.gz: '091de63eb19ea8be48064261655fd624e4ad1ccdd729cccc8006fab217b0ce4c91d01c188a97a63ab6d2eeccfbfe84ad74570cd59df7836aa009fc9f9a36f549'
7
- data.tar.gz: 63d08861e11394b95cd63ab3d3a868300212792669344b59341c4ac48aa2840f7b3d07d0cb9c4a62628e551fdad261bbc44c608a86e57934dd47345de9207794
6
+ metadata.gz: 21e184615b454b2a4e49c42971e8f126c50b7446f9e0efbcaafacfff2e178fa3556174e3fb92ec54341f00735dbb2bdd4ba4905fcea43d09612386b192b9a676
7
+ data.tar.gz: bbf177d2a05fc5d4eec1b8f863fd9b65b7efb4f0bd2463ad9710776082b98d8ff7489646269e7cc01e42e4794b566710911abb1d297d8cfac3d18cb48e92c0bc
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.2'
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nujian Den Mark Meralpis
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
82
- rubygems_version: 4.0.10
82
+ rubygems_version: 4.0.16
83
83
  specification_version: 4
84
84
  summary: Seamlessly convert Time and DateTime objects to different time zones with
85
85
  intuitive methods like `.to_pht`, `.to_ict`, and more.