geoblacklight_admin 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -3
  3. data/Rakefile +30 -12
  4. data/app/assets/javascripts/geoblacklight_admin.js +1 -0
  5. data/app/assets/stylesheets/geoblacklight_admin/_core.scss +5 -0
  6. data/app/assets/stylesheets/geoblacklight_admin/modules/_chosen.scss +425 -0
  7. data/app/controllers/admin/admin_controller.rb +4 -2
  8. data/app/controllers/admin/advanced_search_controller.rb +123 -103
  9. data/app/controllers/admin/api_controller.rb +123 -108
  10. data/app/controllers/admin/bookmarks_controller.rb +4 -4
  11. data/app/controllers/admin/bulk_actions_controller.rb +9 -4
  12. data/app/controllers/admin/concerns/upload_util.rb +2 -0
  13. data/app/controllers/admin/document_accesses_controller.rb +10 -4
  14. data/app/controllers/admin/document_assets_controller.rb +14 -11
  15. data/app/controllers/admin/document_downloads_controller.rb +12 -10
  16. data/app/controllers/admin/documents_controller.rb +16 -8
  17. data/app/controllers/admin/elements_controller.rb +6 -5
  18. data/app/controllers/admin/form_elements_controller.rb +4 -4
  19. data/app/controllers/admin/ids_controller.rb +107 -87
  20. data/app/controllers/admin/import_documents_controller.rb +1 -1
  21. data/app/controllers/admin/imports_controller.rb +7 -3
  22. data/app/controllers/admin/mappings_controller.rb +6 -4
  23. data/app/controllers/admin/notifications_controller.rb +1 -1
  24. data/app/controllers/admin/search_controller.rb +1 -1
  25. data/app/controllers/admin/users_controller.rb +1 -1
  26. data/app/helpers/form_input_helper.rb +4 -4
  27. data/app/helpers/geoblacklight_admin_helper.rb +1 -1
  28. data/app/jobs/export_job.rb +2 -1
  29. data/app/models/admin/bookmark.rb +18 -0
  30. data/app/models/api_search_builder.rb +3 -1
  31. data/app/models/document/bbox_validator.rb +9 -5
  32. data/app/models/document/date_range_validator.rb +13 -10
  33. data/app/models/document/geom_validator.rb +4 -2
  34. data/app/models/document.rb +15 -7
  35. data/app/models/element.rb +9 -7
  36. data/app/models/form_control.rb +2 -0
  37. data/app/models/form_element.rb +2 -0
  38. data/app/models/form_feature.rb +2 -0
  39. data/app/models/form_group.rb +2 -0
  40. data/app/models/form_header.rb +2 -0
  41. data/app/models/geoblacklight_admin/schema.rb +5 -2
  42. data/app/models/geoblacklight_admin.rb +2 -0
  43. data/app/models/import/csv_duplicates_validator.rb +2 -1
  44. data/app/models/import/csv_header_validator.rb +2 -1
  45. data/app/models/import.rb +4 -7
  46. data/app/models/user.rb +1 -1
  47. data/app/services/export_csv_service.rb +5 -1
  48. data/app/views/admin/advanced_search/facets.json.jbuilder +9 -8
  49. data/app/views/admin/advanced_search/index.json.jbuilder +8 -7
  50. data/app/views/admin/api/_field.json.jbuilder +1 -1
  51. data/app/views/admin/api/fetch.json.jbuilder +8 -7
  52. data/app/views/admin/api/index.json.jbuilder +8 -7
  53. data/app/views/admin/bookmarks/index.html.erb +2 -2
  54. data/app/views/admin/bulk_actions/index.html.erb +3 -3
  55. data/app/views/admin/bulk_actions/show.html.erb +1 -1
  56. data/app/views/admin/document_accesses/_form.html.erb +1 -1
  57. data/app/views/admin/document_accesses/destroy_all.html.erb +2 -2
  58. data/app/views/admin/document_accesses/edit.html.erb +1 -1
  59. data/app/views/admin/document_accesses/import.html.erb +2 -2
  60. data/app/views/admin/document_accesses/index.html.erb +9 -9
  61. data/app/views/admin/document_accesses/new.html.erb +1 -1
  62. data/app/views/admin/document_downloads/_form.html.erb +1 -1
  63. data/app/views/admin/document_downloads/destroy_all.html.erb +1 -1
  64. data/app/views/admin/document_downloads/edit.html.erb +2 -3
  65. data/app/views/admin/document_downloads/import.html.erb +1 -1
  66. data/app/views/admin/document_downloads/index.html.erb +9 -9
  67. data/app/views/admin/document_downloads/new.html.erb +1 -1
  68. data/app/views/admin/document_downloads/show.html.erb +2 -2
  69. data/app/views/admin/documents/_document_bookmark.html.erb +1 -1
  70. data/app/views/admin/documents/_form_nav.html.erb +1 -1
  71. data/app/views/admin/documents/_json_btaa_aardvark.jbuilder +1 -3
  72. data/app/views/admin/documents/edit.html.erb +1 -1
  73. data/app/views/admin/documents/features/_multiple_download_links.html.erb +2 -2
  74. data/app/views/admin/documents/index.html.erb +2 -4
  75. data/app/views/admin/documents/versions.html.erb +1 -1
  76. data/app/views/admin/elements/_element.json.jbuilder +4 -1
  77. data/app/views/admin/elements/_form.html.erb +1 -1
  78. data/app/views/admin/elements/edit.html.erb +2 -2
  79. data/app/views/admin/elements/index.html.erb +3 -3
  80. data/app/views/admin/elements/index.json.jbuilder +2 -0
  81. data/app/views/admin/elements/new.html.erb +1 -1
  82. data/app/views/admin/elements/show.html.erb +6 -6
  83. data/app/views/admin/elements/show.json.jbuilder +2 -0
  84. data/app/views/admin/form_elements/_form.html.erb +1 -1
  85. data/app/views/admin/form_elements/_form_element.json.jbuilder +2 -0
  86. data/app/views/admin/form_elements/edit.html.erb +2 -2
  87. data/app/views/admin/form_elements/index.html.erb +1 -1
  88. data/app/views/admin/form_elements/index.json.jbuilder +2 -0
  89. data/app/views/admin/form_elements/new.html.erb +1 -1
  90. data/app/views/admin/form_elements/show.html.erb +2 -2
  91. data/app/views/admin/form_elements/show.json.jbuilder +2 -0
  92. data/app/views/admin/ids/fetch.json.jbuilder +8 -7
  93. data/app/views/admin/ids/index.json.jbuilder +3 -2
  94. data/app/views/admin/import_documents/show.html.haml +1 -1
  95. data/app/views/admin/imports/_import.json.jbuilder +2 -1
  96. data/app/views/admin/imports/_show_failed_tab.html.erb +2 -2
  97. data/app/views/admin/imports/_show_success_tab.html.erb +1 -1
  98. data/app/views/admin/imports/edit.html.erb +3 -3
  99. data/app/views/admin/imports/index.html.erb +3 -3
  100. data/app/views/admin/layouts/application.html.erb +4 -4
  101. data/app/views/admin/mappings/_form.html.erb +1 -1
  102. data/app/views/admin/mappings/_mapping.json.jbuilder +2 -1
  103. data/app/views/admin/mappings/edit.html.erb +2 -2
  104. data/app/views/admin/mappings/new.html.erb +1 -1
  105. data/app/views/admin/mappings/show.html.erb +2 -2
  106. data/app/views/admin/notifications/index.html.erb +3 -3
  107. data/app/views/admin/search/index.html.erb +2 -2
  108. data/app/views/admin/shared/_navbar.html.erb +8 -3
  109. data/app/views/catalog/_show_gbl_admin.html.erb +3 -0
  110. data/config/routes.rb +37 -33
  111. data/db/migrate/20230316183001_add_geoblacklight_admin_gem.rb +408 -0
  112. data/db/seeds.rb +7 -5
  113. data/lib/generators/geoblacklight_admin/config_generator.rb +43 -31
  114. data/lib/generators/geoblacklight_admin/install_generator.rb +2 -3
  115. data/lib/generators/geoblacklight_admin/jobs_generator.rb +3 -2
  116. data/lib/generators/geoblacklight_admin/models_generator.rb +0 -1
  117. data/lib/generators/geoblacklight_admin/templates/_show_sidebar.html.erb +19 -0
  118. data/lib/generators/geoblacklight_admin/templates/_user_util_links.html.erb +1 -1
  119. data/lib/generators/geoblacklight_admin/templates/config/database.yml +9 -5
  120. data/lib/generators/geoblacklight_admin/templates/config/initializers/geoblacklight_admin.rb +1 -2
  121. data/lib/generators/geoblacklight_admin/templates/config/initializers/pagy.rb +150 -68
  122. data/lib/generators/geoblacklight_admin/templates/config/settings.yml +241 -0
  123. data/lib/generators/geoblacklight_admin/templates/package.json +1 -0
  124. data/lib/generators/geoblacklight_admin/views_generator.rb +0 -1
  125. data/lib/geoblacklight_admin/engine.rb +5 -6
  126. data/lib/geoblacklight_admin/version.rb +1 -1
  127. data/lib/geoblacklight_admin.rb +1 -1
  128. data/lib/tasks/geoblacklight_admin.rake +10 -6
  129. metadata +79 -48
  130. data/.editorconfig +0 -18
  131. data/.gitignore +0 -75
  132. data/.standard.yml +0 -4
  133. data/Gemfile +0 -59
  134. data/LICENSE +0 -21
  135. data/app/assets/images/.keep +0 -0
  136. data/app/controllers/admin/concerns/.keep +0 -0
  137. data/app/models/bookmark.rb +0 -17
  138. data/app/models/concerns/.keep +0 -0
  139. data/db/migrate/20230316183001_add_geoblacklight_admin.rb +0 -399
  140. data/geoblacklight_admin.gemspec +0 -67
  141. data/lib/generators/geoblacklight_admin/templates/.env.development.example +0 -28
  142. data/lib/generators/geoblacklight_admin/templates/.solr_wrapper.yml +0 -7
  143. data/lib/generators/geoblacklight_admin/templates/solr/snapshots/.keep +0 -0
  144. data/lib/tasks/.keep +0 -0
  145. data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -35
  146. data/template.rb +0 -16
