rollups 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/generators/rollups_generator.rb +9 -1
- data/lib/rollup.rb +1 -4
- data/lib/rollup/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b33b1111b50f1f8fcc5b6982932a09c840ca4f4a81191380737e8cdf68775c9e
|
4
|
+
data.tar.gz: 85d9688173df57cd7ab8eb40a4def91adde625303df8374a397e2e136820256f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f64fac7253c86ae3bbc92086551f8c76cb565d5d0630b700707ffd059630bb60017469be586126bc54051ca8df6ccfdfbb42664eacefc982e9618457f4e5e65b
|
7
|
+
data.tar.gz: a7971f424d126c532f03208cf7fb9f72d505787dd3251df33db10d6487d39e29ab6de7d55249d064c9153d50cf2bb07a29a0a3124c1c1111cb585560565b6418
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Works great with [Ahoy](https://github.com/ankane/ahoy) and [Searchjoy](https://github.com/ankane/searchjoy)
|
6
6
|
|
7
|
-
[![Build Status](https://
|
7
|
+
[![Build Status](https://github.com/ankane/rollup/workflows/build/badge.svg?branch=master)](https://github.com/ankane/rollup/actions)
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -12,7 +12,7 @@ class RollupsGenerator < Rails::Generators::Base
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def migration_source
|
15
|
-
case
|
15
|
+
case adapter
|
16
16
|
when /postg/i
|
17
17
|
"dimensions.rb"
|
18
18
|
else
|
@@ -23,4 +23,12 @@ class RollupsGenerator < Rails::Generators::Base
|
|
23
23
|
def migration_version
|
24
24
|
"[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
|
25
25
|
end
|
26
|
+
|
27
|
+
def adapter
|
28
|
+
if ActiveRecord::VERSION::STRING.to_f >= 6.1
|
29
|
+
ActiveRecord::Base.connection_db_config.adapter.to_s
|
30
|
+
else
|
31
|
+
ActiveRecord::Base.connection_config[:adapter].to_s
|
32
|
+
end
|
33
|
+
end
|
26
34
|
end
|
data/lib/rollup.rb
CHANGED
@@ -75,10 +75,7 @@ class Rollup < ActiveRecord::Base
|
|
75
75
|
# feels cleaner than overriding _read_attribute
|
76
76
|
def inspect
|
77
77
|
if Utils.date_interval?(interval)
|
78
|
-
|
79
|
-
previous_time = previous_time.to_s(:db) if previous_time.is_a?(Time)
|
80
|
-
previous_time = previous_time + " 00:00:00" if previous_time.length == 10
|
81
|
-
super.sub("time: \"#{previous_time}\"", "time: \"#{time.to_s(:db)}\"")
|
78
|
+
super.sub(/time: "[^"]+"/, "time: \"#{time.to_s(:db)}\"")
|
82
79
|
else
|
83
80
|
super
|
84
81
|
end
|
data/lib/rollup/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rollups
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email: andrew@chartkick.com
|
141
141
|
executables: []
|
142
142
|
extensions: []
|
@@ -158,7 +158,7 @@ homepage: https://github.com/ankane/rollup
|
|
158
158
|
licenses:
|
159
159
|
- MIT
|
160
160
|
metadata: {}
|
161
|
-
post_install_message:
|
161
|
+
post_install_message:
|
162
162
|
rdoc_options: []
|
163
163
|
require_paths:
|
164
164
|
- lib
|
@@ -173,8 +173,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
requirements: []
|
176
|
-
rubygems_version: 3.
|
177
|
-
signing_key:
|
176
|
+
rubygems_version: 3.2.3
|
177
|
+
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: Rollup time-series data in Rails
|
180
180
|
test_files: []
|