geoblacklight_admin 0.0.1 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +59 -36
  3. data/Rakefile +47 -14
  4. data/app/assets/javascripts/geoblacklight_admin.js +2 -1
  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/assets/stylesheets/geoblacklight_admin/modules/_forms.scss +108 -0
  8. data/app/controllers/admin/admin_controller.rb +4 -2
  9. data/app/controllers/admin/advanced_search_controller.rb +123 -103
  10. data/app/controllers/admin/api_controller.rb +123 -108
  11. data/app/controllers/admin/bookmarks_controller.rb +4 -4
  12. data/app/controllers/admin/bulk_actions_controller.rb +9 -4
  13. data/app/controllers/admin/concerns/upload_util.rb +2 -0
  14. data/app/controllers/admin/document_accesses_controller.rb +10 -4
  15. data/app/controllers/admin/document_assets_controller.rb +14 -11
  16. data/app/controllers/admin/document_downloads_controller.rb +12 -10
  17. data/app/controllers/admin/documents_controller.rb +32 -15
  18. data/app/controllers/admin/elements_controller.rb +6 -5
  19. data/app/controllers/admin/form_elements_controller.rb +4 -4
  20. data/app/controllers/admin/ids_controller.rb +107 -87
  21. data/app/controllers/admin/import_documents_controller.rb +1 -1
  22. data/app/controllers/admin/imports_controller.rb +7 -3
  23. data/app/controllers/admin/mappings_controller.rb +6 -4
  24. data/app/controllers/admin/notifications_controller.rb +1 -1
  25. data/app/controllers/admin/search_controller.rb +3 -2
  26. data/app/controllers/admin/users_controller.rb +2 -2
  27. data/app/helpers/form_input_helper.rb +4 -4
  28. data/app/helpers/geoblacklight_admin_helper.rb +1 -1
  29. data/app/indexers/document_indexer.rb +1 -1
  30. data/app/jobs/export_job.rb +9 -6
  31. data/app/jobs/export_json_bulk_job.rb +95 -0
  32. data/app/jobs/export_json_job.rb +14 -12
  33. data/app/models/admin/bookmark.rb +18 -0
  34. data/app/models/api_search_builder.rb +3 -1
  35. data/app/models/blacklight_api.rb +6 -6
  36. data/app/models/blacklight_api_facets.rb +7 -2
  37. data/app/models/blacklight_api_ids.rb +3 -4
  38. data/app/models/bulk_action.rb +1 -1
  39. data/app/models/document/bbox_validator.rb +9 -5
  40. data/app/models/document/date_range_validator.rb +13 -10
  41. data/app/models/document/geom_validator.rb +4 -2
  42. data/app/models/document.rb +15 -7
  43. data/app/models/element.rb +9 -7
  44. data/app/models/form_control.rb +2 -0
  45. data/app/models/form_element.rb +2 -0
  46. data/app/models/form_feature.rb +2 -0
  47. data/app/models/form_group.rb +2 -0
  48. data/app/models/form_header.rb +2 -0
  49. data/app/models/geoblacklight_admin/schema.rb +5 -2
  50. data/app/models/geoblacklight_admin.rb +2 -0
  51. data/app/models/import/csv_duplicates_validator.rb +2 -1
  52. data/app/models/import/csv_header_validator.rb +2 -1
  53. data/app/models/import.rb +4 -7
  54. data/app/models/user.rb +1 -1
  55. data/app/services/export_csv_service.rb +5 -1
  56. data/app/views/admin/advanced_search/facets.json.jbuilder +9 -8
  57. data/app/views/admin/advanced_search/index.json.jbuilder +8 -7
  58. data/app/views/admin/api/_field.json.jbuilder +1 -1
  59. data/app/views/admin/api/fetch.json.jbuilder +8 -7
  60. data/app/views/admin/api/index.json.jbuilder +8 -7
  61. data/app/views/admin/bookmarks/index.html.erb +2 -2
  62. data/app/views/admin/bulk_actions/index.html.erb +3 -3
  63. data/app/views/admin/bulk_actions/show.html.erb +1 -1
  64. data/app/views/admin/document_accesses/_form.html.erb +1 -1
  65. data/app/views/admin/document_accesses/destroy_all.html.erb +3 -3
  66. data/app/views/admin/document_accesses/edit.html.erb +1 -1
  67. data/app/views/admin/document_accesses/import.html.erb +2 -2
  68. data/app/views/admin/document_accesses/index.html.erb +9 -9
  69. data/app/views/admin/document_accesses/new.html.erb +1 -1
  70. data/app/views/admin/document_downloads/_form.html.erb +1 -1
  71. data/app/views/admin/document_downloads/destroy_all.html.erb +2 -2
  72. data/app/views/admin/document_downloads/edit.html.erb +2 -3
  73. data/app/views/admin/document_downloads/import.html.erb +1 -1
  74. data/app/views/admin/document_downloads/index.html.erb +9 -9
  75. data/app/views/admin/document_downloads/new.html.erb +1 -1
  76. data/app/views/admin/document_downloads/show.html.erb +2 -2
  77. data/app/views/admin/documents/_document_bookmark.html.erb +1 -1
  78. data/app/views/admin/documents/_form_nav.html.erb +3 -1
  79. data/app/views/admin/documents/_json_btaa_aardvark.jbuilder +1 -3
  80. data/app/views/admin/documents/_json_file.jbuilder +14 -0
  81. data/app/views/admin/documents/_result_selected_options.html.erb +3 -1
  82. data/app/views/admin/documents/edit.html.erb +1 -1
  83. data/app/views/admin/documents/features/_multiple_download_links.html.erb +2 -2
  84. data/app/views/admin/documents/fetch.json_file.jbuilder +9 -0
  85. data/app/views/admin/documents/index.html.erb +2 -4
  86. data/app/views/admin/documents/index.json_file.jbuilder +9 -0
  87. data/app/views/admin/documents/versions.html.erb +1 -1
  88. data/app/views/admin/elements/_element.json.jbuilder +4 -1
  89. data/app/views/admin/elements/_form.html.erb +1 -1
  90. data/app/views/admin/elements/edit.html.erb +2 -2
  91. data/app/views/admin/elements/index.html.erb +4 -4
  92. data/app/views/admin/elements/index.json.jbuilder +2 -0
  93. data/app/views/admin/elements/new.html.erb +1 -1
  94. data/app/views/admin/elements/show.html.erb +6 -6
  95. data/app/views/admin/elements/show.json.jbuilder +2 -0
  96. data/app/views/admin/form_elements/_form.html.erb +1 -1
  97. data/app/views/admin/form_elements/_form_element.json.jbuilder +2 -0
  98. data/app/views/admin/form_elements/edit.html.erb +2 -2
  99. data/app/views/admin/form_elements/index.html.erb +2 -2
  100. data/app/views/admin/form_elements/index.json.jbuilder +2 -0
  101. data/app/views/admin/form_elements/new.html.erb +1 -1
  102. data/app/views/admin/form_elements/show.html.erb +2 -2
  103. data/app/views/admin/form_elements/show.json.jbuilder +2 -0
  104. data/app/views/admin/ids/fetch.json.jbuilder +8 -7
  105. data/app/views/admin/ids/index.json.jbuilder +3 -2
  106. data/app/views/admin/import_documents/show.html.haml +1 -1
  107. data/app/views/admin/imports/_import.json.jbuilder +2 -1
  108. data/app/views/admin/imports/_show_failed_tab.html.erb +2 -2
  109. data/app/views/admin/imports/_show_success_tab.html.erb +1 -1
  110. data/app/views/admin/imports/edit.html.erb +3 -3
  111. data/app/views/admin/imports/index.html.erb +3 -3
  112. data/app/views/admin/layouts/application.html.erb +4 -4
  113. data/app/views/admin/mappings/_form.html.erb +1 -1
  114. data/app/views/admin/mappings/_mapping.json.jbuilder +2 -1
  115. data/app/views/admin/mappings/edit.html.erb +2 -2
  116. data/app/views/admin/mappings/new.html.erb +1 -1
  117. data/app/views/admin/mappings/show.html.erb +2 -2
  118. data/app/views/admin/notifications/index.html.erb +3 -3
  119. data/app/views/admin/search/index.html.erb +2 -2
  120. data/app/views/admin/shared/_navbar.html.erb +11 -6
  121. data/app/views/admin/shared/_toast.html.erb +1 -1
  122. data/app/views/admin/users/index.html.erb +1 -1
  123. data/app/views/catalog/_show_gbl_admin.html.erb +3 -0
  124. data/config/locales/documents.en.yml +3 -0
  125. data/config/routes.rb +37 -33
  126. data/db/migrate/20230316183001_add_geoblacklight_admin_gem.rb +409 -0
  127. data/db/seeds.rb +7 -6
  128. data/db/seeds_elements.csv +56 -55
  129. data/db/seeds_elements.numbers +0 -0
  130. data/db/seeds_form_elements.csv +65 -64
  131. data/db/seeds_form_elements.numbers +0 -0
  132. data/lib/generators/geoblacklight_admin/config_generator.rb +61 -94
  133. data/lib/generators/geoblacklight_admin/install_generator.rb +3 -12
  134. data/lib/generators/geoblacklight_admin/jobs_generator.rb +3 -2
  135. data/lib/generators/geoblacklight_admin/models_generator.rb +0 -1
  136. data/lib/generators/geoblacklight_admin/templates/_show_sidebar.html.erb +19 -0
  137. data/lib/generators/geoblacklight_admin/templates/_user_util_links.html.erb +1 -1
  138. data/lib/generators/geoblacklight_admin/templates/config/database.yml +9 -5
  139. data/lib/generators/geoblacklight_admin/templates/config/geomg_aardvark_schema.json +12 -6
  140. data/lib/generators/geoblacklight_admin/templates/config/initializers/devise.rb +315 -0
  141. data/lib/generators/geoblacklight_admin/templates/config/initializers/geoblacklight_admin.rb +1 -2
  142. data/lib/generators/geoblacklight_admin/templates/config/initializers/kithe.rb +2 -0
  143. data/lib/generators/geoblacklight_admin/templates/config/initializers/mime_types.rb +15 -0
  144. data/lib/generators/geoblacklight_admin/templates/config/initializers/pagy.rb +152 -68
  145. data/lib/generators/geoblacklight_admin/templates/config/initializers/simple_form.rb +178 -0
  146. data/lib/generators/geoblacklight_admin/templates/config/initializers/simple_form_bootstrap.rb +365 -0
  147. data/lib/generators/geoblacklight_admin/templates/config/settings.yml +293 -0
  148. data/lib/generators/geoblacklight_admin/templates/javascript/controllers/results_controller.js +10 -0
  149. data/lib/generators/geoblacklight_admin/templates/package.json +3 -0
  150. data/lib/generators/geoblacklight_admin/templates/solr/conf/schema.xml +3 -3
  151. data/lib/generators/geoblacklight_admin/views_generator.rb +2 -3
  152. data/lib/geoblacklight_admin/engine.rb +5 -6
  153. data/lib/geoblacklight_admin/version.rb +1 -1
  154. data/lib/geoblacklight_admin.rb +1 -1
  155. data/lib/tasks/geoblacklight_admin.rake +15 -11
  156. metadata +101 -63
  157. data/.editorconfig +0 -18
  158. data/.gitignore +0 -75
  159. data/.standard.yml +0 -4
  160. data/Gemfile +0 -59
  161. data/LICENSE +0 -21
  162. data/app/assets/images/.keep +0 -0
  163. data/app/controllers/admin/concerns/.keep +0 -0
  164. data/app/models/bookmark.rb +0 -17
  165. data/app/models/concerns/.keep +0 -0
  166. data/db/migrate/20230316183001_add_geoblacklight_admin.rb +0 -399
  167. data/geoblacklight_admin.gemspec +0 -67
  168. data/lib/generators/geoblacklight_admin/example_docs_generator.rb +0 -18
  169. data/lib/generators/geoblacklight_admin/templates/.env.development.example +0 -28
  170. data/lib/generators/geoblacklight_admin/templates/.solr_wrapper.yml +0 -7
  171. data/lib/generators/geoblacklight_admin/templates/solr/snapshots/.keep +0 -0
  172. data/lib/tasks/.keep +0 -0
  173. data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -35
  174. data/template.rb +0 -16
  175. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/confirmations/new.html.erb +0 -0
  176. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/invitations/edit.html.erb +0 -0
  177. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/invitations/new.html.erb +0 -0
  178. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/mailer/invitation_instructions.html.erb +0 -0
  179. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/mailer/invitation_instructions.text.erb +0 -0
  180. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/passwords/edit.html.erb +0 -0
  181. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/passwords/new.html.erb +0 -0
  182. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/registrations/edit.html.erb +0 -0
  183. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/registrations/new.html.erb +0 -0
  184. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/sessions/new.html.erb +0 -0
  185. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/shared/_links.html.erb +0 -0
  186. /data/{app/views/admin → lib/generators/geoblacklight_admin/templates}/devise/unlocks/new.html.erb +0 -0
