Skip to content

Commit aba24c5

Browse files
authored
Merge pull request #268 from AlchemyCMS/test-alchemy-8.2
CI: Test Alchemy 8.2
2 parents 90badb6 + 0e35853 commit aba24c5

4 files changed

Lines changed: 60 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ jobs:
1414
matrix:
1515
alchemy_branch:
1616
- "8.1-stable"
17+
- "8.2-stable"
1718
ruby:
18-
- "3.2"
1919
- "3.3"
2020
- "3.4"
21+
- "4.0"
2122
rails:
2223
- "7.2"
2324
- "8.0"

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source "https://rubygems.org"
22

3-
alchemy_branch = ENV.fetch("ALCHEMY_BRANCH", "8.1-stable")
3+
alchemy_branch = ENV.fetch("ALCHEMY_BRANCH", "8.2-stable")
44
gem "alchemy_cms", github: "AlchemyCMS/alchemy_cms", branch: alchemy_branch
55

66
rails_version = ENV.fetch("RAILS_VERSION", "8.0")

spec/controllers/admin/users_controller_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ module Alchemy
176176

177177
context "if user is permitted to update roles" do
178178
before do
179+
allow(controller)
180+
.to receive(:can?)
181+
.with(:edit_content, Alchemy::Page)
182+
.and_return(true)
179183
allow(controller)
180184
.to receive(:can?)
181185
.with(:update_role, Alchemy::User)
@@ -192,6 +196,10 @@ module Alchemy
192196

193197
context "if the user is not permitted to update roles" do
194198
before do
199+
allow(controller)
200+
.to receive(:can?)
201+
.with(:edit_content, Alchemy::Page)
202+
.and_return(true)
195203
allow(controller)
196204
.to receive(:can?)
197205
.with(:update_role, Alchemy::User)

spec/dummy/config/initializers/alchemy.rb

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@
4949
# config.preview = {
5050
# host: https://www.my-static-site.com
5151
# auth:
52-
# username: <%= ENV["BASIC_AUTH_USERNAME"] %%>
53-
# password: <%= ENV["BASIC_AUTH_PASSWORD"] %%>
52+
# username: <%= ENV["BASIC_AUTH_USERNAME"] %>
53+
# password: <%= ENV["BASIC_AUTH_PASSWORD"] %>
5454
# }
5555
# Preview config per site is supported as well.
5656
#
5757
# config.preview = {
5858
# My site name:
5959
# host: https://www.my-static-site.com
6060
# auth:
61-
# username: <%= ENV["BASIC_AUTH_USERNAME"] %%>
62-
# password: <%= ENV["BASIC_AUTH_PASSWORD"] %%>
61+
# username: <%= ENV["BASIC_AUTH_USERNAME"] %>
62+
# password: <%= ENV["BASIC_AUTH_PASSWORD"] %>
6363
# }
6464

6565
# === Picture rendering settings
@@ -207,7 +207,7 @@
207207
# config.admin_page_preview_layout = "application"
208208

209209
# The sizes for the preview size select in the page editor.
210-
# config.page_preview_sizes = [360, 640, 768, 1024, 1280, 1440]
210+
# config.page_preview_sizes = ["360", "640", "768", "1024", "1280", "1440"]
211211

212212
# Enable full text search configuration
213213
#
@@ -224,5 +224,48 @@
224224

225225
# The storage adapter for Pictures and Attachments
226226
#
227-
config.storage_adapter = "dragonfly"
227+
config.storage_adapter = "active_storage"
228+
229+
# Additional JS modules to be imported in the Alchemy admin UI
230+
#
231+
# Be sure to also pin the modules with +Alchemy.importmap+.
232+
#
233+
# == Example
234+
#
235+
# Alchemy.importmap.pin "flatpickr/de",
236+
# to: "https://ga.jspm.io/npm:flatpickr@4.6.13/dist/l10n/de.js"
237+
#
238+
# config.admin_js_imports << "flatpickr/de"
239+
240+
# Additional importmaps to be included in the Alchemy admin UI
241+
#
242+
# Be sure to also pin modules with +Alchemy.importmap+.
243+
#
244+
# config.admin_importmaps.add(
245+
# importmap_path: root.join("config/importmap.rb"),
246+
# source_paths: [
247+
# root.join("app/javascript")
248+
# ],
249+
# name: "admin_extension"
250+
# )
251+
252+
# Additional stylesheets to be included in the Alchemy admin UI
253+
# config.admin_stylesheets.add("my_app/admin_extension")
254+
255+
# Define page publish targets
256+
#
257+
# A publish target is a ActiveJob that gets performed
258+
# whenever a user clicks the publish page button.
259+
#
260+
# Use this to trigger deployment hooks of external
261+
# services in an asychronous way.
262+
#
263+
# config.publish_targets << "MyPublishJob"
264+
265+
# Configure tabs in the link dialog
266+
#
267+
# With this configuration that tabs in the link dialog can be extended
268+
# without overwriting or defacing the Admin Interface.
269+
#
270+
# config.link_dialog_tabs << "Acme::LinkTab"
228271
end

0 commit comments

Comments
 (0)