adhoq 0.0.7 → 0.1.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: 02a157e9e5f920c790dacf15b8922fc3788e72f5
4
- data.tar.gz: 29ed73191c4f2446ee01b1c9d4963ad232c982a4
3
+ metadata.gz: fcc956fd60d482e84489aced477d68d8df73c142
4
+ data.tar.gz: 218b3bba8abf8e12d72ce80f9b7fdc761561f44f
5
5
  SHA512:
6
- metadata.gz: 930398b399c5a821fe2374ddc37c1563224d14a03add9a0523af2b0fa427801ca345d6c894674445fac1178f7be07aeed6a747a006883da1168d191370c9bdcb
7
- data.tar.gz: c0e698cfd0ca88aff00437bd88c6fdeaf9ddeb72b6b8b3528638dea83cab0678b704100c1156920185f21d34d3557252f1bfb1d7501df7a7f5440f45e63d51ef
6
+ metadata.gz: 9a2c43c464d372904b2b294c4d02ea831de5a6f54b72a1304da1d3becef429202fb06f93cf6d2da45d0ffc1f29e319a846b346b446cd08fb8326a4903cb694ac
7
+ data.tar.gz: cf2c9a58b577e0fb4403b6274d13ac4052d9528a2d37ab8fb97505aef48fd893d338ab43b29640a544ad9faa85fc0b8182445fbef1316c45e14015788c5cb578
data/README.md CHANGED
@@ -12,7 +12,7 @@ Rails engine to generate instant reports from adhoc SQL query.
12
12
  - .json
13
13
  - .xlsx
14
14
  - Persist generated report as local file or in AWS S3
15
- - Rails 4.x & 3.2 support
15
+ - Rails 4.x
16
16
  - Nice administration console with rails engine
17
17
 
18
18
  ### Future planning
@@ -2,6 +2,13 @@ module Adhoq
2
2
  class ApplicationController < ::ApplicationController
3
3
  layout 'adhoq/application'
4
4
 
5
+ # NOTE support for before Rails5 application
6
+ unless respond_to?(:before_action)
7
+ def self.before_action(*args)
8
+ before_filter(*args)
9
+ end
10
+ end
11
+
5
12
  include Adhoq::AuthorizationMethods
6
13
  end
7
14
  end
@@ -3,10 +3,9 @@ module Adhoq
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  included do |controller|
6
- controller.before_filter Authorizer.new
6
+ controller.before_action Authorizer.new
7
7
 
8
8
  helper_method :adhoq_current_user
9
- hide_action :adhoq_current_user
10
9
  end
11
10
 
12
11
  class Authorizer
@@ -27,6 +26,8 @@ module Adhoq
27
26
  end
28
27
  end
29
28
 
29
+ private
30
+
30
31
  def adhoq_current_user
31
32
  @_adhoq_current_user_proc ||= Adhoq.config.callablize(:current_user)
32
33
 
@@ -1,6 +1,6 @@
1
1
  module Adhoq
2
2
  class CurrentTablesController < Adhoq::ApplicationController
3
- before_filter :eager_load_models
3
+ before_action :eager_load_models
4
4
 
5
5
  def index
6
6
  hidden_model_names = Array(Adhoq.config.hidden_model_names)
@@ -44,7 +44,16 @@ module Adhoq
44
44
  end
45
45
 
46
46
  def query_parameters
47
- params[:parameters] || HashWithIndifferentAccess.new
47
+ if params[:parameters]
48
+ if params[:parameters].kind_of?(Hash)
49
+ params[:parameters]
50
+ else
51
+ # for after Rails5
52
+ params[:parameters].to_unsafe_hash
53
+ end
54
+ else
55
+ HashWithIndifferentAccess.new
56
+ end
48
57
  end
49
58
  end
50
59
  end
@@ -1,3 +1,3 @@
1
1
  module Adhoq
2
- VERSION = "0.0.7"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adhoq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyosuke MOROHASHI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-29 00:00:00.000000000 Z
11
+ date: 2016-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -484,7 +484,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
484
484
  version: '0'
485
485
  requirements: []
486
486
  rubyforge_project:
487
- rubygems_version: 2.4.5
487
+ rubygems_version: 2.5.1
488
488
  signing_key:
489
489
  specification_version: 4
490
490
  summary: DB management console in the wild.