diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fabf9809..51f80552 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,11 @@ jobs: matrix: alchemy_branch: - "8.1-stable" + - "8.2-stable" ruby: - - "3.2" - "3.3" - "3.4" + - "4.0" rails: - "7.2" - "8.0" diff --git a/Gemfile b/Gemfile index 49bc19a4..b25a1083 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source "https://rubygems.org" -alchemy_branch = ENV.fetch("ALCHEMY_BRANCH", "8.1-stable") +alchemy_branch = ENV.fetch("ALCHEMY_BRANCH", "8.2-stable") gem "alchemy_cms", github: "AlchemyCMS/alchemy_cms", branch: alchemy_branch rails_version = ENV.fetch("RAILS_VERSION", "8.0") diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb index bd1fee98..60fa2362 100644 --- a/spec/controllers/admin/users_controller_spec.rb +++ b/spec/controllers/admin/users_controller_spec.rb @@ -176,6 +176,10 @@ module Alchemy context "if user is permitted to update roles" do before do + allow(controller) + .to receive(:can?) + .with(:edit_content, Alchemy::Page) + .and_return(true) allow(controller) .to receive(:can?) .with(:update_role, Alchemy::User) @@ -192,6 +196,10 @@ module Alchemy context "if the user is not permitted to update roles" do before do + allow(controller) + .to receive(:can?) + .with(:edit_content, Alchemy::Page) + .and_return(true) allow(controller) .to receive(:can?) .with(:update_role, Alchemy::User) diff --git a/spec/dummy/config/initializers/alchemy.rb b/spec/dummy/config/initializers/alchemy.rb index b6d6199d..8fead9a3 100644 --- a/spec/dummy/config/initializers/alchemy.rb +++ b/spec/dummy/config/initializers/alchemy.rb @@ -49,8 +49,8 @@ # config.preview = { # host: https://www.my-static-site.com # auth: - # username: <%= ENV["BASIC_AUTH_USERNAME"] %%> - # password: <%= ENV["BASIC_AUTH_PASSWORD"] %%> + # username: <%= ENV["BASIC_AUTH_USERNAME"] %> + # password: <%= ENV["BASIC_AUTH_PASSWORD"] %> # } # Preview config per site is supported as well. # @@ -58,8 +58,8 @@ # My site name: # host: https://www.my-static-site.com # auth: - # username: <%= ENV["BASIC_AUTH_USERNAME"] %%> - # password: <%= ENV["BASIC_AUTH_PASSWORD"] %%> + # username: <%= ENV["BASIC_AUTH_USERNAME"] %> + # password: <%= ENV["BASIC_AUTH_PASSWORD"] %> # } # === Picture rendering settings @@ -207,7 +207,7 @@ # config.admin_page_preview_layout = "application" # The sizes for the preview size select in the page editor. - # config.page_preview_sizes = [360, 640, 768, 1024, 1280, 1440] + # config.page_preview_sizes = ["360", "640", "768", "1024", "1280", "1440"] # Enable full text search configuration # @@ -224,5 +224,48 @@ # The storage adapter for Pictures and Attachments # - config.storage_adapter = "dragonfly" + config.storage_adapter = "active_storage" + + # Additional JS modules to be imported in the Alchemy admin UI + # + # Be sure to also pin the modules with +Alchemy.importmap+. + # + # == Example + # + # Alchemy.importmap.pin "flatpickr/de", + # to: "https://ga.jspm.io/npm:flatpickr@4.6.13/dist/l10n/de.js" + # + # config.admin_js_imports << "flatpickr/de" + + # Additional importmaps to be included in the Alchemy admin UI + # + # Be sure to also pin modules with +Alchemy.importmap+. + # + # config.admin_importmaps.add( + # importmap_path: root.join("config/importmap.rb"), + # source_paths: [ + # root.join("app/javascript") + # ], + # name: "admin_extension" + # ) + + # Additional stylesheets to be included in the Alchemy admin UI + # config.admin_stylesheets.add("my_app/admin_extension") + + # Define page publish targets + # + # A publish target is a ActiveJob that gets performed + # whenever a user clicks the publish page button. + # + # Use this to trigger deployment hooks of external + # services in an asychronous way. + # + # config.publish_targets << "MyPublishJob" + + # Configure tabs in the link dialog + # + # With this configuration that tabs in the link dialog can be extended + # without overwriting or defacing the Admin Interface. + # + # config.link_dialog_tabs << "Acme::LinkTab" end