@@ -1,399 +0,0 @@
1
- class AddGeoblacklightAdmin < ActiveRecord::Migration[6.1]
2
- def change
3
- # These are extensions that must be enabled in order to support this database
4
- enable_extension "pgcrypto"
5
- enable_extension "plpgsql"
6
-
7
- create_function :kithe_models_friendlier_id_gen, sql_definition: <<-'SQL'
8
- CREATE OR REPLACE FUNCTION public.kithe_models_friendlier_id_gen(min_value bigint, max_value bigint)
9
- RETURNS text
10
- LANGUAGE plpgsql
11
- AS $function$
12
- DECLARE
13
- new_id_int bigint;
14
- new_id_str character varying := '';
15
- done bool;
16
- tries integer;
17
- alphabet char[] := ARRAY['0','1','2','3','4','5','6','7','8','9',
18
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
19
- 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
20
- alphabet_length integer := array_length(alphabet, 1);
21
-
22
- BEGIN
23
- done := false;
24
- tries := 0;
25
- WHILE (NOT done) LOOP
26
- tries := tries + 1;
27
- IF (tries > 3) THEN
28
- RAISE 'Could not find non-conflicting friendlier_id in 3 tries';
29
- END IF;
30
-
31
- new_id_int := trunc(random() * (max_value - min_value) + min_value);
32
-
33
- -- convert bigint to a Base-36 alphanumeric string
34
- -- see https://web.archive.org/web/20130420084605/http://www.jamiebegin.com/base36-conversion-in-postgresql/
35
- -- https://gist.github.com/btbytes/7159902
36
- WHILE new_id_int != 0 LOOP
37
- new_id_str := alphabet[(new_id_int % alphabet_length)+1] || new_id_str;
38
- new_id_int := new_id_int / alphabet_length;
39
- END LOOP;
40
-
41
- done := NOT exists(SELECT 1 FROM kithe_models WHERE friendlier_id=new_id_str);
42
- END LOOP;
43
- RETURN new_id_str;
44
- END;
45
- $function$
46
- SQL
47
-
48
- create_table "blazer_audits", force: :cascade do |t|
49
- t.bigint "user_id"
50
- t.bigint "query_id"
51
- t.text "statement"
52
- t.string "data_source"
53
- t.datetime "created_at"
54
- t.index ["query_id"], name: "index_blazer_audits_on_query_id"
55
- t.index ["user_id"], name: "index_blazer_audits_on_user_id"
56
- end
57
-
58
- create_table "blazer_checks", force: :cascade do |t|
59
- t.bigint "creator_id"
60
- t.bigint "query_id"
61
- t.string "state"
62
- t.string "schedule"
63
- t.text "emails"
64
- t.text "slack_channels"
65
- t.string "check_type"
66
- t.text "message"
67
- t.datetime "last_run_at"
68
- t.datetime "created_at", precision: 6, null: false
69
- t.datetime "updated_at", precision: 6, null: false
70
- t.index ["creator_id"], name: "index_blazer_checks_on_creator_id"
71
- t.index ["query_id"], name: "index_blazer_checks_on_query_id"
72
- end
73
-
74
- create_table "blazer_dashboard_queries", force: :cascade do |t|
75
- t.bigint "dashboard_id"
76
- t.bigint "query_id"
77
- t.integer "position"
78
- t.datetime "created_at", precision: 6, null: false
79
- t.datetime "updated_at", precision: 6, null: false
80
- t.index ["dashboard_id"], name: "index_blazer_dashboard_queries_on_dashboard_id"
81
- t.index ["query_id"], name: "index_blazer_dashboard_queries_on_query_id"
82
- end
83
-
84
- create_table "blazer_dashboards", force: :cascade do |t|
85
- t.bigint "creator_id"
86
- t.string "name"
87
- t.datetime "created_at", precision: 6, null: false
88
- t.datetime "updated_at", precision: 6, null: false
89
- t.index ["creator_id"], name: "index_blazer_dashboards_on_creator_id"
90
- end
91
-
92
- create_table "blazer_queries", force: :cascade do |t|
93
- t.bigint "creator_id"
94
- t.string "name"
95
- t.text "description"
96
- t.text "statement"
97
- t.string "data_source"
98
- t.string "status"
99
- t.datetime "created_at", precision: 6, null: false
100
- t.datetime "updated_at", precision: 6, null: false
101
- t.index ["creator_id"], name: "index_blazer_queries_on_creator_id"
102
- end
103
-
104
- create_table "blazer_uploads", force: :cascade do |t|
105
- t.bigint "creator_id"
106
- t.string "table"
107
- t.text "description"
108
- t.datetime "created_at", precision: 6, null: false
109
- t.datetime "updated_at", precision: 6, null: false
110
- t.index ["creator_id"], name: "index_blazer_uploads_on_creator_id"
111
- end
112
-
113
- create_table "bookmarks", force: :cascade do |t|
114
- t.integer "user_id", null: false
115
- t.string "user_type"
116
- t.string "document_id"
117
- t.string "document_type"
118
- t.binary "title"
119
- t.datetime "created_at", precision: 6, null: false
120
- t.datetime "updated_at", precision: 6, null: false
121
- t.index ["document_id"], name: "index_bookmarks_on_document_id"
122
- t.index ["user_id"], name: "index_bookmarks_on_user_id"
123
- end
124
-
125
- create_table "bulk_action_document_transitions", force: :cascade do |t|
126
- t.string "to_state", null: false
127
- t.text "metadata", default: "{}"
128
- t.integer "sort_key", null: false
129
- t.integer "bulk_action_document_id", null: false
130
- t.boolean "most_recent", null: false
131
- t.datetime "created_at", precision: 6, null: false
132
- t.datetime "updated_at", precision: 6, null: false
133
- t.index ["bulk_action_document_id", "most_recent"], name: "index_bulk_action_document_transitions_parent_most_recent", unique: true, where: "most_recent"
134
- t.index ["bulk_action_document_id", "sort_key"], name: "index_bulk_action_document_transitions_parent_sort", unique: true
135
- end
136
-
137
- create_table "bulk_action_documents", force: :cascade do |t|
138
- t.string "friendlier_id", null: false
139
- t.integer "version", null: false
140
- t.bigint "bulk_action_id", null: false
141
- t.datetime "created_at", precision: 6, null: false
142
- t.datetime "updated_at", precision: 6, null: false
143
- t.uuid "document_id"
144
- t.index ["bulk_action_id"], name: "index_bulk_action_documents_on_bulk_action_id"
145
- end
146
-
147
- create_table "bulk_action_transitions", force: :cascade do |t|
148
- t.string "to_state", null: false
149
- t.text "metadata", default: "{}"
150
- t.integer "sort_key", null: false
151
- t.integer "bulk_action_id", null: false
152
- t.boolean "most_recent", null: false
153
- t.datetime "created_at", precision: 6, null: false
154
- t.datetime "updated_at", precision: 6, null: false
155
- t.index ["bulk_action_id", "most_recent"], name: "index_bulk_action_transitions_parent_most_recent", unique: true, where: "most_recent"
156
- t.index ["bulk_action_id", "sort_key"], name: "index_bulk_action_transitions_parent_sort", unique: true
157
- end
158
-
159
- create_table "bulk_actions", force: :cascade do |t|
160
- t.string "name"
161
- t.string "scope", null: false
162
- t.string "field_name", null: false
163
- t.string "field_value", null: false
164
- t.text "notes"
165
- t.datetime "created_at", precision: 6, null: false
166
- t.datetime "updated_at", precision: 6, null: false
167
- end
168
-
169
- create_table "document_accesses", force: :cascade do |t|
170
- t.string "friendlier_id", null: false
171
- t.string "institution_code", null: false
172
- t.text "access_url", null: false
173
- t.datetime "created_at", precision: 6, null: false
174
- t.datetime "updated_at", precision: 6, null: false
175
- end
176
-
177
- create_table "document_downloads", force: :cascade do |t|
178
- t.string "friendlier_id"
179
- t.string "label"
180
- t.string "value"
181
- t.integer "position"
182
- t.datetime "created_at", precision: 6, null: false
183
- t.datetime "updated_at", precision: 6, null: false
184
- end
185
-
186
- create_table "document_transitions", force: :cascade do |t|
187
- t.string "to_state", null: false
188
- t.text "metadata", default: "{}"
189
- t.integer "sort_key", null: false
190
- t.uuid "kithe_model_id", null: false
191
- t.boolean "most_recent", null: false
192
- t.datetime "created_at", precision: 6, null: false
193
- t.datetime "updated_at", precision: 6, null: false
194
- t.index ["kithe_model_id", "most_recent"], name: "index_document_transitions_parent_most_recent", unique: true, where: "most_recent"
195
- t.index ["kithe_model_id", "sort_key"], name: "index_document_transitions_parent_sort", unique: true
196
- end
197
-
198
- create_table "elements", force: :cascade do |t|
199
- t.string "label", null: false
200
- t.string "solr_field", null: false
201
- t.string "field_definition"
202
- t.string "field_type", null: false
203
- t.boolean "required", default: false, null: false
204
- t.boolean "repeatable", default: false, null: false
205
- t.boolean "formable", default: true, null: false
206
- t.string "placeholder_text"
207
- t.string "data_entry_hint"
208
- t.string "test_fixture_example"
209
- t.string "controlled_vocabulary"
210
- t.string "js_behaviors"
211
- t.text "html_attributes"
212
- t.boolean "display_only_on_persisted", default: false, null: false
213
- t.boolean "importable", default: true, null: false
214
- t.boolean "import_deliminated", default: false, null: false
215
- t.string "import_transformation_method"
216
- t.boolean "exportable", default: true, null: false
217
- t.string "export_transformation_method"
218
- t.boolean "indexable", default: true, null: false
219
- t.string "index_transformation_method"
220
- t.string "validation_method"
221
- t.datetime "created_at", precision: 6, null: false
222
- t.datetime "updated_at", precision: 6, null: false
223
- t.integer "position"
224
- end
225
-
226
- create_table "form_elements", force: :cascade do |t|
227
- t.string "type", null: false
228
- t.string "label"
229
- t.string "element_solr_field"
230
- t.integer "position"
231
- t.datetime "created_at", precision: 6, null: false
232
- t.datetime "updated_at", precision: 6, null: false
233
- end
234
-
235
- create_table "import_document_transitions", force: :cascade do |t|
236
- t.string "to_state", null: false
237
- t.text "metadata", default: "{}"
238
- t.integer "sort_key", null: false
239
- t.integer "import_document_id", null: false
240
- t.boolean "most_recent", null: false
241
- t.datetime "created_at", precision: 6, null: false
242
- t.datetime "updated_at", precision: 6, null: false
243
- t.index ["import_document_id", "most_recent"], name: "index_import_document_transitions_parent_most_recent", unique: true, where: "most_recent"
244
- t.index ["import_document_id", "sort_key"], name: "index_import_document_transitions_parent_sort", unique: true
245
- end
246
-
247
- create_table "import_documents", force: :cascade do |t|
248
- t.string "friendlier_id", null: false
249
- t.string "title", null: false
250
- t.json "json_attributes", default: "{}"
251
- t.bigint "import_id", null: false
252
- t.datetime "created_at", precision: 6, null: false
253
- t.datetime "updated_at", precision: 6, null: false
254
- t.index ["import_id"], name: "index_import_documents_on_import_id"
255
- end
256
-
257
- create_table "import_transitions", force: :cascade do |t|
258
- t.string "to_state", null: false
259
- t.text "metadata", default: "{}"
260
- t.integer "sort_key", null: false
261
- t.integer "import_id", null: false
262
- t.boolean "most_recent", null: false
263
- t.datetime "created_at", precision: 6, null: false
264
- t.datetime "updated_at", precision: 6, null: false
265
- t.index ["import_id", "most_recent"], name: "index_import_transitions_parent_most_recent", unique: true, where: "most_recent"
266
- t.index ["import_id", "sort_key"], name: "index_import_transitions_parent_sort", unique: true
267
- end
268
-
269
- create_table "imports", force: :cascade do |t|
270
- t.string "name", null: false
271
- t.string "source"
272
- t.text "description"
273
- t.string "filename"
274
- t.integer "row_count"
275
- t.text "headers", default: [], array: true
276
- t.string "encoding"
277
- t.string "content_type"
278
- t.string "extension"
279
- t.boolean "validity", default: false, null: false
280
- t.text "validation_result"
281
- t.datetime "created_at", precision: 6, null: false
282
- t.datetime "updated_at", precision: 6, null: false
283
- t.string "type"
284
- end
285
-
286
- create_table "kithe_derivatives", force: :cascade do |t|
287
- t.string "key", null: false
288
- t.jsonb "file_data"
289
- t.uuid "asset_id", null: false
290
- t.datetime "created_at", null: false
291
- t.datetime "updated_at", null: false
292
- t.index ["asset_id", "key"], name: "index_kithe_derivatives_on_asset_id_and_key", unique: true
293
- t.index ["asset_id"], name: "index_kithe_derivatives_on_asset_id"
294
- end
295
-
296
- create_table "kithe_model_contains", id: false, force: :cascade do |t|
297
- t.uuid "containee_id"
298
- t.uuid "container_id"
299
- t.index ["containee_id"], name: "index_kithe_model_contains_on_containee_id"
300
- t.index ["container_id"], name: "index_kithe_model_contains_on_container_id"
301
- end
302
-
303
- create_table "kithe_models", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t|
304
- t.string "title", null: false
305
- t.string "type", null: false
306
- t.integer "position"
307
- t.jsonb "json_attributes"
308
- t.datetime "created_at", null: false
309
- t.datetime "updated_at", null: false
310
- t.uuid "parent_id"
311
- t.string "friendlier_id", default: -> { "kithe_models_friendlier_id_gen('2821109907456'::bigint, '101559956668415'::bigint)" }, null: false
312
- t.jsonb "file_data"
313
- t.uuid "representative_id"
314
- t.uuid "leaf_representative_id"
315
- t.integer "kithe_model_type", null: false
316
- t.bigint "import_id"
317
- t.string "publication_state", default: "draft"
318
- t.index ["friendlier_id"], name: "index_kithe_models_on_friendlier_id", unique: true
319
- t.index ["import_id"], name: "index_kithe_models_on_import_id"
320
- t.index ["leaf_representative_id"], name: "index_kithe_models_on_leaf_representative_id"
321
- t.index ["parent_id"], name: "index_kithe_models_on_parent_id"
322
- t.index ["representative_id"], name: "index_kithe_models_on_representative_id"
323
- end
324
-
325
- create_table "mappings", force: :cascade do |t|
326
- t.string "source_header"
327
- t.string "destination_field"
328
- t.boolean "delimited"
329
- t.string "transformation_method"
330
- t.bigint "import_id", null: false
331
- t.datetime "created_at", precision: 6, null: false
332
- t.datetime "updated_at", precision: 6, null: false
333
- t.index ["import_id"], name: "index_mappings_on_import_id"
334
- end
335
-
336
- create_table "notifications", force: :cascade do |t|
337
- t.string "recipient_type", null: false
338
- t.bigint "recipient_id", null: false
339
- t.string "type", null: false
340
- t.jsonb "params"
341
- t.datetime "read_at"
342
- t.datetime "created_at", precision: 6, null: false
343
- t.datetime "updated_at", precision: 6, null: false
344
- t.index ["read_at"], name: "index_notifications_on_read_at"
345
- t.index ["recipient_type", "recipient_id"], name: "index_notifications_on_recipient"
346
- end
347
-
348
- create_table "users", force: :cascade do |t|
349
- t.string "email", default: "", null: false
350
- t.string "encrypted_password", default: "", null: false
351
- t.string "reset_password_token"
352
- t.datetime "reset_password_sent_at"
353
- t.datetime "remember_created_at"
354
- t.datetime "created_at", precision: 6, null: false
355
- t.datetime "updated_at", precision: 6, null: false
356
- t.string "invitation_token"
357
- t.datetime "invitation_created_at"
358
- t.datetime "invitation_sent_at"
359
- t.datetime "invitation_accepted_at"
360
- t.integer "invitation_limit"
361
- t.string "invited_by_type"
362
- t.bigint "invited_by_id"
363
- t.integer "invitations_count", default: 0
364
- t.boolean "admin", default: false, null: false
365
- t.index ["email"], name: "index_users_on_email", unique: true
366
- t.index ["invitation_token"], name: "index_users_on_invitation_token", unique: true
367
- t.index ["invitations_count"], name: "index_users_on_invitations_count"
368
- t.index ["invited_by_id"], name: "index_users_on_invited_by_id"
369
- t.index ["invited_by_type", "invited_by_id"], name: "index_users_on_invited_by_type_and_invited_by_id"
370
- t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
371
- end
372
-
373
- create_table "versions", force: :cascade do |t|
374
- t.string "item_type", null: false
375
- t.uuid "item_id", null: false
376
- t.string "event", null: false
377
- t.string "whodunnit"
378
- t.text "object"
379
- t.datetime "created_at"
380
- t.text "object_changes"
381
- t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
382
- end
383
-
384
- add_foreign_key "bulk_action_document_transitions", "bulk_action_documents"
385
- add_foreign_key "bulk_action_documents", "bulk_actions"
386
- add_foreign_key "bulk_action_transitions", "bulk_actions"
387
- add_foreign_key "import_document_transitions", "import_documents"
388
- add_foreign_key "import_documents", "imports"
389
- add_foreign_key "import_transitions", "imports"
390
- add_foreign_key "kithe_derivatives", "kithe_models", column: "asset_id"
391
- add_foreign_key "kithe_model_contains", "kithe_models", column: "containee_id"
392
- add_foreign_key "kithe_model_contains", "kithe_models", column: "container_id"
393
- add_foreign_key "kithe_models", "kithe_models", column: "leaf_representative_id"
394
- add_foreign_key "kithe_models", "kithe_models", column: "parent_id"
395
- add_foreign_key "kithe_models", "kithe_models", column: "representative_id"
396
- add_foreign_key "mappings", "imports"
397
-
398
- end
399
- end
@@ -1,67 +0,0 @@
1
- $LOAD_PATH.push File.expand_path("../lib", __FILE__)
2
-
3
- # Maintain your gem's version:
4
- require "geoblacklight_admin/version"
5
-
6
- # Describe your gem and declare its dependencies:
7
- Gem::Specification.new do |s|
8
- s.name = "geoblacklight_admin"
9
- s.version = GeoblacklightAdmin::VERSION
10
- s.authors = ["Eric Larson"]
11
- s.email = ["ewlarson@gmail.com"]
12
- s.homepage = "https://github.com/geobtaa/geoblacklight_admin"
13
- s.summary = "Administrative UI for GeoBlacklight. Built on Kithe."
14
- s.license = "MIT"
15
-
16
- s.files = `git ls-files -z`.split(%(\x0))
17
- s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- s.require_paths = ["lib"]
19
-
20
- s.add_dependency "active_storage_validations", "~> 1.0"
21
- s.add_dependency "amazing_print"
22
- s.add_dependency "bootstrap", "~> 4.0"
23
- s.add_dependency "cocoon", "~> 1.2"
24
- s.add_dependency "config", "~> 4.0"
25
- s.add_dependency "chosen-rails", "1.0"
26
- s.add_dependency "devise", "~> 4.7"
27
- s.add_dependency "devise-bootstrap-views", "~> 1.0"
28
- s.add_dependency "devise_invitable", "~> 2.0"
29
- s.add_dependency "blacklight", "~> 7.33"
30
- s.add_dependency "blacklight_advanced_search"
31
- s.add_dependency "geoblacklight", "~> 4.0"
32
- s.add_dependency "haml", "~> 5.2.0"
33
- s.add_dependency "httparty", "~> 0.21"
34
- s.add_dependency "inline_svg", "~> 1.9"
35
- s.add_dependency "jquery-rails", "~> 4.4"
36
- s.add_dependency "kithe", "~> 2.0"
37
- s.add_dependency "noticed", "~> 1.6"
38
- s.add_dependency "pagy", "~> 3.8"
39
- s.add_dependency "paper_trail", "~> 14.0"
40
- s.add_dependency "pg", "~> 1.4"
41
- s.add_dependency "qa", "~> 5.0"
42
- s.add_dependency "rails", ">= 6.1", "< 7.1"
43
- s.add_dependency "ruby-progressbar"
44
- s.add_dependency "simple_form", "~> 5.0"
45
- s.add_dependency "sprockets", "< 4"
46
- s.add_dependency "statesman", "~> 7.1.0"
47
-
48
- s.add_development_dependency "byebug", "~> 11.1"
49
- s.add_development_dependency "capybara", "~> 3.0"
50
- s.add_development_dependency "capybara-screenshot", "~> 1.0"
51
- s.add_development_dependency "database_cleaner", "~> 1.3"
52
- s.add_development_dependency "database_cleaner-active_record", "~> 2.1"
53
- s.add_development_dependency "engine_cart", "~> 2.4"
54
- s.add_development_dependency "m", "~> 1.5"
55
- s.add_development_dependency "minitest", "~> 5.18"
56
- s.add_development_dependency "minitest-ci", "~> 3.4"
57
- s.add_development_dependency "minitest-rails", "~> 6.1"
58
- s.add_development_dependency "minitest-reporters", "~> 1.6"
59
- s.add_development_dependency "rspec-rails", "~> 3.0"
60
- s.add_development_dependency "selenium-webdriver"
61
- s.add_development_dependency "shoulda-context", "~> 2.0"
62
- s.add_development_dependency "simplecov", "~> 0.22"
63
- s.add_development_dependency "solr_wrapper", "~> 4.0"
64
- s.add_development_dependency "sprockets", "< 4"
65
- s.add_development_dependency "standard", "~> 1.24"
66
- s.add_development_dependency "webdrivers"
67
- end
@@ -1,28 +0,0 @@
1
- SOLR_VERSION=8.11.1
2
-
3
- # Solr - Local development
4
- SOLR_URL=http://127.0.0.1:8983/solr/blacklight-core
5
-
6
- # Solr - Remote development
7
- # SOLR_URL=https://remote_server/solr/core
8
- # SOLR_BASIC_AUTH_USER=user
9
- # SOLR_BASIC_AUTH_PASSWORD=password
10
-
11
- # BL API
12
- BLACKLIGHT_URL=http://localhost:3000
13
- BLACKLIGHT_JSON_API=http://localhost:3000/admin/api.json
14
- BLACKLIGHT_JSON_API_IDS=http://localhost:3000/admin/api/ids.json
15
- BLACKLIGHT_JSON_API_FACETS=http://localhost:3000/admin/advanced_search/facets.json
16
-
17
- # BL IDS
18
- BLACKLIGHT_JSON_IDS=http://localhost:3000/admin/ids.json
19
-
20
- GEOMG_DB_DATABASE=geoblacklight_development
21
- GEOMG_DB_USER=
22
- GEOMG_DB_PASSWORD=
23
-
24
- GEOMG_DEVISE_SECRET_KEY=generated-by-rake-secret
25
-
26
- # Blazer
27
- BLAZER_UPLOADS_URL=postgresql://127.0.0.1:5432/geoblacklight_development
28
- MAPBOX_ACCESS_TOKEN=your-key-here
@@ -1,7 +0,0 @@
1
- validate: false
2
- instance_dir: tmp/solr
3
- download_dir: tmp/solr
4
- collection:
5
- dir: solr/conf/
6
- name: blacklight-core
7
- persist: true
data/lib/tasks/.keep DELETED
File without changes
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "rails/generators"
4
-
5
- class TestAppGenerator < Rails::Generators::Base
6
- source_root "./test/test_app_templates"
7
-
8
- # if you need to generate any additional configuration
9
- # into the test app, this generator will be run immediately
10
- # after setting up the application
11
-
12
- def add_gems
13
- gem "blacklight", "~> 7.0"
14
- gem "geoblacklight", ">= 4.0"
15
-
16
- Bundler.with_unbundled_env do
17
- run "bundle install"
18
- end
19
- end
20
-
21
- def run_blacklight_generator
22
- say_status("warning", "GENERATING BL", :yellow)
23
- generate "blacklight:install", "--devise"
24
- end
25
-
26
- def run_geoblacklight_generator
27
- say_status("warning", "GENERATING GBL", :yellow)
28
- generate "geoblacklight:install", "--force"
29
- end
30
-
31
- def run_geoblacklight_admin_generator
32
- say_status("warning", "GENERATING GBL Admin", :yellow)
33
- generate "geoblacklight_admin:install", "--force"
34
- end
35
- end
data/template.rb DELETED
@@ -1,16 +0,0 @@
1
- # $ rails _7.0.4.2_ new app-name -m https://raw.githubusercontent.com/geobtaa/geoblacklight_admin/main/template.rb
2
-
3
- gem "blacklight", ">= 7.0", "< 8.0"
4
- gem "blacklight_advanced_search", "~> 7.0"
5
- gem "geoblacklight", ">= 4.0"
6
- gem "statesman", ">= 3.4"
7
- gem "geoblacklight_admin", git: "https://github.com/geobtaa/geoblacklight_admin.git", branch: "main"
8
-
9
- run "bundle install"
10
-
11
- generate "blacklight:install", "--devise"
12
- generate "geoblacklight:install", "--force"
13
- generate "blacklight_advanced_search:install", "--force"
14
- generate "geoblacklight_admin:install", "--force"
15
-
16
- rake "db:migrate"