diff --git a/.circleci/config.yml b/.circleci/config.yml index e0c65617e1..9f027eaee5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,7 +81,7 @@ jobs: environment: RAILS_VERSION: << parameters.rails_version >> NOKOGIRI_USE_SYSTEM_LIBRARIES: true - ENGINE_CART_RAILS_OPTIONS: --database=postgresql --skip-git --skip-bundle --skip-listen --skip-spring --skip-keeps --skip-test --skip-bootsnap + ENGINE_CART_RAILS_OPTIONS: --database=postgresql --skip-git --skip-bundle --skip-listen --skip-spring --skip-keeps --skip-test --skip-bootsnap --skip-javascript DATABASE_URL: postgresql://postgres@127.0.0.1/circle_test # Hard-coded with data from CircleCI orb, related to https://github.com/samvera-labs/samvera-circleci-orb/issues/42 steps: - attach_workspace: diff --git a/.engine_cart.yml b/.engine_cart.yml deleted file mode 100644 index 2cec34155c..0000000000 --- a/.engine_cart.yml +++ /dev/null @@ -1,40 +0,0 @@ -# Greetings Hyrax developer, you may be surprised to see this file. -# Hyrax is moving to using Postgresql for testing in CircleCI and -# hopefully by Hyrax developers during local development. Previously, -# we used sqlite. -# -# And while installing Postgresql is beyond the scope of this -# community, I (Jeremy) installed Postgresql via homebrew (brew.sh), -# and have used the following for testing (note `hyrax-testup` is -# defined later on): -# -# ```console -# hyrax-testup -# brew services start postgresql -# export DATABASE_URL="postgresql://localhost:5432/internal_development" -# bundle exec rspec -# ``` -# -# But, before running that, I have a shell alias (see -# https://github.com/jeremyf/dotzshrc/blob/trunk/configs/aliases.zsh) -# that I call. The alias ensures that I have: -# -# * clean set of solr indices -# * running solr indices -# * running fcrepo -# * running redis server -# -# ```console -# alias hyrax-testup='cd $HOME/git/samvera/hyrax/.internal_test_app ; \ -# rm -rf tmp/solr-valkyrie-test/server/solr/hyrax-valkyrie-test ; \ -# rm -rf tmp/solr-test/server/solr/hydra-test ; \ -# fcrepo_wrapper --config config/fcrepo_wrapper_test.yml & \ -# solr_wrapper --config config/solr_wrapper_test.yml & \ -# solr_wrapper --config config/solr_wrapper_valkyrie_test.yml & \ -# redis-server &' -# ``` -# -# Best luck, and I (Jeremy) hope to add this to the Wiki at some point -# once this current code is accepted into the main-line. -rails_options: - - "--database=postgresql" # Caution, as you may only get "one option" until this is merged. https://github.com/cbeer/engine_cart/pull/102 diff --git a/hyrax.gemspec b/hyrax.gemspec index b8eebc9b43..cca89bd6e1 100644 --- a/hyrax.gemspec +++ b/hyrax.gemspec @@ -84,6 +84,7 @@ SUMMARY spec.add_dependency 'tinymce-rails', '~> 5.10' spec.add_dependency 'valkyrie', '~> 2', '>= 2.1.1' spec.add_dependency 'sprockets', '~> 3.7' + spec.add_dependency 'sass-rails', '~> 6.0' spec.add_development_dependency "capybara", '~> 3.29' spec.add_development_dependency 'capybara-screenshot', '~> 1.0' @@ -111,11 +112,4 @@ SUMMARY spec.add_development_dependency 'shoulda-matchers', '~> 3.1' spec.add_development_dependency 'webdrivers', '~> 4.4' spec.add_development_dependency 'webmock' - - ######################################################## - # Temporarily pinned dependencies. INCLUDE EXPLANATIONS. - # - # Pin sass-rails to 5.x because rails 5.x apps have this same dependency in their generated Gemfiles - # See https://github.com/samvera/hyrax/issues/3919 - spec.add_dependency 'sass-rails', '~> 6.0' end diff --git a/lib/generators/hyrax/assets_generator.rb b/lib/generators/hyrax/assets_generator.rb index 4eb63f885b..a87fc858e1 100644 --- a/lib/generators/hyrax/assets_generator.rb +++ b/lib/generators/hyrax/assets_generator.rb @@ -18,11 +18,8 @@ def inject_css def inject_js return if hyrax_javascript_installed? - insert_into_file 'app/assets/javascripts/application.js', after: '//= require_tree .' do - <<-JS.strip_heredoc - - //= require hyrax - JS + insert_into_file 'app/assets/javascripts/application.js', after: "//= require blacklight/blacklight\n" do + "//= require hyrax\n" \ end end diff --git a/spec/helpers/hyrax/collections_helper_spec.rb b/spec/helpers/hyrax/collections_helper_spec.rb index 36286660e4..0614eee171 100644 --- a/spec/helpers/hyrax/collections_helper_spec.rb +++ b/spec/helpers/hyrax/collections_helper_spec.rb @@ -151,8 +151,8 @@ form = doc.xpath('//form').first expect(form.attr('action')).to eq hyrax.dashboard_collection_path(collection) i = form.xpath('.//input')[2] - expect(i.attr('value')).to eq("remove") - expect(i.attr('name')).to eq("collection[members]") + expect(i.attr('value')).to eq("Remove From Collection") + expect(i.attr('name')).to eq("commit") end it "creates a button with my text" do diff --git a/spec/test_app_templates/lib/generators/test_app_generator.rb b/spec/test_app_templates/lib/generators/test_app_generator.rb index 41694f1aea..5b02af24ef 100644 --- a/spec/test_app_templates/lib/generators/test_app_generator.rb +++ b/spec/test_app_templates/lib/generators/test_app_generator.rb @@ -5,6 +5,14 @@ class TestAppGenerator < Rails::Generators::Base # so the following path gets us to /path/to/hyrax/spec/test_app_templates/ source_root File.expand_path('../../../../spec/test_app_templates/', __FILE__) + def install_turbolinks + gem 'turbolinks', '~> 5' + + Bundler.with_clean_env do + run "bundle install" + end + end + def install_engine generate 'hyrax:install', '-f' end @@ -198,7 +206,7 @@ def configure_action_cable_to_use_redis end def install_universal_viewer - raise '`yarn install` failed!' unless system('./bin/yarn install') + raise '`yarn install` failed!' unless system('yarn install') end def create_sample_metadata_configuration