Skip to content

Commit

Permalink
COMPATIBILITY: update for Ember 5, add FE tests, fix BE tests, add li…
Browse files Browse the repository at this point in the history
…nting config & Github workflow (#87)

* COMPATIBILITY: update for Ember 5, add FE tests

* FIX: tests!

* IMPROVE: add github workflow

* linting

* add Gemfiles

* add rubocop config

* linting

* rename rubocop config
  • Loading branch information
merefield authored Jan 30, 2024
1 parent a9740c2 commit ce0ace5
Show file tree
Hide file tree
Showing 22 changed files with 5,383 additions and 321 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@discourse/lint-configs/eslint");
11 changes: 11 additions & 0 deletions .github/workflows/discourse-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Discourse Plugin

on:
push:
branches:
- main
pull_request:

jobs:
ci:
uses: discourse/.github/.github/workflows/discourse-plugin.yml@v1
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.swp
gems/
node_modules
1 change: 1 addition & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@discourse/lint-configs/prettier");
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
inherit_gem:
rubocop-discourse: stree-compat.yml
RSpec/NamedSubject:
Enabled: false

9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true

source "https://rubygems.org"

group :development do
gem "rubocop-discourse"
gem "syntax_tree"
end

54 changes: 54 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
json (2.7.1)
language_server-protocol (3.17.0.3)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
racc (1.7.3)
rainbow (3.1.1)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.60.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-discourse (3.6.0)
rubocop (>= 1.59.0)
rubocop-rspec (>= 2.25.0)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-rspec (2.26.1)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-progressbar (1.13.0)
syntax_tree (6.2.0)
prettier_print (>= 1.2.0)
unicode-display_width (2.5.0)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
rubocop-discourse
syntax_tree

BUNDLED WITH
2.5.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { getOwner } from "@ember/application";

export default {
setupComponent(args, component) {
const retort = getOwner(this).lookup("service:retort");
retort.setPicker(component);

const controller = getOwner(this).lookup("controller:topic");
controller.set("renderRetortPicker", false);

component.set("renderRetortPicker", controller.get("renderRetortPicker"));

controller.addObserver("renderRetortPicker", () => {
if (this._state === "destroying") {
return;
}
component.set("renderRetortPicker", controller.get("renderRetortPicker"));
});
},
};

This file was deleted.

Loading

0 comments on commit ce0ace5

Please sign in to comment.