cmor_files 0.0.1.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +44 -0
  4. data/Rakefile +19 -0
  5. data/app/assets/config/cmor_files_manifest.js +2 -0
  6. data/app/assets/javascripts/cmor/files/application/keep.js +0 -0
  7. data/app/assets/javascripts/cmor/files/application.js +14 -0
  8. data/app/assets/stylesheets/cmor/files/application/keep.css +0 -0
  9. data/app/assets/stylesheets/cmor/files/application.css +15 -0
  10. data/app/controllers/cmor/files/application_controller.rb +5 -0
  11. data/app/controllers/cmor/files/application_resources_controller.rb +18 -0
  12. data/app/controllers/cmor/files/folders_controller.rb +19 -0
  13. data/app/helpers/cmor/files/application_helper.rb +4 -0
  14. data/app/jobs/cmor/files/application_job.rb +4 -0
  15. data/app/mailers/cmor/files/application_mailer.rb +6 -0
  16. data/app/models/cmor/files/application_record.rb +5 -0
  17. data/app/models/cmor/files/file_detail.rb +6 -0
  18. data/app/models/cmor/files/folder.rb +71 -0
  19. data/app/views/cmor/files/folders/index.haml +9 -0
  20. data/app/views/cmor/files/folders/show.haml +17 -0
  21. data/app/views/layouts/cmor/files/application.html.erb +14 -0
  22. data/config/initializers/assets.rb +1 -0
  23. data/config/initializers/i18n.rb +2 -0
  24. data/config/locales/de.yml +44 -0
  25. data/config/locales/en.yml +44 -0
  26. data/config/routes.rb +7 -0
  27. data/db/migrate/20180301094240_create_cmor_files_folders.rb +11 -0
  28. data/db/migrate/20180302082402_create_cmor_files_file_details.rb +13 -0
  29. data/lib/cmor/files/configuration.rb +9 -0
  30. data/lib/cmor/files/engine.rb +13 -0
  31. data/lib/cmor/files/version.rb +7 -0
  32. data/lib/cmor/files.rb +10 -0
  33. data/lib/cmor_files.rb +6 -0
  34. data/lib/generators/cmor/files/install/install_generator.rb +24 -0
  35. data/lib/generators/cmor/files/install/templates/initializer.rb +7 -0
  36. data/lib/generators/cmor/files/install/templates/routes.source +3 -0
  37. data/lib/tasks/cmor_files_tasks.rake +4 -0
  38. data/spec/config/locales/de.yml +3 -0
  39. data/spec/dummy/config/initializers/cmor_files.rb +7 -0
  40. data/spec/dummy/config/initializers/i18n.rb +2 -0
  41. data/spec/dummy/db/development.sqlite3 +0 -0
  42. data/spec/dummy/db/migrate/20190325174535_create_active_storage_tables.active_storage.rb +27 -0
  43. data/spec/dummy/db/migrate/20190325174557_create_cmor_files_folders.cmor_files.rb +12 -0
  44. data/spec/dummy/db/migrate/20190325174558_create_cmor_files_file_details.cmor_files.rb +14 -0
  45. data/spec/dummy/db/test.sqlite3 +0 -0
  46. data/spec/dummy/log/development.log +122 -0
  47. data/spec/dummy/log/test.log +143 -0
  48. data/spec/dummy/tmp/development_secret.txt +1 -0
  49. data/spec/dummy/tmp/storage/Bh/RE/BhREgVesQFJGKZawuwybEm9o +0 -0
  50. data/spec/dummy/tmp/storage/x9/kn/x9knsAYKxaGksCFoE1kksZUn +0 -0
  51. data/spec/dummy~/Rakefile +6 -0
  52. data/spec/dummy~/app/assets/config/manifest.js +4 -0
  53. data/spec/dummy~/app/assets/javascripts/application.js +14 -0
  54. data/spec/dummy~/app/assets/javascripts/cable.js +13 -0
  55. data/spec/dummy~/app/assets/stylesheets/application.css +15 -0
  56. data/spec/dummy~/app/channels/application_cable/channel.rb +4 -0
  57. data/spec/dummy~/app/channels/application_cable/connection.rb +4 -0
  58. data/spec/dummy~/app/controllers/application_controller.rb +2 -0
  59. data/spec/dummy~/app/helpers/application_helper.rb +2 -0
  60. data/spec/dummy~/app/jobs/application_job.rb +2 -0
  61. data/spec/dummy~/app/mailers/application_mailer.rb +4 -0
  62. data/spec/dummy~/app/models/application_record.rb +3 -0
  63. data/spec/dummy~/app/views/layouts/application.html.erb +14 -0
  64. data/spec/dummy~/app/views/layouts/mailer.html.erb +13 -0
  65. data/spec/dummy~/app/views/layouts/mailer.text.erb +1 -0
  66. data/spec/dummy~/bin/bundle +3 -0
  67. data/spec/dummy~/bin/rails +4 -0
  68. data/spec/dummy~/bin/rake +4 -0
  69. data/spec/dummy~/bin/setup +36 -0
  70. data/spec/dummy~/bin/update +31 -0
  71. data/spec/dummy~/bin/yarn +11 -0
  72. data/spec/dummy~/config/application.rb +30 -0
  73. data/spec/dummy~/config/boot.rb +5 -0
  74. data/spec/dummy~/config/cable.yml +10 -0
  75. data/spec/dummy~/config/database.yml +25 -0
  76. data/spec/dummy~/config/environment.rb +5 -0
  77. data/spec/dummy~/config/environments/development.rb +61 -0
  78. data/spec/dummy~/config/environments/production.rb +94 -0
  79. data/spec/dummy~/config/environments/test.rb +46 -0
  80. data/spec/dummy~/config/initializers/application_controller_renderer.rb +8 -0
  81. data/spec/dummy~/config/initializers/assets.rb +14 -0
  82. data/spec/dummy~/config/initializers/backtrace_silencers.rb +7 -0
  83. data/spec/dummy~/config/initializers/cmor/files.rb +7 -0
  84. data/spec/dummy~/config/initializers/content_security_policy.rb +22 -0
  85. data/spec/dummy~/config/initializers/cookies_serializer.rb +5 -0
  86. data/spec/dummy~/config/initializers/filter_parameter_logging.rb +4 -0
  87. data/spec/dummy~/config/initializers/inflections.rb +16 -0
  88. data/spec/dummy~/config/initializers/mime_types.rb +4 -0
  89. data/spec/dummy~/config/initializers/wrap_parameters.rb +14 -0
  90. data/spec/dummy~/config/locales/en.yml +33 -0
  91. data/spec/dummy~/config/puma.rb +34 -0
  92. data/spec/dummy~/config/routes.rb +3 -0
  93. data/spec/dummy~/config/spring.rb +6 -0
  94. data/spec/dummy~/config/storage.yml +35 -0
  95. data/spec/dummy~/config.ru +5 -0
  96. data/spec/dummy~/db/development.sqlite3 +0 -0
  97. data/spec/dummy~/db/schema.rb +41 -0
  98. data/spec/dummy~/db/test.sqlite3 +0 -0
  99. data/spec/dummy~/log/test.log +0 -0
  100. data/spec/dummy~/package.json +5 -0
  101. data/spec/dummy~/public/404.html +67 -0
  102. data/spec/dummy~/public/422.html +67 -0
  103. data/spec/dummy~/public/500.html +66 -0
  104. data/spec/dummy~/public/apple-touch-icon-precomposed.png +0 -0
  105. data/spec/dummy~/public/apple-touch-icon.png +0 -0
  106. data/spec/dummy~/public/favicon.ico +0 -0
  107. data/spec/factories/cmor_files_file_details.rb +17 -0
  108. data/spec/factories/cmor_files_folders.rb +5 -0
  109. data/spec/files/cmor/files/file_details/example.png +0 -0
  110. data/spec/models/cmor/files/file_detail_spec.rb +7 -0
  111. data/spec/models/cmor/files/folder_spec.rb +12 -0
  112. data/spec/models/generic_spec.rb +50 -0
  113. data/spec/models/i18n_spec.rb +41 -0
  114. data/spec/rails_helper.rb +62 -0
  115. data/spec/spec_helper.rb +96 -0
  116. data/spec/support/capybara.rb +1 -0
  117. data/spec/support/factory_bot.rb +5 -0
  118. data/spec/support/rao-shoulda_matchers.rb +5 -0
  119. data/spec/support/shoulda_matchers.rb +8 -0
  120. metadata +469 -0
