calculate-all 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_config.yml +1 -0
- data/lib/calculate-all.rb +6 -1
- data/lib/calculate-all/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35426c107c947f1f28da7166c703bade37858910
|
4
|
+
data.tar.gz: 810c8b1b9020a9ec4aef2886b6a6fc523f44340e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d90936efd4b9a78893e534b347c92934becc305281a7e2b2e9582644eaf3e063da8311c30a8da2b48ca0fa893024a6800e008af964d21a7f3eb64b4c2789a4d9
|
7
|
+
data.tar.gz: ac2dcf69499e33939e28f5b9bc7cd9582e1796b628910edf1ac20173ce6c373f903d8b958eb94f4840927acfd2ead5b22d3b15be4dbec13f17d31a0debe604a4
|
data/_config.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
theme: jekyll-theme-cayman
|
data/lib/calculate-all.rb
CHANGED
@@ -36,7 +36,12 @@ module CalculateAll
|
|
36
36
|
# Note the map(&:to_s). It is required since groupdate returns a
|
37
37
|
# Groupdate::OrderHack instead of a string for the group_values which is not
|
38
38
|
# accepted by ActiveRecord's pluck method.
|
39
|
-
|
39
|
+
sql_snippets = group_values.map(&:to_s) + functions.values
|
40
|
+
# Fix DEPRECATION WARNING:
|
41
|
+
# Dangerous query method, will be disallowed in Rails 6.0
|
42
|
+
# using Arel.sql() to silence the warning
|
43
|
+
# https://github.com/rails/rails/commit/310c3a8f2d043f3d00d3f703052a1e160430a2c2
|
44
|
+
pluck(*sql_snippets.map { |sql| Arel.sql(sql) }).each do |row|
|
40
45
|
|
41
46
|
# If no grouping, make sure it is still a results array
|
42
47
|
row = [row] if plain_rows
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calculate-all
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- codesnik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- LICENSE.txt
|
123
123
|
- README.md
|
124
124
|
- Rakefile
|
125
|
+
- _config.yml
|
125
126
|
- bin/console
|
126
127
|
- bin/setup
|
127
128
|
- calculate-all.gemspec
|