adhoq 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/README.md +80 -0
  4. data/Rakefile +28 -0
  5. data/app/assets/javascripts/adhoq/application.js +19 -0
  6. data/app/assets/javascripts/adhoq/bootstrap-sprockets.js +12 -0
  7. data/app/assets/javascripts/adhoq/bootstrap.js +2107 -0
  8. data/app/assets/javascripts/adhoq/bootstrap/affix.js +142 -0
  9. data/app/assets/javascripts/adhoq/bootstrap/alert.js +92 -0
  10. data/app/assets/javascripts/adhoq/bootstrap/button.js +110 -0
  11. data/app/assets/javascripts/adhoq/bootstrap/carousel.js +223 -0
  12. data/app/assets/javascripts/adhoq/bootstrap/collapse.js +170 -0
  13. data/app/assets/javascripts/adhoq/bootstrap/dropdown.js +151 -0
  14. data/app/assets/javascripts/adhoq/bootstrap/modal.js +280 -0
  15. data/app/assets/javascripts/adhoq/bootstrap/popover.js +113 -0
  16. data/app/assets/javascripts/adhoq/bootstrap/scrollspy.js +170 -0
  17. data/app/assets/javascripts/adhoq/bootstrap/tab.js +128 -0
  18. data/app/assets/javascripts/adhoq/bootstrap/tooltip.js +457 -0
  19. data/app/assets/javascripts/adhoq/bootstrap/transition.js +59 -0
  20. data/app/assets/javascripts/adhoq/previewer.js.coffee +25 -0
  21. data/app/assets/stylesheets/adhoq/_bootstrap-compass.scss +7 -0
  22. data/app/assets/stylesheets/adhoq/_bootstrap-mincer.scss +17 -0
  23. data/app/assets/stylesheets/adhoq/_bootstrap-sprockets.scss +7 -0
  24. data/app/assets/stylesheets/adhoq/adhoq.css.sass +57 -0
  25. data/app/assets/stylesheets/adhoq/application.css +16 -0
  26. data/app/assets/stylesheets/adhoq/bootstrap.scss +50 -0
  27. data/app/assets/stylesheets/adhoq/bootstrap/_alerts.scss +68 -0
  28. data/app/assets/stylesheets/adhoq/bootstrap/_badges.scss +57 -0
  29. data/app/assets/stylesheets/adhoq/bootstrap/_breadcrumbs.scss +26 -0
  30. data/app/assets/stylesheets/adhoq/bootstrap/_button-groups.scss +240 -0
  31. data/app/assets/stylesheets/adhoq/bootstrap/_buttons.scss +157 -0
  32. data/app/assets/stylesheets/adhoq/bootstrap/_carousel.scss +243 -0
  33. data/app/assets/stylesheets/adhoq/bootstrap/_close.scss +35 -0
  34. data/app/assets/stylesheets/adhoq/bootstrap/_code.scss +68 -0
  35. data/app/assets/stylesheets/adhoq/bootstrap/_component-animations.scss +35 -0
  36. data/app/assets/stylesheets/adhoq/bootstrap/_dropdowns.scss +215 -0
  37. data/app/assets/stylesheets/adhoq/bootstrap/_forms.scss +538 -0
  38. data/app/assets/stylesheets/adhoq/bootstrap/_glyphicons.scss +237 -0
  39. data/app/assets/stylesheets/adhoq/bootstrap/_grid.scss +84 -0
  40. data/app/assets/stylesheets/adhoq/bootstrap/_input-groups.scss +166 -0
  41. data/app/assets/stylesheets/adhoq/bootstrap/_jumbotron.scss +48 -0
  42. data/app/assets/stylesheets/adhoq/bootstrap/_labels.scss +66 -0
  43. data/app/assets/stylesheets/adhoq/bootstrap/_list-group.scss +131 -0
  44. data/app/assets/stylesheets/adhoq/bootstrap/_media.scss +56 -0
  45. data/app/assets/stylesheets/adhoq/bootstrap/_mixins.scss +39 -0
  46. data/app/assets/stylesheets/adhoq/bootstrap/_modals.scss +150 -0
  47. data/app/assets/stylesheets/adhoq/bootstrap/_navbar.scss +659 -0
  48. data/app/assets/stylesheets/adhoq/bootstrap/_navs.scss +242 -0
  49. data/app/assets/stylesheets/adhoq/bootstrap/_normalize.scss +425 -0
  50. data/app/assets/stylesheets/adhoq/bootstrap/_pager.scss +55 -0
  51. data/app/assets/stylesheets/adhoq/bootstrap/_pagination.scss +88 -0
  52. data/app/assets/stylesheets/adhoq/bootstrap/_panels.scss +243 -0
  53. data/app/assets/stylesheets/adhoq/bootstrap/_popovers.scss +133 -0
  54. data/app/assets/stylesheets/adhoq/bootstrap/_print.scss +101 -0
  55. data/app/assets/stylesheets/adhoq/bootstrap/_progress-bars.scss +105 -0
  56. data/app/assets/stylesheets/adhoq/bootstrap/_responsive-embed.scss +34 -0
  57. data/app/assets/stylesheets/adhoq/bootstrap/_responsive-utilities.scss +174 -0
  58. data/app/assets/stylesheets/adhoq/bootstrap/_scaffolding.scss +150 -0
  59. data/app/assets/stylesheets/adhoq/bootstrap/_tables.scss +233 -0
  60. data/app/assets/stylesheets/adhoq/bootstrap/_theme.scss +258 -0
  61. data/app/assets/stylesheets/adhoq/bootstrap/_thumbnails.scss +38 -0
  62. data/app/assets/stylesheets/adhoq/bootstrap/_tooltip.scss +95 -0
  63. data/app/assets/stylesheets/adhoq/bootstrap/_type.scss +304 -0
  64. data/app/assets/stylesheets/adhoq/bootstrap/_utilities.scss +57 -0
  65. data/app/assets/stylesheets/adhoq/bootstrap/_variables.scss +850 -0
  66. data/app/assets/stylesheets/adhoq/bootstrap/_wells.scss +29 -0
  67. data/app/assets/stylesheets/adhoq/bootstrap/bootstrap.scss +50 -0
  68. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_alerts.scss +14 -0
  69. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_background-variant.scss +11 -0
  70. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_border-radius.scss +18 -0
  71. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_buttons.scss +50 -0
  72. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_center-block.scss +7 -0
  73. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_clearfix.scss +22 -0
  74. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_forms.scss +84 -0
  75. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_gradients.scss +58 -0
  76. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_grid-framework.scss +81 -0
  77. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_grid.scss +122 -0
  78. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_hide-text.scss +21 -0
  79. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_image.scss +34 -0
  80. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_labels.scss +12 -0
  81. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_list-group.scss +31 -0
  82. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_nav-divider.scss +10 -0
  83. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  84. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_opacity.scss +8 -0
  85. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_pagination.scss +23 -0
  86. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_panels.scss +24 -0
  87. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_progress-bar.scss +10 -0
  88. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_reset-filter.scss +8 -0
  89. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_resize.scss +6 -0
  90. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_responsive-visibility.scss +21 -0
  91. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_size.scss +10 -0
  92. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_tab-focus.scss +9 -0
  93. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_table-row.scss +28 -0
  94. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_text-emphasis.scss +11 -0
  95. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_text-overflow.scss +8 -0
  96. data/app/assets/stylesheets/adhoq/bootstrap/mixins/_vendor-prefixes.scss +219 -0
  97. data/app/controllers/adhoq/application_controller.rb +5 -0
  98. data/app/controllers/adhoq/authorization_methods.rb +36 -0
  99. data/app/controllers/adhoq/executions_controller.rb +25 -0
  100. data/app/controllers/adhoq/previews_controller.rb +13 -0
  101. data/app/controllers/adhoq/queries_controller.rb +38 -0
  102. data/app/helpers/adhoq/application_helper.rb +11 -0
  103. data/app/models/adhoq/execution.rb +29 -0
  104. data/app/models/adhoq/query.rb +14 -0
  105. data/app/models/adhoq/report.rb +42 -0
  106. data/app/models/adhoq/time_based_orders.rb +9 -0
  107. data/app/views/adhoq/application/_global_nav.html.slim +11 -0
  108. data/app/views/adhoq/application/_sidebar_queries_index.html.slim +10 -0
  109. data/app/views/adhoq/previews/create.html.slim +12 -0
  110. data/app/views/adhoq/previews/statement_invalid.html.slim +5 -0
  111. data/app/views/adhoq/queries/_form.html.slim +38 -0
  112. data/app/views/adhoq/queries/_query.html.slim +43 -0
  113. data/app/views/adhoq/queries/edit.html.slim +2 -0
  114. data/app/views/adhoq/queries/index.html.slim +1 -0
  115. data/app/views/adhoq/queries/new.html.slim +2 -0
  116. data/app/views/adhoq/queries/show.html.slim +1 -0
  117. data/app/views/layouts/adhoq/application.html.slim +18 -0
  118. data/config/routes.rb +9 -0
  119. data/db/migrate/20141003095645_create_adhoq_queries.rb +11 -0
  120. data/db/migrate/20141006014750_create_adhoq_executions.rb +13 -0
  121. data/db/migrate/20141007052308_create_adhoq_reports.rb +12 -0
  122. data/lib/adhoq.rb +13 -0
  123. data/lib/adhoq/configuration.rb +21 -0
  124. data/lib/adhoq/engine.rb +15 -0
  125. data/lib/adhoq/error.rb +4 -0
  126. data/lib/adhoq/executor.rb +27 -0
  127. data/lib/adhoq/global_variable.rb +34 -0
  128. data/lib/adhoq/reporter.rb +5 -0
  129. data/lib/adhoq/reporter/xlsx.rb +32 -0
  130. data/lib/adhoq/result.rb +18 -0
  131. data/lib/adhoq/storage.rb +5 -0
  132. data/lib/adhoq/storage/local_file.rb +45 -0
  133. data/lib/adhoq/version.rb +3 -0
  134. data/lib/tasks/adhoq_tasks.rake +4 -0
  135. data/spec/adhoq/executor_spec.rb +11 -0
  136. data/spec/adhoq/storage_spec.rb +19 -0
  137. data/spec/factories/adhoq_queries.rb +29 -0
  138. data/spec/models/adhoq/execution_spec.rb +4 -0
  139. data/spec/models/adhoq/query_spec.rb +4 -0
  140. data/spec/models/adhoq/report_spec.rb +25 -0
  141. data/spec/spec_helper.rb +36 -0
  142. data/spec/support/have_values_in_xlsx_sheet_matcher.rb +20 -0
  143. metadata +375 -0