@@ -0,0 +1,122 @@
1
+  (0.1ms) SELECT sqlite_version(*)
2
+ ↳ bin/rails:4
3
+  (7.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
4
+ ↳ bin/rails:4
5
+  (11.2ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
6
+ ↳ bin/rails:4
7
+  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
8
+ ↳ bin/rails:4
9
+ Migrating to CreateActiveStorageTables (20190325174535)
10
+  (0.2ms) begin transaction
11
+ ↳ bin/rails:4
12
+  (1.5ms) CREATE TABLE "active_storage_blobs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar NOT NULL, "filename" varchar NOT NULL, "content_type" varchar, "metadata" text, "byte_size" bigint NOT NULL, "checksum" varchar NOT NULL, "created_at" datetime NOT NULL)
13
+ ↳ db/migrate/20190325174535_create_active_storage_tables.active_storage.rb:4
14
+  (0.4ms) CREATE UNIQUE INDEX "index_active_storage_blobs_on_key" ON "active_storage_blobs" ("key")
15
+ ↳ db/migrate/20190325174535_create_active_storage_tables.active_storage.rb:4
16
+  (0.4ms) CREATE TABLE "active_storage_attachments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "record_type" varchar NOT NULL, "record_id" integer NOT NULL, "blob_id" integer NOT NULL, "created_at" datetime NOT NULL, CONSTRAINT "fk_rails_c3b3935057"
17
+ FOREIGN KEY ("blob_id")
18
+ REFERENCES "active_storage_blobs" ("id")
19
+ )
20
+ ↳ db/migrate/20190325174535_create_active_storage_tables.active_storage.rb:16
21
+  (0.2ms) CREATE INDEX "index_active_storage_attachments_on_blob_id" ON "active_storage_attachments" ("blob_id")
22
+ ↳ db/migrate/20190325174535_create_active_storage_tables.active_storage.rb:16
23
+  (0.4ms) CREATE UNIQUE INDEX "index_active_storage_attachments_uniqueness" ON "active_storage_attachments" ("record_type", "record_id", "name", "blob_id")
24
+ ↳ db/migrate/20190325174535_create_active_storage_tables.active_storage.rb:16
25
+ ActiveRecord::SchemaMigration Create (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190325174535"]]
26
+ ↳ bin/rails:4
27
+  (13.1ms) commit transaction
28
+ ↳ bin/rails:4
29
+ Migrating to CreateCmorFilesFolders (20190325174557)
30
+  (0.3ms) begin transaction
31
+ ↳ bin/rails:4
32
+  (1.5ms) CREATE TABLE "cmor_files_folders" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "published_at" datetime, "description" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
33
+ ↳ db/migrate/20190325174557_create_cmor_files_folders.cmor_files.rb:4
34
+ ActiveRecord::SchemaMigration Create (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190325174557"]]
35
+ ↳ bin/rails:4
36
+  (26.0ms) commit transaction
37
+ ↳ bin/rails:4
38
+ Migrating to CreateCmorFilesFileDetails (20190325174558)
39
+  (0.1ms) begin transaction
40
+ ↳ bin/rails:4
41
+  (1.0ms) CREATE TABLE "cmor_files_file_details" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "folder_id" integer, "asset_id" integer, "title" varchar, "description" text, "position" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
42
+ ↳ db/migrate/20190325174558_create_cmor_files_file_details.cmor_files.rb:4
43
+ ActiveRecord::SchemaMigration Create (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20190325174558"]]
44
+ ↳ bin/rails:4
45
+  (5.7ms) commit transaction
46
+ ↳ bin/rails:4
47
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
48
+ ↳ bin/rails:4
49
+  (0.4ms) begin transaction
50
+ ↳ bin/rails:4
51
+ ActiveRecord::InternalMetadata Create (0.8ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2019-03-25 17:45:57.917361"], ["updated_at", "2019-03-25 17:45:57.917361"]]
52
+ ↳ bin/rails:4
53
+  (16.7ms) commit transaction
54
+ ↳ bin/rails:4
55
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
56
+ ↳ bin/rails:4
57
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
58
+ ↳ bin/rails:4
59
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
60
+ ↳ bin/rails:4
61
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
62
+ ↳ bin/rails:4
63
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
64
+ ↳ bin/rails:4
65
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
66
+ ↳ bin/rails:4
67
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", "environment"]]
68
+ ↳ bin/rails:4
69
+  (1.0ms) DROP TABLE IF EXISTS "active_storage_attachments"
70
+ ↳ db/schema.rb:15
71
+  (0.2ms) SELECT sqlite_version(*)
72
+ ↳ db/schema.rb:15
73
+  (6.2ms) CREATE TABLE "active_storage_attachments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "record_type" varchar NOT NULL, "record_id" integer NOT NULL, "blob_id" integer NOT NULL, "created_at" datetime NOT NULL)
74
+ ↳ db/schema.rb:15
75
+  (5.1ms) CREATE INDEX "index_active_storage_attachments_on_blob_id" ON "active_storage_attachments" ("blob_id")
76
+ ↳ db/schema.rb:15
77
+  (4.8ms) CREATE UNIQUE INDEX "index_active_storage_attachments_uniqueness" ON "active_storage_attachments" ("record_type", "record_id", "name", "blob_id")
78
+ ↳ db/schema.rb:15
79
+  (0.9ms) DROP TABLE IF EXISTS "active_storage_blobs"
80
+ ↳ db/schema.rb:25
81
+  (6.0ms) CREATE TABLE "active_storage_blobs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "key" varchar NOT NULL, "filename" varchar NOT NULL, "content_type" varchar, "metadata" text, "byte_size" bigint NOT NULL, "checksum" varchar NOT NULL, "created_at" datetime NOT NULL)
82
+ ↳ db/schema.rb:25
83
+  (21.9ms) CREATE UNIQUE INDEX "index_active_storage_blobs_on_key" ON "active_storage_blobs" ("key")
84
+ ↳ db/schema.rb:25
85
+  (0.3ms) DROP TABLE IF EXISTS "cmor_files_file_details"
86
+ ↳ db/schema.rb:36
87
+  (29.1ms) CREATE TABLE "cmor_files_file_details" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "folder_id" integer, "asset_id" integer, "title" varchar, "description" text, "position" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
88
+ ↳ db/schema.rb:36
89
+  (0.2ms) DROP TABLE IF EXISTS "cmor_files_folders"
90
+ ↳ db/schema.rb:46
91
+  (26.5ms) CREATE TABLE "cmor_files_folders" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "published_at" datetime, "description" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
92
+ ↳ db/schema.rb:46
93
+  (6.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
94
+ ↳ db/schema.rb:13
95
+  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
96
+ ↳ db/schema.rb:13
97
+  (4.9ms) INSERT INTO "schema_migrations" (version) VALUES (20190325174558)
98
+ ↳ db/schema.rb:13
99
+  (5.2ms) INSERT INTO "schema_migrations" (version) VALUES
100
+ (20190325174557),
101
+ (20190325174535);
102
+
103
+ 
104
+ ↳ db/schema.rb:13
105
+  (5.7ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
106
+ ↳ db/schema.rb:13
107
+ ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
108
+ ↳ db/schema.rb:13
109
+  (0.1ms) begin transaction
110
+ ↳ db/schema.rb:13
111
+ ActiveRecord::InternalMetadata Create (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", "2019-03-25 17:45:58.135166"], ["updated_at", "2019-03-25 17:45:58.135166"]]
112
+ ↳ db/schema.rb:13
113
+  (5.8ms) commit transaction
114
+ ↳ db/schema.rb:13
115
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
116
+ ↳ bin/rails:4
117
+  (0.1ms) begin transaction
118
+ ↳ bin/rails:4
119
+ ActiveRecord::InternalMetadata Update (0.4ms) UPDATE "ar_internal_metadata" SET "value" = ?, "updated_at" = ? WHERE "ar_internal_metadata"."key" = ? [["value", "test"], ["updated_at", "2019-03-25 17:45:58.150845"], ["key", "environment"]]
120
+ ↳ bin/rails:4
121
+  (4.1ms) commit transaction
122
+ ↳ bin/rails:4
@@ -0,0 +1,143 @@
1
+  (0.2ms) begin transaction
2
+  (0.2ms) rollback transaction
3
+  (0.1ms) begin transaction
4
+  (0.1ms) rollback transaction
5
+  (0.1ms) begin transaction
6
+  (0.1ms) rollback transaction
7
+  (0.1ms) begin transaction
8
+ Cmor::Files::Folder Exists (0.3ms) SELECT 1 AS one FROM "cmor_files_folders" WHERE "cmor_files_folders"."name" IS NULL LIMIT ? [["LIMIT", 1]]
9
+  (0.2ms) rollback transaction
10
+  (0.2ms) begin transaction
11
+ Cmor::Files::Folder Load (0.6ms) SELECT "cmor_files_folders".* FROM "cmor_files_folders" ORDER BY "cmor_files_folders"."id" ASC LIMIT ? [["LIMIT", 1]]
12
+  (0.2ms) SAVEPOINT active_record_1
13
+ Cmor::Files::Folder Create (0.6ms) INSERT INTO "cmor_files_folders" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2019-03-25 17:46:06.468881"], ["updated_at", "2019-03-25 17:46:06.468881"]]
14
+  (0.2ms) RELEASE SAVEPOINT active_record_1
15
+  (0.1ms) SAVEPOINT active_record_1
16
+ Cmor::Files::Folder Update (0.5ms) UPDATE "cmor_files_folders" SET "name" = ?, "updated_at" = ? WHERE "cmor_files_folders"."id" = ? [["name", "dummy value"], ["updated_at", "2019-03-25 17:46:06.473487"], ["id", 1]]
17
+  (0.1ms) RELEASE SAVEPOINT active_record_1
18
+ Cmor::Files::Folder Exists (0.5ms) SELECT 1 AS one FROM "cmor_files_folders" WHERE "cmor_files_folders"."name" = ? LIMIT ? [["name", "dummy value"], ["LIMIT", 1]]
19
+ Cmor::Files::Folder Exists (0.5ms) SELECT 1 AS one FROM "cmor_files_folders" WHERE "cmor_files_folders"."name" = ? LIMIT ? [["name", "DUMMY VALUE"], ["LIMIT", 1]]
20
+  (2.6ms) rollback transaction
21
+  (0.1ms) begin transaction
22
+  (1.1ms) rollback transaction
23
+  (0.2ms) begin transaction
24
+  (0.8ms) rollback transaction
25
+  (0.1ms) begin transaction
26
+ Cmor::Files::Folder Exists (0.5ms) SELECT 1 AS one FROM "cmor_files_folders" WHERE "cmor_files_folders"."name" = ? LIMIT ? [["name", "Folder #1"], ["LIMIT", 1]]
27
+  (0.2ms) rollback transaction
28
+  (0.1ms) begin transaction
29
+ Cmor::Files::Folder Exists (0.4ms) SELECT 1 AS one FROM "cmor_files_folders" WHERE "cmor_files_folders"."name" IS NULL LIMIT ? [["LIMIT", 1]]
30
+  (0.0ms) rollback transaction
31
+  (0.3ms) begin transaction
32
+  (0.2ms) SAVEPOINT active_record_1
33
+ Cmor::Files::Folder Exists (0.4ms) SELECT 1 AS one FROM "cmor_files_folders" WHERE "cmor_files_folders"."name" = ? LIMIT ? [["name", "Folder #2"], ["LIMIT", 1]]
34
+ Cmor::Files::Folder Create (0.3ms) INSERT INTO "cmor_files_folders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Folder #2"], ["created_at", "2019-03-25 17:46:06.542916"], ["updated_at", "2019-03-25 17:46:06.542916"]]
35
+  (0.1ms) RELEASE SAVEPOINT active_record_1
36
+  (0.1ms) rollback transaction
37
+  (0.1ms) begin transaction
38
+  (0.2ms) rollback transaction
39
+  (0.2ms) begin transaction
40
+  (0.1ms) rollback transaction
41
+  (0.2ms) begin transaction
42
+  Disk Storage (1.1ms) Uploaded file to key: BhREgVesQFJGKZawuwybEm9o (checksum: PQckBuk+cVT3lBy73cnuAQ==)
43
+  (0.2ms) SAVEPOINT active_record_1
44
+ ActiveStorage::Blob Create (0.4ms) INSERT INTO "active_storage_blobs" ("key", "filename", "content_type", "metadata", "byte_size", "checksum", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["key", "BhREgVesQFJGKZawuwybEm9o"], ["filename", "example.png"], ["content_type", "image/png"], ["metadata", "{\"identified\":true}"], ["byte_size", 9691], ["checksum", "PQckBuk+cVT3lBy73cnuAQ=="], ["created_at", "2019-03-25 17:46:06.763658"]]
45
+  (0.1ms) RELEASE SAVEPOINT active_record_1
46
+  (0.9ms) rollback transaction
47
+  (0.1ms) begin transaction
48
+  (0.1ms) rollback transaction
49
+  (0.1ms) begin transaction
50
+  Disk Storage (3.7ms) Uploaded file to key: x9knsAYKxaGksCFoE1kksZUn (checksum: PQckBuk+cVT3lBy73cnuAQ==)
51
+  (0.2ms) SAVEPOINT active_record_1
52
+ ActiveStorage::Blob Create (0.7ms) INSERT INTO "active_storage_blobs" ("key", "filename", "content_type", "metadata", "byte_size", "checksum", "created_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["key", "x9knsAYKxaGksCFoE1kksZUn"], ["filename", "example.png"], ["content_type", "image/png"], ["metadata", "{\"identified\":true}"], ["byte_size", 9691], ["checksum", "PQckBuk+cVT3lBy73cnuAQ=="], ["created_at", "2019-03-25 17:46:06.896898"]]
53
+  (0.1ms) RELEASE SAVEPOINT active_record_1
54
+  (1.6ms) SAVEPOINT active_record_1
55
+ Cmor::Files::Folder Exists (0.2ms) SELECT 1 AS one FROM "cmor_files_folders" WHERE "cmor_files_folders"."name" = ? LIMIT ? [["name", "Folder #4"], ["LIMIT", 1]]
56
+ Cmor::Files::Folder Create (0.3ms) INSERT INTO "cmor_files_folders" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "Folder #4"], ["created_at", "2019-03-25 17:46:06.907880"], ["updated_at", "2019-03-25 17:46:06.907880"]]
57
+ ActiveStorage::Attachment Create (0.4ms) INSERT INTO "active_storage_attachments" ("name", "record_type", "record_id", "blob_id", "created_at") VALUES (?, ?, ?, ?, ?) [["name", "assets"], ["record_type", "Cmor::Files::Folder"], ["record_id", 1], ["blob_id", 1], ["created_at", "2019-03-25 17:46:06.910426"]]
58
+ Cmor::Files::FileDetail Create (0.3ms) INSERT INTO "cmor_files_file_details" ("folder_id", "asset_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["folder_id", 1], ["asset_id", 1], ["created_at", "2019-03-25 17:46:06.914198"], ["updated_at", "2019-03-25 17:46:06.914198"]]
59
+ Cmor::Files::FileDetail Create (1.0ms) INSERT INTO "cmor_files_file_details" ("folder_id", "asset_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["folder_id", 1], ["asset_id", 1], ["created_at", "2019-03-25 17:46:06.916209"], ["updated_at", "2019-03-25 17:46:06.916209"]]
60
+ Cmor::Files::Folder Update (0.2ms) UPDATE "cmor_files_folders" SET "updated_at" = ? WHERE "cmor_files_folders"."id" = ? [["updated_at", "2019-03-25 17:46:06.913187"], ["id", 1]]
61
+  (0.2ms) RELEASE SAVEPOINT active_record_1
62
+ [ActiveJob] Enqueued ActiveStorage::AnalyzeJob (Job ID: dd2d96ea-50bb-4dd3-aa3c-c65f490fa47a) to Async(default) with arguments: #<GlobalID:0x0000000007170898 @uri=#<URI::GID gid://dummy/ActiveStorage::Blob/1>>
63
+ ActiveStorage::Blob Load (2.1ms) SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
64
+ [ActiveJob] [ActiveStorage::AnalyzeJob] [dd2d96ea-50bb-4dd3-aa3c-c65f490fa47a] Performing ActiveStorage::AnalyzeJob (Job ID: dd2d96ea-50bb-4dd3-aa3c-c65f490fa47a) from Async(default) with arguments: #<GlobalID:0x00000000071173d8 @uri=#<URI::GID gid://dummy/ActiveStorage::Blob/1>>
65
+ [ActiveJob] [ActiveStorage::AnalyzeJob] [dd2d96ea-50bb-4dd3-aa3c-c65f490fa47a]  Disk Storage (0.2ms) Downloaded file from key: x9knsAYKxaGksCFoE1kksZUn
66
+ [ActiveJob] [ActiveStorage::AnalyzeJob] [dd2d96ea-50bb-4dd3-aa3c-c65f490fa47a] Skipping image analysis because the mini_magick gem isn't installed
67
+  (2.0ms) rollback transaction
68
+ [ActiveJob] [ActiveStorage::AnalyzeJob] [dd2d96ea-50bb-4dd3-aa3c-c65f490fa47a]  (0.2ms) begin transaction
69
+ [ActiveJob] [ActiveStorage::AnalyzeJob] [dd2d96ea-50bb-4dd3-aa3c-c65f490fa47a] ActiveStorage::Blob Update (0.6ms) UPDATE "active_storage_blobs" SET "metadata" = ? WHERE "active_storage_blobs"."id" = ? [["metadata", "{\"identified\":true,\"analyzed\":true}"], ["id", 1]]
70
+ [ActiveJob] [ActiveStorage::AnalyzeJob] [dd2d96ea-50bb-4dd3-aa3c-c65f490fa47a]  (0.2ms) commit transaction
71
+ [ActiveJob] [ActiveStorage::AnalyzeJob] [dd2d96ea-50bb-4dd3-aa3c-c65f490fa47a] Performed ActiveStorage::AnalyzeJob (Job ID: dd2d96ea-50bb-4dd3-aa3c-c65f490fa47a) from Async(default) in 22.07ms
72
+  (0.4ms) begin transaction
73
+  (0.2ms) rollback transaction
74
+  (0.1ms) begin transaction
75
+  (0.1ms) rollback transaction
76
+  (0.1ms) begin transaction
77
+  (0.1ms) rollback transaction
78
+  (0.1ms) begin transaction
79
+  (0.1ms) rollback transaction
80
+  (0.1ms) begin transaction
81
+  (0.4ms) rollback transaction
82
+  (0.1ms) begin transaction
83
+  (0.1ms) rollback transaction
84
+  (0.1ms) begin transaction
85
+  (0.2ms) rollback transaction
86
+  (0.3ms) begin transaction
87
+  (0.3ms) rollback transaction
88
+  (1.3ms) begin transaction
89
+  (0.3ms) rollback transaction
90
+  (0.3ms) begin transaction
91
+  (0.2ms) rollback transaction
92
+  (0.3ms) begin transaction
93
+  (0.3ms) rollback transaction
94
+  (0.4ms) begin transaction
95
+  (0.2ms) rollback transaction
96
+  (0.2ms) begin transaction
97
+  (0.1ms) rollback transaction
98
+  (0.3ms) begin transaction
99
+  (0.2ms) rollback transaction
100
+  (0.1ms) begin transaction
101
+  (0.1ms) rollback transaction
102
+  (0.1ms) begin transaction
103
+  (0.1ms) rollback transaction
104
+  (0.1ms) begin transaction
105
+  (0.1ms) rollback transaction
106
+  (0.2ms) begin transaction
107
+  (0.1ms) rollback transaction
108
+  (0.3ms) begin transaction
109
+  (0.1ms) rollback transaction
110
+  (0.3ms) begin transaction
111
+  (0.1ms) rollback transaction
112
+  (0.2ms) begin transaction
113
+  (0.1ms) rollback transaction
114
+  (0.2ms) begin transaction
115
+  (0.1ms) rollback transaction
116
+  (0.3ms) begin transaction
117
+  (0.1ms) rollback transaction
118
+  (0.1ms) begin transaction
119
+  (0.2ms) rollback transaction
120
+  (0.2ms) begin transaction
121
+  (0.1ms) rollback transaction
122
+  (0.1ms) begin transaction
123
+  (0.1ms) rollback transaction
124
+  (0.1ms) begin transaction
125
+  (0.1ms) rollback transaction
126
+  (0.2ms) begin transaction
127
+  (0.1ms) rollback transaction
128
+  (0.2ms) begin transaction
129
+  (0.1ms) rollback transaction
130
+  (0.1ms) begin transaction
131
+  (0.1ms) rollback transaction
132
+  (0.1ms) begin transaction
133
+  (0.1ms) rollback transaction
134
+  (0.1ms) begin transaction
135
+  (0.1ms) rollback transaction
136
+  (0.2ms) begin transaction
137
+  (0.1ms) rollback transaction
138
+  (0.1ms) begin transaction
139
+  (0.1ms) rollback transaction
140
+  (0.1ms) begin transaction
141
+  (0.1ms) rollback transaction
142
+  (0.6ms) begin transaction
143
+  (0.3ms) rollback transaction
@@ -0,0 +1 @@
1
+ 68d4bc20833fed1daf3dfa793b6eac93173618e37355acea00cb3d5641c67e435f19f37de4d8f622072acc94f949f27ab5fbd2e262e0a62ae1fd3836507c27f2
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative 'config/application'
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,4 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
4
+ //= link cmor/files_manifest.js
@@ -0,0 +1,14 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require activestorage
14
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ // Action Cable provides the framework to deal with WebSockets in Rails.
2
+ // You can generate new channels where WebSocket features live using the `rails generate channel` command.
3
+ //
4
+ //= require action_cable
5
+ //= require_self
6
+ //= require_tree ./channels
7
+
8
+ (function() {
9
+ this.App || (this.App = {});
10
+
11
+ App.cable = ActionCable.createConsumer();
12
+
13
+ }).call(this);
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationController < ActionController::Base
2
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,2 @@
1
+ class ApplicationJob < ActiveJob::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class ApplicationMailer < ActionMailer::Base
2
+ default from: 'from@example.com'
3
+ layout 'mailer'
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= csrf_meta_tags %>
6
+
7
+ <%= stylesheet_link_tag 'application', media: 'all' %>
8
+ <%= javascript_include_tag 'application' %>
9
+ </head>
10
+
11
+ <body>
12
+ <%= yield %>
13
+ </body>
14
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1 @@
1
+ <%= yield %>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../config/application', __dir__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+ require 'fileutils'
3
+ include FileUtils
4
+
5
+ # path to your application root.
6
+ APP_ROOT = File.expand_path('..', __dir__)
7
+
8
+ def system!(*args)
9
+ system(*args) || abort("\n== Command #{args} failed ==")
10
+ end
11
+
12
+ chdir APP_ROOT do
13
+ # This script is a starting point to setup your application.
14
+ # Add necessary setup steps to this file.
15
+
16
+ puts '== Installing dependencies =='
17
+ system! 'gem install bundler --conservative'
18
+ system('bundle check') || system!('bundle install')
19
+
20
+ # Install JavaScript dependencies if using Yarn
21
+ # system('bin/yarn')
22
+
23
+ # puts "\n== Copying sample files =="
24
+ # unless File.exist?('config/database.yml')
25
+ # cp 'config/database.yml.sample', 'config/database.yml'
26
+ # end
27
+
28
+ puts "\n== Preparing database =="
29
+ system! 'bin/rails db:setup'
30
+
31
+ puts "\n== Removing old logs and tempfiles =="
32
+ system! 'bin/rails log:clear tmp:clear'
33
+
34
+ puts "\n== Restarting application server =="
35
+ system! 'bin/rails restart'
36
+ end
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env ruby
2
+ require 'fileutils'
3
+ include FileUtils
4
+
5
+ # path to your application root.
6
+ APP_ROOT = File.expand_path('..', __dir__)
7
+
8
+ def system!(*args)
9
+ system(*args) || abort("\n== Command #{args} failed ==")
10
+ end
11
+
12
+ chdir APP_ROOT do
13
+ # This script is a way to update your development environment automatically.
14
+ # Add necessary update steps to this file.
15
+
16
+ puts '== Installing dependencies =='
17
+ system! 'gem install bundler --conservative'
18
+ system('bundle check') || system!('bundle install')
19
+
20
+ # Install JavaScript dependencies if using Yarn
21
+ # system('bin/yarn')
22
+
23
+ puts "\n== Updating database =="
24
+ system! 'bin/rails db:migrate'
25
+
26
+ puts "\n== Removing old logs and tempfiles =="
27
+ system! 'bin/rails log:clear tmp:clear'
28
+
29
+ puts "\n== Restarting application server =="
30
+ system! 'bin/rails restart'
31
+ end
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path('..', __dir__)
3
+ Dir.chdir(APP_ROOT) do
4
+ begin
5
+ exec "yarnpkg", *ARGV
6
+ rescue Errno::ENOENT
7
+ $stderr.puts "Yarn executable was not detected in the system."
8
+ $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
+ exit 1
10
+ end
11
+ end
@@ -0,0 +1,30 @@
1
+ require_relative 'boot'
2
+
3
+ require "rails"
4
+ # Pick the frameworks you want:
5
+ require "active_model/railtie"
6
+ require "active_job/railtie"
7
+ require "active_record/railtie"
8
+ require "active_storage/engine"
9
+ require "action_controller/railtie"
10
+ require "action_mailer/railtie"
11
+ require "action_view/railtie"
12
+ require "action_cable/engine"
13
+ require "sprockets/railtie"
14
+ # require "rails/test_unit/railtie"
15
+
16
+ Bundler.require(*Rails.groups)
17
+ require "cmor_files"
18
+
19
+ module Dummy
20
+ class Application < Rails::Application
21
+ # Initialize configuration defaults for originally generated Rails version.
22
+ config.load_defaults 5.2
23
+
24
+ # Settings in config/environments/* take precedence over those specified here.
25
+ # Application configuration can go into files in config/initializers
26
+ # -- all .rb files in that directory are automatically loaded after loading
27
+ # the framework and any gems in your application.
28
+ end
29
+ end
30
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__)
@@ -0,0 +1,10 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: async
6
+
7
+ production:
8
+ adapter: redis
9
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
+ channel_prefix: dummy_production
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: sqlite3
9
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: db/development.sqlite3
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: db/test.sqlite3
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require_relative 'application'
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!