data/Gemfile DELETED
@@ -1,59 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Declare your gem's dependencies in geoblacklight_admin.gemspec.
4
- # Bundler will treat runtime dependencies like base dependencies, and
5
- # development dependencies will be added by default to the :development group.
6
-
7
- # Please see geoblacklight_admin.gemspec for dependency information.
8
- gemspec
9
-
10
- # Declare any dependencies that are still in development here instead of in
11
- # your gemspec. These might include edge Rails or gems from your path or
12
- # Git. Remember to move these dependencies to your gemspec before releasing
13
- # your gem to rubygems.org.
14
-
15
- group :development, :test do
16
- end
17
-
18
- # To use a debugger
19
- # gem 'byebug', group: [:development, :test]
20
-
21
- # BEGIN ENGINE_CART BLOCK
22
- # engine_cart: 2.5.0
23
- # engine_cart stanza: 2.5.0
24
- # the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
25
- file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
26
- if File.exist?(file)
27
- begin
28
- eval_gemfile file
29
- rescue Bundler::GemfileError => e
30
- Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:'
31
- Bundler.ui.warn e.message
32
- end
33
- else
34
- Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
35
- gem "blacklight", "~> 7.33"
36
- gem "blacklight_advanced_search"
37
- gem "geoblacklight", ">= 4.0"
38
- gem "statesman", ">= 3.4"
39
-
40
- if ENV['RAILS_VERSION']
41
- if ENV['RAILS_VERSION'] == 'edge'
42
- gem 'rails', github: 'rails/rails'
43
- ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
44
- else
45
- gem 'rails', ENV['RAILS_VERSION']
46
- end
47
-
48
- case ENV['RAILS_VERSION']
49
- when /^6.0/
50
- gem 'sass-rails', '>= 6'
51
- gem 'webpacker', '~> 4.0'
52
- when /^5.[12]/
53
- gem 'sass-rails', '~> 5.0'
54
- gem 'sprockets', '~> 3.7'
55
- gem 'thor', '~> 0.20'
56
- end
57
- end
58
- end
59
- # END ENGINE_CART BLOCK
data/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2023 Big Ten Academic Alliance Geospatial Information Network
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.
File without changes
File without changes
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Bookmark
4
- class Bookmark < ApplicationRecord
5
- belongs_to :user, polymorphic: true
6
- belongs_to :document, polymorphic: true
7
-
8
- def document_type
9
- value = super if defined?(super)
10
- value &&= value.constantize
11
- value || default_document_type
12
- end
13
-
14
- def default_document_type
15
- SolrDocument
16
- end
17
- end
File without changes
@@ -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,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "rails/generators"
4
-
5
- module GeoblacklightAdmin
6
- class ExampleDocsGenerator < Rails::Generators::Base
7
- source_root File.expand_path("../../../spec/fixtures", __dir__)
8
-
9
- desc <<-DESCRIPTION
10
- This generator makes the following changes to your application:
11
- 1. Copies the dir of example solr doc files to host app/solr/geoblacklight/example_docs
12
- DESCRIPTION
13
-
14
- def create_services
15
- directory "files", "solr/geoblacklight/example_docs"
16
- end
17
- end
18
- 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