discourse/Gemfile.lock

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

754 lines
17 KiB
Plaintext
Raw Normal View History

2013-02-06 03:16:51 +08:00
GEM
remote: https://rubygems.org/
2013-02-06 03:16:51 +08:00
specs:
2024-08-19 20:44:17 +08:00
actionmailer (7.2.2)
actionpack (= 7.2.2)
actionview (= 7.2.2)
activejob (= 7.2.2)
activesupport (= 7.2.2)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
2024-08-19 20:44:17 +08:00
actionpack (7.2.2)
actionview (= 7.2.2)
activesupport (= 7.2.2)
nokogiri (>= 1.8.5)
racc
2024-08-19 20:44:17 +08:00
rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
2017-10-03 14:56:44 +08:00
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
2024-08-19 20:44:17 +08:00
useragent (~> 0.16)
actionview (7.2.2)
activesupport (= 7.2.2)
2014-05-08 12:14:24 +08:00
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actionview_precompiler (0.4.0)
actionview (>= 6.0.a)
active_model_serializers (0.8.4)
2013-07-24 02:42:52 +08:00
activemodel (>= 3.0)
2024-08-19 20:44:17 +08:00
activejob (7.2.2)
activesupport (= 7.2.2)
2017-08-23 10:58:25 +08:00
globalid (>= 0.3.6)
2024-08-19 20:44:17 +08:00
activemodel (7.2.2)
activesupport (= 7.2.2)
activerecord (7.2.2)
activemodel (= 7.2.2)
activesupport (= 7.2.2)
timeout (>= 0.4.0)
2024-08-19 20:44:17 +08:00
activesupport (7.2.2)
base64
Build(deps): Bump the rails group with 6 updates Bumps the rails group with 6 updates: | Package | From | To | | --- | --- | --- | | [actionmailer](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [actionpack](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [actionview](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [activerecord](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [activesupport](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [railties](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | Updates `actionmailer` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/actionmailer/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `actionpack` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/actionpack/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `actionview` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/actionview/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `activerecord` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/activerecord/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `activesupport` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/activesupport/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `railties` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/railties/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) --- updated-dependencies: - dependency-name: actionmailer dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: actionpack dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: actionview dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: activerecord dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: activesupport dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: railties dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails ... Signed-off-by: dependabot[bot] <support@github.com>
2024-11-05 05:29:54 +08:00
benchmark (>= 0.3)
bigdecimal
2024-08-19 20:44:17 +08:00
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
Build(deps): Bump the rails group with 6 updates Bumps the rails group with 6 updates: | Package | From | To | | --- | --- | --- | | [actionmailer](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [actionpack](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [actionview](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [activerecord](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [activesupport](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [railties](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | Updates `actionmailer` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/actionmailer/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `actionpack` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/actionpack/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `actionview` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/actionview/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `activerecord` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/activerecord/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `activesupport` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/activesupport/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `railties` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/railties/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) --- updated-dependencies: - dependency-name: actionmailer dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: actionpack dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: actionview dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: activerecord dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: activesupport dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: railties dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails ... Signed-off-by: dependabot[bot] <support@github.com>
2024-11-05 05:29:54 +08:00
logger (>= 1.4.2)
minitest (>= 5.1)
Build(deps): Bump the rails group with 6 updates Bumps the rails group with 6 updates: | Package | From | To | | --- | --- | --- | | [actionmailer](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [actionpack](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [actionview](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [activerecord](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [activesupport](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | | [railties](https://github.com/rails/rails) | `7.1.4.2` | `7.1.5` | Updates `actionmailer` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/actionmailer/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `actionpack` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/actionpack/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `actionview` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/actionview/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `activerecord` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/activerecord/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `activesupport` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/activesupport/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) Updates `railties` from 7.1.4.2 to 7.1.5 - [Release notes](https://github.com/rails/rails/releases) - [Changelog](https://github.com/rails/rails/blob/v7.2.2/railties/CHANGELOG.md) - [Commits](https://github.com/rails/rails/compare/v7.1.4.2...v7.1.5) --- updated-dependencies: - dependency-name: actionmailer dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: actionpack dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: actionview dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: activerecord dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: activesupport dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails - dependency-name: railties dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rails ... Signed-off-by: dependabot[bot] <support@github.com>
2024-11-05 05:29:54 +08:00
securerandom (>= 0.3)
2024-08-19 20:44:17 +08:00
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
rake (>= 10.4, < 14.0)
ast (2.4.2)
aws-eventstream (1.3.0)
aws-partitions (1.894.0)
aws-sdk-core (3.191.3)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.77.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.143.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sdk-sns (1.72.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.2.0)
benchmark (0.4.0)
better_errors (2.10.1)
erubi (>= 1.0.0)
2014-08-22 08:33:55 +08:00
rack (>= 0.9.0)
rouge (>= 1.0.0)
bigdecimal (3.1.8)
binding_of_caller (1.0.1)
debug_inspector (>= 1.2.0)
bootsnap (1.18.4)
msgpack (~> 1.2)
builder (3.3.0)
bullet (8.0.0)
2016-06-28 09:29:42 +08:00
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.3)
capybara (3.40.0)
DEV: Minimal first pass of rails system test setup (#16311) This commit introduces rails system tests run with chromedriver, selenium, and headless chrome to our testing toolbox. We use the `webdrivers` gem and `selenium-webdriver` which is what the latest Rails uses so the tests run locally and in CI out of the box. You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra verbose logs of what selenium is doing to communicate with the system tests. By default JS logs are verbose so errors from JS are shown when running system tests, you can disable this with `SELENIUM_DISABLE_VERBOSE_JS_LOGS=1` You can use `SELENIUM_HEADLESS=0` to run the system tests inside a chrome browser instead of headless, which can be useful to debug things and see what the spec sees. See note above about `bin/ember-cli` to avoid surprises. I have modified `bin/turbo_rspec` to exclude `spec/system` by default, support for parallel system specs is a little shaky right now and we don't want them slowing down the turbo by default either. ### PageObjects and System Tests To make querying and inspecting parts of the page easier and more reusable inbetween system tests, we are using the concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in our system tests. A "Page" here is generally corresponds to an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`, and this contains logic for querying components within the topic such as "Posts". I have also split "Modals" into their own entity. Further down the line we may want to explore creating independent "Component" contexts. Capybara DSL should be included in each PageObject class, reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl For system tests, since they are so slow, we want to focus on the "happy path" and not do every different possible context and branch check using them. They are meant to be overarching tests that check a number of things are correct using the full stack from JS and ember to rails to ruby and then the database. ### CI Setup Whenever a system spec fails, a screenshot is taken and a build artifact is produced _after the entire CI run is complete_, which can be downloaded from the Actions UI in the repo. Most importantly, a step to build the Ember app using Ember CLI is needed, otherwise the JS assets cannot be found by capybara: ``` - name: Build Ember CLI run: bin/ember-cli --build ``` A new `--build` argument has been added to `bin/ember-cli` for this case, which is not needed locally if you already have the discourse rails server running via `bin/ember-cli -u` since the whole server is built and set up by default. Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-28 09:48:16 +08:00
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.11)
DEV: Minimal first pass of rails system test setup (#16311) This commit introduces rails system tests run with chromedriver, selenium, and headless chrome to our testing toolbox. We use the `webdrivers` gem and `selenium-webdriver` which is what the latest Rails uses so the tests run locally and in CI out of the box. You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra verbose logs of what selenium is doing to communicate with the system tests. By default JS logs are verbose so errors from JS are shown when running system tests, you can disable this with `SELENIUM_DISABLE_VERBOSE_JS_LOGS=1` You can use `SELENIUM_HEADLESS=0` to run the system tests inside a chrome browser instead of headless, which can be useful to debug things and see what the spec sees. See note above about `bin/ember-cli` to avoid surprises. I have modified `bin/turbo_rspec` to exclude `spec/system` by default, support for parallel system specs is a little shaky right now and we don't want them slowing down the turbo by default either. ### PageObjects and System Tests To make querying and inspecting parts of the page easier and more reusable inbetween system tests, we are using the concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in our system tests. A "Page" here is generally corresponds to an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`, and this contains logic for querying components within the topic such as "Posts". I have also split "Modals" into their own entity. Further down the line we may want to explore creating independent "Component" contexts. Capybara DSL should be included in each PageObject class, reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl For system tests, since they are so slow, we want to focus on the "happy path" and not do every different possible context and branch check using them. They are meant to be overarching tests that check a number of things are correct using the full stack from JS and ember to rails to ruby and then the database. ### CI Setup Whenever a system spec fails, a screenshot is taken and a build artifact is produced _after the entire CI run is complete_, which can be downloaded from the Actions UI in the repo. Most importantly, a step to build the Ember app using Ember CLI is needed, otherwise the JS assets cannot be found by capybara: ``` - name: Build Ember CLI run: bin/ember-cli --build ``` A new `--build` argument has been added to `bin/ember-cli` for this case, which is not needed locally if you already have the discourse rails server running via `bin/ember-cli -u` since the whole server is built and set up by default. Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-28 09:48:16 +08:00
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
cbor (0.5.9.8)
2014-09-25 08:40:35 +08:00
certified (1.0.0)
cgi (0.4.1)
chunky_png (1.4.0)
coderay (1.1.3)
colored2 (4.0.0)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
cose (1.3.1)
cbor (~> 0.5.9)
openssl-signature_algorithm (~> 1.0)
cppjieba_rb (0.4.2)
crack (1.0.0)
bigdecimal
rexml
crass (1.0.6)
css_parser (1.19.1)
addressable
csv (3.3.0)
date (3.4.1)
debug_inspector (1.2.0)
diff-lcs (1.5.1)
diffy (3.4.3)
digest (3.1.1)
discourse-fonts (0.0.9)
discourse-seed-fu (2.3.12)
activerecord (>= 3.1)
activesupport (>= 3.1)
discourse_dev_assets (0.0.4)
faker (~> 2.16)
literate_randomizer
docile (1.4.1)
drb (2.2.1)
dry-initializer (3.1.1)
email_reply_trimmer (0.2.0)
erubi (1.13.0)
excon (1.2.2)
execjs (2.10.0)
exifr (1.4.0)
extralite-bundle (2.8.2)
fabrication (2.31.0)
faker (2.23.0)
i18n (>= 1.8.11, < 2)
fakeweb (1.3.0)
faraday (2.12.1)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
faraday-retry (2.2.1)
faraday (~> 2.0)
fast_blank (1.0.1)
fastimage (2.3.1)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
fspath (3.1.2)
globalid (1.2.1)
activesupport (>= 6.1)
google-protobuf (4.29.0-aarch64-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.29.0-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.29.0-x86_64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.29.0-x86_64-linux)
bigdecimal
rake (>= 13)
2015-03-10 08:09:49 +08:00
guess_html_encoding (0.0.11)
hana (1.3.7)
hashdiff (1.1.2)
hashie (5.0.0)
highline (3.1.1)
reline
2015-09-23 15:10:15 +08:00
htmlentities (4.3.4)
http_accept_language (2.1.1)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
image_optim (0.31.4)
exifr (~> 1.2, >= 1.2.2)
fspath (~> 3.0)
image_size (>= 1.5, < 4)
in_threads (~> 1.3)
progress (~> 3.0, >= 3.0.1)
image_size (3.4.0)
in_threads (1.6.0)
io-console (0.7.2)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
iso8601 (0.13.0)
jmespath (1.6.2)
json (2.9.0)
json-schema (5.1.1)
addressable (~> 2.8)
bigdecimal (~> 3.1)
json_schemer (2.3.0)
bigdecimal
hana (~> 1.3)
regexp_parser (~> 2.0)
simpleidn (~> 0.2)
jwt (2.9.3)
base64
kgio (2.11.4)
language_server-protocol (3.17.0.3)
libv8-node (18.19.0.0-aarch64-linux)
libv8-node (18.19.0.0-arm64-darwin)
libv8-node (18.19.0.0-x86_64-darwin)
libv8-node (18.19.0.0-x86_64-linux)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
literate_randomizer (0.4.0)
logger (1.6.2)
lograge (0.14.0)
actionpack (>= 4)
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
logstash-event (1.2.02)
logster (2.20.0)
loofah (2.23.1)
2017-10-03 14:56:44 +08:00
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
lru_redux (1.1.0)
lz4-ruby (0.3.3)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
DEV: Minimal first pass of rails system test setup (#16311) This commit introduces rails system tests run with chromedriver, selenium, and headless chrome to our testing toolbox. We use the `webdrivers` gem and `selenium-webdriver` which is what the latest Rails uses so the tests run locally and in CI out of the box. You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra verbose logs of what selenium is doing to communicate with the system tests. By default JS logs are verbose so errors from JS are shown when running system tests, you can disable this with `SELENIUM_DISABLE_VERBOSE_JS_LOGS=1` You can use `SELENIUM_HEADLESS=0` to run the system tests inside a chrome browser instead of headless, which can be useful to debug things and see what the spec sees. See note above about `bin/ember-cli` to avoid surprises. I have modified `bin/turbo_rspec` to exclude `spec/system` by default, support for parallel system specs is a little shaky right now and we don't want them slowing down the turbo by default either. ### PageObjects and System Tests To make querying and inspecting parts of the page easier and more reusable inbetween system tests, we are using the concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in our system tests. A "Page" here is generally corresponds to an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`, and this contains logic for querying components within the topic such as "Posts". I have also split "Modals" into their own entity. Further down the line we may want to explore creating independent "Component" contexts. Capybara DSL should be included in each PageObject class, reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl For system tests, since they are so slow, we want to focus on the "happy path" and not do every different possible context and branch check using them. They are meant to be overarching tests that check a number of things are correct using the full stack from JS and ember to rails to ruby and then the database. ### CI Setup Whenever a system spec fails, a screenshot is taken and a build artifact is produced _after the entire CI run is complete_, which can be downloaded from the Actions UI in the repo. Most importantly, a step to build the Ember app using Ember CLI is needed, otherwise the JS assets cannot be found by capybara: ``` - name: Build Ember CLI run: bin/ember-cli --build ``` A new `--build` argument has been added to `bin/ember-cli` for this case, which is not needed locally if you already have the discourse rails server running via `bin/ember-cli -u` since the whole server is built and set up by default. Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-28 09:48:16 +08:00
matrix (0.4.2)
maxminddb (0.1.22)
memory_profiler (1.1.0)
message_bus (4.3.8)
rack (>= 1.1.3)
messageformat-wrapper (1.1.0)
mini_racer (>= 0.6.3)
method_source (1.1.0)
mini_mime (1.1.5)
mini_racer (0.14.1)
libv8-node (~> 18.19.0.0)
mini_scheduler (0.17.0)
sidekiq (>= 4.2.3, < 7.0)
mini_sql (1.6.0)
mini_suffix (0.3.3)
ffi (~> 1.9)
minio_runner (0.1.2)
minitest (5.25.3)
mocha (2.6.1)
ruby2_keywords (>= 0.0.5)
msgpack (1.7.5)
multi_json (1.15.0)
multi_xml (0.7.1)
bigdecimal (~> 3.1)
mustache (1.1.1)
net-http (0.6.0)
uri
net-imap (0.5.1)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.0)
net-protocol
nio4r (2.7.4)
nokogiri (1.16.8-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.8-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.8-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.8-x86_64-linux)
racc (~> 1.4)
oauth (1.1.0)
oauth-tty (~> 1.0, >= 1.0.1)
snaky_hash (~> 2.0)
version_gem (~> 1.1)
oauth-tty (1.0.5)
version_gem (~> 1.1, >= 1.1.1)
oauth2 (1.4.11)
faraday (>= 0.17.3, < 3.0)
2019-01-01 03:07:18 +08:00
jwt (>= 1.0, < 3.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 4)
oj (3.16.7)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
omniauth (1.9.2)
2020-03-16 21:12:10 +08:00
hashie (>= 3.4.6)
2017-03-28 04:51:52 +08:00
rack (>= 1.6.2, < 3)
omniauth-facebook (9.0.0)
2014-09-25 08:40:35 +08:00
omniauth-oauth2 (~> 1.2)
omniauth-github (1.4.0)
omniauth (~> 1.5)
omniauth-oauth2 (>= 1.4.0, < 2.0)
omniauth-google-oauth2 (0.8.2)
2019-01-01 03:07:18 +08:00
jwt (>= 2.0)
oauth2 (~> 1.1)
omniauth (~> 1.1)
omniauth-oauth2 (>= 1.6)
omniauth-oauth (1.2.1)
oauth
omniauth (>= 1.0, < 3)
rack (>= 1.6.2, < 4)
omniauth-oauth2 (1.7.3)
oauth2 (>= 1.4, < 3)
omniauth (>= 1.9, < 3)
omniauth-twitter (1.4.0)
2015-09-23 15:18:43 +08:00
omniauth-oauth (~> 1.1)
rack
openssl (3.2.0)
openssl-signature_algorithm (1.3.0)
openssl (> 2.0)
optimist (3.2.0)
ostruct (0.6.1)
parallel (1.26.3)
parallel_tests (4.7.2)
parallel
parser (3.3.6.0)
ast (~> 2.4.1)
racc
pg (1.5.4)
prettier_print (1.2.1)
progress (3.6.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
pry-rails (0.3.11)
pry (>= 0.13.0)
pry-stack_explorer (0.6.1)
binding_of_caller (~> 1.0)
pry (~> 0.13)
psych (5.2.1)
date
stringio
public_suffix (6.0.1)
puma (6.5.0)
nio4r (~> 2.0)
racc (1.8.1)
rack (2.2.10)
rack-mini-profiler (3.3.1)
rack (>= 1.2.0)
rack-protection (3.2.0)
base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
rack-session (1.0.2)
rack (< 3)
rack-test (2.1.0)
rack (>= 1.3)
2024-08-19 20:44:17 +08:00
rackup (1.0.1)
rack (< 3)
webrick
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
2017-08-23 10:58:25 +08:00
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.1)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails_failover (2.1.1)
activerecord (>= 6.1, < 8.0)
concurrent-ruby
railties (>= 6.1, < 8.0)
rails_multisite (6.1.0)
activerecord (>= 6.0)
railties (>= 6.0)
2024-08-19 20:44:17 +08:00
railties (7.2.2)
actionpack (= 7.2.2)
activesupport (= 7.2.2)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rainbow (3.1.1)
raindrops (0.20.1)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
2019-03-21 00:04:26 +08:00
ffi (~> 1.0)
2023-12-20 03:59:21 +08:00
rbtrace (0.5.1)
ffi (>= 1.0.6)
msgpack (>= 0.4.3)
optimist (>= 3.0.0)
rchardet (1.8.0)
rdoc (6.8.1)
psych (>= 4.0.0)
redcarpet (3.6.0)
redis (4.8.1)
redis-namespace (1.11.0)
redis (>= 4)
regexp_parser (2.9.3)
reline (0.5.12)
io-console (~> 0.5)
request_store (1.7.0)
rack (>= 1.4)
rexml (3.3.9)
rinku (2.0.6)
rotp (6.3.0)
rouge (4.5.1)
rqrcode (2.2.0)
chunky_png (~> 1.0)
rqrcode_core (~> 1.0)
rqrcode_core (1.2.0)
rrule (0.6.0)
activesupport (>= 2.3)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.2)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
2015-04-26 06:29:43 +08:00
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-html-matchers (0.10.0)
nokogiri (~> 1)
rspec (>= 3.0.0.a)
rspec-mocks (3.13.2)
2015-04-26 06:29:43 +08:00
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-multi-mock (0.3.1)
rspec (>= 3.7.0)
rspec-rails (7.1.0)
actionpack (>= 7.0)
activesupport (>= 7.0)
railties (>= 7.0)
rspec-core (~> 3.13)
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.2)
rss (0.3.1)
rexml
rswag-specs (2.16.0)
activesupport (>= 5.2, < 8.1)
json-schema (>= 2.2, < 6.0)
railties (>= 5.2, < 8.1)
rspec-core (>= 2.14)
rtlcss (0.2.1)
mini_racer (>= 0.6.3)
rubocop (1.69.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
2017-08-01 09:51:44 +08:00
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
2017-08-01 09:51:44 +08:00
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-discourse (3.9.0)
activesupport (>= 6.1)
rubocop (>= 1.59.0)
rubocop-capybara (>= 2.0.0)
rubocop-factory_bot (>= 2.0.0)
rubocop-rails (>= 2.25.0)
rubocop-rspec (>= 3.0.1)
rubocop-rspec_rails (>= 2.30.0)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-rails (2.27.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.2.0)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
ruby-prof (1.7.1)
ruby-progressbar (1.13.0)
ruby-readability (0.7.2)
2014-02-18 00:44:28 +08:00
guess_html_encoding (>= 0.0.4)
2014-09-25 08:40:35 +08:00
nokogiri (>= 1.6.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
sanitize (6.1.3)
2015-09-23 15:10:15 +08:00
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
sass-embedded (1.77.5-aarch64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-arm64-darwin)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-x86_64-darwin)
google-protobuf (>= 3.25, < 5.0)
sass-embedded (1.77.5-x86_64-linux-gnu)
google-protobuf (>= 3.25, < 5.0)
sassc-embedded (1.77.7)
sass-embedded (~> 1.77)
securerandom (0.4.0)
selenium-devtools (0.131.0)
selenium-webdriver (~> 4.2)
selenium-webdriver (4.27.0)
base64 (~> 0.2)
logger (~> 1.4)
DEV: Minimal first pass of rails system test setup (#16311) This commit introduces rails system tests run with chromedriver, selenium, and headless chrome to our testing toolbox. We use the `webdrivers` gem and `selenium-webdriver` which is what the latest Rails uses so the tests run locally and in CI out of the box. You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra verbose logs of what selenium is doing to communicate with the system tests. By default JS logs are verbose so errors from JS are shown when running system tests, you can disable this with `SELENIUM_DISABLE_VERBOSE_JS_LOGS=1` You can use `SELENIUM_HEADLESS=0` to run the system tests inside a chrome browser instead of headless, which can be useful to debug things and see what the spec sees. See note above about `bin/ember-cli` to avoid surprises. I have modified `bin/turbo_rspec` to exclude `spec/system` by default, support for parallel system specs is a little shaky right now and we don't want them slowing down the turbo by default either. ### PageObjects and System Tests To make querying and inspecting parts of the page easier and more reusable inbetween system tests, we are using the concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in our system tests. A "Page" here is generally corresponds to an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`, and this contains logic for querying components within the topic such as "Posts". I have also split "Modals" into their own entity. Further down the line we may want to explore creating independent "Component" contexts. Capybara DSL should be included in each PageObject class, reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl For system tests, since they are so slow, we want to focus on the "happy path" and not do every different possible context and branch check using them. They are meant to be overarching tests that check a number of things are correct using the full stack from JS and ember to rails to ruby and then the database. ### CI Setup Whenever a system spec fails, a screenshot is taken and a build artifact is produced _after the entire CI run is complete_, which can be downloaded from the Actions UI in the repo. Most importantly, a step to build the Ember app using Ember CLI is needed, otherwise the JS assets cannot be found by capybara: ``` - name: Build Ember CLI run: bin/ember-cli --build ``` A new `--build` argument has been added to `bin/ember-cli` for this case, which is not needed locally if you already have the discourse rails server running via `bin/ember-cli -u` since the whole server is built and set up by default. Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-28 09:48:16 +08:00
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
shoulda-matchers (6.4.0)
activesupport (>= 5.2.0)
sidekiq (6.5.12)
connection_pool (>= 2.2.5, < 3)
rack (~> 2.0)
redis (>= 4.5.0, < 5)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
simpleidn (0.2.3)
snaky_hash (2.0.1)
hashie
version_gem (~> 1.1, >= 1.1.1)
sprockets (3.7.5)
base64
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.5.2)
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
sqlite3 (2.3.1-aarch64-linux-gnu)
sqlite3 (2.3.1-arm64-darwin)
sqlite3 (2.3.1-x86_64-darwin)
sqlite3 (2.3.1-x86_64-linux-gnu)
sshkey (3.0.0)
stackprof (0.2.26)
stringio (3.1.2)
syntax_tree (6.2.0)
prettier_print (>= 1.2.0)
syntax_tree-disable_ternary (1.0.0)
test-prof (1.4.2)
thor (1.3.2)
timeout (0.4.2)
trilogy (2.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2024.2)
tzinfo (>= 1.0.0)
uglifier (4.2.1)
2016-05-23 10:23:15 +08:00
execjs (>= 0.3.0, < 3)
unf (0.2.0)
unicode-display_width (3.1.2)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
unicorn (6.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
uniform_notifier (1.16.0)
uri (1.0.2)
2024-08-19 20:44:17 +08:00
useragent (0.16.10)
version_gem (1.1.4)
web-push (3.0.1)
jwt (~> 2.0)
openssl (~> 3.0)
webmock (3.24.0)
addressable (>= 2.8.0)
2017-04-15 12:11:02 +08:00
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.9.1)
websocket (1.2.11)
DEV: Minimal first pass of rails system test setup (#16311) This commit introduces rails system tests run with chromedriver, selenium, and headless chrome to our testing toolbox. We use the `webdrivers` gem and `selenium-webdriver` which is what the latest Rails uses so the tests run locally and in CI out of the box. You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra verbose logs of what selenium is doing to communicate with the system tests. By default JS logs are verbose so errors from JS are shown when running system tests, you can disable this with `SELENIUM_DISABLE_VERBOSE_JS_LOGS=1` You can use `SELENIUM_HEADLESS=0` to run the system tests inside a chrome browser instead of headless, which can be useful to debug things and see what the spec sees. See note above about `bin/ember-cli` to avoid surprises. I have modified `bin/turbo_rspec` to exclude `spec/system` by default, support for parallel system specs is a little shaky right now and we don't want them slowing down the turbo by default either. ### PageObjects and System Tests To make querying and inspecting parts of the page easier and more reusable inbetween system tests, we are using the concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in our system tests. A "Page" here is generally corresponds to an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`, and this contains logic for querying components within the topic such as "Posts". I have also split "Modals" into their own entity. Further down the line we may want to explore creating independent "Component" contexts. Capybara DSL should be included in each PageObject class, reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl For system tests, since they are so slow, we want to focus on the "happy path" and not do every different possible context and branch check using them. They are meant to be overarching tests that check a number of things are correct using the full stack from JS and ember to rails to ruby and then the database. ### CI Setup Whenever a system spec fails, a screenshot is taken and a build artifact is produced _after the entire CI run is complete_, which can be downloaded from the Actions UI in the repo. Most importantly, a step to build the Ember app using Ember CLI is needed, otherwise the JS assets cannot be found by capybara: ``` - name: Build Ember CLI run: bin/ember-cli --build ``` A new `--build` argument has been added to `bin/ember-cli` for this case, which is not needed locally if you already have the discourse rails server running via `bin/ember-cli -u` since the whole server is built and set up by default. Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-28 09:48:16 +08:00
xpath (3.2.0)
nokogiri (~> 1.8)
yaml-lint (0.1.2)
yard (0.9.37)
zeitwerk (2.7.1)
2013-02-06 03:16:51 +08:00
PLATFORMS
2021-12-01 03:31:11 +08:00
aarch64-linux
arm64-darwin-20
arm64-darwin-21
arm64-darwin-22
arm64-darwin-23
arm64-darwin-24
x86_64-darwin-18
x86_64-darwin-19
x86_64-darwin-20
x86_64-darwin-22
x86_64-darwin-23
x86_64-darwin-24
x86_64-linux
2013-02-06 03:16:51 +08:00
DEPENDENCIES
2024-08-19 20:44:17 +08:00
actionmailer (~> 7.2.0)
actionpack (~> 7.2.0)
actionview (~> 7.2.0)
actionview_precompiler
active_model_serializers (~> 0.8.3)
2024-08-19 20:44:17 +08:00
activemodel (~> 7.2.0)
activerecord (~> 7.2.0)
activesupport (~> 7.2.0)
addressable
annotate
aws-sdk-s3
aws-sdk-sns
2013-02-06 03:16:51 +08:00
better_errors
binding_of_caller
2017-05-27 01:26:45 +08:00
bootsnap
2016-06-28 09:29:42 +08:00
bullet
2015-08-14 11:59:06 +08:00
byebug
DEV: Minimal first pass of rails system test setup (#16311) This commit introduces rails system tests run with chromedriver, selenium, and headless chrome to our testing toolbox. We use the `webdrivers` gem and `selenium-webdriver` which is what the latest Rails uses so the tests run locally and in CI out of the box. You can use `SELENIUM_VERBOSE_DRIVER_LOGS=1` to show extra verbose logs of what selenium is doing to communicate with the system tests. By default JS logs are verbose so errors from JS are shown when running system tests, you can disable this with `SELENIUM_DISABLE_VERBOSE_JS_LOGS=1` You can use `SELENIUM_HEADLESS=0` to run the system tests inside a chrome browser instead of headless, which can be useful to debug things and see what the spec sees. See note above about `bin/ember-cli` to avoid surprises. I have modified `bin/turbo_rspec` to exclude `spec/system` by default, support for parallel system specs is a little shaky right now and we don't want them slowing down the turbo by default either. ### PageObjects and System Tests To make querying and inspecting parts of the page easier and more reusable inbetween system tests, we are using the concept of [PageObjects](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) in our system tests. A "Page" here is generally corresponds to an overarching ember route, e.g. "Topic" for `/t/324345/some-topic`, and this contains logic for querying components within the topic such as "Posts". I have also split "Modals" into their own entity. Further down the line we may want to explore creating independent "Component" contexts. Capybara DSL should be included in each PageObject class, reference for this can be found at https://rubydoc.info/github/teamcapybara/capybara/master#the-dsl For system tests, since they are so slow, we want to focus on the "happy path" and not do every different possible context and branch check using them. They are meant to be overarching tests that check a number of things are correct using the full stack from JS and ember to rails to ruby and then the database. ### CI Setup Whenever a system spec fails, a screenshot is taken and a build artifact is produced _after the entire CI run is complete_, which can be downloaded from the Actions UI in the repo. Most importantly, a step to build the Ember app using Ember CLI is needed, otherwise the JS assets cannot be found by capybara: ``` - name: Build Ember CLI run: bin/ember-cli --build ``` A new `--build` argument has been added to `bin/ember-cli` for this case, which is not needed locally if you already have the discourse rails server running via `bin/ember-cli -u` since the whole server is built and set up by default. Co-authored-by: David Taylor <david@taylorhq.com>
2022-09-28 09:48:16 +08:00
capybara
cbor
2013-02-06 03:16:51 +08:00
certified
cgi (>= 0.3.6)
colored2
cose
cppjieba_rb
css_parser
csv
diffy
digest
discourse-fonts
discourse-seed-fu
discourse_dev_assets
dry-initializer (~> 3.1)
email_reply_trimmer
2015-05-25 15:57:06 +08:00
excon
execjs
extralite-bundle
fabrication
faker (~> 2.16)
fakeweb
faraday
faraday-retry
fast_blank
fastimage
highline
htmlentities
http_accept_language
image_optim
iso8601
json
json_schemer
2017-04-13 22:26:07 +08:00
listen
lograge
logstash-event
logster
loofah
2013-04-24 09:59:59 +08:00
lru_redux
lz4-ruby
mail
maxminddb
memory_profiler
message_bus
messageformat-wrapper
mini_mime
mini_racer
mini_scheduler
mini_sql
mini_suffix
minio_runner
mocha
2013-02-06 03:16:51 +08:00
multi_json
mustache
net-http
net-imap
net-pop
net-smtp
2016-06-07 14:54:36 +08:00
nokogiri
oj
omniauth
omniauth-facebook
omniauth-github
omniauth-google-oauth2
omniauth-oauth2
omniauth-twitter
parallel
parallel_tests
pg
pry-byebug
2013-02-06 03:16:51 +08:00
pry-rails
pry-stack_explorer
puma
rack
2014-02-18 00:44:28 +08:00
rack-mini-profiler
rack-protection
rails-dom-testing
rails_failover
2018-02-12 14:08:02 +08:00
rails_multisite
2024-08-19 20:44:17 +08:00
railties (~> 7.2.0)
2013-02-06 03:16:51 +08:00
rake
rb-fsevent
2023-12-20 03:59:21 +08:00
rbtrace
rchardet
redcarpet
redis (< 5.0)
2016-01-01 12:40:12 +08:00
redis-namespace
2013-02-06 03:16:51 +08:00
rinku
rotp
rqrcode
rrule
2016-05-30 11:38:04 +08:00
rspec
rspec-html-matchers
rspec-multi-mock
rspec-rails
rss
rswag-specs
rtlcss
rubocop-discourse
2017-09-05 14:55:20 +08:00
ruby-prof
ruby-progressbar
ruby-readability
rubyzip
sanitize
sassc-embedded
selenium-devtools
selenium-webdriver (~> 4.14)
shoulda-matchers
2014-02-24 07:00:25 +08:00
sidekiq
simplecov
sprockets (~> 3.7.3)
2017-08-23 10:58:25 +08:00
sprockets-rails
sqlite3
sshkey
stackprof
syntax_tree
syntax_tree-disable_ternary
test-prof
thor
trilogy
tzinfo-data
2013-02-06 03:16:51 +08:00
uglifier
unf
unicorn
web-push
2017-04-15 12:11:02 +08:00
webmock
yaml-lint
DEV: Chat service object initial implementation (#19814) This is a combined work of Martin Brennan, Loïc Guitaut, and Joffrey Jaffeux. --- This commit implements a base service object when working in chat. The documentation is available at https://discourse.github.io/discourse/chat/backend/Chat/Service.html Generating documentation has been made as part of this commit with a bigger goal in mind of generally making it easier to dive into the chat project. Working with services generally involves 3 parts: - The service object itself, which is a series of steps where few of them are specialized (model, transaction, policy) ```ruby class UpdateAge include Chat::Service::Base model :user, :fetch_user policy :can_see_user contract step :update_age class Contract attribute :age, :integer end def fetch_user(user_id:, **) User.find_by(id: user_id) end def can_see_user(guardian:, **) guardian.can_see_user(user) end def update_age(age:, **) user.update!(age: age) end end ``` - The `with_service` controller helper, handling success and failure of the service within a service and making easy to return proper response to it from the controller ```ruby def update with_service(UpdateAge) do on_success { render_serialized(result.user, BasicUserSerializer, root: "user") } end end ``` - Rspec matchers and steps inspector, improving the dev experience while creating specs for a service ```ruby RSpec.describe(UpdateAge) do subject(:result) do described_class.call(guardian: guardian, user_id: user.id, age: age) end fab!(:user) { Fabricate(:user) } fab!(:current_user) { Fabricate(:admin) } let(:guardian) { Guardian.new(current_user) } let(:age) { 1 } it { expect(user.reload.age).to eq(age) } end ``` Note in case of unexpected failure in your spec, the output will give all the relevant information: ``` 1) UpdateAge when no channel_id is given is expected to fail to find a model named 'user' Failure/Error: it { is_expected.to fail_to_find_a_model(:user) } Expected model 'foo' (key: 'result.model.user') was not found in the result object. [1/4] [model] 'user' ❌ [2/4] [policy] 'can_see_user' [3/4] [contract] 'default' [4/4] [step] 'update_age' /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/update_age.rb:32:in `fetch_user': missing keyword: :user_id (ArgumentError) from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:202:in `instance_exec' from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:202:in `call' from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:219:in `call' from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:417:in `block in run!' from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:417:in `each' from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:417:in `run!' from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:411:in `run' from <internal:kernel>:90:in `tap' from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/app/services/base.rb:302:in `call' from /Users/joffreyjaffeux/Code/pr-discourse/plugins/chat/spec/services/update_age_spec.rb:15:in `block (3 levels) in <main>' ```
2023-02-13 20:09:57 +08:00
yard
zeitwerk
BUNDLED WITH
2.5.18