0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 19:36:44 +08:00
discourse/plugins/spoiler-alert
Alan Guo Xiang Tan 6df9b0b357
DEV: Prefer RSpec primitives for test setup (#42122)
RSpec setup becomes harder to follow at either extreme: trivial fixture
wrappers hide lifecycle and intent, while forcing every named operation
inline repeats low-level protocol and configuration details.

This change documents and applies a test-setup hierarchy:

- use `fab!`, `let`, `let!`, `subject`, and inline `Fabricate` according
to lifecycle and role;
- use a small example-group method when parameterized behavior gives one
spec useful vocabulary;
- move helpers into auto-loaded `spec/support` only when they are shared
across spec files;
- use fabricators and page objects for the data shapes and system-test
interfaces they own.

Core and plugin support files are loaded centrally by `rails_helper`, so
plugin-specific support loaders are unnecessary. The migration specs
encountered during the sweep are removed according to repository policy;
production migrations are unchanged.
2026-07-30 11:17:22 +08:00
..
assets FIX: Allow re-blur on spoiler when in details view (#41266) 2026-06-29 12:47:49 -05:00
config I18N: Update translations (#39701) 2026-05-04 21:30:12 +02:00
spec DEV: Prefer RSpec primitives for test setup (#42122) 2026-07-30 11:17:22 +08:00
test/javascripts DEV: Remove rich_editor site setting (#41873) 2026-07-23 19:49:20 -03:00
package.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00
plugin.rb
README.md
tsconfig.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00

discourse-spoiler-alert

https://meta.discourse.org/t/discourse-spoiler-alert/12650/

Spoiler plugin for Discourse highly inspired by the spoiler-alert jQuery plugin.

Usage

In your posts, surround text or images with [spoiler] ... [/spoiler]. For example:

I watched the murder mystery on TV last night. [spoiler]The butler did it[/spoiler].

Installation

  • Add the plugin's repo url to your container's app.yml file
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-spoiler-alert.git
  • Rebuild the container
cd /var/discourse
./launcher rebuild app

License

MIT