active_reporting 0.4.1 → 0.4.2

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: 4470ea5ed19154c0f73c4205dfb251f327a076563eeee479a8ebf1410cfd6c81
4
- data.tar.gz: '038914792fde14a53347f7952336a68e3d2520a171dbb2a620342ba85dffc144'
3
+ metadata.gz: d27e433e477ff2baa8fe387b37e4f0996f50370fa7ccf312f6d167b029411ea6
4
+ data.tar.gz: e0a8859f97e37b055a5c7360e775fb78a08b6c58247030bfbfa96d2fc286ad6b
5
5
  SHA512:
6
- metadata.gz: 0dafa3b0a2d8a9731f14c51e1505bdf79b79cb52fb9b9ecabe3c8006340f946b60638090b775a830a8952f7dce1c32f75608eb488894e08d899e0cc6b5b0d5e5
7
- data.tar.gz: a4a2e65604d42d290582c50954aa66f991350bf5efbfd47887ae4534d4ed7811dc70538371cd693650124af7f1ef0843ebd4c62a84111527d35c268231a79a11
6
+ metadata.gz: 7a57b1c4c4c4908227a22fad753939c64053d37bf74458fad0784e069ee9c706c33cfd83a9d6f799d0d09ff4a8532c00b8d30d3970b77c95c27f748717fd94eb
7
+ data.tar.gz: e6bde1820453eb599d6720c6f3900cdb2feaef6c0a5cf297b357faf31fa3f60cdebd7579c003b8671c655373fbabf8e68589b18cb7704064219f615f557db566
data/.travis.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  sudo: false
2
2
  language: ruby
3
+ services:
4
+ - mysql
3
5
  addons:
4
6
  postgresql: "9.6"
5
7
  rvm:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.4.2 (2019-11-01)
2
+
3
+ ### Misc
4
+
5
+ * Test against Rails 6.0 final
6
+ * Fixed deprecated call to `to_hash` - *joshforbes*
7
+ * Corrected readme entry for `dimesions` option for `ActiveReporting::Metric` - *joshforbes*
8
+
1
9
  ## 0.4.1 (2019-05-28)
2
10
 
3
11
  ### Features
data/Gemfile CHANGED
@@ -15,7 +15,7 @@ when '5-1'
15
15
  when '5-2'
16
16
  gem 'activerecord', '~> 5.2.0'
17
17
  when '6-0'
18
- gem 'activerecord', '6.0.0.rc1'
18
+ gem 'activerecord', '6.0.0'
19
19
  end
20
20
 
21
21
  case rails
data/README.md CHANGED
@@ -10,7 +10,7 @@ ActiveReporting officially supports MySQL, PostgreSQL, and SQLite.
10
10
 
11
11
  ActiveReporting officially supports Ruby 2.4 and later. Other versions may work, but are not supported.
12
12
 
13
- ActiveReporting officially supports Rails 4.2, 5.1, and 5.2. Other versions may work, but are not supported.
13
+ ActiveReporting officially supports Rails 4.2, 5.1, 5.2, and 6.0. Other versions may work, but are not supported.
14
14
 
15
15
  ## Installation
16
16
 
@@ -285,7 +285,7 @@ my_metric = ActiveReporting::Metric.new(
285
285
 
286
286
  `aggregate` - The SQL aggregate used to calculate the metric. Supported aggregates include count, max, min, avg, and sum. (Default: `:count`)
287
287
 
288
- `dimensions` - An array of dimensions used for the metric. When given just a symbol, the default dimension label will be used for the dimension. You may specify a hierarchy level by using a hash. (Examples: `[:sales_rep, {order_date: :month}]`). In hierarchies you can customize the label in this way: `[{order_date: { label: :month, name: :a_custom_name_for_month }}]`. If you use a hash instead of a Symbol to define a hierarchy the `label` item must be a valid field in your table. The `name` can be whatever you want.
288
+ `dimensions` - An array of dimensions used for the metric. When given just a symbol, the default dimension label will be used for the dimension. You may specify a hierarchy level by using a hash. (Examples: `[:sales_rep, {order_date: :month}]`). In hierarchies you can customize the label in this way: `[{order_date: { field: :month, name: :a_custom_name_for_month }}]`. If you use a hash instead of a Symbol to define a hierarchy the `field` item must be a valid field in your table. The `name` can be whatever label you want.
289
289
 
290
290
  `dimension_filter` - A hash were the keys are dimension filter names and the values are the values passed into the filter.
291
291
 
@@ -36,7 +36,7 @@ module ActiveReporting
36
36
  private ######################################################################
37
37
 
38
38
  def build_data
39
- @data = model.connection.exec_query(statement.to_sql).to_hash
39
+ @data = model.connection.exec_query(statement.to_sql).to_a
40
40
  apply_dimension_callbacks
41
41
  @data
42
42
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveReporting
4
- VERSION = '0.4.1'
4
+ VERSION = '0.4.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_reporting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Drake
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-28 00:00:00.000000000 Z
11
+ date: 2019-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord