groupdate 6.2.0 → 6.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/groupdate/relation.rb +1 -1
- data/lib/groupdate/series_builder.rb +1 -1
- data/lib/groupdate/version.rb +1 -1
- data/lib/groupdate.rb +9 -9
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a4126fc8a5f5889756f5dafbe8a2aad2ec9e1f02e3ecebf28087aaa658329e9
|
4
|
+
data.tar.gz: f449b78239463cb3eb30cb0f1e07010b0a9826beaaafa6d29c07568f8af6781c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85907ac131fdbeaaaa66dc220f933f935deae5d97dddb1ed9fcfef06ff9cbc55cfdd01ea3447bb659bff1809a415e94a19c00008dea3c5e94fab8c2403c74bf8
|
7
|
+
data.tar.gz: d069f3f9b5ff8cbd5f2aba12f04d9921e017d541b0efe043679c514593827db0e2a6150cc18ec6cc4f33fba869c1ca263776e4c00bd91311ef2c69e0cafa27b2
|
data/CHANGELOG.md
CHANGED
data/lib/groupdate/relation.rb
CHANGED
@@ -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
|
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
|
data/lib/groupdate/version.rb
CHANGED
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
|
-
|
8
|
-
|
9
|
-
|
7
|
+
require_relative "groupdate/magic"
|
8
|
+
require_relative "groupdate/series_builder"
|
9
|
+
require_relative "groupdate/version"
|
10
10
|
|
11
11
|
# adapters
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
@@ -47,8 +47,8 @@ Groupdate.register_adapter ["Mysql2", "Mysql2Spatial", "Mysql2Rgeo"], Groupdate:
|
|
47
47
|
Groupdate.register_adapter ["PostgreSQL", "PostGIS", "Redshift"], Groupdate::Adapters::PostgreSQLAdapter
|
48
48
|
Groupdate.register_adapter "SQLite", Groupdate::Adapters::SQLiteAdapter
|
49
49
|
|
50
|
-
|
50
|
+
require_relative "groupdate/enumerable"
|
51
51
|
|
52
52
|
ActiveSupport.on_load(:active_record) do
|
53
|
-
|
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.
|
4
|
+
version: 6.3.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-
|
11
|
+
date: 2023-07-02 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: '
|
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: '
|
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: '
|
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.
|
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
|