groupdate 6.5.1 → 6.6.0
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 +45 -0
- data/LICENSE.txt +1 -1
- data/README.md +8 -8
- data/lib/groupdate/adapters/base_adapter.rb +2 -8
- data/lib/groupdate/version.rb +1 -1
- metadata +6 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e81c8d8bce77a4b40a6e612c9dac7017561e3083cbe3f232ca7326d4cbc45941
|
4
|
+
data.tar.gz: 993879fa7e1fd657e3362dd2e8edcda080c5c808cb5265ae9e14f46d5704a870
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 867a01e2efd77e36617edcc345a1503194a32518115afcd6f952f0eecf1fb03a26c1e4abbbb8acf82255db650408403c4c6744008e17d0c6355375a37b4cc10f
|
7
|
+
data.tar.gz: d28f72bb69616b0389107d902758b41e1268c5785edb442406f9b213e8a1790185f3b61e91c7496edd992a6599b7bfd967721d861be79d78d3e28c3753b15cac
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 6.6.0 (2025-05-04)
|
2
|
+
|
3
|
+
- Dropped support for Ruby < 3.2 and Active Record < 7.1
|
4
|
+
|
1
5
|
## 6.5.1 (2024-10-07)
|
2
6
|
|
3
7
|
- Fixed connection leasing for Active Record 7.2+
|
@@ -272,3 +276,44 @@ Breaking changes
|
|
272
276
|
## 1.0.0 (2013-05-15)
|
273
277
|
|
274
278
|
- First major release
|
279
|
+
|
280
|
+
## 0.1.6 (2013-05-07)
|
281
|
+
|
282
|
+
- Fixed error with Ruby 1.8
|
283
|
+
|
284
|
+
## 0.1.5 (2013-05-01)
|
285
|
+
|
286
|
+
- Added support for getting the entire series
|
287
|
+
|
288
|
+
## 0.1.4 (2013-05-01)
|
289
|
+
|
290
|
+
- Added support for Ruby 1.8
|
291
|
+
|
292
|
+
## 0.1.3 (2013-04-25)
|
293
|
+
|
294
|
+
- Improved field names for ordering
|
295
|
+
|
296
|
+
## 0.1.2 (2013-04-24)
|
297
|
+
|
298
|
+
- Added ability to order easily
|
299
|
+
|
300
|
+
## 0.1.1 (2013-04-21)
|
301
|
+
|
302
|
+
- Improved return types for MySQL
|
303
|
+
|
304
|
+
## 0.1.0 (2013-04-21)
|
305
|
+
|
306
|
+
- Added `day_of_week`
|
307
|
+
- Added `hour_of_day`
|
308
|
+
|
309
|
+
## 0.0.3 (2013-04-18)
|
310
|
+
|
311
|
+
- Added support for Rails time zone strings
|
312
|
+
|
313
|
+
## 0.0.2 (2013-04-18)
|
314
|
+
|
315
|
+
- Added tests
|
316
|
+
|
317
|
+
## 0.0.1 (2013-04-17)
|
318
|
+
|
319
|
+
- First release
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -32,9 +32,9 @@ For MySQL, MariaDB, and SQLite, also follow [these instructions](#additional-ins
|
|
32
32
|
```ruby
|
33
33
|
User.group_by_day(:created_at).count
|
34
34
|
# {
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
35
|
+
# Wed, 01 Jan 2025 => 50,
|
36
|
+
# Thu, 02 Jan 2025 => 100,
|
37
|
+
# Fri, 03 Jan 2025 => 34
|
38
38
|
# }
|
39
39
|
```
|
40
40
|
|
@@ -75,9 +75,9 @@ or
|
|
75
75
|
```ruby
|
76
76
|
User.group_by_week(:created_at, time_zone: "Pacific Time (US & Canada)").count
|
77
77
|
# {
|
78
|
-
# Sun,
|
79
|
-
# Sun,
|
80
|
-
# Sun,
|
78
|
+
# Sun, 05 Jan 2025 => 70,
|
79
|
+
# Sun, 12 Jan 2025 => 54,
|
80
|
+
# Sun, 19 Jan 2025 => 80
|
81
81
|
# }
|
82
82
|
```
|
83
83
|
|
@@ -154,8 +154,8 @@ To get keys in a different format, use:
|
|
154
154
|
```ruby
|
155
155
|
User.group_by_month(:created_at, format: "%b %Y").count
|
156
156
|
# {
|
157
|
-
# "Jan
|
158
|
-
# "Feb
|
157
|
+
# "Jan 2025" => 10
|
158
|
+
# "Feb 2025" => 12
|
159
159
|
# }
|
160
160
|
```
|
161
161
|
|
@@ -14,14 +14,8 @@ module Groupdate
|
|
14
14
|
@n_seconds = n_seconds
|
15
15
|
@adapter_name = adapter_name
|
16
16
|
|
17
|
-
if ActiveRecord
|
18
|
-
|
19
|
-
raise Groupdate::Error, "ActiveRecord.default_timezone must be :utc to use Groupdate"
|
20
|
-
end
|
21
|
-
else
|
22
|
-
if relation.default_timezone == :local
|
23
|
-
raise Groupdate::Error, "ActiveRecord::Base.default_timezone must be :utc to use Groupdate"
|
24
|
-
end
|
17
|
+
if ActiveRecord.default_timezone == :local
|
18
|
+
raise Groupdate::Error, "ActiveRecord.default_timezone must be :utc to use Groupdate"
|
25
19
|
end
|
26
20
|
end
|
27
21
|
|
data/lib/groupdate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groupdate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activesupport
|
@@ -16,15 +15,14 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '7'
|
18
|
+
version: '7.1'
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: '7'
|
27
|
-
description:
|
25
|
+
version: '7.1'
|
28
26
|
email: andrew@ankane.org
|
29
27
|
executables: []
|
30
28
|
extensions: []
|
@@ -50,7 +48,6 @@ homepage: https://github.com/ankane/groupdate
|
|
50
48
|
licenses:
|
51
49
|
- MIT
|
52
50
|
metadata: {}
|
53
|
-
post_install_message:
|
54
51
|
rdoc_options: []
|
55
52
|
require_paths:
|
56
53
|
- lib
|
@@ -58,15 +55,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
58
55
|
requirements:
|
59
56
|
- - ">="
|
60
57
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
58
|
+
version: '3.2'
|
62
59
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
60
|
requirements:
|
64
61
|
- - ">="
|
65
62
|
- !ruby/object:Gem::Version
|
66
63
|
version: '0'
|
67
64
|
requirements: []
|
68
|
-
rubygems_version: 3.
|
69
|
-
signing_key:
|
65
|
+
rubygems_version: 3.6.7
|
70
66
|
specification_version: 4
|
71
67
|
summary: The simplest way to group temporal data
|
72
68
|
test_files: []
|