groupdate 6.1.0 → 6.2.1

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: 95d89de45bf1e6828b313f8181a5b68ba1ba7c32b173bc0a9c15290e7aec9cd6
4
- data.tar.gz: e39b910219e23681dac05095ae0a6a81de70e846f7bc089bb45d0bd3a4849211
3
+ metadata.gz: 372cf4471ee65729f41e684b45f5b3e05333379390fab3956df568a2fa89c8cd
4
+ data.tar.gz: 549f1a34474348dfc96c7a0c244218688e4c2d45cd9b935a3c5ff63b03873968
5
5
  SHA512:
6
- metadata.gz: 74a5a30dc46ad1f8087889dcd5ef19f995e60b691adaadf8a01576b14086085ee9dece80bc45e8b14bac0dd001f51ca6015e4b503c339cc2ae20c9f8b7dc10f9
7
- data.tar.gz: 1067a26e0e5b99c36a93e501eda2f152056e46b8c96ae6cfd1468464cebf0113455fdcbad288730d31d9b527b05411a6c20fb71de6575501b183d07e3aed3d36
6
+ metadata.gz: 17009c3b4061583998a5419edca9b62fb138136097d9ef1a719dc04a09bd5f3583be45bae5639498000318cffa2d5d2e0a31b0e2f564a1d3cc61016d1db7f4f2
7
+ data.tar.gz: 1fcb4a2a87baf147fa763508f0b17b01bbae8c28fed284055282ec196163e92026548f87ddcf381fba280c2d5a2e4a61adb54d8e8f4334252ec481e4f04f92d9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 6.2.1 (2023-04-18)
2
+
3
+ - Fixed extra day with `DateTime` ranges
4
+
5
+ ## 6.2.0 (2023-01-29)
6
+
7
+ - Added support for async methods with Active Record 7.1
8
+
1
9
  ## 6.1.0 (2022-04-05)
2
10
 
3
11
  - Added `expand_range` option
@@ -125,6 +125,10 @@ module Groupdate
125
125
  end
126
126
 
127
127
  def perform(relation, result, default_value:)
128
+ if defined?(ActiveRecord::Promise) && result.is_a?(ActiveRecord::Promise)
129
+ return result.then { |r| perform(relation, r, default_value: default_value) }
130
+ end
131
+
128
132
  multiple_groups = relation.group_values.size > 1
129
133
 
130
134
  check_nils(result, multiple_groups, relation)
@@ -118,7 +118,7 @@ module Groupdate
118
118
 
119
119
  finish = time_range.end
120
120
  finish = finish.in_time_zone(time_zone) if finish
121
- if time_range.end.is_a?(Date) && !exclude_end
121
+ if time_range.end.is_a?(Date) && !time_range.end.is_a?(DateTime) && !exclude_end
122
122
  finish += 1.day
123
123
  exclude_end = true
124
124
  end
@@ -1,3 +1,3 @@
1
1
  module Groupdate
2
- VERSION = "6.1.0"
2
+ VERSION = "6.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groupdate
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-05 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  requirements: []
68
- rubygems_version: 3.3.7
68
+ rubygems_version: 3.4.10
69
69
  signing_key:
70
70
  specification_version: 4
71
71
  summary: The simplest way to group temporal data