ezii-postgres 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. checksums.yaml +7 -0
  2. data/ezii-postgres.gemspec +13 -0
  3. data/natural-backend/Capfile +50 -0
  4. data/natural-backend/Gemfile +63 -0
  5. data/natural-backend/Gemfile.lock +233 -0
  6. data/natural-backend/LICENSE +21 -0
  7. data/natural-backend/Procfile +2 -0
  8. data/natural-backend/README.md +51 -0
  9. data/natural-backend/Rakefile +6 -0
  10. data/natural-backend/app.json +28 -0
  11. data/natural-backend/app/channels/application_cable/channel.rb +4 -0
  12. data/natural-backend/app/channels/application_cable/connection.rb +4 -0
  13. data/natural-backend/app/commands/base_command.rb +31 -0
  14. data/natural-backend/app/commands/create_new_or_authenticate_user.rb +60 -0
  15. data/natural-backend/app/commands/create_project_authentication_token_command.rb +25 -0
  16. data/natural-backend/app/commands/decode_authentication_command.rb +50 -0
  17. data/natural-backend/app/commands/decode_project_authentication_token_command.rb +51 -0
  18. data/natural-backend/app/controllers/application_controller.rb +3 -0
  19. data/natural-backend/app/controllers/authentication_controller.rb +17 -0
  20. data/natural-backend/app/controllers/columns_controller.rb +51 -0
  21. data/natural-backend/app/controllers/concerns/token_authenticatable.rb +26 -0
  22. data/natural-backend/app/controllers/databases_controller.rb +51 -0
  23. data/natural-backend/app/controllers/ember_controller.rb +6 -0
  24. data/natural-backend/app/controllers/projects_controller.rb +51 -0
  25. data/natural-backend/app/controllers/queries_controller.rb +59 -0
  26. data/natural-backend/app/controllers/row_values_controller.rb +51 -0
  27. data/natural-backend/app/controllers/rows_controller.rb +56 -0
  28. data/natural-backend/app/controllers/tables_controller.rb +55 -0
  29. data/natural-backend/app/jobs/application_job.rb +2 -0
  30. data/natural-backend/app/jobs/create_column_job.rb +10 -0
  31. data/natural-backend/app/jobs/create_database_job.rb +11 -0
  32. data/natural-backend/app/jobs/create_database_user_job.rb +8 -0
  33. data/natural-backend/app/jobs/create_table_job.rb +21 -0
  34. data/natural-backend/app/jobs/delete_row_job.rb +12 -0
  35. data/natural-backend/app/jobs/delete_value_job.rb +10 -0
  36. data/natural-backend/app/jobs/destroy_column_job.rb +10 -0
  37. data/natural-backend/app/jobs/destroy_database_job.rb +8 -0
  38. data/natural-backend/app/jobs/destroy_database_user_job.rb +8 -0
  39. data/natural-backend/app/jobs/destroy_table_job.rb +9 -0
  40. data/natural-backend/app/jobs/insert_value_job.rb +11 -0
  41. data/natural-backend/app/jobs/run_query_job.rb +35 -0
  42. data/natural-backend/app/jobs/sync_db_job.rb +80 -0
  43. data/natural-backend/app/jobs/update_column_type_job.rb +10 -0
  44. data/natural-backend/app/jobs/update_value_job.rb +10 -0
  45. data/natural-backend/app/mailers/application_mailer.rb +4 -0
  46. data/natural-backend/app/models/application_record.rb +3 -0
  47. data/natural-backend/app/models/column.rb +43 -0
  48. data/natural-backend/app/models/database.rb +37 -0
  49. data/natural-backend/app/models/project.rb +31 -0
  50. data/natural-backend/app/models/query.rb +20 -0
  51. data/natural-backend/app/models/row.rb +15 -0
  52. data/natural-backend/app/models/row_value.rb +30 -0
  53. data/natural-backend/app/models/table.rb +32 -0
  54. data/natural-backend/app/models/user.rb +10 -0
  55. data/natural-backend/app/serializers/column_serializer.rb +5 -0
  56. data/natural-backend/app/serializers/database_serializer.rb +6 -0
  57. data/natural-backend/app/serializers/project_serializer.rb +4 -0
  58. data/natural-backend/app/serializers/query_serializer.rb +3 -0
  59. data/natural-backend/app/serializers/row_serializer.rb +5 -0
  60. data/natural-backend/app/serializers/row_value_serializer.rb +5 -0
  61. data/natural-backend/app/serializers/table_serializer.rb +8 -0
  62. data/natural-backend/app/services/jwt_service.rb +17 -0
  63. data/natural-backend/app/views/layouts/mailer.html.erb +13 -0
  64. data/natural-backend/app/views/layouts/mailer.text.erb +1 -0
  65. data/natural-backend/bin/bundle +3 -0
  66. data/natural-backend/bin/rails +9 -0
  67. data/natural-backend/bin/rake +9 -0
  68. data/natural-backend/bin/run_migrations.sh +3 -0
  69. data/natural-backend/bin/setup +35 -0
  70. data/natural-backend/bin/spring +17 -0
  71. data/natural-backend/bin/update +29 -0
  72. data/natural-backend/config.ru +5 -0
  73. data/natural-backend/config/application.rb +33 -0
  74. data/natural-backend/config/boot.rb +3 -0
  75. data/natural-backend/config/cable.yml +10 -0
  76. data/natural-backend/config/database.yml +21 -0
  77. data/natural-backend/config/deploy.rb +36 -0
  78. data/natural-backend/config/deploy/production.rb +61 -0
  79. data/natural-backend/config/deploy/staging.rb +61 -0
  80. data/natural-backend/config/environment.rb +5 -0
  81. data/natural-backend/config/environments/development.rb +47 -0
  82. data/natural-backend/config/environments/production.rb +83 -0
  83. data/natural-backend/config/environments/test.rb +42 -0
  84. data/natural-backend/config/initializers/application_controller_renderer.rb +8 -0
  85. data/natural-backend/config/initializers/backtrace_silencers.rb +7 -0
  86. data/natural-backend/config/initializers/bugsnag.rb +3 -0
  87. data/natural-backend/config/initializers/cors.rb +16 -0
  88. data/natural-backend/config/initializers/filter_parameter_logging.rb +4 -0
  89. data/natural-backend/config/initializers/inflections.rb +16 -0
  90. data/natural-backend/config/initializers/json_api.rb +5 -0
  91. data/natural-backend/config/initializers/load_commands.rb +4 -0
  92. data/natural-backend/config/initializers/load_lib.rb +6 -0
  93. data/natural-backend/config/initializers/mime_types.rb +4 -0
  94. data/natural-backend/config/initializers/redis_classy.rb +1 -0
  95. data/natural-backend/config/initializers/sidekiq.rb +1 -0
  96. data/natural-backend/config/initializers/wrap_parameters.rb +14 -0
  97. data/natural-backend/config/locales/en.yml +33 -0
  98. data/natural-backend/config/puma.rb +56 -0
  99. data/natural-backend/config/routes.rb +14 -0
  100. data/natural-backend/config/schedule.rb +18 -0
  101. data/natural-backend/config/secrets.yml +32 -0
  102. data/natural-backend/config/spring.rb +6 -0
  103. data/natural-backend/db/migrate/20180408155000_create_projects.rb +9 -0
  104. data/natural-backend/db/migrate/20180408155011_create_databases.rb +10 -0
  105. data/natural-backend/db/migrate/20180409174859_create_tables.rb +9 -0
  106. data/natural-backend/db/migrate/20180409174916_create_columns.rb +11 -0
  107. data/natural-backend/db/migrate/20180409175800_create_rows.rb +9 -0
  108. data/natural-backend/db/migrate/20180409214650_create_row_values.rb +11 -0
  109. data/natural-backend/db/migrate/20180411110745_add_db_username_to_projects.rb +5 -0
  110. data/natural-backend/db/migrate/20180411145722_add_dbpw_to_projects.rb +5 -0
  111. data/natural-backend/db/migrate/20180411185924_add_database_identifier_to_databases.rb +6 -0
  112. data/natural-backend/db/migrate/20180412002908_add_dbid_to_rows.rb +5 -0
  113. data/natural-backend/db/migrate/20180412012433_create_queries.rb +11 -0
  114. data/natural-backend/db/migrate/20180429151758_create_users.rb +10 -0
  115. data/natural-backend/db/migrate/20180430094604_add_user_ref_to_projects.rb +5 -0
  116. data/natural-backend/db/migrate/20180430102945_add_user_ref_to_databases.rb +5 -0
  117. data/natural-backend/db/migrate/20180430102955_add_user_ref_to_tables.rb +5 -0
  118. data/natural-backend/db/migrate/20180430103004_add_user_ref_to_rows.rb +5 -0
  119. data/natural-backend/db/migrate/20180430103015_add_user_ref_to_columns.rb +5 -0
  120. data/natural-backend/db/migrate/20180430103024_add_user_ref_to_row_values.rb +5 -0
  121. data/natural-backend/db/migrate/20180430141537_add_api_token_projects.rb +5 -0
  122. data/natural-backend/db/schema.rb +112 -0
  123. data/natural-backend/db/seeds.rb +7 -0
  124. data/natural-backend/lib/database_manager/database_manager.rb +59 -0
  125. data/natural-backend/lib/database_manager/lib/connection.rb +49 -0
  126. data/natural-backend/lib/database_manager/lib/database.rb +65 -0
  127. data/natural-backend/lib/database_manager/lib/database_user.rb +46 -0
  128. data/natural-backend/lib/database_manager/lib/table.rb +129 -0
  129. data/natural-backend/public/assets/natural-frontend-598145a86019fc7faa2e0386ec6cb276.css +6 -0
  130. data/natural-backend/public/assets/natural-frontend-8e453ff9db7fc3a47e6d9e3de45aa19e.js +31 -0
  131. data/natural-backend/public/assets/vendor-7ffaee0528b64f886e9d1860fc719b5a.js +7359 -0
  132. data/natural-backend/public/assets/vendor-8bd8fa913b4f7f8b27f086c7bfd98b7f.css +1 -0
  133. data/natural-backend/public/index.html +26 -0
  134. data/natural-backend/public/robots.txt +3 -0
  135. data/natural-backend/roadmap.md +25 -0
  136. data/natural-backend/test/controllers/authentication_controller_test.rb +7 -0
  137. data/natural-backend/test/controllers/columns_controller_test.rb +38 -0
  138. data/natural-backend/test/controllers/databases_controller_test.rb +38 -0
  139. data/natural-backend/test/controllers/ember_controller_test.rb +7 -0
  140. data/natural-backend/test/controllers/projects_controller_test.rb +38 -0
  141. data/natural-backend/test/controllers/queries_controller_test.rb +38 -0
  142. data/natural-backend/test/controllers/row_values_controller_test.rb +38 -0
  143. data/natural-backend/test/controllers/rows_controller_test.rb +38 -0
  144. data/natural-backend/test/controllers/tables_controller_test.rb +38 -0
  145. data/natural-backend/test/fixtures/columns.yml +11 -0
  146. data/natural-backend/test/fixtures/databases.yml +9 -0
  147. data/natural-backend/test/fixtures/projects.yml +7 -0
  148. data/natural-backend/test/fixtures/queries.yml +9 -0
  149. data/natural-backend/test/fixtures/row_values.yml +11 -0
  150. data/natural-backend/test/fixtures/rows.yml +7 -0
  151. data/natural-backend/test/fixtures/tables.yml +7 -0
  152. data/natural-backend/test/fixtures/users.yml +9 -0
  153. data/natural-backend/test/jobs/add_column_job_test.rb +7 -0
  154. data/natural-backend/test/jobs/create_database_job_test.rb +7 -0
  155. data/natural-backend/test/jobs/create_database_user_job_test.rb +7 -0
  156. data/natural-backend/test/jobs/create_table_job_test.rb +7 -0
  157. data/natural-backend/test/jobs/delete_row_job_test.rb +7 -0
  158. data/natural-backend/test/jobs/delete_value_job_test.rb +7 -0
  159. data/natural-backend/test/jobs/destroy_database_job_test.rb +7 -0
  160. data/natural-backend/test/jobs/destroy_database_user_job_test.rb +7 -0
  161. data/natural-backend/test/jobs/destroy_table_job_test.rb +7 -0
  162. data/natural-backend/test/jobs/insert_value_job_test.rb +7 -0
  163. data/natural-backend/test/jobs/run_query_job_test.rb +7 -0
  164. data/natural-backend/test/jobs/sync_db_job_test.rb +7 -0
  165. data/natural-backend/test/jobs/update_value_job_test.rb +7 -0
  166. data/natural-backend/test/lib/database_manager/database_manager_test.rb +21 -0
  167. data/natural-backend/test/lib/database_manager/lib/database_test.rb +28 -0
  168. data/natural-backend/test/lib/database_manager/lib/database_user_test.rb +43 -0
  169. data/natural-backend/test/lib/database_manager/lib/table_test.rb +46 -0
  170. data/natural-backend/test/models/column_test.rb +7 -0
  171. data/natural-backend/test/models/database_test.rb +7 -0
  172. data/natural-backend/test/models/project_test.rb +7 -0
  173. data/natural-backend/test/models/query_test.rb +7 -0
  174. data/natural-backend/test/models/row_test.rb +7 -0
  175. data/natural-backend/test/models/row_value_test.rb +7 -0
  176. data/natural-backend/test/models/table_test.rb +7 -0
  177. data/natural-backend/test/models/user_test.rb +7 -0
  178. data/natural-backend/test/test_helper.rb +10 -0
  179. data/natural-frontend/LICENSE +21 -0
  180. data/natural-frontend/README.md +3 -0
  181. data/natural-frontend/app/adapters/application.js +33 -0
  182. data/natural-frontend/app/app.js +18 -0
  183. data/natural-frontend/app/components/column-editor.js +41 -0
  184. data/natural-frontend/app/components/row-editor.js +21 -0
  185. data/natural-frontend/app/components/row-value-editor.js +49 -0
  186. data/natural-frontend/app/controllers/application.js +11 -0
  187. data/natural-frontend/app/controllers/authenticate.js +16 -0
  188. data/natural-frontend/app/controllers/databases.js +22 -0
  189. data/natural-frontend/app/controllers/projects.js +18 -0
  190. data/natural-frontend/app/controllers/table.js +12 -0
  191. data/natural-frontend/app/controllers/table/rows.js +23 -0
  192. data/natural-frontend/app/controllers/tables.js +22 -0
  193. data/natural-frontend/app/helpers/plus-one.js +8 -0
  194. data/natural-frontend/app/index.html +25 -0
  195. data/natural-frontend/app/mixins/application-route-auth-mixin.js +8 -0
  196. data/natural-frontend/app/mixins/authenticated-route-mixin.js +10 -0
  197. data/natural-frontend/app/models/column.js +9 -0
  198. data/natural-frontend/app/models/database.js +9 -0
  199. data/natural-frontend/app/models/project.js +8 -0
  200. data/natural-frontend/app/models/row-value.js +8 -0
  201. data/natural-frontend/app/models/row.js +8 -0
  202. data/natural-frontend/app/models/table.js +9 -0
  203. data/natural-frontend/app/resolver.js +4 -0
  204. data/natural-frontend/app/router.js +22 -0
  205. data/natural-frontend/app/routes/application.js +5 -0
  206. data/natural-frontend/app/routes/authenticate.js +4 -0
  207. data/natural-frontend/app/routes/databases.js +15 -0
  208. data/natural-frontend/app/routes/function.js +20 -0
  209. data/natural-frontend/app/routes/functions.js +22 -0
  210. data/natural-frontend/app/routes/index.js +9 -0
  211. data/natural-frontend/app/routes/projects.js +8 -0
  212. data/natural-frontend/app/routes/table.js +17 -0
  213. data/natural-frontend/app/routes/table/rows.js +19 -0
  214. data/natural-frontend/app/routes/tables.js +16 -0
  215. data/natural-frontend/app/serializers/application.js +10 -0
  216. data/natural-frontend/app/services/authentication.js +38 -0
  217. data/natural-frontend/app/styles/app.scss +58 -0
  218. data/natural-frontend/app/templates/application.hbs +32 -0
  219. data/natural-frontend/app/templates/authenticate.hbs +7 -0
  220. data/natural-frontend/app/templates/components/api-usage-documentation.hbs +36 -0
  221. data/natural-frontend/app/templates/components/column-editor.hbs +37 -0
  222. data/natural-frontend/app/templates/components/row-editor.hbs +21 -0
  223. data/natural-frontend/app/templates/components/row-value-editor.hbs +1 -0
  224. data/natural-frontend/app/templates/databases.hbs +37 -0
  225. data/natural-frontend/app/templates/function.hbs +9 -0
  226. data/natural-frontend/app/templates/functions.hbs +30 -0
  227. data/natural-frontend/app/templates/index.hbs +15 -0
  228. data/natural-frontend/app/templates/projects.hbs +37 -0
  229. data/natural-frontend/app/templates/table.hbs +10 -0
  230. data/natural-frontend/app/templates/table/rows.hbs +23 -0
  231. data/natural-frontend/app/templates/tables.hbs +32 -0
  232. data/natural-frontend/config/environment.js +61 -0
  233. data/natural-frontend/config/targets.js +19 -0
  234. data/natural-frontend/deploy_rails_public.sh +6 -0
  235. data/natural-frontend/ember-cli-build.js +42 -0
  236. data/natural-frontend/package-lock.json +13288 -0
  237. data/natural-frontend/package.json +59 -0
  238. data/natural-frontend/public/robots.txt +3 -0
  239. data/natural-frontend/testem.js +20 -0
  240. data/natural-frontend/tests/index.html +33 -0
  241. data/natural-frontend/tests/integration/components/column-editor-test.js +27 -0
  242. data/natural-frontend/tests/integration/components/row-editor-test.js +27 -0
  243. data/natural-frontend/tests/integration/components/row-value-editor-test.js +27 -0
  244. data/natural-frontend/tests/integration/helpers/humanization-test.js +18 -0
  245. data/natural-frontend/tests/test-helper.js +9 -0
  246. data/natural-frontend/tests/unit/controllers/databases-test.js +13 -0
  247. data/natural-frontend/tests/unit/controllers/projects-test.js +13 -0
  248. data/natural-frontend/tests/unit/controllers/table-test.js +13 -0
  249. data/natural-frontend/tests/unit/controllers/table/rows-test.js +12 -0
  250. data/natural-frontend/tests/unit/controllers/tables-test.js +13 -0
  251. data/natural-frontend/tests/unit/models/column-test.js +15 -0
  252. data/natural-frontend/tests/unit/models/database-test.js +15 -0
  253. data/natural-frontend/tests/unit/models/project-test.js +15 -0
  254. data/natural-frontend/tests/unit/models/row-test.js +15 -0
  255. data/natural-frontend/tests/unit/models/rwo-value-test.js +15 -0
  256. data/natural-frontend/tests/unit/models/table-test.js +15 -0
  257. data/natural-frontend/tests/unit/routes/authenticate-test.js +11 -0
  258. data/natural-frontend/tests/unit/routes/databases-test.js +12 -0
  259. data/natural-frontend/tests/unit/routes/projects-test.js +12 -0
  260. data/natural-frontend/tests/unit/routes/table-test.js +12 -0
  261. data/natural-frontend/tests/unit/routes/table/rows-test.js +11 -0
  262. data/natural-frontend/tests/unit/routes/tables-test.js +12 -0
  263. metadata +303 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d76164d32b711cff37d59e9256de3837086130b0eb514a0f0cac63ec595872ef
