active_reporting 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a42a126d95b11825c31edc43efd23fb483238266
4
- data.tar.gz: 1679cf35f25aeee3f40117ffce4d4b4fdf8be499
3
+ metadata.gz: b787d85e5e44d1efda8c727cc6b289674bbebb35
4
+ data.tar.gz: 567f54e1ea4471e679f827c8819c220a1d7dca28
5
5
  SHA512:
6
- metadata.gz: 2eb0fba1d05b5f482716db8cd47cf165546c35533e061a46d55abc8708359b3ba3f0812db60d68b85cf1375554f25037a6e83ff231db1e988d4b6014e2198431
7
- data.tar.gz: d2d2be2376f03a9590142bd732369426510c7f0916bc432f42e82c14e4dcff406a726a8de53ae2a4d7774b8f39e93c3485c54236eafd244dcf8a022a3494f609
6
+ metadata.gz: a89a8bb2e06495ff3fb14f9f5b6356840c09298dcda898433d057b658481e73aedf362ec2b4ccba3b07f7a3878f69e4fdfdfa55521fa67c10c43232caaa0cc98
7
+ data.tar.gz: adfb3ea1b3de2e96ea2fb10dd178cea6a7f68d5a9761e938b9dd9f0eef8c43b54af3cb583f7bca0f6717b7fab6f769d714087dea281830bef95b1a98cd800130
@@ -1,16 +1,15 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.2.7
5
- - 2.3.4
6
- - 2.4.1
4
+ - 2.3.7
5
+ - 2.4.4
6
+ - 2.5.1
7
7
  env:
8
+ - RAILS=5-2 DB=sqlite
9
+ - RAILS=5-2 DB=pg
8
10
  - RAILS=5-1 DB=sqlite
9
11
  - RAILS=5-1 DB=pg
10
12
  - RAILS=5-1 DB=mysql
11
- - RAILS=5-0 DB=sqlite
12
- - RAILS=5-0 DB=pg
13
- - RAILS=5-0 DB=mysql
14
13
  - RAILS=4-2 DB=sqlite
15
14
  - RAILS=4-2 DB=pg
16
15
  - RAILS=4-2 DB=mysql
@@ -1,3 +1,17 @@
1
+ ## 0.3.0 (2018-04-12)
2
+
3
+ ### Bug Fixes
4
+
5
+ * Specify rescue from LoadError for ransack (#9) *niborg*
6
+ * Fix ransack fallback logic *germanotm*
7
+
8
+ ## Misc
9
+
10
+ * Test against Rails 5.2
11
+ * Test against Ruby 2.5
12
+ * Drop support for Rails 5.0 (EOL-ed)
13
+ * Drop support for Ruby 2.2 (EOL-ed)
14
+
1
15
  ## 0.2.0 (2017-06-17)
2
16
 
3
17
  ### Breaking Changes
data/Gemfile CHANGED
@@ -4,13 +4,20 @@ gemspec
4
4
 
5
5
  gem 'simplecov', require: false
6
6
 
7
- rails = ENV['RAILS'] || '5-1'
7
+ rails = ENV['RAILS'] || '5-2'
8
+ db = ENV['DB'] || 'sqlite'
8
9
 
9
10
  case rails
10
11
  when '4-2'
11
12
  gem 'activerecord', '~> 4.2.0'
12
- when '5-0'
13
- gem 'activerecord', '~> 5.0.0'
14
- else
13
+ if ENV['DB'] == 'pg'
14
+ gem 'pg', '~> 0.18'
15
+ end
16
+ if ENV['DB'] == 'mysql'
17
+ gem 'mysql2', '~> 0.3.18'
18
+ end
19
+ when '5-1'
15
20
  gem 'activerecord', '~> 5.1.0'
21
+ else
22
+ gem 'activerecord', '~> 5.2.0'
16
23
  end
data/README.md CHANGED
@@ -8,6 +8,10 @@ ActiveReporting implements various terminology used in Relational Online Analyti
8
8
 
9
9
  ActiveReporting officially supports MySQL, PostgreSQL, and SQLite.
10
10
 
11
+ ActiveReporting officially supports Ruby 2.3, 2.4, and 2.5.
12
+
13
+ ActiveReporting officially supports Rails 4.2, 5.1, and 5.2.
14
+
11
15
  ## Installation
12
16
 
13
17
  Add this line to your application's Gemfile:
@@ -12,7 +12,7 @@ require 'active_reporting/version'
12
12
  begin
13
13
  require 'ransack'
14
14
  ActiveReporting::Configuration.ransack_available = true
15
- rescue
15
+ rescue LoadError, StandardError
16
16
  ActiveReporting::Configuration.ransack_available = false
17
17
  end
18
18
 
@@ -1,6 +1,6 @@
1
1
  module ActiveReporting
2
2
  class DimensionFilter
3
- attr_reader :type, :body
3
+ attr_reader :name, :type, :body
4
4
 
5
5
  # Factory for creating a new DimensionFilter
6
6
  #
@@ -143,7 +143,7 @@ module ActiveReporting
143
143
  # Invoke this method to make all dimension filters fallback to use ransack
144
144
  # if they are not defined as scopes on the model
145
145
  def self.use_ransack_for_unknown_dimension_filters
146
- raise RansackNotAvailable, 'Ransack not available. Please include it in your Gemfile.' unless ransack_available
146
+ raise RansackNotAvailable, 'Ransack not available. Please include it in your Gemfile.' unless Configuration.ransack_available
147
147
  @ransack_fallback = true
148
148
  end
149
149
 
@@ -163,7 +163,7 @@ module ActiveReporting
163
163
  @dimension_filters ||= {}
164
164
  dm = @dimension_filters[name.to_sym]
165
165
  return dm if dm.present?
166
- return @dimension_filters[name.to_sym] = DimensionFilter.build(self, name, :ransack) if ransack_fallback
166
+ return @dimension_filters[name.to_sym] = DimensionFilter.build(name, :ransack) if ransack_fallback
167
167
  raise UnknownDimensionFilter, "Dimension filter '#{name}' not found on fact model '#{self.name}'"
168
168
  end
169
169
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveReporting
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  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.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Drake
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-17 00:00:00.000000000 Z
11
+ date: 2018-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  version: '0'
187
187
  requirements: []
188
188
  rubyforge_project:
189
- rubygems_version: 2.6.11
189
+ rubygems_version: 2.6.14
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: Add relational OLAP-like functionality for ActiveRecord