Commit Graph

613 Commits

Author SHA1 Message Date
Gerhard Schlager 24e5be3f0c FIX: Relative links in translations should work with subfolder 2018-11-08 23:31:05 +00:00
Guo Xiang Tan 14ff47f6f1 Fix typo. 2018-11-08 16:42:12 +08:00
Guo Xiang Tan 7290145641 PERF: Speed up `migrate_to_s3` rake task.
* Prioritizes non-image uploads
* Does one remap per upload instead of 3 remaps previously
* Every 100 uploads migrated, do 2 remaps which fixes broken
  URLs
* Exclude email_logs table from remap
2018-11-08 16:39:56 +08:00
Sam 42572ff138 Revert font awesome 5 changes
We are still pushing ahead on this 100% just need a bit longer to prepare
all plugins
2018-11-08 16:12:18 +11:00
Guo Xiang Tan 0232a3b5e5 PERF: Exclude tables when remapping in `migrate_to_s3` rake task. 2018-11-08 12:37:36 +08:00
Penar Musaraj 005e1ecb9b
FEATURE: Update Font Awesome to v5.4.1 and SVGs (#6557)
* First take on subsetting svg icons

* FontAwesome 5 svg subset WIP

* Include icons from plugins/badges into svg sprite subset

* add svg icon support to themes

* Add spec for SvgSprite

* Misc. SVG icon fixes

* Use FA5 svgs in local-dates plugin

* CSS adjustments, fix SVG icons in group flair

* Use SVG icons in poll plugin

* Add SVG icons to /wizard
2018-11-07 13:05:43 -05:00
Bianca Nenciu e1e392f15b DEV: Use DiscourseIpInfo for all IP queries. (#6482)
* DEV: Use DiscourseIpInfo for all IP queries.

* UX: Use latitude and longitude for more precision.
2018-10-30 22:08:57 +00:00
David Taylor bafe3cd99a Revert "DEV: Lint official plugins in CI (#6519)"
This reverts commit 093cab2db0.
2018-10-22 22:30:33 +01:00
David Taylor 093cab2db0
DEV: Lint official plugins in CI (#6519) 2018-10-22 21:28:38 +01:00
Gerhard Schlager 341836eb42 Fix the rake task and importer instead 2018-10-17 16:48:09 +02:00
Matt Palmer b1d7582abe Run specs on discourse-prometheus-alert-receiver
Sam wants to watch the world burn.
2018-10-17 15:32:57 +11:00
Vinoth Kannan 4c2331260e run specs on discourse-calendar plugin 2018-10-16 01:26:24 +05:30
Arpit Jalan d76658ff8c FEATURE: new rake task to anonymize all users 2018-10-15 16:19:25 +05:30
Guo Xiang Tan 84d4c81a26 FEATURE: Support backup uploads/downloads directly to/from S3.
This reverts commit 3c59106bac.
2018-10-15 09:43:31 +08:00
Joshua Rosenfeld fd58ca1903
remove manually mapping of discourse-logster-rate-limit-checker, repo renamed to match 2018-10-12 15:56:23 -04:00
Joshua Rosenfeld 43a7b08a48
don't run specs on prometheus-alert-receiver for now either 2018-10-12 12:20:49 -04:00
Joshua Rosenfeld ca71815bb2
don't run specs on calendar for now 2018-10-12 12:12:21 -04:00
Joshua Rosenfeld 9d4916012a
manually map discourse-perspective too 2018-10-12 10:32:07 -04:00
Joshua Rosenfeld 2cb176f1ed
manually map discourse-logster-rate-limit-checker
also remove obsolete plugins
2018-10-12 10:27:24 -04:00
Chris Butler ddbed82bca Exit with an error if there are errors with settings import (#6475)
If the site_settings import has any errors or settings that are not found, this
will cause the task to exit with a non-zero exit code.

This is useful when using this task as part of automated configuration deployment,
where you may not want to continue with the process if a setting fails to
import.
2018-10-11 15:57:57 +08:00
Guo Xiang Tan 3c59106bac Revert "FEATURE: Support backup uploads/downloads directly to/from S3."
This reverts commit c29a4dddc1.

We're doing a beta bump soon so un-revert this after that is done.
2018-10-11 11:08:23 +08:00
Gerhard Schlager c29a4dddc1 FEATURE: Support backup uploads/downloads directly to/from S3. 2018-10-11 10:38:43 +08:00
Guo Xiang Tan 918633aa12 FIX: `upload:migrate_to_s3` rake task not remapping properly. 2018-10-10 15:09:21 +08:00
Sam 9b01e2b855 FIX: maxmind download task does not need environment 2018-10-10 11:16:28 +11:00
Bianca Nenciu 1d26a473e7 FEATURE: Show "Recently used devices" in user preferences (#6335)
* FEATURE: Added MaxMindDb to resolve IP information.

* FEATURE: Added browser detection based on user agent.

* FEATURE: Added recently used devices in user preferences.

* DEV: Added acceptance test for recently used devices.

* UX: Do not show 'Show more' button if there aren't more tokens.

* DEV: Fix unit tests.

* DEV: Make changes after code review.

* Add more detailed unit tests.

* Improve logging messages.

* Minor coding style fixes.

* DEV: Use DropdownSelectBoxComponent and run Prettier.

* DEV: Fix unit tests.
2018-10-09 22:21:41 +08:00
Guo Xiang Tan 77c293f82d Prefer `Process.clock_gettime` over `Time.now`. 2018-10-05 10:25:52 +08:00
Penar Musaraj dc8a16b43b
Use Yarn to manage dependencies, cleanup unused bootstrap libs (#6436) 2018-10-03 10:15:43 -04:00
Guo Xiang Tan 13dde44c72 FIX: Limit concurrent `assets:precompile` to number of available cores. 2018-10-03 16:46:21 +08:00
David Taylor b8c0e77908 DEV: apply plugin migrations when testing in Travis and Docker
In `RAILS_ENV=test`, plugins are not loaded by default. Therefore we need to explicitly specify `LOAD_PLUGINS=1` when we want to apply plugin migrations.
2018-09-13 12:39:54 +01:00
David Taylor 9461c99210 DEV: Add travis_fold to termination stage 2018-09-12 18:59:48 +01:00
David Taylor 26bd67a865 DEV: Add travis_fold statements to docker_test 2018-09-12 17:52:58 +01:00
Guo Xiang Tan 24c55bd613 Add dry run option to `UploadRecovery`. 2018-09-12 21:53:01 +08:00
Guo Xiang Tan c053f8ccf6 New rake task `uploads:recover`. 2018-09-12 01:52:30 -07:00
Guo Xiang Tan 6d01e0aa04 DEV: Print the error class in `uploads:list_posts_with_broken_images`. 2018-09-12 01:06:51 -07:00
Blake Erickson 1d41f3c3fb
Merge pull request #6380 from discourse/rake-destroy-sub-category
FIX: Allow `rake destroy:topics` to delete topics in sub-categories
2018-09-10 10:26:04 -06:00
Guo Xiang Tan 94ff428571 Pass the right value to rake task. 2018-09-10 20:07:28 +08:00
David Taylor 84fc7abb73 FIX: Allow `rake destroy:topics` to delete topics in sub-categories 2018-09-10 12:52:14 +01:00
Guo Xiang Tan 4a966c639d DEV: Update `uploads:list_posts_with_broken_images` to recover from tombstone. 2018-09-10 17:01:41 +08:00
Guo Xiang Tan 68572b8afc Print error messages on why upload fails to save. 2018-09-10 16:02:13 +08:00
Guo Xiang Tan 0aca80e92a Fixes to `uploads:list_posts_with_broken_images`. 2018-09-10 15:16:29 +08:00
Guo Xiang Tan 8496537590 Add `RECOVER_FROM_S3` to `uploads:list_posts_with_broken_images` rake task. 2018-09-10 15:14:30 +08:00
Gerhard Schlager f13c34aaed Adds a check for invalid message formats to rake i18n:check 2018-09-06 17:27:17 +02:00
Gerhard Schlager 3c09026fe4 Minor improvements to rake i18n:check 2018-09-06 16:54:30 +02:00
Guo Xiang Tan 72834f19ff DEV: Add rake tasks to list posts with broken images. 2018-09-05 16:54:15 +08:00
Gerhard Schlager f4956f79a5 Make Rubocop happy 2018-09-05 01:04:43 +02:00
Gerhard Schlager 6658a6601c Remove unused rake task 2018-09-05 00:47:39 +02:00
Gerhard Schlager 0d8c72d8c4 DEV: Add rake task to check locale files for errors 2018-09-05 00:47:39 +02:00
Guo Xiang Tan 8dc1463ab3 Enable `Lint/ShadowingOuterLocalVariable` for Rubocop. 2018-09-04 10:16:42 +08:00
Guo Xiang Tan 492b6dc306 DEV: `yarn exec` doesn't do what I think it does. 2018-08-30 15:55:36 +08:00
Guo Xiang Tan 720726ea68 Use `yarn exec` when running eslint and prettier. 2018-08-29 11:03:42 +08:00
Gerhard Schlager 6588a45880 Make Rubocop happy 2018-08-23 15:09:20 +02:00
Gerhard Schlager 409ee66839 Add optional "ignore_case" parameter to posts:remap rake task 2018-08-23 14:49:17 +02:00
Guo Xiang Tan 0f07494b12
Merge pull request #6259 from pfaffman/patch-2
FIX: disable_2fa fix method selection
2018-08-21 17:29:42 +08:00
Gerhard Schlager 802ad0dc61 Add rake task for updating static pages 2018-08-16 19:51:20 +02:00
Joffrey JAFFEUX 3fbf7b164d
FEATURE: emoji 11.0 "recently added" update (#6275)
Adds support for emojis in the http://www.unicode.org/emoji/charts-11.0/emoji-released.html list
2018-08-16 11:59:45 +02:00
Arpit Jalan 8e3b685aa4 make rubocop happy 2018-08-16 14:03:46 +05:30
Arpit Jalan df55e5bac4 optimize categories:create_definition task 2018-08-16 14:00:07 +05:30
Arpit Jalan 78e14abb32 new rake task to bulk tag all topics in a category 2018-08-16 13:56:57 +05:30
Arpit Jalan 777055f960 new rake task to create category definition 2018-08-16 13:50:52 +05:30
Guo Xiang Tan 33f4aa2835 Fix `migrate_to_s3` rake task, `File#close!` is not a valid method. 2018-08-16 13:26:58 +08:00
Jay Pfaffman 71a1d75d7e
FIX: disable_2fa fix method selection
The previous code resulted in

    NameError: undefined local variable or method `totp' for main:Object

I now understand what @tgxworld meant about we should only disable totp when I submitted this before.

This is the kind of Ruby stuff that I still don't understand well,(perhaps this isn't the most Ruby way to do this?) but this does what I think is supposed to happen. And it worked just now.
2018-08-10 14:45:40 -07:00
Sam 1fc2597626 better error handling for upload extension fixer 2018-08-10 11:28:22 +10:00
Guo Xiang Tan 0879610ffd Add missing require in `uploads:fix_incorrect_extensions`. 2018-08-08 15:39:37 +08:00
Guo Xiang Tan 17047806b9 Add a rake task to fix uploads with wrong extension. 2018-08-08 13:15:17 +08:00
Régis Hanol 14bbd5d167 FIX: use the right URL when downloading the file from S3 2018-08-02 10:04:41 +02:00
Régis Hanol 0f1137dafa FIX: 'migrate_from_s3' rake task wasn't handling short urls 2018-08-01 22:58:46 +02:00
Neil Lalonde b829452c75
Merge pull request #6209 from discourse/mini_scheduler
REFACTOR: extract scheduler to the mini_scheduler gem
2018-08-01 10:28:24 -04:00
Neil Lalonde 4ad7ce70ce REFACTOR: extract scheduler to the mini_scheduler gem 2018-07-31 17:12:55 -04:00
Sam f0c203a5cf clean up previous commit 2018-07-31 14:50:02 +10:00
Jay Pfaffman b55d9e63a0 Rake mail test debugging (#6171)
* FEATURE: rake emails:test add debugging

* Oops! Remove safety code

* more language tweaks
2018-07-31 14:45:59 +10:00
Gerhard Schlager e42038eae2 Rake task called method with wrong arguments 2018-07-24 00:10:09 +02:00
Jay Pfaffman 0ed2834c2d FEATURE: Add users:disable_2factor rake task
https://meta.discourse.org/t/admin-locked-out-of-2fa/92156/2?u=pfaffman
2018-07-16 09:56:55 +08:00
Arpit Jalan 536cef86f4 PERF: do not carry post ids in memory when rebaking all posts 2018-07-11 14:34:33 +05:30
Guo Xiang Tan 59a2767de8 Ensure that we restore the site setting in posts:rebake rake task. 2018-07-06 16:22:54 +08:00
Neil Lalonde 92000bc8a0 FEATURE: add a rake task to recalculate user stats post_count and topic_count 2018-07-05 10:38:46 -04:00
Sam d1b21aa73b add timings to asset precompile 2018-07-04 09:42:38 +10:00
Gerhard Schlager 23acddc9fa Add descriptions for rake tasks 2018-06-27 20:24:46 +02:00
Joffrey JAFFEUX 2f7960bd2a
DEV: updates prettier and displays linters/prettifiers version in CI 2018-06-20 18:34:49 +02:00
Joffrey JAFFEUX 8126b603e4
fix prettier 2018-06-20 18:26:43 +02:00
Joffrey JAFFEUX c5c1b45d19
higher loglevel for prettier 2018-06-20 16:51:48 +02:00
Sam cb824a6b33 DEV: remove all calls to SqlBuilder use DB.build instead
This is part of the migration to mini_sql, SqlBuilder.new is being
deprecated and replaced with DB.build
2018-06-20 17:53:49 +10:00
Sam 5f64fd0a21 DEV: remove exec_sql and replace with mini_sql
Introduce new patterns for direct sql that are safe and fast.

MiniSql is not prone to memory bloat that can happen with direct PG usage.
It also has an extremely fast materializer and very a convenient API

- DB.exec(sql, *params) => runs sql returns row count
- DB.query(sql, *params) => runs sql returns usable objects (not a hash)
- DB.query_hash(sql, *params) => runs sql returns an array of hashes
- DB.query_single(sql, *params) => runs sql and returns a flat one dimensional array
- DB.build(sql) => returns a sql builder

See more at: https://github.com/discourse/mini_sql
2018-06-19 16:13:36 +10:00
Joffrey JAFFEUX 913d97e780
fix prettier 2018-06-18 20:10:48 +02:00
Joffrey JAFFEUX 6f2c5ea1f2
increases loglevel to debug CI only failure 2018-06-18 19:25:54 +02:00
Joffrey JAFFEUX 03a7d532cf
DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
Guo Xiang Tan b91a3c12a5 Revert "Smoke test should wait up to 5 minutes before it fails"
This reverts commit 34d4712133.
2018-06-11 08:47:57 +08:00
Joffrey JAFFEUX d96c775833
enforces prettier 2018-06-08 17:38:29 +02:00
Gerhard Schlager 4ba910ac54 Update username only after successful user anonymization 2018-06-08 15:50:07 +02:00
Joffrey JAFFEUX 22c186a792
disables prettier enforcing for now 2018-06-08 15:44:00 +02:00
Joffrey JAFFEUX eedf7ffc4f
force install with sudo 2018-06-08 13:25:33 +02:00
Joffrey JAFFEUX bc7f16a406
forces install of prettier using npm 2018-06-08 13:22:36 +02:00
Joffrey JAFFEUX 3869a9d027
forces global install of prettier 2018-06-08 12:40:05 +02:00
Joffrey JAFFEUX ddade9c145
better log of yarn setup 2018-06-08 12:12:17 +02:00
Joffrey JAFFEUX bb920e9bb1
DEV: makes sure yarn is ran before docker:test 2018-06-08 12:04:53 +02:00
Joffrey JAFFEUX 174d392e5a
DEV: adds prettier (#5956)
Run `prettier --write "app/assets/stylesheets/**/*.scss" "plugins/**/*.scss"` after making sure you installed it with `yarn`

It's recommended to configure your editor to run prettier on file save.
2018-06-08 11:49:31 +02:00
Sam 322b66bcee attempt to shuffle order of operation for test 2018-06-07 18:16:45 +10:00
Guo Xiang Tan 3533bdb83f Remove line that is no longer required. 2018-06-07 15:56:16 +08:00
Guo Xiang Tan 1d5c176ea5 DEV: `docker:test` rake task should install plugins first before migrating. 2018-06-07 15:20:06 +08:00
Sam 89ad2b5900 DEV: Rails 5.2 upgrade and global gem upgrade
This updates tests to use latest rails 5 practice
and updates ALL dependencies that could be updated

Performance testing shows that performance has not regressed
if anything it is marginally faster now.
2018-06-07 14:21:33 +10:00
Guo Xiang Tan cb9596e196 Remove invalid `hosted-site` plugin. 2018-06-07 08:49:19 +08:00