adhoq 0.1.2 → 0.2.0

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
  SHA1:
3
- metadata.gz: ff58c455df9c61e8df3a602a4596e3403b3ee488
4
- data.tar.gz: 9a4110eb2bb142689cc9d55adcfe67fe44227e07
3
+ metadata.gz: 610933cb558524c8a284e46b1c237a2ed11b5b2f
4
+ data.tar.gz: 683f284599de1c18c082ae941821b64759315773
5
5
  SHA512:
6
- metadata.gz: df26bf182627080572116af631b83261604b7092ff03b88a48cd5adc33419d98762d2dfa5001d39b940e4cddda380a6947988ecf44ba18fb84cf5420d095fc9d
7
- data.tar.gz: ac1b1a44fdbb52daf7ab555eddcd81f4e333c0861b15cf55bebe3d8496ff8d9859bbed54cc8f791349a9fbfbe9e08a948177fdec400dd15c88c8a4032cb3e2a2
6
+ metadata.gz: 1433f363086cbf99b03f402dad113a222fc37a1e5c4c91d29820573e29d8018971fa435cea11c248d3f749c46cd9672e6f9a0ddbd20f59e54418af49bc8b3ffe
7
+ data.tar.gz: bfa98c6c1ea78864ddac408f9db426cc866388822c8bebd0c0bd5012a28561f412e22304d201eea769dd5a738b6d6e2a56f29614245531814b4bbcce1ffc0ce1
@@ -1,5 +1,5 @@
1
1
  module Adhoq
2
- class ApplicationController < ::ApplicationController
2
+ class ApplicationController < Adhoq.config.base_controller.constantize
3
3
  layout 'adhoq/application'
4
4
 
5
5
  # NOTE support for before Rails5 application
@@ -8,7 +8,7 @@ module Adhoq
8
8
  hidden_model_names << 'ApplicationRecord'
9
9
 
10
10
  @ar_classes = ActiveRecord::Base.descendants.
11
- reject {|klass| hidden_model_names.include?(klass.name) }.
11
+ reject {|klass| klass.abstract_class? || hidden_model_names.include?(klass.name) }.
12
12
  sort_by(&:name)
13
13
 
14
14
  render layout: false
@@ -13,13 +13,9 @@ module Adhoq
13
13
  end
14
14
 
15
15
  def schema_version
16
- if defined?(ActiveRecord::SchemaMigration)
17
- ActiveRecord::SchemaMigration.maximum(:version)
18
- else
19
- connection = Adhoq::Executor::ConnectionWrapper.new
20
- result = connection.select("SELECT MAX(version) AS current_version FROM #{ActiveRecord::Migrator.schema_migrations_table_name}")
21
- result.rows.first.first
22
- end
16
+ connection = Adhoq::Executor::ConnectionWrapper.new
17
+ result = connection.select("SELECT MAX(version) AS current_version FROM #{ActiveRecord::SchemaMigration.table_name}")
18
+ result.rows.first.first
23
19
  end
24
20
 
25
21
  # TODO extract into presenter
@@ -1,5 +1,5 @@
1
1
  p.statement-invalid.alert.alert-danger
2
- strong= @statement_invalid.original_exception.class
2
+ strong= @statement_invalid.cause.class
3
3
  br
4
- = @statement_invalid.original_exception.message
4
+ = @statement_invalid.cause.message
5
5
 
@@ -1,5 +1,5 @@
1
1
  p.statement-invalid.alert.alert-danger
2
- strong= @statement_invalid.original_exception.class
2
+ strong= @statement_invalid.cause.class
3
3
  br
4
- = @statement_invalid.original_exception.message
4
+ = @statement_invalid.cause.message
5
5
 
@@ -1,7 +1,7 @@
1
1
  Adhoq::Engine.routes.draw do
2
2
  root to: 'queries#new'
3
3
 
4
- resources :queries, path: 'q', except: %w(new) do
4
+ resources :queries, path: 'q', only: %w(create edit show index update destroy) do
5
5
  resources :executions, only: %w(create show)
6
6
  end
7
7
 
@@ -7,6 +7,10 @@ module Adhoq
7
7
  [:on_the_fly]
8
8
  end
9
9
 
10
+ config_accessor :base_controller do
11
+ 'ApplicationController'
12
+ end
13
+
10
14
  config_accessor :authorization
11
15
  config_accessor :authorization_failure_action
12
16
 
@@ -1,4 +1,4 @@
1
- require 'fog'
1
+ require 'fog/local'
2
2
 
3
3
  module Adhoq
4
4
  module Storage
@@ -1,4 +1,4 @@
1
- require 'fog'
1
+ require 'fog/aws'
2
2
 
3
3
  module Adhoq
4
4
  module Storage
@@ -1,3 +1,3 @@
1
1
  module Adhoq
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.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.1.2
4
+ version: 0.2.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: 2017-02-28 00:00:00.000000000 Z
11
+ date: 2017-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: '4.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '3.2'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: axlsx
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -53,19 +53,33 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: fog
56
+ name: fog-aws
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.23'
61
+ version: '1.4'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.23'
68
+ version: '1.4'
69
+ - !ruby/object:Gem::Dependency
70
+ name: fog-local
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.3'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.3'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: font-awesome-sass
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -483,7 +497,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
483
497
  version: '0'
484
498
  requirements: []
485
499
  rubyforge_project:
486
- rubygems_version: 2.5.2
500
+ rubygems_version: 2.6.11
487
501
  signing_key:
488
502
  specification_version: 4
489
503
  summary: DB management console in the wild.