Skip to content

Commit

Permalink
🧹 Get the page to load
Browse files Browse the repository at this point in the history
This commit will get the proprietor page to load.  You can create a
tenant and vist it as well.
  • Loading branch information
kirkkwang committed Dec 13, 2023
1 parent 68f8909 commit 939bd17
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 15 deletions.
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ GIT

GIT
remote: https://github.com/scientist-softserv/apartment.git
revision: e1a24b5574dca7116f69e99f140372c42b75e041
revision: 9ad4b0ef2ee6debb956e86ef9e7095c8358fef5e
branch: development
specs:
apartment (2.2.1)
Expand Down Expand Up @@ -1365,6 +1365,7 @@ DEPENDENCIES
iiif_print!
jbuilder (~> 2.5)
jquery-rails
json-canonicalization (= 0.3.1)
launchy
listen (>= 3.0.5, < 3.2)
lograge
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def locale_for(type:, term:, record_class:)
locale
end

def missing_translation(value)
def missing_translation(value, options = {})
value.include?('translation missing')
end
end
2 changes: 1 addition & 1 deletion app/jobs/create_default_admin_set_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

class CreateDefaultAdminSetJob < ApplicationJob
def perform(_account)
AdminSet.find_or_create_default_admin_set_id
Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id
end
end
2 changes: 1 addition & 1 deletion app/services/create_account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def create_defaults
Hyrax::CollectionType.find_or_create_admin_set_type
return if account.search_only?

AdminSet.find_or_create_default_admin_set_id
Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id
end

# Workaround for upstream issue https://github.com/samvera/hyrax/issues/3136
Expand Down
2 changes: 1 addition & 1 deletion app/services/roles_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def create_default_hyrax_groups_with_roles!
default_hyrax_groups_with_roles.each do |group_name, group_attrs|
group_roles = group_attrs.delete(:roles)
group = Hyrax::Group.find_or_create_by!(name: group_name)
group.update_attributes(group_attrs)
group.update(group_attrs)

group_roles.each do |role_name|
next if role_name.blank?
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/hyrax.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
<%= content_for?(:content) ? yield(:content) : yield %>
</div><!-- /#content-wrapper -->
<%= render 'shared/footer' %>
<%= render 'shared/ajax_modal' %>
<%= render 'shared/modal' %>
</body>
</html>
3 changes: 2 additions & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@
# routes, locales, etc. This feature depends on the listen gem.
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker

config.hosts << "hyku.test"
# adding `.` wildcard to allow for subdomains
config.hosts << "." + ENV['HYKU_ADMIN_HOST']
end
2 changes: 1 addition & 1 deletion db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
AccountElevator.switch!(single_tenant_default.cname)

puts "\n== Creating default admin set"
admin_set = AdminSet.find(AdminSet.find_or_create_default_admin_set_id)
admin_set = AdminSet.find(Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id)

puts "\n== Creating default collection types"
Hyrax::CollectionType.find_or_create_default_collection_type
Expand Down
2 changes: 1 addition & 1 deletion spec/features/admin_set_form_participants_tab_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
end

let(:admin) { FactoryBot.create(:admin) }
let!(:admin_set_id) { AdminSet.find_or_create_default_admin_set_id }
let!(:admin_set_id) { Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id }
let!(:permission_template) { Hyrax::PermissionTemplate.find_or_create_by!(source_id: admin_set_id) }

context 'add group participants' do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/assign_workflow_to_group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
let!(:group) { FactoryBot.create(:group, name: 'flinstones', humanized_name: 'Flinstones') }
let!(:group_3) { FactoryBot.create(:group, name: 'town_of_bedrock', humanized_name: 'Town of Bedrock') }

let!(:admin_set_id) { AdminSet.find_or_create_default_admin_set_id }
let!(:admin_set_id) { Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id }
let!(:permission_template) { Hyrax::PermissionTemplate.find_or_create_by!(source_id: admin_set_id) }

it 'admin assigns an approving workflow role to a user' do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/create_generic_work_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

context 'a logged in user with the :work_depositor role' do
let(:user) { create(:user, roles: [:work_depositor]) }
let(:admin_set_id) { AdminSet.find_or_create_default_admin_set_id }
let(:admin_set_id) { Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id }
let(:permission_template) { Hyrax::PermissionTemplate.find_or_create_by!(source_id: admin_set_id) }
let(:workflow) do
Sipity::Workflow.create!(
Expand Down
2 changes: 1 addition & 1 deletion spec/features/create_image_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

context 'a logged in user with the :work_depositor role' do
let(:user) { create(:user, roles: [:work_depositor]) }
let(:admin_set_id) { AdminSet.find_or_create_default_admin_set_id }
let(:admin_set_id) { Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id }
let(:permission_template) { Hyrax::PermissionTemplate.find_or_create_by!(source_id: admin_set_id) }
let(:workflow) do
Sipity::Workflow.create!(
Expand Down
2 changes: 1 addition & 1 deletion spec/features/create_work_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
FactoryBot.create(:admin_group)
FactoryBot.create(:editors_group)
FactoryBot.create(:depositors_group)
AdminSet.find_or_create_default_admin_set_id
Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id
login_as user, scope: :user
end

Expand Down
2 changes: 1 addition & 1 deletion spec/features/show_page_theme_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
user: user)
end

let(:admin_set_id) { AdminSet.find_or_create_default_admin_set_id }
let(:admin_set_id) { Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id }
let(:permission_template) { Hyrax::PermissionTemplate.find_or_create_by!(source_id: admin_set_id) }
let(:workflow) do
Sipity::Workflow.create!(
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/work_depositor_role_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
end

describe 'read permissions' do
let!(:admin_set_id) { AdminSet.find_or_create_default_admin_set_id }
let!(:admin_set_id) { Hyrax::AdminSetCreateService.find_or_create_default_admin_set.id }

before do
solr = Blacklight.default_index.connection
Expand Down

0 comments on commit 939bd17

Please sign in to comment.