vertica_history 2.0.1 → 2.1.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: 84e6d8cced6f852484af3f2cbde8d538c78bec36
4
- data.tar.gz: 0ddcad69b0af764d7db60a5d64d467d52564412c
3
+ metadata.gz: 7f6271b8e0910b217edf4060a40baf456bee2a7f
4
+ data.tar.gz: 2cb886d2bae11425fcdcc303627903c9ba4b77d4
5
5
  SHA512:
6
- metadata.gz: 5677aca06936025ad51aafeabcffe5552f6c809dd8ba2030daa72fa40bb283d87d3840ecb2804bdf596d46469b2252722794a624258921aa377674b49ce9935e
7
- data.tar.gz: 8476016b8fbed65fcf6791b1dab163841aa093a91cedfb23e8c583a6a2dbbf4d86b5093989e551dbd9c3eb1e445a9692ed836a06a00b695831010dba2e352609
6
+ metadata.gz: ce2aec3ec3f115211eed071d15689c906d6022923514623ff03ca316d75d3b0233edf9fe7c7c5eed670c56b77251ea9ee7ffc3ce189d16bb8f3e74262ceae34d
7
+ data.tar.gz: 7af8068ad6a687b2471777aab31f3a8725e89795d2de4477b691735cb765fe1ffe8de52b7274cf61ae8e30011a905b6e1fa9bda92cffd0d47445adf90bbebc3f
@@ -1,3 +1,3 @@
1
1
  module VerticaHistory
2
- VERSION = "2.0.1"
2
+ VERSION = "2.1.0"
3
3
  end
@@ -1,7 +1,31 @@
1
1
  require "vertica_history/engine"
2
+ require 'rails_admin/config/actions/vertica_history'
3
+
2
4
  module VerticaHistory
3
5
  PROJECT_CONFIG = File.join(__dir__, '..', 'config')
6
+
7
+ class Interface
8
+ def self.make_query(query)
9
+ connection_configurations = {
10
+ host: Rails.configuration.vertica_host,
11
+ user: Rails.configuration.vertica_user,
12
+ password: Rails.configuration.vertica_password,
13
+ ssl: Rails.configuration.vertica_ssl || true,
14
+ port: Rails.configuration.vertica_port || 5433,
15
+ database: Rails.configuration.vertica_database,
16
+ role: Rails.configuration.vertica_role,
17
+ search_path: Rails.configuration.vertica_search_path || nil,
18
+ row_style: Rails.configuration.vertica_row_style || :hash
19
+ }
20
+
21
+ connection = Vertica.connect(connection_configurations)
22
+ result = connection.query("#{query}")
23
+ @q = query
24
+ @columns = result.columns.map { |x| x.name }
25
+ @rows = result.rows
26
+ connection.close
27
+ {columns: @columns, rows: @rows}
28
+ end
29
+ end
4
30
  end
5
31
 
6
- require 'vertica_history/engine'
7
- require 'rails_admin/config/actions/vertica_history'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vertica_history
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Taylor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-16 00:00:00.000000000 Z
11
+ date: 2016-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -146,42 +146,41 @@ signing_key:
146
146
  specification_version: 4
147
147
  summary: Gem to connect rails admin to Vertica to see history of any record
148
148
  test_files:
149
+ - test/integration/navigation_test.rb
149
150
  - test/test_helper.rb
151
+ - test/dummy/public/favicon.ico
152
+ - test/dummy/public/500.html
153
+ - test/dummy/public/404.html
154
+ - test/dummy/public/422.html
155
+ - test/dummy/app/helpers/application_helper.rb
156
+ - test/dummy/app/assets/stylesheets/application.css
157
+ - test/dummy/app/assets/javascripts/application.js
158
+ - test/dummy/app/views/layouts/application.html.erb
159
+ - test/dummy/app/controllers/application_controller.rb
160
+ - test/dummy/config.ru
161
+ - test/dummy/README.rdoc
162
+ - test/dummy/db/schema.rb
163
+ - test/dummy/bin/setup
164
+ - test/dummy/bin/rails
150
165
  - test/dummy/bin/bundle
151
166
  - test/dummy/bin/rake
152
- - test/dummy/bin/rails
153
- - test/dummy/bin/setup
154
- - test/dummy/config/initializers/session_store.rb
155
- - test/dummy/config/initializers/cookies_serializer.rb
167
+ - test/dummy/Rakefile
168
+ - test/dummy/config/initializers/inflections.rb
156
169
  - test/dummy/config/initializers/mime_types.rb
157
- - test/dummy/config/initializers/assets.rb
158
- - test/dummy/config/initializers/backtrace_silencers.rb
159
170
  - test/dummy/config/initializers/filter_parameter_logging.rb
160
- - test/dummy/config/initializers/inflections.rb
161
171
  - test/dummy/config/initializers/wrap_parameters.rb
172
+ - test/dummy/config/initializers/backtrace_silencers.rb
173
+ - test/dummy/config/initializers/session_store.rb
174
+ - test/dummy/config/initializers/cookies_serializer.rb
175
+ - test/dummy/config/initializers/assets.rb
176
+ - test/dummy/config/secrets.yml
177
+ - test/dummy/config/database.yml
162
178
  - test/dummy/config/application.rb
179
+ - test/dummy/config/environments/development.rb
163
180
  - test/dummy/config/environments/test.rb
164
181
  - test/dummy/config/environments/production.rb
165
- - test/dummy/config/environments/development.rb
166
- - test/dummy/config/secrets.yml
167
- - test/dummy/config/database.yml
168
- - test/dummy/config/locales/en.yml
169
182
  - test/dummy/config/environment.rb
170
183
  - test/dummy/config/routes.rb
184
+ - test/dummy/config/locales/en.yml
171
185
  - test/dummy/config/boot.rb
172
- - test/dummy/config.ru
173
- - test/dummy/public/422.html
174
- - test/dummy/public/favicon.ico
175
- - test/dummy/public/500.html
176
- - test/dummy/public/404.html
177
- - test/dummy/db/schema.rb
178
- - test/dummy/README.rdoc
179
- - test/dummy/Rakefile
180
- - test/dummy/app/assets/javascripts/application.js
181
- - test/dummy/app/assets/stylesheets/application.css
182
- - test/dummy/app/views/layouts/application.html.erb
183
- - test/dummy/app/helpers/application_helper.rb
184
- - test/dummy/app/controllers/application_controller.rb
185
- - test/integration/navigation_test.rb
186
186
  - test/vertica_history_test.rb
187
- has_rdoc: