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 +4 -4
- data/README.md +1 -1
- data/app/controllers/adhoq/application_controller.rb +7 -0
- data/app/controllers/adhoq/authorization_methods.rb +3 -2
- data/app/controllers/adhoq/current_tables_controller.rb +1 -1
- data/app/controllers/adhoq/executions_controller.rb +10 -1
- data/lib/adhoq/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcc956fd60d482e84489aced477d68d8df73c142
|
4
|
+
data.tar.gz: 218b3bba8abf8e12d72ce80f9b7fdc761561f44f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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
|
|
@@ -44,7 +44,16 @@ module Adhoq
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def query_parameters
|
47
|
-
params[:parameters]
|
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
|
data/lib/adhoq/version.rb
CHANGED
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
|
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:
|
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.
|
487
|
+
rubygems_version: 2.5.1
|
488
488
|
signing_key:
|
489
489
|
specification_version: 4
|
490
490
|
summary: DB management console in the wild.
|