4
+ data.tar.gz: fd8074f4a3699a30d3de144047878418d803ba9c8c8c41113855952caed6f527
5
+ SHA512:
6
+ metadata.gz: e6fc78a1326253557dfd86650a44e3e6b777502f1ce5e0351d93fc9a69713977369d213a8de388e6f8406acb37bcbd2b8fb0a21d8b802e9898ef11f3fe9375e2
7
+ data.tar.gz: dc80e73fa8c999cf2ca75f324cb3304974aba2d2cbb586772463ce2d4c1a9ee3af9757fbf81dfea5cce4a47c7daee6f9ec72c41ff829f4052641375c325e20c8
@@ -0,0 +1,13 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'ezii-postgres'
3
+ s.version = '0.0.1'
4
+ s.date = '2019-08-14'
5
+ s.summary = "eZii PostgreSQL"
6
+ s.description = "easy way of accessing a postgres database, both visually and via api"
7
+ s.authors = ["Manuel Arno Korfmann"]
8
+ s.email = 'manu@korfmann.info'
9
+ s.files = Dir.glob("**/*")
10
+ s.homepage =
11
+ 'https://rubygems.org/gems/ezii-postgres'
12
+ s.license = 'n0ne'
13
+ end
@@ -0,0 +1,50 @@
1
+ # Load DSL and set up stages
2
+ require "capistrano/setup"
3
+
4
+ # Include default deployment tasks
5
+ require "capistrano/deploy"
6
+
7
+ require 'capistrano/rbenv'
8
+
9
+ require 'capistrano/bundler'
10
+ require 'capistrano/rails/migrations'
11
+ require 'capistrano/passenger'
12
+ require 'capistrano/sidekiq'
13
+ require 'capistrano/sidekiq/monit'
14
+ require "whenever/capistrano"
15
+
16
+ set :rbenv_type, :user
17
+ set :rbenv_ruby, '2.5.1'
18
+
19
+ # Load the SCM plugin appropriate to your project:
20
+ #
21
+ # require "capistrano/scm/hg"
22
+ # install_plugin Capistrano::SCM::Hg
23
+ # or
24
+ # require "capistrano/scm/svn"
25
+ # install_plugin Capistrano::SCM::Svn
26
+ # or
27
+ require "capistrano/scm/git"
28
+ install_plugin Capistrano::SCM::Git
29
+
30
+ # Include tasks from other gems included in your Gemfile
31
+ #
32
+ # For documentation on these, see for example:
33
+ #
34
+ # https://github.com/capistrano/rvm
35
+ # https://github.com/capistrano/rbenv
36
+ # https://github.com/capistrano/chruby
37
+ # https://github.com/capistrano/bundler
38
+ # https://github.com/capistrano/rails
39
+ # https://github.com/capistrano/passenger
40
+ #
41
+ # require "capistrano/rvm"
42
+ # require "capistrano/rbenv"
43
+ # require "capistrano/chruby"
44
+ # require "capistrano/bundler"
45
+ # require "capistrano/rails/assets"
46
+ # require "capistrano/rails/migrations"
47
+ # require "capistrano/passenger"
48
+
49
+ # Load custom tasks from `lib/capistrano/tasks` if you have any defined
50
+ Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
@@ -0,0 +1,63 @@
1
+ source 'https://rubygems.org'
2
+
3
+ git_source(:github) do |repo_name|
4
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5
+ "https://github.com/#{repo_name}.git"
6
+ end
7
+
8
+ gem 'rack-cors', :require => 'rack/cors'
9
+ gem 'active_model_serializers'
10
+ gem 'sidekiq'
11
+ gem 'whenever', require: false
12
+ gem 'redis-mutex'
13
+ gem 'bcrypt'
14
+ gem 'jwt', github: 'jwt/ruby-jwt'
15
+ gem 'kaminari'
16
+
17
+ group :development do
18
+ gem "capistrano", "~> 3.10", require: false
19
+ gem 'capistrano-rails'
20
+ gem 'capistrano-passenger'
21
+ gem 'capistrano-rbenv'
22
+ gem 'capistrano-sidekiq', github: 'seuros/capistrano-sidekiq'
23
+ end
24
+
25
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
26
+ gem 'rails', '~> 5.1.6'
27
+ # Use sqlite3 as the database for Active Record
28
+ gem 'pg'
29
+ # Use Puma as the app server
30
+ gem 'puma', '~> 3.7'
31
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
32
+ # gem 'jbuilder', '~> 2.5'
33
+ # Use Redis adapter to run Action Cable in production
34
+ # gem 'redis', '~> 4.0'
35
+ # Use ActiveModel has_secure_password
36
+ # gem 'bcrypt', '~> 3.1.7'
37
+
38
+ # Use Capistrano for deployment
39
+ # gem 'capistrano-rails', group: :development
40
+
41
+ # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
42
+ # gem 'rack-cors'
43
+
44
+ group :development, :test do
45
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
46
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
47
+ end
48
+
49
+ group :development do
50
+ gem 'listen', '>= 3.0.5', '< 3.2'
51
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
52
+ gem 'spring'
53
+ gem 'spring-watcher-listen', '~> 2.0.0'
54
+ end
55
+
56
+ group :test do
57
+ gem 'minitest-spec-rails'
58
+ end
59
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
60
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
61
+
62
+ # Added at 2018-06-17 14:14:32 +0200 by manuel:
63
+ gem "bugsnag", "~> 6.7"
@@ -0,0 +1,233 @@
1
+ GIT
2
+ remote: https://github.com/jwt/ruby-jwt.git
3
+ revision: 93b02ab493b45c283ec7ce79f62edb706dffd9ea
4
+ specs:
5
+ jwt (2.1.1)
6
+
7
+ GIT
8
+ remote: https://github.com/seuros/capistrano-sidekiq.git
9
+ revision: 2a9e46f61bed00e1d897737e44d939c6b6f2db2d
10
+ specs:
11
+ capistrano-sidekiq (1.0.2)
12
+ capistrano (>= 3.9.0)
13
+ sidekiq (>= 3.4)
14
+
15
+ GEM
16
+ remote: https://rubygems.org/
17
+ specs:
18
+ actioncable (5.1.6)
19
+ actionpack (= 5.1.6)
20
+ nio4r (~> 2.0)
21
+ websocket-driver (~> 0.6.1)
22
+ actionmailer (5.1.6)
23
+ actionpack (= 5.1.6)
24
+ actionview (= 5.1.6)
25
+ activejob (= 5.1.6)
26
+ mail (~> 2.5, >= 2.5.4)
27
+ rails-dom-testing (~> 2.0)
28
+ actionpack (5.1.6)
29
+ actionview (= 5.1.6)
30
+ activesupport (= 5.1.6)
31
+ rack (~> 2.0)
32
+ rack-test (>= 0.6.3)
33
+ rails-dom-testing (~> 2.0)
34
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
35
+ actionview (5.1.6)
36
+ activesupport (= 5.1.6)
37
+ builder (~> 3.1)
38
+ erubi (~> 1.4)
39
+ rails-dom-testing (~> 2.0)
40
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
41
+ active_model_serializers (0.10.7)
42
+ actionpack (>= 4.1, < 6)
43
+ activemodel (>= 4.1, < 6)
44
+ case_transform (>= 0.2)
45
+ jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
46
+ activejob (5.1.6)
47
+ activesupport (= 5.1.6)
48
+ globalid (>= 0.3.6)
49
+ activemodel (5.1.6)
50
+ activesupport (= 5.1.6)
51
+ activerecord (5.1.6)
52
+ activemodel (= 5.1.6)
53
+ activesupport (= 5.1.6)
54
+ arel (~> 8.0)
55
+ activesupport (5.1.6)
56
+ concurrent-ruby (~> 1.0, >= 1.0.2)
57
+ i18n (>= 0.7, < 2)
58
+ minitest (~> 5.1)
59
+ tzinfo (~> 1.1)
60
+ airbrussh (1.3.0)
61
+ sshkit (>= 1.6.1, != 1.7.0)
62
+ arel (8.0.0)
63
+ bcrypt (3.1.12)
64
+ bugsnag (6.7.3)
65
+ concurrent-ruby (~> 1.0)
66
+ builder (3.2.3)
67
+ byebug (10.0.2)
68
+ capistrano (3.11.0)
69
+ airbrussh (>= 1.0.0)
70
+ i18n
71
+ rake (>= 10.0.0)
72
+ sshkit (>= 1.9.0)
73
+ capistrano-bundler (1.3.0)
74
+ capistrano (~> 3.1)
75
+ sshkit (~> 1.2)
76
+ capistrano-passenger (0.2.0)
77
+ capistrano (~> 3.0)
78
+ capistrano-rails (1.4.0)
79
+ capistrano (~> 3.1)
80
+ capistrano-bundler (~> 1.1)
81
+ capistrano-rbenv (2.1.3)
82
+ capistrano (~> 3.1)
83
+ sshkit (~> 1.3)
84
+ case_transform (0.2)
85
+ activesupport
86
+ chronic (0.10.2)
87
+ concurrent-ruby (1.0.5)
88
+ connection_pool (2.2.2)
89
+ crass (1.0.4)
90
+ erubi (1.7.1)
91
+ ffi (1.9.25)
92
+ globalid (0.4.1)
93
+ activesupport (>= 4.2.0)
94
+ i18n (1.0.1)
95
+ concurrent-ruby (~> 1.0)
96
+ jsonapi-renderer (0.2.0)
97
+ kaminari (1.1.1)
98
+ activesupport (>= 4.1.0)
99
+ kaminari-actionview (= 1.1.1)
100
+ kaminari-activerecord (= 1.1.1)
101
+ kaminari-core (= 1.1.1)
102
+ kaminari-actionview (1.1.1)
103
+ actionview
104
+ kaminari-core (= 1.1.1)
105
+ kaminari-activerecord (1.1.1)
106
+ activerecord
107
+ kaminari-core (= 1.1.1)
108
+ kaminari-core (1.1.1)
109
+ listen (3.1.5)
110
+ rb-fsevent (~> 0.9, >= 0.9.4)
111
+ rb-inotify (~> 0.9, >= 0.9.7)
112
+ ruby_dep (~> 1.2)
113
+ loofah (2.2.2)
114
+ crass (~> 1.0.2)
115
+ nokogiri (>= 1.5.9)
116
+ mail (2.7.0)
117
+ mini_mime (>= 0.1.1)
118
+ method_source (0.9.0)
119
+ mini_mime (1.0.0)
120
+ mini_portile2 (2.3.0)
121
+ minitest (5.11.3)
122
+ minitest-spec-rails (5.4.0)
123
+ minitest (~> 5.0)
124
+ rails (>= 4.1)
125
+ net-scp (1.2.1)
126
+ net-ssh (>= 2.6.5)
127
+ net-ssh (5.0.2)
128
+ nio4r (2.3.1)
129
+ nokogiri (1.8.3)
130
+ mini_portile2 (~> 2.3.0)
131
+ pg (1.0.0)
132
+ puma (3.11.4)
133
+ rack (2.0.5)
134
+ rack-cors (1.0.2)
135
+ rack-protection (2.0.3)
136
+ rack
137
+ rack-test (1.0.0)
138
+ rack (>= 1.0, < 3)
139
+ rails (5.1.6)
140
+ actioncable (= 5.1.6)
141
+ actionmailer (= 5.1.6)
142
+ actionpack (= 5.1.6)
143
+ actionview (= 5.1.6)
144
+ activejob (= 5.1.6)
145
+ activemodel (= 5.1.6)
146
+ activerecord (= 5.1.6)
147
+ activesupport (= 5.1.6)
148
+ bundler (>= 1.3.0)
149
+ railties (= 5.1.6)
150
+ sprockets-rails (>= 2.0.0)
151
+ rails-dom-testing (2.0.3)
152
+ activesupport (>= 4.2.0)
153
+ nokogiri (>= 1.6)
154
+ rails-html-sanitizer (1.0.4)
155
+ loofah (~> 2.2, >= 2.2.2)
156
+ railties (5.1.6)
157
+ actionpack (= 5.1.6)
158
+ activesupport (= 5.1.6)
159
+ method_source
160
+ rake (>= 0.8.7)
161
+ thor (>= 0.18.1, < 2.0)
162
+ rake (12.3.1)
163
+ rb-fsevent (0.10.3)
164
+ rb-inotify (0.9.10)
165
+ ffi (>= 0.5.0, < 2)
166
+ redis (4.0.1)
167
+ redis-classy (2.4.1)
168
+ redis-namespace (~> 1.0)
169
+ redis-mutex (4.0.1)
170
+ redis-classy (~> 2.0)
171
+ redis-namespace (1.6.0)
172
+ redis (>= 3.0.4)
173
+ ruby_dep (1.5.0)
174
+ sidekiq (5.1.3)
175
+ concurrent-ruby (~> 1.0)
176
+ connection_pool (~> 2.2, >= 2.2.0)
177
+ rack-protection (>= 1.5.0)
178
+ redis (>= 3.3.5, < 5)
179
+ spring (2.0.2)
180
+ activesupport (>= 4.2)
181
+ spring-watcher-listen (2.0.1)
182
+ listen (>= 2.7, < 4.0)
183
+ spring (>= 1.2, < 3.0)
184
+ sprockets (3.7.2)
185
+ concurrent-ruby (~> 1.0)
186
+ rack (> 1, < 3)
187
+ sprockets-rails (3.2.1)
188
+ actionpack (>= 4.0)
189
+ activesupport (>= 4.0)
190
+ sprockets (>= 3.0.0)
191
+ sshkit (1.16.1)
192
+ net-scp (>= 1.1.2)
193
+ net-ssh (>= 2.8.0)
194
+ thor (0.20.0)
195
+ thread_safe (0.3.6)
196
+ tzinfo (1.2.5)
197
+ thread_safe (~> 0.1)
198
+ websocket-driver (0.6.5)
199
+ websocket-extensions (>= 0.1.0)
200
+ websocket-extensions (0.1.3)
201
+ whenever (0.10.0)
202
+ chronic (>= 0.6.3)
203
+
204
+ PLATFORMS
205
+ ruby
206
+
207
+ DEPENDENCIES
208
+ active_model_serializers
209
+ bcrypt
210
+ bugsnag (~> 6.7)
211
+ byebug
212
+ capistrano (~> 3.10)
213
+ capistrano-passenger
214
+ capistrano-rails
215
+ capistrano-rbenv
216
+ capistrano-sidekiq!
217
+ jwt!
218
+ kaminari
219
+ listen (>= 3.0.5, < 3.2)
220
+ minitest-spec-rails
221
+ pg
222
+ puma (~> 3.7)
223
+ rack-cors
224
+ rails (~> 5.1.6)
225
+ redis-mutex
226
+ sidekiq
227
+ spring
228
+ spring-watcher-listen (~> 2.0.0)
229
+ tzinfo-data
230
+ whenever
231
+
232
+ BUNDLED WITH
233
+ 1.16.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Manuel Arno Korfmann
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ web: bundle exec puma
2
+ worker: bundle exec sidekiq -c 1
@@ -0,0 +1,51 @@
1
+ [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/gitterHQ/gitter)
2
+
3
+ ## Demo
4
+
5
+ https://natural-db.com.
6
+
7
+ ## One-click deployments
8
+
9
+ Currently looking into:
10
+
11
+ [![Deploy](https://cdn.wedeploy.com/images/deploy.svg)](https://console.wedeploy.com/deploy?repo=https://github.com/LemonAndroid/natural-backend)
12
+
13
+ Let's see if this works, heroku didn't work.
14
+
15
+ Not supported for now:
16
+
17
+ [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
18
+
19
+ In order to make the heroku deployment work properly, a custom Amazon RDS instance would have to be configured. HMU in the gitter and I'll guide you through it if you want to deploy to heroku. Be aware that the Amazon RDS instance will cost money.
20
+
21
+ ## Getting started
22
+
23
+ 1. Clone this repository:
24
+ ```sh
25
+ $ git clone https://github.com/LemonAndroid/natural-backend.git
26
+ ````
27
+
28
+ 2. Install redis
29
+ ```sh
30
+ $ sudo apt install redis
31
+ ```
32
+ 3. Change into the app directory:
33
+ ```sh
34
+ $ cd natural-backend
35
+ ```
36
+ 4. Install dependencies:
37
+ ```sh
38
+ $ bundle install
39
+ ```
40
+ 5. Setup database:
41
+ ```sh
42
+ $ bundle exec rake db:setup
43
+ ```
44
+ 6. Start the application:
45
+ ```sh
46
+ $ bundle exec rails server
47
+ ```
48
+ 7. Start sidekiq:
49
+ ```sh
50
+ $ bundle exec sidekiq
51
+ ```