groupdate 6.2.0 → 6.4.0

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: ee8a614ef0b4d869d534df2d0bb972296d26edd2839e430547d54a8ffb22a2b0
4
- data.tar.gz: f15a380692b7726895a3083a4bd5e013610f6583bce614ede9e2fefd06d30f60
3
+ metadata.gz: cdca24f5af218da761aff856a2798e39d4469fa5cdf5186d061572cea4b256a6
4
+ data.tar.gz: 3b327397c8ba2638ccda503d3d3fd9d641b86cf8018161fc3cbb7891122d3b3f
5
5
  SHA512:
6
- metadata.gz: 6145ca25662c5df8cab197d570a1bf1b26e7492e0404faba390d4af793992fbb3405c4995136b6818ac0be6a6bc3ff4da2ee8288860fd5c2b9b4fadad036c9e6
7
- data.tar.gz: aaccec08b13902b51c2eb8180bb5a0807e6d2905fdd5b658a3dfab74dd2b4f2fed96dffc2dc42edcf61fe0a4eb20e21efca6a86ef55402a1f9d594d7eecb77e1
6
+ metadata.gz: 0b06dcf600f13158dbf4d5edeab2212aedd21b4a2e4efb36d26ab1635c035c562e28932b03ed26bdb452c5118c125d38fc8ea665e2dc5c458a986bd87e62912b
7
+ data.tar.gz: 0b78a8ee21b370052d1eacffa3c5c42ceb059ec1a1d14a7b992076cd02cfe158dc6ecee027578aeb233d2adc1c3fa4e71b2f572bf87affd51077b2282e6b2e21
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 6.4.0 (2023-09-13)
2
+
3
+ - Added support for Trilogy
4
+
5
+ ## 6.3.0 (2023-07-02)
6
+
7
+ - Dropped support for Ruby < 3 and Rails < 6.1
8
+
9
+ ## 6.2.1 (2023-04-18)
10
+
11
+ - Fixed extra day with `DateTime` ranges
12
+
1
13
  ## 6.2.0 (2023-01-29)
2
14
 
3
15
  - Added support for async methods with Active Record 7.1
@@ -10,7 +10,7 @@ module Groupdate
10
10
 
11
11
  def calculate(*args, &block)
12
12
  # prevent calculate from being called twice
13
- return super if ActiveRecord::VERSION::STRING.to_f >= 6.1 && has_include?(args[1])
13
+ return super if has_include?(args[1])
14
14
 
15
15
  default_value = [:count, :sum].include?(args[0]) ? 0 : nil
16
16
  Groupdate.process_result(self, super, default_value: default_value)
@@ -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.2.0"
2
+ VERSION = "6.4.0"
3
3
  end
data/lib/groupdate.rb CHANGED
@@ -4,15 +4,15 @@ require "active_support/core_ext/module/attribute_accessors"
4
4
  require "active_support/time"
5
5
 
6
6
  # modules
7
- require "groupdate/magic"
8
- require "groupdate/series_builder"
9
- require "groupdate/version"
7
+ require_relative "groupdate/magic"
8
+ require_relative "groupdate/series_builder"
9
+ require_relative "groupdate/version"
10
10
 
11
11
  # adapters
12
- require "groupdate/adapters/base_adapter"
13
- require "groupdate/adapters/mysql_adapter"
14
- require "groupdate/adapters/postgresql_adapter"
15
- require "groupdate/adapters/sqlite_adapter"
12
+ require_relative "groupdate/adapters/base_adapter"
13
+ require_relative "groupdate/adapters/mysql_adapter"
14
+ require_relative "groupdate/adapters/postgresql_adapter"
15
+ require_relative "groupdate/adapters/sqlite_adapter"
16
16
 
17
17
  module Groupdate
18
18
  class Error < RuntimeError; end
@@ -43,12 +43,12 @@ module Groupdate
43
43
  end
44
44
  end
45
45
 
46
- Groupdate.register_adapter ["Mysql2", "Mysql2Spatial", "Mysql2Rgeo"], Groupdate::Adapters::MySQLAdapter
46
+ Groupdate.register_adapter ["Mysql2", "Mysql2Spatial", "Mysql2Rgeo", "Trilogy"], Groupdate::Adapters::MySQLAdapter
47
47
  Groupdate.register_adapter ["PostgreSQL", "PostGIS", "Redshift"], Groupdate::Adapters::PostgreSQLAdapter
48
48
  Groupdate.register_adapter "SQLite", Groupdate::Adapters::SQLiteAdapter
49
49
 
50
- require "groupdate/enumerable"
50
+ require_relative "groupdate/enumerable"
51
51
 
52
52
  ActiveSupport.on_load(:active_record) do
53
- require "groupdate/active_record"
53
+ require_relative "groupdate/active_record"
54
54
  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.2.0
4
+ version: 6.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-30 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.2'
19
+ version: '6.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '5.2'
26
+ version: '6.1'
27
27
  description:
28
28
  email: andrew@ankane.org
29
29
  executables: []
@@ -58,14 +58,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '2.6'
61
+ version: '3'
62
62
  required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  requirements: []
68
- rubygems_version: 3.4.1
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