ezii-postgres 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ezii-postgres.gemspec +13 -0
- data/natural-backend/Capfile +50 -0
- data/natural-backend/Gemfile +63 -0
- data/natural-backend/Gemfile.lock +233 -0
- data/natural-backend/LICENSE +21 -0
- data/natural-backend/Procfile +2 -0
- data/natural-backend/README.md +51 -0
- data/natural-backend/Rakefile +6 -0
- data/natural-backend/app.json +28 -0
- data/natural-backend/app/channels/application_cable/channel.rb +4 -0
- data/natural-backend/app/channels/application_cable/connection.rb +4 -0
- data/natural-backend/app/commands/base_command.rb +31 -0
- data/natural-backend/app/commands/create_new_or_authenticate_user.rb +60 -0
- data/natural-backend/app/commands/create_project_authentication_token_command.rb +25 -0
- data/natural-backend/app/commands/decode_authentication_command.rb +50 -0
- data/natural-backend/app/commands/decode_project_authentication_token_command.rb +51 -0
- data/natural-backend/app/controllers/application_controller.rb +3 -0
- data/natural-backend/app/controllers/authentication_controller.rb +17 -0
- data/natural-backend/app/controllers/columns_controller.rb +51 -0
- data/natural-backend/app/controllers/concerns/token_authenticatable.rb +26 -0
- data/natural-backend/app/controllers/databases_controller.rb +51 -0
- data/natural-backend/app/controllers/ember_controller.rb +6 -0
- data/natural-backend/app/controllers/projects_controller.rb +51 -0
- data/natural-backend/app/controllers/queries_controller.rb +59 -0
- data/natural-backend/app/controllers/row_values_controller.rb +51 -0
- data/natural-backend/app/controllers/rows_controller.rb +56 -0
- data/natural-backend/app/controllers/tables_controller.rb +55 -0
- data/natural-backend/app/jobs/application_job.rb +2 -0
- data/natural-backend/app/jobs/create_column_job.rb +10 -0
- data/natural-backend/app/jobs/create_database_job.rb +11 -0
- data/natural-backend/app/jobs/create_database_user_job.rb +8 -0
- data/natural-backend/app/jobs/create_table_job.rb +21 -0
- data/natural-backend/app/jobs/delete_row_job.rb +12 -0
- data/natural-backend/app/jobs/delete_value_job.rb +10 -0
- data/natural-backend/app/jobs/destroy_column_job.rb +10 -0
- data/natural-backend/app/jobs/destroy_database_job.rb +8 -0
- data/natural-backend/app/jobs/destroy_database_user_job.rb +8 -0
- data/natural-backend/app/jobs/destroy_table_job.rb +9 -0
- data/natural-backend/app/jobs/insert_value_job.rb +11 -0
- data/natural-backend/app/jobs/run_query_job.rb +35 -0
- data/natural-backend/app/jobs/sync_db_job.rb +80 -0
- data/natural-backend/app/jobs/update_column_type_job.rb +10 -0
- data/natural-backend/app/jobs/update_value_job.rb +10 -0
- data/natural-backend/app/mailers/application_mailer.rb +4 -0
- data/natural-backend/app/models/application_record.rb +3 -0
- data/natural-backend/app/models/column.rb +43 -0
- data/natural-backend/app/models/database.rb +37 -0
- data/natural-backend/app/models/project.rb +31 -0
- data/natural-backend/app/models/query.rb +20 -0
- data/natural-backend/app/models/row.rb +15 -0
- data/natural-backend/app/models/row_value.rb +30 -0
- data/natural-backend/app/models/table.rb +32 -0
- data/natural-backend/app/models/user.rb +10 -0
- data/natural-backend/app/serializers/column_serializer.rb +5 -0
- data/natural-backend/app/serializers/database_serializer.rb +6 -0
- data/natural-backend/app/serializers/project_serializer.rb +4 -0
- data/natural-backend/app/serializers/query_serializer.rb +3 -0
- data/natural-backend/app/serializers/row_serializer.rb +5 -0
- data/natural-backend/app/serializers/row_value_serializer.rb +5 -0
- data/natural-backend/app/serializers/table_serializer.rb +8 -0
- data/natural-backend/app/services/jwt_service.rb +17 -0
- data/natural-backend/app/views/layouts/mailer.html.erb +13 -0
- data/natural-backend/app/views/layouts/mailer.text.erb +1 -0
- data/natural-backend/bin/bundle +3 -0
- data/natural-backend/bin/rails +9 -0
- data/natural-backend/bin/rake +9 -0
- data/natural-backend/bin/run_migrations.sh +3 -0
- data/natural-backend/bin/setup +35 -0
- data/natural-backend/bin/spring +17 -0
- data/natural-backend/bin/update +29 -0
- data/natural-backend/config.ru +5 -0
- data/natural-backend/config/application.rb +33 -0
- data/natural-backend/config/boot.rb +3 -0
- data/natural-backend/config/cable.yml +10 -0
- data/natural-backend/config/database.yml +21 -0
- data/natural-backend/config/deploy.rb +36 -0
- data/natural-backend/config/deploy/production.rb +61 -0
- data/natural-backend/config/deploy/staging.rb +61 -0
- data/natural-backend/config/environment.rb +5 -0
- data/natural-backend/config/environments/development.rb +47 -0
- data/natural-backend/config/environments/production.rb +83 -0
- data/natural-backend/config/environments/test.rb +42 -0
- data/natural-backend/config/initializers/application_controller_renderer.rb +8 -0
- data/natural-backend/config/initializers/backtrace_silencers.rb +7 -0
- data/natural-backend/config/initializers/bugsnag.rb +3 -0
- data/natural-backend/config/initializers/cors.rb +16 -0
- data/natural-backend/config/initializers/filter_parameter_logging.rb +4 -0
- data/natural-backend/config/initializers/inflections.rb +16 -0
- data/natural-backend/config/initializers/json_api.rb +5 -0
- data/natural-backend/config/initializers/load_commands.rb +4 -0
- data/natural-backend/config/initializers/load_lib.rb +6 -0
- data/natural-backend/config/initializers/mime_types.rb +4 -0
- data/natural-backend/config/initializers/redis_classy.rb +1 -0
- data/natural-backend/config/initializers/sidekiq.rb +1 -0
- data/natural-backend/config/initializers/wrap_parameters.rb +14 -0
- data/natural-backend/config/locales/en.yml +33 -0
- data/natural-backend/config/puma.rb +56 -0
- data/natural-backend/config/routes.rb +14 -0
- data/natural-backend/config/schedule.rb +18 -0
- data/natural-backend/config/secrets.yml +32 -0
- data/natural-backend/config/spring.rb +6 -0
- data/natural-backend/db/migrate/20180408155000_create_projects.rb +9 -0
- data/natural-backend/db/migrate/20180408155011_create_databases.rb +10 -0
- data/natural-backend/db/migrate/20180409174859_create_tables.rb +9 -0
- data/natural-backend/db/migrate/20180409174916_create_columns.rb +11 -0
- data/natural-backend/db/migrate/20180409175800_create_rows.rb +9 -0
- data/natural-backend/db/migrate/20180409214650_create_row_values.rb +11 -0
- data/natural-backend/db/migrate/20180411110745_add_db_username_to_projects.rb +5 -0
- data/natural-backend/db/migrate/20180411145722_add_dbpw_to_projects.rb +5 -0
- data/natural-backend/db/migrate/20180411185924_add_database_identifier_to_databases.rb +6 -0
- data/natural-backend/db/migrate/20180412002908_add_dbid_to_rows.rb +5 -0
- data/natural-backend/db/migrate/20180412012433_create_queries.rb +11 -0
- data/natural-backend/db/migrate/20180429151758_create_users.rb +10 -0
- data/natural-backend/db/migrate/20180430094604_add_user_ref_to_projects.rb +5 -0
- data/natural-backend/db/migrate/20180430102945_add_user_ref_to_databases.rb +5 -0
- data/natural-backend/db/migrate/20180430102955_add_user_ref_to_tables.rb +5 -0
- data/natural-backend/db/migrate/20180430103004_add_user_ref_to_rows.rb +5 -0
- data/natural-backend/db/migrate/20180430103015_add_user_ref_to_columns.rb +5 -0
- data/natural-backend/db/migrate/20180430103024_add_user_ref_to_row_values.rb +5 -0
- data/natural-backend/db/migrate/20180430141537_add_api_token_projects.rb +5 -0
- data/natural-backend/db/schema.rb +112 -0
- data/natural-backend/db/seeds.rb +7 -0
- data/natural-backend/lib/database_manager/database_manager.rb +59 -0
- data/natural-backend/lib/database_manager/lib/connection.rb +49 -0
- data/natural-backend/lib/database_manager/lib/database.rb +65 -0
- data/natural-backend/lib/database_manager/lib/database_user.rb +46 -0
- data/natural-backend/lib/database_manager/lib/table.rb +129 -0
- data/natural-backend/public/assets/natural-frontend-598145a86019fc7faa2e0386ec6cb276.css +6 -0
- data/natural-backend/public/assets/natural-frontend-8e453ff9db7fc3a47e6d9e3de45aa19e.js +31 -0
- data/natural-backend/public/assets/vendor-7ffaee0528b64f886e9d1860fc719b5a.js +7359 -0
- data/natural-backend/public/assets/vendor-8bd8fa913b4f7f8b27f086c7bfd98b7f.css +1 -0
- data/natural-backend/public/index.html +26 -0
- data/natural-backend/public/robots.txt +3 -0
- data/natural-backend/roadmap.md +25 -0
- data/natural-backend/test/controllers/authentication_controller_test.rb +7 -0
- data/natural-backend/test/controllers/columns_controller_test.rb +38 -0
- data/natural-backend/test/controllers/databases_controller_test.rb +38 -0
- data/natural-backend/test/controllers/ember_controller_test.rb +7 -0
- data/natural-backend/test/controllers/projects_controller_test.rb +38 -0
- data/natural-backend/test/controllers/queries_controller_test.rb +38 -0
- data/natural-backend/test/controllers/row_values_controller_test.rb +38 -0
- data/natural-backend/test/controllers/rows_controller_test.rb +38 -0
- data/natural-backend/test/controllers/tables_controller_test.rb +38 -0
- data/natural-backend/test/fixtures/columns.yml +11 -0
- data/natural-backend/test/fixtures/databases.yml +9 -0
- data/natural-backend/test/fixtures/projects.yml +7 -0
- data/natural-backend/test/fixtures/queries.yml +9 -0
- data/natural-backend/test/fixtures/row_values.yml +11 -0
- data/natural-backend/test/fixtures/rows.yml +7 -0
- data/natural-backend/test/fixtures/tables.yml +7 -0
- data/natural-backend/test/fixtures/users.yml +9 -0
- data/natural-backend/test/jobs/add_column_job_test.rb +7 -0
- data/natural-backend/test/jobs/create_database_job_test.rb +7 -0
- data/natural-backend/test/jobs/create_database_user_job_test.rb +7 -0
- data/natural-backend/test/jobs/create_table_job_test.rb +7 -0
- data/natural-backend/test/jobs/delete_row_job_test.rb +7 -0
- data/natural-backend/test/jobs/delete_value_job_test.rb +7 -0
- data/natural-backend/test/jobs/destroy_database_job_test.rb +7 -0
- data/natural-backend/test/jobs/destroy_database_user_job_test.rb +7 -0
- data/natural-backend/test/jobs/destroy_table_job_test.rb +7 -0
- data/natural-backend/test/jobs/insert_value_job_test.rb +7 -0
- data/natural-backend/test/jobs/run_query_job_test.rb +7 -0
- data/natural-backend/test/jobs/sync_db_job_test.rb +7 -0
- data/natural-backend/test/jobs/update_value_job_test.rb +7 -0
- data/natural-backend/test/lib/database_manager/database_manager_test.rb +21 -0
- data/natural-backend/test/lib/database_manager/lib/database_test.rb +28 -0
- data/natural-backend/test/lib/database_manager/lib/database_user_test.rb +43 -0
- data/natural-backend/test/lib/database_manager/lib/table_test.rb +46 -0
- data/natural-backend/test/models/column_test.rb +7 -0
- data/natural-backend/test/models/database_test.rb +7 -0
- data/natural-backend/test/models/project_test.rb +7 -0
- data/natural-backend/test/models/query_test.rb +7 -0
- data/natural-backend/test/models/row_test.rb +7 -0
- data/natural-backend/test/models/row_value_test.rb +7 -0
- data/natural-backend/test/models/table_test.rb +7 -0
- data/natural-backend/test/models/user_test.rb +7 -0
- data/natural-backend/test/test_helper.rb +10 -0
- data/natural-frontend/LICENSE +21 -0
- data/natural-frontend/README.md +3 -0
- data/natural-frontend/app/adapters/application.js +33 -0
- data/natural-frontend/app/app.js +18 -0
- data/natural-frontend/app/components/column-editor.js +41 -0
- data/natural-frontend/app/components/row-editor.js +21 -0
- data/natural-frontend/app/components/row-value-editor.js +49 -0
- data/natural-frontend/app/controllers/application.js +11 -0
- data/natural-frontend/app/controllers/authenticate.js +16 -0
- data/natural-frontend/app/controllers/databases.js +22 -0
- data/natural-frontend/app/controllers/projects.js +18 -0
- data/natural-frontend/app/controllers/table.js +12 -0
- data/natural-frontend/app/controllers/table/rows.js +23 -0
- data/natural-frontend/app/controllers/tables.js +22 -0
- data/natural-frontend/app/helpers/plus-one.js +8 -0
- data/natural-frontend/app/index.html +25 -0
- data/natural-frontend/app/mixins/application-route-auth-mixin.js +8 -0
- data/natural-frontend/app/mixins/authenticated-route-mixin.js +10 -0
- data/natural-frontend/app/models/column.js +9 -0
- data/natural-frontend/app/models/database.js +9 -0
- data/natural-frontend/app/models/project.js +8 -0
- data/natural-frontend/app/models/row-value.js +8 -0
- data/natural-frontend/app/models/row.js +8 -0
- data/natural-frontend/app/models/table.js +9 -0
- data/natural-frontend/app/resolver.js +4 -0
- data/natural-frontend/app/router.js +22 -0
- data/natural-frontend/app/routes/application.js +5 -0
- data/natural-frontend/app/routes/authenticate.js +4 -0
- data/natural-frontend/app/routes/databases.js +15 -0
- data/natural-frontend/app/routes/function.js +20 -0
- data/natural-frontend/app/routes/functions.js +22 -0
- data/natural-frontend/app/routes/index.js +9 -0
- data/natural-frontend/app/routes/projects.js +8 -0
- data/natural-frontend/app/routes/table.js +17 -0
- data/natural-frontend/app/routes/table/rows.js +19 -0
- data/natural-frontend/app/routes/tables.js +16 -0
- data/natural-frontend/app/serializers/application.js +10 -0
- data/natural-frontend/app/services/authentication.js +38 -0
- data/natural-frontend/app/styles/app.scss +58 -0
- data/natural-frontend/app/templates/application.hbs +32 -0
- data/natural-frontend/app/templates/authenticate.hbs +7 -0
- data/natural-frontend/app/templates/components/api-usage-documentation.hbs +36 -0
- data/natural-frontend/app/templates/components/column-editor.hbs +37 -0
- data/natural-frontend/app/templates/components/row-editor.hbs +21 -0
- data/natural-frontend/app/templates/components/row-value-editor.hbs +1 -0
- data/natural-frontend/app/templates/databases.hbs +37 -0
- data/natural-frontend/app/templates/function.hbs +9 -0
- data/natural-frontend/app/templates/functions.hbs +30 -0
- data/natural-frontend/app/templates/index.hbs +15 -0
- data/natural-frontend/app/templates/projects.hbs +37 -0
- data/natural-frontend/app/templates/table.hbs +10 -0
- data/natural-frontend/app/templates/table/rows.hbs +23 -0
- data/natural-frontend/app/templates/tables.hbs +32 -0
- data/natural-frontend/config/environment.js +61 -0
- data/natural-frontend/config/targets.js +19 -0
- data/natural-frontend/deploy_rails_public.sh +6 -0
- data/natural-frontend/ember-cli-build.js +42 -0
- data/natural-frontend/package-lock.json +13288 -0
- data/natural-frontend/package.json +59 -0
- data/natural-frontend/public/robots.txt +3 -0
- data/natural-frontend/testem.js +20 -0
- data/natural-frontend/tests/index.html +33 -0
- data/natural-frontend/tests/integration/components/column-editor-test.js +27 -0
- data/natural-frontend/tests/integration/components/row-editor-test.js +27 -0
- data/natural-frontend/tests/integration/components/row-value-editor-test.js +27 -0
- data/natural-frontend/tests/integration/helpers/humanization-test.js +18 -0
- data/natural-frontend/tests/test-helper.js +9 -0
- data/natural-frontend/tests/unit/controllers/databases-test.js +13 -0
- data/natural-frontend/tests/unit/controllers/projects-test.js +13 -0
- data/natural-frontend/tests/unit/controllers/table-test.js +13 -0
- data/natural-frontend/tests/unit/controllers/table/rows-test.js +12 -0
- data/natural-frontend/tests/unit/controllers/tables-test.js +13 -0
- data/natural-frontend/tests/unit/models/column-test.js +15 -0
- data/natural-frontend/tests/unit/models/database-test.js +15 -0
- data/natural-frontend/tests/unit/models/project-test.js +15 -0
- data/natural-frontend/tests/unit/models/row-test.js +15 -0
- data/natural-frontend/tests/unit/models/rwo-value-test.js +15 -0
- data/natural-frontend/tests/unit/models/table-test.js +15 -0
- data/natural-frontend/tests/unit/routes/authenticate-test.js +11 -0
- data/natural-frontend/tests/unit/routes/databases-test.js +12 -0
- data/natural-frontend/tests/unit/routes/projects-test.js +12 -0
- data/natural-frontend/tests/unit/routes/table-test.js +12 -0
- data/natural-frontend/tests/unit/routes/table/rows-test.js +11 -0
- data/natural-frontend/tests/unit/routes/tables-test.js +12 -0
- metadata +303 -0
@@ -0,0 +1 @@
|
|
1
|
+
.cm-tab,.octicon{display:inline-block}.card-header[role=tab]{cursor:pointer}.octicon{vertical-align:text-top;fill:currentColor}.CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
|
+
<title>NaturalDB</title>
|
7
|
+
<meta name="description" content="">
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
9
|
+
|
10
|
+
|
11
|
+
<meta name="natural-frontend/config/environment" content="%7B%22modulePrefix%22%3A%22natural-frontend%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22/%22%2C%22locationType%22%3A%22hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22natural-frontend%22%2C%22version%22%3A%220.0.0+28ff0d33%22%7D%2C%22apiHost%22%3A%22/%22%2C%22exportApplicationGlobal%22%3Afalse%7D" />
|
12
|
+
|
13
|
+
<link integrity="" rel="stylesheet" href="/assets/vendor-8bd8fa913b4f7f8b27f086c7bfd98b7f.css">
|
14
|
+
<link integrity="" rel="stylesheet" href="/assets/natural-frontend-598145a86019fc7faa2e0386ec6cb276.css">
|
15
|
+
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
|
20
|
+
|
21
|
+
<script src="/assets/vendor-7ffaee0528b64f886e9d1860fc719b5a.js" integrity="sha256-hRq/lP9RHEDtGXM8fD1QqIf7rp7JakFiPWVSf/Fu+W0= sha512-QKtocDhiDwRaD7ui5gd0GWUQvdTwNfhU+7XcZpuhf7uNnSHkVkW7Gm9+/99lAqMOHyroIsmCSUZGCoErI3C40A==" ></script>
|
22
|
+
<script src="/assets/natural-frontend-8e453ff9db7fc3a47e6d9e3de45aa19e.js" integrity="sha256-6RncB2Fb7Cai0QvZocKI1GWeFfpPVfHZVHI9KUURsCg= sha512-TfCfqxziHJ4jZl/V2uu1uV4aFz5fFpgK5Yfvj+EGR9z3s5Hp1SWzlyza+81l0/tiOSSaHrNk2agWEQ4mVokYxw==" ></script>
|
23
|
+
|
24
|
+
<div id="ember-bootstrap-wormhole"></div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
# Database & table creation
|
3
|
+
|
4
|
+
sql escape for all inputs
|
5
|
+
Project
|
6
|
+
* #uuid -> Database user
|
7
|
+
|
8
|
+
Database
|
9
|
+
* rename database_identifier to uuid
|
10
|
+
|
11
|
+
Table
|
12
|
+
|
13
|
+
Column
|
14
|
+
|
15
|
+
Rows x RowValues
|
16
|
+
* automatically inserted
|
17
|
+
* later: two-way binding
|
18
|
+
|
19
|
+
DatabaseController
|
20
|
+
* DatabaseController#queries
|
21
|
+
* SQL payload queried against database
|
22
|
+
* Answer is a JSON dict for SELECT statements
|
23
|
+
* query-uuid returned as answer
|
24
|
+
* /queries/<query-uuid>
|
25
|
+
* later pagable
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ColumnsControllerTest < ActionDispatch::IntegrationTest
|
4
|
+
setup do
|
5
|
+
@column = columns(:one)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should get index" do
|
9
|
+
get columns_url, as: :json
|
10
|
+
assert_response :success
|
11
|
+
end
|
12
|
+
|
13
|
+
test "should create column" do
|
14
|
+
assert_difference('Column.count') do
|
15
|
+
post columns_url, params: { column: { name: @column.name, table_id: @column.table_id, type: @column.type } }, as: :json
|
16
|
+
end
|
17
|
+
|
18
|
+
assert_response 201
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should show column" do
|
22
|
+
get column_url(@column), as: :json
|
23
|
+
assert_response :success
|
24
|
+
end
|
25
|
+
|
26
|
+
test "should update column" do
|
27
|
+
patch column_url(@column), params: { column: { name: @column.name, table_id: @column.table_id, type: @column.type } }, as: :json
|
28
|
+
assert_response 200
|
29
|
+
end
|
30
|
+
|
31
|
+
test "should destroy column" do
|
32
|
+
assert_difference('Column.count', -1) do
|
33
|
+
delete column_url(@column), as: :json
|
34
|
+
end
|
35
|
+
|
36
|
+
assert_response 204
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class DatabasesControllerTest < ActionDispatch::IntegrationTest
|
4
|
+
setup do
|
5
|
+
@database = databases(:one)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should get index" do
|
9
|
+
get databases_url, as: :json
|
10
|
+
assert_response :success
|
11
|
+
end
|
12
|
+
|
13
|
+
test "should create database" do
|
14
|
+
assert_difference('Database.count') do
|
15
|
+
post databases_url, params: { database: { name: @database.name, project_id: @database.project_id } }, as: :json
|
16
|
+
end
|
17
|
+
|
18
|
+
assert_response 201
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should show database" do
|
22
|
+
get database_url(@database), as: :json
|
23
|
+
assert_response :success
|
24
|
+
end
|
25
|
+
|
26
|
+
test "should update database" do
|
27
|
+
patch database_url(@database), params: { database: { name: @database.name, project_id: @database.project_id } }, as: :json
|
28
|
+
assert_response 200
|
29
|
+
end
|
30
|
+
|
31
|
+
test "should destroy database" do
|
32
|
+
assert_difference('Database.count', -1) do
|
33
|
+
delete database_url(@database), as: :json
|
34
|
+
end
|
35
|
+
|
36
|
+
assert_response 204
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ProjectsControllerTest < ActionDispatch::IntegrationTest
|
4
|
+
setup do
|
5
|
+
@project = projects(:one)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should get index" do
|
9
|
+
get projects_url, as: :json
|
10
|
+
assert_response :success
|
11
|
+
end
|
12
|
+
|
13
|
+
test "should create project" do
|
14
|
+
assert_difference('Project.count') do
|
15
|
+
post projects_url, params: { project: { name: @project.name } }, as: :json
|
16
|
+
end
|
17
|
+
|
18
|
+
assert_response 201
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should show project" do
|
22
|
+
get project_url(@project), as: :json
|
23
|
+
assert_response :success
|
24
|
+
end
|
25
|
+
|
26
|
+
test "should update project" do
|
27
|
+
patch project_url(@project), params: { project: { name: @project.name } }, as: :json
|
28
|
+
assert_response 200
|
29
|
+
end
|
30
|
+
|
31
|
+
test "should destroy project" do
|
32
|
+
assert_difference('Project.count', -1) do
|
33
|
+
delete project_url(@project), as: :json
|
34
|
+
end
|
35
|
+
|
36
|
+
assert_response 204
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class QueriesControllerTest < ActionDispatch::IntegrationTest
|
4
|
+
setup do
|
5
|
+
@query = queries(:one)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should get index" do
|
9
|
+
get queries_url, as: :json
|
10
|
+
assert_response :success
|
11
|
+
end
|
12
|
+
|
13
|
+
test "should create query" do
|
14
|
+
assert_difference('Query.count') do
|
15
|
+
post queries_url, params: { query: { request_data: @query.request_data, response_data: @query.response_data } }, as: :json
|
16
|
+
end
|
17
|
+
|
18
|
+
assert_response 201
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should show query" do
|
22
|
+
get query_url(@query), as: :json
|
23
|
+
assert_response :success
|
24
|
+
end
|
25
|
+
|
26
|
+
test "should update query" do
|
27
|
+
patch query_url(@query), params: { query: { request_data: @query.request_data, response_data: @query.response_data } }, as: :json
|
28
|
+
assert_response 200
|
29
|
+
end
|
30
|
+
|
31
|
+
test "should destroy query" do
|
32
|
+
assert_difference('Query.count', -1) do
|
33
|
+
delete query_url(@query), as: :json
|
34
|
+
end
|
35
|
+
|
36
|
+
assert_response 204
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RowValuesControllerTest < ActionDispatch::IntegrationTest
|
4
|
+
setup do
|
5
|
+
@row_value = row_values(:one)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should get index" do
|
9
|
+
get row_values_url, as: :json
|
10
|
+
assert_response :success
|
11
|
+
end
|
12
|
+
|
13
|
+
test "should create row_value" do
|
14
|
+
assert_difference('RowValue.count') do
|
15
|
+
post row_values_url, params: { row_value: { column_id: @row_value.column_id, row_id: @row_value.row_id, value: @row_value.value } }, as: :json
|
16
|
+
end
|
17
|
+
|
18
|
+
assert_response 201
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should show row_value" do
|
22
|
+
get row_value_url(@row_value), as: :json
|
23
|
+
assert_response :success
|
24
|
+
end
|
25
|
+
|
26
|
+
test "should update row_value" do
|
27
|
+
patch row_value_url(@row_value), params: { row_value: { column_id: @row_value.column_id, row_id: @row_value.row_id, value: @row_value.value } }, as: :json
|
28
|
+
assert_response 200
|
29
|
+
end
|
30
|
+
|
31
|
+
test "should destroy row_value" do
|
32
|
+
assert_difference('RowValue.count', -1) do
|
33
|
+
delete row_value_url(@row_value), as: :json
|
34
|
+
end
|
35
|
+
|
36
|
+
assert_response 204
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RowsControllerTest < ActionDispatch::IntegrationTest
|
4
|
+
setup do
|
5
|
+
@row = rows(:one)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should get index" do
|
9
|
+
get rows_url, as: :json
|
10
|
+
assert_response :success
|
11
|
+
end
|
12
|
+
|
13
|
+
test "should create row" do
|
14
|
+
assert_difference('Row.count') do
|
15
|
+
post rows_url, params: { row: { table_id: @row.table_id } }, as: :json
|
16
|
+
end
|
17
|
+
|
18
|
+
assert_response 201
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should show row" do
|
22
|
+
get row_url(@row), as: :json
|
23
|
+
assert_response :success
|
24
|
+
end
|
25
|
+
|
26
|
+
test "should update row" do
|
27
|
+
patch row_url(@row), params: { row: { table_id: @row.table_id } }, as: :json
|
28
|
+
assert_response 200
|
29
|
+
end
|
30
|
+
|
31
|
+
test "should destroy row" do
|
32
|
+
assert_difference('Row.count', -1) do
|
33
|
+
delete row_url(@row), as: :json
|
34
|
+
end
|
35
|
+
|
36
|
+
assert_response 204
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class TablesControllerTest < ActionDispatch::IntegrationTest
|
4
|
+
setup do
|
5
|
+
@table = tables(:one)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should get index" do
|
9
|
+
get tables_url, as: :json
|
10
|
+
assert_response :success
|
11
|
+
end
|
12
|
+
|
13
|
+
test "should create table" do
|
14
|
+
assert_difference('Table.count') do
|
15
|
+
post tables_url, params: { table: { name: @table.name } }, as: :json
|
16
|
+
end
|
17
|
+
|
18
|
+
assert_response 201
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should show table" do
|
22
|
+
get table_url(@table), as: :json
|
23
|
+
assert_response :success
|
24
|
+
end
|
25
|
+
|
26
|
+
test "should update table" do
|
27
|
+
patch table_url(@table), params: { table: { name: @table.name } }, as: :json
|
28
|
+
assert_response 200
|
29
|
+
end
|
30
|
+
|
31
|
+
test "should destroy table" do
|
32
|
+
assert_difference('Table.count', -1) do
|
33
|
+
delete table_url(@table), as: :json
|
34
|
+
end
|
35
|
+
|
36
|
+
assert_response 204
|
37
|
+
end
|
38
|
+
end
|