@@ -0,0 +1,13 @@
1
+ require 'adhoq/engine'
2
+ require 'adhoq/global_variable'
3
+
4
+ module Adhoq
5
+ autoload 'Configuration', 'adhoq/configuration'
6
+ autoload 'Error', 'adhoq/error'
7
+ autoload 'Executor', 'adhoq/executor'
8
+ autoload 'Reporter', 'adhoq/reporter'
9
+ autoload 'Result', 'adhoq/result'
10
+ autoload 'Storage', 'adhoq/storage'
11
+
12
+ extend Adhoq::GlobalVariable
13
+ end
@@ -0,0 +1,21 @@
1
+ # see https://github.com/amatsuda/kaminari/blob/master/lib/kaminari/config.rb
2
+ module Adhoq
3
+ class Configuration
4
+ include ActiveSupport::Configurable
5
+
6
+ config_accessor :storage
7
+
8
+ config_accessor :authorization
9
+ config_accessor :authorization_failure_action
10
+
11
+ config_accessor :current_user
12
+
13
+ def callablize(name)
14
+ if (c = config[name]).respond_to?(:call)
15
+ c
16
+ else
17
+ c.to_proc
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,15 @@
1
+ # TODO where to write?
2
+ require 'font-awesome-sass'
3
+ require 'jquery-rails'
4
+ require 'slim-rails'
5
+
6
+ module Adhoq
7
+ class Engine < ::Rails::Engine
8
+ isolate_namespace Adhoq
9
+
10
+ config.generators do |g|
11
+ g.test_framework :rspec, fixture: false
12
+ g.fixture_replacement :factory_girl, dir: 'spec/factories'
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,4 @@
1
+ module Adhoq
2
+ class Error < RuntimeError
3
+ end
4
+ end
@@ -0,0 +1,27 @@
1
+ module Adhoq
2
+ class Executor
3
+ class << self
4
+ def select(query)
5
+ current_connection.send(:select, query)
6
+ end
7
+
8
+ def current_connection
9
+ ActiveRecord::Base.connection
10
+ end
11
+ end
12
+
13
+ def initialize(query)
14
+ @query = query
15
+ end
16
+
17
+ def execute
18
+ wrap_result(self.class.select(@query))
19
+ end
20
+
21
+ private
22
+
23
+ def wrap_result(ar_result)
24
+ Adhoq::Result.new(ar_result.columns, ar_result.rows)
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,34 @@
1
+ require 'monitor'
2
+
3
+ module Adhoq
4
+ module GlobalVariable
5
+ def self.extended(base)
6
+ base.extend MonitorMixin
7
+ end
8
+
9
+ def current_storage
10
+ synchronize {
11
+ @current_storage ||= setup_storage(*Adhoq.config.storage)
12
+ }
13
+ end
14
+
15
+ def configure(&block)
16
+ yield config
17
+ end
18
+
19
+ def config
20
+ @config ||= Adhoq::Configuration.new
21
+ end
22
+
23
+ private
24
+
25
+ # TODO Implement S3
26
+ def setup_storage(type, *args)
27
+ unless type == :local_file
28
+ raise NotImplementedError
29
+ end
30
+
31
+ Adhoq::Storage::LocalFile.new(*args)
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,5 @@
1
+ module Adhoq
2
+ module Reporter
3
+ autoload 'Xlsx', 'adhoq/reporter/xlsx'
4
+ end
5
+ end
@@ -0,0 +1,32 @@
1
+ require 'axlsx'
2
+
3
+ module Adhoq
4
+ module Reporter
5
+ class Xlsx
6
+
7
+ def self.mime_type
8
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
9
+ end
10
+
11
+ def initialize(result)
12
+ @result = result
13
+ end
14
+
15
+ def build_report
16
+ xlsx = Axlsx::Package.new
17
+ write_result!(xlsx)
18
+
19
+ xlsx.to_stream
20
+ end
21
+
22
+ private
23
+
24
+ def write_result!(xlsx)
25
+ xlsx.workbook.add_worksheet do |sheet|
26
+ sheet.add_row @result.header
27
+ @result.rows.each {|row| sheet.add_row row }
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,18 @@
1
+ module Adhoq
2
+ class Result
3
+ attr_reader :header, :rows
4
+
5
+ def initialize(header, rows = [])
6
+ @header = header
7
+ @rows = rows
8
+ end
9
+
10
+ def <<(row)
11
+ rows << row
12
+ end
13
+
14
+ def ==(obj)
15
+ header == obj.header && rows == obj.rows
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,5 @@
1
+ module Adhoq
2
+ module Storage
3
+ autoload 'LocalFile', 'adhoq/storage/local_file'
4
+ end
5
+ end
@@ -0,0 +1,45 @@
1
+ module Adhoq
2
+ module Storage
3
+ class LocalFile
4
+ attr_reader :root
5
+
6
+ def initialize(root_path)
7
+ @root = Pathname.new(root_path)
8
+ end
9
+
10
+ def identifier
11
+ "file://#{@root.realpath}"
12
+ end
13
+
14
+ def store(suffix = nil, seed = Time.now, &block)
15
+ calculate_identifier(suffix, seed).tap do |identifier|
16
+ mkpath!(identifier)
17
+
18
+ (@root + identifier).open('w:BINARY') do |file|
19
+ yield file, identifier
20
+ file.flush
21
+ end
22
+ end
23
+ end
24
+
25
+ def get(identifier)
26
+ (@root + identifier).open('r:BINARY')
27
+ end
28
+
29
+ private
30
+
31
+ def calculate_identifier(suffix, seed)
32
+ dirname, fname_seed = ['%Y-%m-%d', '%H%M%S.%L'].map {|f| seed.strftime(f) }
33
+
34
+ basename = "%s_%05d%s" % [fname_seed, Process.pid, suffix]
35
+
36
+ identifier = [dirname, basename].join('/')
37
+ end
38
+
39
+ def mkpath!(identifier)
40
+ dir = identifier.split('/').first
41
+ (@root + dir).mkpath
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,3 @@
1
+ module Adhoq
2
+ VERSION = "0.0.2"
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :adhoq do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,11 @@
1
+ module Adhoq
2
+ RSpec.describe Executor, type: :model do
3
+ context 'create xlsx report' do
4
+ let(:executor) do
5
+ Executor.new('SELECT 42 AS answer')
6
+ end
7
+
8
+ specify { expect(executor.execute).to eq Adhoq::Result.new(%w[answer], [[42]]) }
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,19 @@
1
+ module Adhoq
2
+ RSpec.describe Storage, type: :model do
3
+ describe Storage::LocalFile do
4
+ tempdir = __dir__ + '/../../tmp/adhoq_storage.test'
5
+
6
+ after(:all) do
7
+ FileUtils.rm_rf(tempdir)
8
+ end
9
+
10
+ let(:storage) { Storage::LocalFile.new(tempdir) }
11
+
12
+ let(:identifier) do
13
+ storage.store('.txt') {|file, ident| file.puts 'Hello adhoq!' }
14
+ end
15
+
16
+ specify { expect(storage.get(identifier).read).to eq "Hello adhoq!\n" }
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,29 @@
1
+ # Read about factories at https://github.com/thoughtbot/factory_girl
2
+
3
+ FactoryGirl.define do
4
+ factory :adhoq_query, class: 'Adhoq::Query' do
5
+ name 'A query'
6
+ description 'Simple simple SELECT'
7
+ query 'SELECT 1'
8
+
9
+ trait :complex do
10
+ name 'adhoq current use'
11
+ description 'Simple analysys: count execution per query'
12
+ query <<-SQL.strip_heredoc
13
+ SELECT
14
+ q.id
15
+ ,q.name
16
+ ,(
17
+ SELECT COUNT(*)
18
+ FROM adhoq_executions exec
19
+ INNER JOIN adhoq_reports r ON r.execution_id = exec.id
20
+ WHERE exec.query_id = q.id
21
+ ) AS use_count
22
+ FROM
23
+ adhoq_queries q
24
+ ORDER BY
25
+ use_count DESC, id ASC
26
+ SQL
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,4 @@
1
+ module Adhoq
2
+ RSpec.describe Execution, :type => :model do
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Adhoq
2
+ RSpec.describe Query, type: :model do
3
+ end
4
+ end
@@ -0,0 +1,25 @@
1
+ module Adhoq
2
+ RSpec.describe Report, type: :model do
3
+ context 'create xlsx report' do
4
+ let(:query) do
5
+ create(:adhoq_query, query: 'SELECT name, description FROM adhoq_queries')
6
+ end
7
+
8
+ let(:report) do
9
+ execution = query.execute!('xlsx')
10
+ execution.report
11
+ end
12
+
13
+ specify do
14
+ expect(report.data).to have_values_in_xlsx_sheet([
15
+ %w[name description],
16
+ [query.name, query.description]
17
+ ])
18
+ end
19
+
20
+ specify do
21
+ expect(report.name).to match /#{query.name}\.[\d\-]+\.xlsx/
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,36 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+ require_relative 'dummy/config/environment'
3
+
4
+ require 'rspec/rails'
5
+ require 'factory_girl_rails'
6
+
7
+ require 'pry-byebug'
8
+
9
+ Rails.backtrace_cleaner.remove_silencers!
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f }
11
+
12
+ RSpec.configure do |config|
13
+ config.expect_with :rspec do |expectations|
14
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
15
+ end
16
+
17
+ config.mock_with :rspec do |mocks|
18
+ mocks.verify_partial_doubles = true
19
+ end
20
+
21
+ config.use_transactional_fixtures = true
22
+ config.filter_run :focus
23
+ config.run_all_when_everything_filtered = true
24
+
25
+ config.warnings = ENV['SHOW_WARNING']
26
+
27
+ if config.files_to_run.one?
28
+ config.default_formatter = 'doc'
29
+ end
30
+
31
+ config.profile_examples = 10
32
+ config.order = :random
33
+
34
+ config.include FactoryGirl::Syntax::Methods
35
+ Kernel.srand config.seed
36
+ end
@@ -0,0 +1,20 @@
1
+ require 'rspec/matchers'
2
+ require 'simple_xlsx_reader'
3
+
4
+ RSpec::Matchers.define :have_values_in_xlsx_sheet do |values|
5
+ match do |data|
6
+ expect(extract_values(data)).to eq values
7
+ end
8
+
9
+ private
10
+
11
+ def extract_values(data)
12
+ Tempfile.open(%w[actual .xlsx], Dir.tmpdir, encoding: 'BINARY') do |f|
13
+ f.write data.read
14
+ f.flush
15
+
16
+ sheet = SimpleXlsxReader::Document.new(f.path).sheets.first
17
+ [sheet.headers, *sheet.data]
18
+ end
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,375 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: adhoq
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Kyosuke MOROHASHI
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: axlsx
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: coffee-rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: font-awesome-sass
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: jquery-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: sass-rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: slim-rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: factory_girl_rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry-byebug
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rspec-rails
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: simple_xlsx_reader
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: sqlite3
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: tapp
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ description: Rails engine to generate instant reports from adhoc SQL query.
196
+ email:
197
+ - moronatural@gmail.com
198
+ executables: []
199
+ extensions: []
200
+ extra_rdoc_files: []
201
+ files:
202
+ - LICENSE.txt
203
+ - README.md
204
+ - Rakefile
205
+ - app/assets/javascripts/adhoq/application.js
206
+ - app/assets/javascripts/adhoq/bootstrap-sprockets.js
207
+ - app/assets/javascripts/adhoq/bootstrap.js
208
+ - app/assets/javascripts/adhoq/bootstrap/affix.js
209
+ - app/assets/javascripts/adhoq/bootstrap/alert.js
210
+ - app/assets/javascripts/adhoq/bootstrap/button.js
211
+ - app/assets/javascripts/adhoq/bootstrap/carousel.js
212
+ - app/assets/javascripts/adhoq/bootstrap/collapse.js
213
+ - app/assets/javascripts/adhoq/bootstrap/dropdown.js
214
+ - app/assets/javascripts/adhoq/bootstrap/modal.js
215
+ - app/assets/javascripts/adhoq/bootstrap/popover.js
216
+ - app/assets/javascripts/adhoq/bootstrap/scrollspy.js
217
+ - app/assets/javascripts/adhoq/bootstrap/tab.js
218
+ - app/assets/javascripts/adhoq/bootstrap/tooltip.js
219
+ - app/assets/javascripts/adhoq/bootstrap/transition.js
220
+ - app/assets/javascripts/adhoq/previewer.js.coffee
221
+ - app/assets/stylesheets/adhoq/_bootstrap-compass.scss
222
+ - app/assets/stylesheets/adhoq/_bootstrap-mincer.scss
223
+ - app/assets/stylesheets/adhoq/_bootstrap-sprockets.scss
224
+ - app/assets/stylesheets/adhoq/adhoq.css.sass
225
+ - app/assets/stylesheets/adhoq/application.css
226
+ - app/assets/stylesheets/adhoq/bootstrap.scss
227
+ - app/assets/stylesheets/adhoq/bootstrap/_alerts.scss
228
+ - app/assets/stylesheets/adhoq/bootstrap/_badges.scss
229
+ - app/assets/stylesheets/adhoq/bootstrap/_breadcrumbs.scss
230
+ - app/assets/stylesheets/adhoq/bootstrap/_button-groups.scss
231
+ - app/assets/stylesheets/adhoq/bootstrap/_buttons.scss
232
+ - app/assets/stylesheets/adhoq/bootstrap/_carousel.scss
233
+ - app/assets/stylesheets/adhoq/bootstrap/_close.scss
234
+ - app/assets/stylesheets/adhoq/bootstrap/_code.scss
235
+ - app/assets/stylesheets/adhoq/bootstrap/_component-animations.scss
236
+ - app/assets/stylesheets/adhoq/bootstrap/_dropdowns.scss
237
+ - app/assets/stylesheets/adhoq/bootstrap/_forms.scss
238
+ - app/assets/stylesheets/adhoq/bootstrap/_glyphicons.scss
239
+ - app/assets/stylesheets/adhoq/bootstrap/_grid.scss
240
+ - app/assets/stylesheets/adhoq/bootstrap/_input-groups.scss
241
+ - app/assets/stylesheets/adhoq/bootstrap/_jumbotron.scss
242
+ - app/assets/stylesheets/adhoq/bootstrap/_labels.scss
243
+ - app/assets/stylesheets/adhoq/bootstrap/_list-group.scss
244
+ - app/assets/stylesheets/adhoq/bootstrap/_media.scss
245
+ - app/assets/stylesheets/adhoq/bootstrap/_mixins.scss
246
+ - app/assets/stylesheets/adhoq/bootstrap/_modals.scss
247
+ - app/assets/stylesheets/adhoq/bootstrap/_navbar.scss
248
+ - app/assets/stylesheets/adhoq/bootstrap/_navs.scss
249
+ - app/assets/stylesheets/adhoq/bootstrap/_normalize.scss
250
+ - app/assets/stylesheets/adhoq/bootstrap/_pager.scss
251
+ - app/assets/stylesheets/adhoq/bootstrap/_pagination.scss
252
+ - app/assets/stylesheets/adhoq/bootstrap/_panels.scss
253
+ - app/assets/stylesheets/adhoq/bootstrap/_popovers.scss
254
+ - app/assets/stylesheets/adhoq/bootstrap/_print.scss
255
+ - app/assets/stylesheets/adhoq/bootstrap/_progress-bars.scss
256
+ - app/assets/stylesheets/adhoq/bootstrap/_responsive-embed.scss
257
+ - app/assets/stylesheets/adhoq/bootstrap/_responsive-utilities.scss
258
+ - app/assets/stylesheets/adhoq/bootstrap/_scaffolding.scss
259
+ - app/assets/stylesheets/adhoq/bootstrap/_tables.scss
260
+ - app/assets/stylesheets/adhoq/bootstrap/_theme.scss
261
+ - app/assets/stylesheets/adhoq/bootstrap/_thumbnails.scss
262
+ - app/assets/stylesheets/adhoq/bootstrap/_tooltip.scss
263
+ - app/assets/stylesheets/adhoq/bootstrap/_type.scss
264
+ - app/assets/stylesheets/adhoq/bootstrap/_utilities.scss
265
+ - app/assets/stylesheets/adhoq/bootstrap/_variables.scss
266
+ - app/assets/stylesheets/adhoq/bootstrap/_wells.scss
267
+ - app/assets/stylesheets/adhoq/bootstrap/bootstrap.scss
268
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_alerts.scss
269
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_background-variant.scss
270
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_border-radius.scss
271
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_buttons.scss
272
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_center-block.scss
273
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_clearfix.scss
274
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_forms.scss
275
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_gradients.scss
276
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_grid-framework.scss
277
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_grid.scss
278
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_hide-text.scss
279
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_image.scss
280
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_labels.scss
281
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_list-group.scss
282
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_nav-divider.scss
283
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_nav-vertical-align.scss
284
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_opacity.scss
285
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_pagination.scss
286
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_panels.scss
287
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_progress-bar.scss
288
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_reset-filter.scss
289
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_resize.scss
290
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_responsive-visibility.scss
291
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_size.scss
292
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_tab-focus.scss
293
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_table-row.scss
294
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_text-emphasis.scss
295
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_text-overflow.scss
296
+ - app/assets/stylesheets/adhoq/bootstrap/mixins/_vendor-prefixes.scss
297
+ - app/controllers/adhoq/application_controller.rb
298
+ - app/controllers/adhoq/authorization_methods.rb
299
+ - app/controllers/adhoq/executions_controller.rb
300
+ - app/controllers/adhoq/previews_controller.rb
301
+ - app/controllers/adhoq/queries_controller.rb
302
+ - app/helpers/adhoq/application_helper.rb
303
+ - app/models/adhoq/execution.rb
304
+ - app/models/adhoq/query.rb
305
+ - app/models/adhoq/report.rb
306
+ - app/models/adhoq/time_based_orders.rb
307
+ - app/views/adhoq/application/_global_nav.html.slim
308
+ - app/views/adhoq/application/_sidebar_queries_index.html.slim
309
+ - app/views/adhoq/previews/create.html.slim
310
+ - app/views/adhoq/previews/statement_invalid.html.slim
311
+ - app/views/adhoq/queries/_form.html.slim
312
+ - app/views/adhoq/queries/_query.html.slim
313
+ - app/views/adhoq/queries/edit.html.slim
314
+ - app/views/adhoq/queries/index.html.slim
315
+ - app/views/adhoq/queries/new.html.slim
316
+ - app/views/adhoq/queries/show.html.slim
317
+ - app/views/layouts/adhoq/application.html.slim
318
+ - config/routes.rb
319
+ - db/migrate/20141003095645_create_adhoq_queries.rb
320
+ - db/migrate/20141006014750_create_adhoq_executions.rb
321
+ - db/migrate/20141007052308_create_adhoq_reports.rb
322
+ - lib/adhoq.rb
323
+ - lib/adhoq/configuration.rb
324
+ - lib/adhoq/engine.rb
325
+ - lib/adhoq/error.rb
326
+ - lib/adhoq/executor.rb
327
+ - lib/adhoq/global_variable.rb
328
+ - lib/adhoq/reporter.rb
329
+ - lib/adhoq/reporter/xlsx.rb
330
+ - lib/adhoq/result.rb
331
+ - lib/adhoq/storage.rb
332
+ - lib/adhoq/storage/local_file.rb
333
+ - lib/adhoq/version.rb
334
+ - lib/tasks/adhoq_tasks.rake
335
+ - spec/adhoq/executor_spec.rb
336
+ - spec/adhoq/storage_spec.rb
337
+ - spec/factories/adhoq_queries.rb
338
+ - spec/models/adhoq/execution_spec.rb
339
+ - spec/models/adhoq/query_spec.rb
340
+ - spec/models/adhoq/report_spec.rb
341
+ - spec/spec_helper.rb
342
+ - spec/support/have_values_in_xlsx_sheet_matcher.rb
343
+ homepage: https://github.com/esminc/adhoq
344
+ licenses:
345
+ - MIT
346
+ metadata: {}
347
+ post_install_message:
348
+ rdoc_options: []
349
+ require_paths:
350
+ - lib
351
+ required_ruby_version: !ruby/object:Gem::Requirement
352
+ requirements:
353
+ - - ">="
354
+ - !ruby/object:Gem::Version
355
+ version: '0'
356
+ required_rubygems_version: !ruby/object:Gem::Requirement
357
+ requirements:
358
+ - - ">="
359
+ - !ruby/object:Gem::Version
360
+ version: '0'
361
+ requirements: []
362
+ rubyforge_project:
363
+ rubygems_version: 2.2.2
364
+ signing_key:
365
+ specification_version: 4
366
+ summary: DB management console in the wild.
367
+ test_files:
368
+ - spec/adhoq/executor_spec.rb
369
+ - spec/adhoq/storage_spec.rb
370
+ - spec/factories/adhoq_queries.rb
371
+ - spec/models/adhoq/execution_spec.rb
372
+ - spec/models/adhoq/query_spec.rb
373
+ - spec/models/adhoq/report_spec.rb
374
+ - spec/support/have_values_in_xlsx_sheet_matcher.rb
375
+ - spec/spec_helper.rb