diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ba13bf1f29c..536a268e55d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1 +1 @@ - + diff --git a/app/assets/javascripts/discourse/app/components/composer-editor.js b/app/assets/javascripts/discourse/app/components/composer-editor.js index c1be68eda59..124cf210f97 100644 --- a/app/assets/javascripts/discourse/app/components/composer-editor.js +++ b/app/assets/javascripts/discourse/app/components/composer-editor.js @@ -288,7 +288,7 @@ export default Component.extend({ // when adding two separate files with the same filename search for matching // placeholder already existing in the editor ie [Uploading: test.png...] - // and add order nr to the next one: [Uplodading: test.png(1)...] + // and add order nr to the next one: [Uploading: test.png(1)...] const escapedFilename = filename.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); const regexString = `\\[${I18n.t("uploading_filename", { filename: escapedFilename + "(?:\\()?([0-9])?(?:\\))?", diff --git a/app/assets/javascripts/discourse/app/controllers/create-account.js b/app/assets/javascripts/discourse/app/controllers/create-account.js index 6dc0fa372eb..57b41f44493 100644 --- a/app/assets/javascripts/discourse/app/controllers/create-account.js +++ b/app/assets/javascripts/discourse/app/controllers/create-account.js @@ -268,7 +268,7 @@ export default Controller.extend( (isEmpty(this.accountUsername) || this.get("authOptions.email")) ) { // If email is valid and username has not been entered yet, - // or email and username were filled automatically by 3rd parth auth, + // or email and username were filled automatically by 3rd party auth, // then look for a registered username that matches the email. discourseDebounce(this, this.fetchExistingUsername, 500); } diff --git a/app/assets/javascripts/discourse/app/controllers/second-factor-add-security-key.js b/app/assets/javascripts/discourse/app/controllers/second-factor-add-security-key.js index d6b48db673c..48839d0bbb9 100644 --- a/app/assets/javascripts/discourse/app/controllers/second-factor-add-security-key.js +++ b/app/assets/javascripts/discourse/app/controllers/second-factor-add-security-key.js @@ -87,7 +87,7 @@ export default Controller.extend(ModalFunctionality, { attestation: "none", authenticatorSelection: { // see https://chromium.googlesource.com/chromium/src/+/master/content/browser/webauth/uv_preferred.md for why - // default value of preferred is not necesarrily what we want, it limits webauthn to only devices that support + // default value of preferred is not necessarily what we want, it limits webauthn to only devices that support // user verification, which usually requires entering a PIN userVerification: "discouraged", }, diff --git a/app/assets/javascripts/discourse/app/controllers/topic.js b/app/assets/javascripts/discourse/app/controllers/topic.js index fcadfa4fefb..6699af2c537 100644 --- a/app/assets/javascripts/discourse/app/controllers/topic.js +++ b/app/assets/javascripts/discourse/app/controllers/topic.js @@ -1606,7 +1606,7 @@ export default Controller.extend(bufferedProperty("model"), { } // scroll to bottom is very specific to new posts from discobot - // hence the -2 check (dicobot id). We can shift all this code + // hence the -2 check (discobot id). We can shift all this code // to discobot plugin longer term if ( topic.get("isPrivateMessage") && diff --git a/app/assets/javascripts/discourse/app/helpers/user-avatar.js b/app/assets/javascripts/discourse/app/helpers/user-avatar.js index 20af1a2c020..e0893b1089c 100644 --- a/app/assets/javascripts/discourse/app/helpers/user-avatar.js +++ b/app/assets/javascripts/discourse/app/helpers/user-avatar.js @@ -59,7 +59,7 @@ function renderAvatar(user, options) { const description = get(user, "description"); // if a description has been provided if (description && description.length > 0) { - // preprend the username before the description + // prepend the username before the description title = I18n.t("user.avatar.name_and_description", { name: displayName, description, diff --git a/app/assets/javascripts/discourse/app/initializers/badging.js b/app/assets/javascripts/discourse/app/initializers/badging.js index f5a73b64366..73c90b0aa19 100644 --- a/app/assets/javascripts/discourse/app/initializers/badging.js +++ b/app/assets/javascripts/discourse/app/initializers/badging.js @@ -1,4 +1,4 @@ -// Updates the PWA badging if avaliable +// Updates the PWA badging if available export default { name: "badging", after: "message-bus", diff --git a/app/assets/javascripts/discourse/app/lib/ajax.js b/app/assets/javascripts/discourse/app/lib/ajax.js index 36330cabf39..b7be9db2ec9 100644 --- a/app/assets/javascripts/discourse/app/lib/ajax.js +++ b/app/assets/javascripts/discourse/app/lib/ajax.js @@ -128,7 +128,7 @@ export function ajax() { Session.current().set("csrfToken", null); } - // If it's a parsererror, don't reject + // If it's a parser error, don't reject if (xhr.status === 200) { return args.success(xhr); } diff --git a/app/assets/javascripts/discourse/app/lib/autocomplete.js b/app/assets/javascripts/discourse/app/lib/autocomplete.js index d95cc46e527..99b77405a97 100644 --- a/app/assets/javascripts/discourse/app/lib/autocomplete.js +++ b/app/assets/javascripts/discourse/app/lib/autocomplete.js @@ -99,7 +99,7 @@ export default function (options) { let div = null; let prevTerm = null; - // By default, when the autcomplete popup is rendered it has the + // By default, when the autocomplete popup is rendered it has the // first suggestion 'selected', and pressing enter key inserts // the first suggestion into the input box. // If you want to stop that behavior, i.e. have the popup renders diff --git a/app/assets/javascripts/discourse/app/lib/eyeline.js b/app/assets/javascripts/discourse/app/lib/eyeline.js index f7f318865d8..f2ca4a8c375 100644 --- a/app/assets/javascripts/discourse/app/lib/eyeline.js +++ b/app/assets/javascripts/discourse/app/lib/eyeline.js @@ -67,7 +67,7 @@ Eyeline.prototype.update = function () { } // It's seen if... - // ...the element is vertically within the top and botom + // ...the element is vertically within the top and bottom if (elemTop <= docViewBottom && elemTop >= docViewTop) { markSeen = true; } diff --git a/app/assets/javascripts/discourse/app/lib/hash.js b/app/assets/javascripts/discourse/app/lib/hash.js index 71396274b9e..a4fd849a880 100644 --- a/app/assets/javascripts/discourse/app/lib/hash.js +++ b/app/assets/javascripts/discourse/app/lib/hash.js @@ -1,6 +1,6 @@ /*eslint no-bitwise:0 */ -// Note: before changing this be aware the same algo is used server side for avatars. +// Note: before changing this be aware the same algorithm is used server side for avatars. export function hashString(str) { let hash = 0; for (let i = 0; i < str.length; i++) { diff --git a/app/assets/javascripts/discourse/app/lib/page-tracker.js b/app/assets/javascripts/discourse/app/lib/page-tracker.js index be741139785..76a937f195a 100644 --- a/app/assets/javascripts/discourse/app/lib/page-tracker.js +++ b/app/assets/javascripts/discourse/app/lib/page-tracker.js @@ -23,7 +23,7 @@ export function startPageTracking(router, appEvents, documentTitle) { return; } router.on("routeDidChange", (transition) => { - // we ocassionally prevent tracking of replaced pages when only query params changed + // we occasionally prevent tracking of replaced pages when only query params changed // eg: google analytics const replacedOnlyQueryParams = transition.urlMethod === "replace" && transition.queryParamsOnly; diff --git a/app/assets/javascripts/discourse/app/lib/url.js b/app/assets/javascripts/discourse/app/lib/url.js index ec875d40331..e107bfef6f0 100644 --- a/app/assets/javascripts/discourse/app/lib/url.js +++ b/app/assets/javascripts/discourse/app/lib/url.js @@ -33,7 +33,7 @@ const SERVER_SIDE_ONLY = [ /^\/styleguide/, ]; -// The amount of height (in pixles) that we factor in when jumpEnd is called so +// The amount of height (in pixels) that we factor in when jumpEnd is called so // that we show a little bit of the post text even on mobile devices instead of // scrolling to "suggested topics". const JUMP_END_BUFFER = 250; diff --git a/app/assets/javascripts/discourse/app/lib/user-search.js b/app/assets/javascripts/discourse/app/lib/user-search.js index 980d92a417a..1c90808b21b 100644 --- a/app/assets/javascripts/discourse/app/lib/user-search.js +++ b/app/assets/javascripts/discourse/app/lib/user-search.js @@ -157,7 +157,7 @@ function organizeResults(r, options) { return results; } -// all punctuations except for -, _ and . which are allowed in usernames +// all punctuation except for -, _ and . which are allowed in usernames // note: these are valid in names, but will end up tripping search anyway so just skip // this means searching for `sam saffron` is OK but if my name is `sam$ saffron` autocomplete // will not find me, which is a reasonable compromise diff --git a/app/assets/javascripts/discourse/app/lib/utilities.js b/app/assets/javascripts/discourse/app/lib/utilities.js index 5cb6976d5d0..9210d0607e0 100644 --- a/app/assets/javascripts/discourse/app/lib/utilities.js +++ b/app/assets/javascripts/discourse/app/lib/utilities.js @@ -452,9 +452,9 @@ const CODE_BLOCKS_REGEX = /^( |\t).*|`[^`]+`|^```[^]*?^```|\[code\][^]*?\[\/c // | | | | // | | | code blocks between [code] // | | | -// | | +--- code blocks between three backquote +// | | +--- code blocks between three backticks // | | -// | +----- inline code between backquotes +// | +----- inline code between backticks // | // +------- paragraphs starting with 4 spaces or tab diff --git a/app/assets/javascripts/discourse/app/lib/webauthn.js b/app/assets/javascripts/discourse/app/lib/webauthn.js index e33ffc20019..113ef3c06bb 100644 --- a/app/assets/javascripts/discourse/app/lib/webauthn.js +++ b/app/assets/javascripts/discourse/app/lib/webauthn.js @@ -42,7 +42,7 @@ export function getWebauthnCredential( timeout: 60000, // see https://chromium.googlesource.com/chromium/src/+/master/content/browser/webauth/uv_preferred.md for why - // default value of preferred is not necesarrily what we want, it limits webauthn to only devices that support + // default value of preferred is not necessarily what we want, it limits webauthn to only devices that support // user verification, which usually requires entering a PIN userVerification: "discouraged", }, diff --git a/app/assets/javascripts/discourse/app/models/category.js b/app/assets/javascripts/discourse/app/models/category.js index 4de28e476d4..af65076dba4 100644 --- a/app/assets/javascripts/discourse/app/models/category.js +++ b/app/assets/javascripts/discourse/app/models/category.js @@ -426,7 +426,7 @@ Category.reopenClass({ findBySlugPathWithID(slugPathWithID) { let parts = slugPathWithID.split("/").filter(Boolean); - // slugs found by star/glob pathing in emeber do not automatically url decode - ensure that these are decoded + // slugs found by star/glob pathing in ember do not automatically url decode - ensure that these are decoded if (this.slugEncoded()) { parts = parts.map((urlPart) => decodeURI(urlPart)); } diff --git a/app/assets/javascripts/discourse/app/widgets/post-cooked.js b/app/assets/javascripts/discourse/app/widgets/post-cooked.js index bbc669ac224..1526ec08743 100644 --- a/app/assets/javascripts/discourse/app/widgets/post-cooked.js +++ b/app/assets/javascripts/discourse/app/widgets/post-cooked.js @@ -155,7 +155,7 @@ export default class PostCooked { valid = href.split("?")[0] === lc.url; } - // don't display badge counts on category badge & oneboxes (unless when explicitely stated) + // don't display badge counts on category badge & oneboxes (unless when explicitly stated) if (valid && isValidLink($link)) { const title = I18n.t("topic_map.clicks", { count: lc.clicks }); $link.append( diff --git a/app/assets/javascripts/discourse/lib/translation-plugin.js b/app/assets/javascripts/discourse/lib/translation-plugin.js index 5b9d06693e1..cc448934501 100644 --- a/app/assets/javascripts/discourse/lib/translation-plugin.js +++ b/app/assets/javascripts/discourse/lib/translation-plugin.js @@ -18,7 +18,7 @@ class TranslationPlugin extends Plugin { build() { // We could get fancy eventually and do this based on whether the yaml - // or vendor files change but in practice we should't need exact up to date + // or vendor files change but in practice we shouldn't need exact up to date // translations in admin. if (built) { return; diff --git a/app/assets/javascripts/discourse/tests/acceptance/admin-badges-show-test.js b/app/assets/javascripts/discourse/tests/acceptance/admin-badges-show-test.js index 3da3a7a4806..8670f9aeea0 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/admin-badges-show-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/admin-badges-show-test.js @@ -95,7 +95,7 @@ acceptance("Admin - Badges - Show", function (needs) { await click("input#badge-icon"); assert.ok(exists(".icon-picker"), "icon picker is becomes visible"); - assert.ok(!exists(".image-uploader"), "image uploader bcomes hidden"); + assert.ok(!exists(".image-uploader"), "image uploader becomes hidden"); assert.equal(query(".icon-picker").textContent.trim(), "fa-rocket"); }); }); diff --git a/app/assets/javascripts/discourse/tests/acceptance/composer-test.js b/app/assets/javascripts/discourse/tests/acceptance/composer-test.js index f60b38f3d67..45035e01fe8 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/composer-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/composer-test.js @@ -788,7 +788,7 @@ acceptance("Composer", function (needs) { "![test|690x313, 50%](upload://test.png)", // 3 No dimensions, should not work "![test](upload://test.jpeg)", - // 4 Wrapped in backquetes should not work + // 4 Wrapped in backticks should not work "`![test|690x313](upload://test.png)`", // 5 html image - should not work "", diff --git a/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js b/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js index f9a6ef32423..93a463a8d7a 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/group-index-test.js @@ -27,7 +27,7 @@ acceptance("Group Members - Anonymous", function () { assert.equal( queryAll(".group-username-filter").attr("placeholder"), I18n.t("groups.members.filter_placeholder"), - "it should display the right filter placehodler" + "it should display the right filter placeholder" ); }); }); @@ -65,7 +65,7 @@ acceptance("Group Members", function (needs) { assert.equal( queryAll(".group-username-filter").attr("placeholder"), I18n.t("groups.members.filter_placeholder_admin"), - "it should display the right filter placehodler" + "it should display the right filter placeholder" ); }); diff --git a/app/assets/javascripts/discourse/tests/fixtures/discovery-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/discovery-fixtures.js index 1a15885b8d0..5267a5b2bbc 100644 --- a/app/assets/javascripts/discourse/tests/fixtures/discovery-fixtures.js +++ b/app/assets/javascripts/discourse/tests/fixtures/discovery-fixtures.js @@ -129,7 +129,7 @@ export default { { id: 6680, username: "cdman", avatar_template: "/images/avatar.png" }, { id: 500, username: "aeid", avatar_template: "/images/avatar.png" }, { id: 8, username: "geek", avatar_template: "/images/avatar.png" }, - { id: 606, username: "Cafeine", avatar_template: "/images/avatar.png" } + { id: 606, username: "Caffeine", avatar_template: "/images/avatar.png" } ], topic_list: { can_create_topic: false, @@ -1272,7 +1272,7 @@ export default { { id: 6680, username: "cdman", avatar_template: "/images/avatar.png" }, { id: 500, username: "aeid", avatar_template: "/images/avatar.png" }, { id: 8, username: "geek", avatar_template: "/images/avatar.png" }, - { id: 606, username: "Cafeine", avatar_template: "/images/avatar.png" } + { id: 606, username: "Caffeine", avatar_template: "/images/avatar.png" } ], topic_list: { can_create_topic: false, @@ -3003,7 +3003,7 @@ export default { { id: 3681, username: "Ajarn", avatar_template: "/images/avatar.png" }, { id: 1621, username: "bnb", avatar_template: "/images/avatar.png" }, { id: 6266, username: "bragi", avatar_template: "/images/avatar.png" }, - { id: 5335, username: "masda70", avatar_template: "/images/avatar.png" }, + { id: 5335, username: "mazda70", avatar_template: "/images/avatar.png" }, { id: 6314, username: "rafaelfranca", @@ -4183,7 +4183,7 @@ export default { { id: 3681, username: "Ajarn", avatar_template: "/images/avatar.png" }, { id: 1621, username: "bnb", avatar_template: "/images/avatar.png" }, { id: 6266, username: "bragi", avatar_template: "/images/avatar.png" }, - { id: 5335, username: "masda70", avatar_template: "/images/avatar.png" }, + { id: 5335, username: "mazda70", avatar_template: "/images/avatar.png" }, { id: 6314, username: "rafaelfranca", @@ -5255,7 +5255,7 @@ export default { { id: 3681, username: "Ajarn", avatar_template: "/images/avatar.png" }, { id: 1621, username: "bnb", avatar_template: "/images/avatar.png" }, { id: 6266, username: "bragi", avatar_template: "/images/avatar.png" }, - { id: 5335, username: "masda70", avatar_template: "/images/avatar.png" }, + { id: 5335, username: "mazda70", avatar_template: "/images/avatar.png" }, { id: 6314, username: "rafaelfranca", diff --git a/app/assets/javascripts/discourse/tests/fixtures/search-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/search-fixtures.js index 9c6069291a1..0ece7ac6305 100644 --- a/app/assets/javascripts/discourse/tests/fixtures/search-fixtures.js +++ b/app/assets/javascripts/discourse/tests/fixtures/search-fixtures.js @@ -159,7 +159,7 @@ export default { uploaded_avatar_id: 3281, created_at: "2014-04-12T22:22:07.930Z", cooked: - '
So you want to set up Discourse on Ubuntu to hack on and develop with?
\n\nWe\'ll assume that you don\'t have Ruby/Rails/Postgre/Redis installed on your Ubuntu system. Let\'s begin!
\n\nAlthough this guide assumes that you are using Ubuntu, but the set-up instructions will work fine for any Debian based ditribution.
\n\n(If you want to install Discourse for production use, see our install guide)
\n\nRun this script in terminal, to setup Rails development environment:
\n\nbash <(wget -qO- https://raw.githubusercontent.com/techAPJ/install-rails/master/linux)
\n\n \n\nThis will install following new packages on your system:
\n\nInstall Phantomjs:
\n\nFor 32 bit macine:
\n\ncd /usr/local/share\nsudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-i686.tar.bz2\nsudo tar xvf phantomjs-1.9.8-linux-i686.tar.bz2\nsudo rm phantomjs-1.9.8-linux-i686.tar.bz2\nsudo ln -s /usr/local/share/phantomjs-1.9.8-linux-i686/bin/phantomjs /usr/local/bin/phantomjs\ncd
\n\nFor 64 bit machine:
\n\ncd /usr/local/share\nsudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo tar xvf phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo rm phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo ln -s /usr/local/share/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs\ncd
\n\n \n\nIn case you have any of this package pre-installed and don\'t want to run entire script, see the script and pick the packages you don\'t have currently installed. The script is fine-tuned for Discourse, and includes all the packages required for Discourse installation.
\n\nNow that we have installed Discourse dependencies, let\'s move on to install Discourse itself.
\n\nClone the Discourse repository in ~/discourse
folder:
git clone https://github.com/discourse/discourse.git ~/discourse
\n\n \n\nOpen psql prompt as postgre user
\n\nsudo -u postgres psql postgres
\n\n \n\nCreate role with the same name as your ubuntu system username with discourse as password:
\n\nCREATE ROLE discourse WITH LOGIN ENCRYPTED PASSWORD \'discourse\' CREATEDB SUPERUSER;
\n\nIn the above command, I named the role as discourse, this means that my ubuntu system username is discourse. (It is necessary for role name to be same as system username, otherwise migrations will not run)
\n\nCheck that you have successfully created discourse role:
\n\n\\du
\n\n \n\nCreate discourse_development and discourse_test database:
\n\nCREATE DATABASE discourse_development WITH OWNER discourse ENCODING \'UTF8\' TEMPLATE template0;\nCREATE DATABASE discourse_test WITH OWNER discourse ENCODING \'UTF8\' TEMPLATE template0;
\n\n \n\nExit psql prompt by pressing ctrld
\n\nNow access psql prompt in discourse_development database as discourse user:
\n\npsql -d discourse_development -U discourse -h localhost
\n\nWhen prompted for password, provide the password which you set at the time of creating role, if you followed the guide as is, the password is discourse
\n\nRun following commands, separately:
\n\nCREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n\n\nExit psql prompt by pressing ctrld
\n\nNow access psql prompt in discourse_test database as discourse user:
\n\npsql -d discourse_test -U discourse -h localhost
\n\nWhen prompted for password, provide the password which you set at the time of creating role, if you followed the guide as is, the password is discourse
\n\nRun following commands, separately:
\n\nCREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n \n\nExit psql prompt by pressing ctrld
\n\nYou have set-up the database successfully!
\n\nSwitch to your Discourse folder:
\n\ncd ~/discourse
\n\nInstall the needed gems
\n\nbundle install
\n\n \n\nNow that you have successfully configured database connection, run this command:
\n\nbundle exec rake db:migrate db:test:prepare db:seed_fu
\n\nNow, try running the specs:
\n\nbundle exec rake autospec
\n\n \n\nStart rails server:
\n\nbundle exec rails server
\n\n \n\nYou should now be able to connect to discourse app on http://localhost:3000 - try it out!
\n\n \n\nWe will use MailCatcher to serve emails in development environment. Install and run MailCatcher:
\n\ngem install mailcatcher\nmailcatcher --http-ip 0.0.0.0
\n\nCreate new account:
\n\n \n\nCheck confirmation email by going to MailCatcher web interface at http://localhost:1080/
\n\n \n\nIf you did not receive the email, try running this in console: bundle exec sidekiq -q default
Click the confirmation link and your account will be activated!
\n\n \n\nNow, to make your account as admin, run the following commands in rails console:
\n\nRAILS_ENV=development bundle exec rails c\nu = User.last\nu.admin = true\nu.save
\n\n \n\nOnce you execute the above commands successfully, check out your Discourse account again:
\n\n \n\nCongratulations! You are now the admin of your own Discourse installation!
\n\nHappy hacking!
\n\nIf anything needs to be improved in this guide, feel free to ask on meta.discourse.org, or even better, submit a pull request.
', + 'So you want to set up Discourse on Ubuntu to hack on and develop with?
\n\nWe\'ll assume that you don\'t have Ruby/Rails/Postgre/Redis installed on your Ubuntu system. Let\'s begin!
\n\nAlthough this guide assumes that you are using Ubuntu, but the set-up instructions will work fine for any Debian based distribution.
\n\n(If you want to install Discourse for production use, see our install guide)
\n\nRun this script in terminal, to setup Rails development environment:
\n\nbash <(wget -qO- https://raw.githubusercontent.com/techAPJ/install-rails/master/linux)
\n\n \n\nThis will install following new packages on your system:
\n\nInstall Phantomjs:
\n\nFor 32 bit machine:
\n\ncd /usr/local/share\nsudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-i686.tar.bz2\nsudo tar xvf phantomjs-1.9.8-linux-i686.tar.bz2\nsudo rm phantomjs-1.9.8-linux-i686.tar.bz2\nsudo ln -s /usr/local/share/phantomjs-1.9.8-linux-i686/bin/phantomjs /usr/local/bin/phantomjs\ncd
\n\nFor 64 bit machine:
\n\ncd /usr/local/share\nsudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo tar xvf phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo rm phantomjs-1.9.8-linux-x86_64.tar.bz2\nsudo ln -s /usr/local/share/phantomjs-1.9.8-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs\ncd
\n\n \n\nIn case you have any of this package pre-installed and don\'t want to run entire script, see the script and pick the packages you don\'t have currently installed. The script is fine-tuned for Discourse, and includes all the packages required for Discourse installation.
\n\nNow that we have installed Discourse dependencies, let\'s move on to install Discourse itself.
\n\nClone the Discourse repository in ~/discourse
folder:
git clone https://github.com/discourse/discourse.git ~/discourse
\n\n \n\nOpen psql prompt as postgre user
\n\nsudo -u postgres psql postgres
\n\n \n\nCreate role with the same name as your ubuntu system username with discourse as password:
\n\nCREATE ROLE discourse WITH LOGIN ENCRYPTED PASSWORD \'discourse\' CREATEDB SUPERUSER;
\n\nIn the above command, I named the role as discourse, this means that my ubuntu system username is discourse. (It is necessary for role name to be same as system username, otherwise migrations will not run)
\n\nCheck that you have successfully created discourse role:
\n\n\\du
\n\n \n\nCreate discourse_development and discourse_test database:
\n\nCREATE DATABASE discourse_development WITH OWNER discourse ENCODING \'UTF8\' TEMPLATE template0;\nCREATE DATABASE discourse_test WITH OWNER discourse ENCODING \'UTF8\' TEMPLATE template0;
\n\n \n\nExit psql prompt by pressing ctrld
\n\nNow access psql prompt in discourse_development database as discourse user:
\n\npsql -d discourse_development -U discourse -h localhost
\n\nWhen prompted for password, provide the password which you set at the time of creating role, if you followed the guide as is, the password is discourse
\n\nRun following commands, separately:
\n\nCREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n\n\nExit psql prompt by pressing ctrld
\n\nNow access psql prompt in discourse_test database as discourse user:
\n\npsql -d discourse_test -U discourse -h localhost
\n\nWhen prompted for password, provide the password which you set at the time of creating role, if you followed the guide as is, the password is discourse
\n\nRun following commands, separately:
\n\nCREATE EXTENSION pg_trgm;\nCREATE EXTENSION hstore;
\n\n \n\nExit psql prompt by pressing ctrld
\n\nYou have set-up the database successfully!
\n\nSwitch to your Discourse folder:
\n\ncd ~/discourse
\n\nInstall the needed gems
\n\nbundle install
\n\n \n\nNow that you have successfully configured database connection, run this command:
\n\nbundle exec rake db:migrate db:test:prepare db:seed_fu
\n\nNow, try running the specs:
\n\nbundle exec rake autospec
\n\n \n\nStart rails server:
\n\nbundle exec rails server
\n\n \n\nYou should now be able to connect to discourse app on http://localhost:3000 - try it out!
\n\n \n\nWe will use MailCatcher to serve emails in development environment. Install and run MailCatcher:
\n\ngem install mailcatcher\nmailcatcher --http-ip 0.0.0.0
\n\nCreate new account:
\n\n \n\nCheck confirmation email by going to MailCatcher web interface at http://localhost:1080/
\n\n \n\nIf you did not receive the email, try running this in console: bundle exec sidekiq -q default
Click the confirmation link and your account will be activated!
\n\n \n\nNow, to make your account as admin, run the following commands in rails console:
\n\nRAILS_ENV=development bundle exec rails c\nu = User.last\nu.admin = true\nu.save
\n\n \n\nOnce you execute the above commands successfully, check out your Discourse account again:
\n\n \n\nCongratulations! You are now the admin of your own Discourse installation!
\n\nHappy hacking!
\n\nIf anything needs to be improved in this guide, feel free to ask on meta.discourse.org, or even better, submit a pull request.
', post_number: 1, post_type: 1, updated_at: "2015-06-22T17:24:20.607Z", diff --git a/app/assets/javascripts/discourse/tests/fixtures/topic.js b/app/assets/javascripts/discourse/tests/fixtures/topic.js index 95debff3a28..70d5b2ff5c4 100644 --- a/app/assets/javascripts/discourse/tests/fixtures/topic.js +++ b/app/assets/javascripts/discourse/tests/fixtures/topic.js @@ -3091,11 +3091,11 @@ export default { { id: 27346, title: - 'Reply+{messagekey}@... optionaly in header "from" in addition to "reply-to"', + 'Reply+{messagekey}@... optionally in header "from" in addition to "reply-to"', fancy_title: - "Reply+{messagekey}@… optionaly in header “from” in addition to “reply-to”", + "Reply+{messagekey}@… optionally in header “from” in addition to “reply-to”", slug: - "reply-messagekey-optionaly-in-header-from-in-addition-to-reply-to", + "reply-messagekey-optionally-in-header-from-in-addition-to-reply-to", posts_count: 1, reply_count: 0, highest_post_number: 1, diff --git a/app/assets/javascripts/discourse/tests/fixtures/user-fixtures.js b/app/assets/javascripts/discourse/tests/fixtures/user-fixtures.js index 3fdf904693e..da0e300420c 100644 --- a/app/assets/javascripts/discourse/tests/fixtures/user-fixtures.js +++ b/app/assets/javascripts/discourse/tests/fixtures/user-fixtures.js @@ -1132,7 +1132,7 @@ export default { action_type: 6, created_at: "2014-01-13T21:58:28Z", excerpt: - "It looks uneeded, but you need to review a fair amount of code to confirm it is not needed. \n\nI am going to keep it for now cause its safer under some weird edge conditions.", + "It looks unneeded, but you need to review a fair amount of code to confirm it is not needed. \n\nI am going to keep it for now cause its safer under some weird edge conditions.", avatar_template: "//www.gravatar.com/avatar/3dcae8378d46c244172a115c28ca49ce.png?s={size}&r=pg&d=identicon", acting_avatar_template: diff --git a/app/assets/javascripts/discourse/tests/integration/widgets/post-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/post-test.js index 708c59101dc..3e2cda1786e 100644 --- a/app/assets/javascripts/discourse/tests/integration/widgets/post-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/post-test.js @@ -526,7 +526,7 @@ discourseModule("Integration | Component | Widget | post", function (hooks) { }, }); - componentTest("reply directly above (supressed)", { + componentTest("reply directly above (suppressed)", { template: hbs`{{mount-widget widget="post" args=args}}`, beforeEach() { this.set("args", { @@ -545,7 +545,7 @@ discourseModule("Integration | Component | Widget | post", function (hooks) { }, }); - componentTest("reply a few posts above (supressed)", { + componentTest("reply a few posts above (suppressed)", { template: hbs`{{mount-widget widget="post" args=args}}`, beforeEach() { this.set("args", { diff --git a/app/assets/javascripts/discourse/tests/integration/widgets/small-user-list-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/small-user-list-test.js index 2cccac3306b..ac8dbcdaefa 100644 --- a/app/assets/javascripts/discourse/tests/integration/widgets/small-user-list-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/small-user-list-test.js @@ -25,7 +25,7 @@ discourseModule( async test(assert) { assert.ok(queryAll('[data-user-card="eviltrout"]').length === 1); assert.ok(queryAll('[data-user-card="someone"]').length === 0); - assert.ok(queryAll(".unknown").length, "includes unkown user"); + assert.ok(queryAll(".unknown").length, "includes unknown user"); }, }); } diff --git a/app/assets/javascripts/discourse/tests/integration/widgets/widget-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/widget-test.js index e31e82e83c0..6df1ef695a8 100644 --- a/app/assets/javascripts/discourse/tests/integration/widgets/widget-test.js +++ b/app/assets/javascripts/discourse/tests/integration/widgets/widget-test.js @@ -305,7 +305,7 @@ discourseModule("Integration | Component | Widget | base", function (hooks) { }, test(assert) { - // comin up + // coming up assert.equal(queryAll("span.string").text(), "evil"); assert.equal(queryAll("span.var").text(), "trout"); assert.equal(queryAll("a").prop("title"), "evil"); diff --git a/app/assets/javascripts/discourse/tests/setup-tests.js b/app/assets/javascripts/discourse/tests/setup-tests.js index 7742a30bb15..12f93098ab1 100644 --- a/app/assets/javascripts/discourse/tests/setup-tests.js +++ b/app/assets/javascripts/discourse/tests/setup-tests.js @@ -247,7 +247,7 @@ function setupTestsCommon(application, container, config) { if (!setupApplicationTest) { // ensures any event not removed is not leaking between tests - // most likely in intialisers, other places (controller, component...) + // most likely in initializers, other places (controller, component...) // should be fixed in code clearAppEventsCache(getOwner(this)); } diff --git a/app/assets/javascripts/discourse/tests/unit/controllers/topic-test.js b/app/assets/javascripts/discourse/tests/unit/controllers/topic-test.js index 7d4c273281c..6920e74a485 100644 --- a/app/assets/javascripts/discourse/tests/unit/controllers/topic-test.js +++ b/app/assets/javascripts/discourse/tests/unit/controllers/topic-test.js @@ -538,7 +538,7 @@ discourseModule("Unit | Controller | topic", function (hooks) { post: placeholder, }), null, - "it should work with a post-placehodler" + "it should work with a post-placeholder" ); }); diff --git a/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js b/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js index f413ffea754..f25c78ce879 100644 --- a/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/pretty-text-test.js @@ -1602,7 +1602,7 @@ var bar = 'bar'; assert.cookedOptions(" -->asd", enabledTypographer, "–>asd
"); }); - test("default typhographic replacements", function (assert) { + test("default typographic replacements", function (assert) { const enabledTypographer = { siteSettings: { enable_markdown_typographer: true }, }; @@ -1628,7 +1628,7 @@ var bar = 'bar'; assert.cookedOptions("(pa) (PA)", enabledTypographer, "¶ ¶
"); }); - test("default typhographic replacements - dashes", function (assert) { + test("default typographic replacements - dashes", function (assert) { const enabledTypographer = { siteSettings: { enable_markdown_typographer: true }, }; @@ -1663,7 +1663,7 @@ var bar = 'bar'; ); }); - test("disabled typhographic replacements", function (assert) { + test("disabled typographic replacements", function (assert) { const enabledTypographer = { siteSettings: { enable_markdown_typographer: true }, }; diff --git a/app/assets/javascripts/discourse/tests/unit/lib/user-search-test.js b/app/assets/javascripts/discourse/tests/unit/lib/user-search-test.js index 021fee33fc8..7e63f52ce79 100644 --- a/app/assets/javascripts/discourse/tests/unit/lib/user-search-test.js +++ b/app/assets/javascripts/discourse/tests/unit/lib/user-search-test.js @@ -129,7 +129,7 @@ module("Unit | Utility | user-search", function (hooks) { assert.equal(results[results.length - 1]["name"], "team"); }); - test("it skips a search depending on punctuations", async function (assert) { + test("it skips a search depending on punctuation", async function (assert) { let results; let skippedTerms = [ "@sam s", // double space is not allowed diff --git a/app/assets/javascripts/discourse/tests/unit/models/composer-test.js b/app/assets/javascripts/discourse/tests/unit/models/composer-test.js index 11be45dce16..415988c24f6 100644 --- a/app/assets/javascripts/discourse/tests/unit/models/composer-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/composer-test.js @@ -47,7 +47,7 @@ discourseModule("Unit | Model | composer", function () { 2, "handles nested quotes correctly" ); - replyLength("", 0, "remove comments"); + replyLength("", 0, "remove comments"); replyLength( "\n more text \n", @@ -333,7 +333,7 @@ discourseModule("Unit | Model | composer", function () { assert.equal( newComposer().get("replyDirty"), false, - "replyDirty is initally false with a quote" + "replyDirty is initially false with a quote" ); }); diff --git a/app/assets/javascripts/discourse/tests/unit/models/post-stream-test.js b/app/assets/javascripts/discourse/tests/unit/models/post-stream-test.js index 78151c33552..4fd2db7af21 100644 --- a/app/assets/javascripts/discourse/tests/unit/models/post-stream-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/post-stream-test.js @@ -826,7 +826,7 @@ module("Unit | Model | post-stream", function () { assert.ok( postStream.get("lastAppended"), found, - "comitting a post changes lastAppended" + "committing a post changes lastAppended" ); }); @@ -885,7 +885,7 @@ module("Unit | Model | post-stream", function () { ); }); - test("comitting and triggerNewPostsInStream race condition", function (assert) { + test("committing and triggerNewPostsInStream race condition", function (assert) { const postStream = buildStream(4964); const store = postStream.store; diff --git a/app/assets/javascripts/discourse/tests/unit/models/rest-model-test.js b/app/assets/javascripts/discourse/tests/unit/models/rest-model-test.js index b549826f1ad..d444d275efe 100644 --- a/app/assets/javascripts/discourse/tests/unit/models/rest-model-test.js +++ b/app/assets/javascripts/discourse/tests/unit/models/rest-model-test.js @@ -50,7 +50,7 @@ module("Unit | Model | rest-model", function () { const secondPromise = widget.update({ name: "new name" }); firstPromise.then(function () { - assert.ok(true, "the first promise succeeeds"); + assert.ok(true, "the first promise succeeds"); }); secondPromise.catch(function () { @@ -93,7 +93,7 @@ module("Unit | Model | rest-model", function () { const firstPromise = widget.save({ name: "Evil Widget" }); const secondPromise = widget.save({ name: "Evil Widget" }); firstPromise.then(function () { - assert.ok(true, "the first promise succeeeds"); + assert.ok(true, "the first promise succeeds"); }); secondPromise.catch(function () { @@ -127,7 +127,7 @@ module("Unit | Model | rest-model", function () { //Create const widget = store.createRecord("my-widget"); await widget.save({ name: "Evil Widget" }); - assert.equal(widget.id, 100, "it saved a new record successully"); + assert.equal(widget.id, 100, "it saved a new record successfully"); assert.equal(widget.get("name"), "Evil Widget"); // Update diff --git a/app/assets/javascripts/locales/i18n.js b/app/assets/javascripts/locales/i18n.js index 814e8ed8d9d..24547305e3d 100644 --- a/app/assets/javascripts/locales/i18n.js +++ b/app/assets/javascripts/locales/i18n.js @@ -73,7 +73,7 @@ I18n.lookup = function(scope, options) { return messages; }; -// Merge serveral hash options, checking if value is set before +// Merge several hash options, checking if value is set before // overwriting any value. The precedence is from left to right. // // I18n.prepareOptions({name: "John Doe"}, {name: "Mary Doe", role: "user"}); diff --git a/app/assets/javascripts/pretty-text/addon/sanitizer.js b/app/assets/javascripts/pretty-text/addon/sanitizer.js index 66bdcbf4ce2..45342882d56 100644 --- a/app/assets/javascripts/pretty-text/addon/sanitizer.js +++ b/app/assets/javascripts/pretty-text/addon/sanitizer.js @@ -97,7 +97,7 @@ export function sanitize(text, allowLister) { } if (tag === "video" && name === "autoplay") { - // This might give us duplicate 'muted' atttributes + // This might give us duplicate 'muted' attributes // but they will be deduped by later processing return "autoplay muted"; } diff --git a/app/assets/javascripts/pretty-text/engines/discourse-markdown/html-img.js b/app/assets/javascripts/pretty-text/engines/discourse-markdown/html-img.js index e876499a252..ded425a743e 100644 --- a/app/assets/javascripts/pretty-text/engines/discourse-markdown/html-img.js +++ b/app/assets/javascripts/pretty-text/engines/discourse-markdown/html-img.js @@ -1,4 +1,4 @@ -// special handling for IMG tags on a line by themeselves +// special handling for IMG tags on a line by themselves // we always have to handle it as so it is an inline // see: https://talk.commonmark.org/t/newline-and-img-tags/2511 diff --git a/app/assets/javascripts/pretty-text/engines/discourse-markdown/mentions.js b/app/assets/javascripts/pretty-text/engines/discourse-markdown/mentions.js index 3c5c7d1e92b..a9a7015bc5f 100644 --- a/app/assets/javascripts/pretty-text/engines/discourse-markdown/mentions.js +++ b/app/assets/javascripts/pretty-text/engines/discourse-markdown/mentions.js @@ -37,7 +37,7 @@ function mentionRegex(unicodeUsernames) { if (unicodeUsernames) { try { // Create the regex from a string, because Babel doesn't understand - // Unicode property escapes and completly mangles the regexp. + // Unicode property escapes and completely mangles the regexp. const alnum = "\\p{Alphabetic}\\p{Mark}\\p{Decimal_Number}"; return new RegExp( `@([${alnum}_][${alnum}._-]{0,58}[${alnum}])|@([${alnum}_])`, diff --git a/app/assets/javascripts/pretty-text/engines/discourse-markdown/newline.js b/app/assets/javascripts/pretty-text/engines/discourse-markdown/newline.js index 5781c9df203..e01b7bb082d 100644 --- a/app/assets/javascripts/pretty-text/engines/discourse-markdown/newline.js +++ b/app/assets/javascripts/pretty-text/engines/discourse-markdown/newline.js @@ -20,7 +20,7 @@ function newline(state, silent) { // ' \n' -> hardbreak // Lookup in pending chars is bad practice! Don't copy to other rules! // Pending string is stored in concat mode, indexed lookups will cause - // convertion to flat mode. + // conversion to flat mode. if (!silent) { if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) { if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) { diff --git a/app/assets/javascripts/pretty-text/engines/discourse-markdown/onebox.js b/app/assets/javascripts/pretty-text/engines/discourse-markdown/onebox.js index 173964f17c4..ee3965f399e 100644 --- a/app/assets/javascripts/pretty-text/engines/discourse-markdown/onebox.js +++ b/app/assets/javascripts/pretty-text/engines/discourse-markdown/onebox.js @@ -62,7 +62,7 @@ function applyOnebox(state, silent) { let href = attrs[0][1]; - // edge case ... what if this is not http or protocoless? + // edge case ... what if this is not http or protocolless? if (!/^http|^\/\//i.test(href)) { continue; } diff --git a/app/assets/javascripts/select-kit/addon/components/composer-actions.js b/app/assets/javascripts/select-kit/addon/components/composer-actions.js index b518602da7b..705c0002c14 100644 --- a/app/assets/javascripts/select-kit/addon/components/composer-actions.js +++ b/app/assets/javascripts/select-kit/addon/components/composer-actions.js @@ -225,7 +225,7 @@ export default DropdownSelectBoxComponent.extend({ } // Edge case: If personal messages are disabled, it is possible to have - // no items which stil renders a button that pops up nothing. In this + // no items which still renders a button that pops up nothing. In this // case, add an option for what you're currently doing. if (items.length === 0) { showCreateTopic = true; diff --git a/app/assets/stylesheets/common/base/magnific-popup.scss b/app/assets/stylesheets/common/base/magnific-popup.scss index 1f89e644bfc..29896ded017 100644 --- a/app/assets/stylesheets/common/base/magnific-popup.scss +++ b/app/assets/stylesheets/common/base/magnific-popup.scss @@ -6,7 +6,7 @@ // // 1. Default Settings // 2. General styles -// - Transluscent overlay +// - Translucent overlay // - Containers, wrappers // - Cursors // - Helper classes @@ -66,7 +66,7 @@ $use-visuallyhidden: false !default; // Hide content from browsers, but make it // 2. General styles //////////////////////// -// Transluscent overlay +// Translucent overlay .mfp-bg { top: 0; left: 0; diff --git a/app/assets/stylesheets/common/d-editor.scss b/app/assets/stylesheets/common/d-editor.scss index 68755aff33a..935e0f9169f 100644 --- a/app/assets/stylesheets/common/d-editor.scss +++ b/app/assets/stylesheets/common/d-editor.scss @@ -260,7 +260,7 @@ opacity: 1; } -// d-editor bar button sizing for all editors - this is kept seprate to keep +// d-editor bar button sizing for all editors - this is kept separate to keep // everything in one place .d-editor-button-bar { margin: 0.25em; diff --git a/app/assets/stylesheets/common/font-variables.scss b/app/assets/stylesheets/common/font-variables.scss index 2ff960e7fca..c64ccfd2205 100644 --- a/app/assets/stylesheets/common/font-variables.scss +++ b/app/assets/stylesheets/common/font-variables.scss @@ -5,7 +5,7 @@ --base-font-size-larger: 1.063em; // eq. to 17px --base-font-size-largest: 1.118em; // eq. to 19px - // Font-size defintions, multiplier ^ (step / interval) + // Font-size definitions, multiplier ^ (step / interval) --font-up-6: 2.296em; --font-up-5: 2em; --font-up-4: 1.7511em; diff --git a/app/assets/stylesheets/common/foundation/variables.scss b/app/assets/stylesheets/common/foundation/variables.scss index 3f4ce8eaf41..ff672beab27 100644 --- a/app/assets/stylesheets/common/foundation/variables.scss +++ b/app/assets/stylesheets/common/foundation/variables.scss @@ -50,7 +50,7 @@ $base-font-size-larger: var(--base-font-size-larger) !default; $base-font-size-largest: var(--base-font-size-largest) !default; $heading-font-family: var(--heading-font-family) !default; -// Font-size defintions, multiplier ^ (step / interval) +// Font-size definitions, multiplier ^ (step / interval) $font-up-6: var(--font-up-6) !default; $font-up-5: var(--font-up-5) !default; $font-up-4: var(--font-up-4) !default; diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cf444e8709e..d75586a458f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -326,7 +326,7 @@ class ApplicationController < ActionController::Base end # If a controller requires a plugin, it will raise an exception if that plugin is - # disabled. This allows plugins to be disabled programatically. + # disabled. This allows plugins to be disabled programmatically. def self.requires_plugin(plugin_name) before_action do raise PluginDisabled.new if Discourse.disabled_plugin_names.include?(plugin_name) @@ -399,7 +399,7 @@ class ApplicationController < ActionController::Base @preloaded ||= {} # I dislike that there is a gsub as opposed to a gsub! # but we can not be mucking with user input, I wonder if there is a way - # to inject this safty deeper in the library or even in AM serializer + # to inject this safety deeper in the library or even in AM serializer @preloaded[key] = json.gsub("", "<\\/") end diff --git a/app/controllers/users_email_controller.rb b/app/controllers/users_email_controller.rb index d808c095df2..a4af506c1da 100644 --- a/app/controllers/users_email_controller.rb +++ b/app/controllers/users_email_controller.rb @@ -80,7 +80,7 @@ class UsersEmailController < ApplicationController rate_limit_second_factor!(@user) if !@error - # this is needed becase the form posts this field as JSON and it can be a + # this is needed because the form posts this field as JSON and it can be a # hash when authenticating security key. if params[:second_factor_method].to_i == UserSecondFactor.methods[:security_key] begin diff --git a/app/helpers/user_notifications_helper.rb b/app/helpers/user_notifications_helper.rb index e2f3f05906b..6d46583532d 100644 --- a/app/helpers/user_notifications_helper.rb +++ b/app/helpers/user_notifications_helper.rb @@ -47,7 +47,7 @@ module UserNotificationsHelper return result unless result.blank? - # If there is no first paragaph with text, return the first paragraph with + # If there is no first paragraph with text, return the first paragraph with # something else (an image) or div (a onebox). doc.css('body > p:not(:empty), body > div:not(:empty), body > p > div.lightbox-wrapper img').first end diff --git a/app/jobs/regular/close_topic.rb b/app/jobs/regular/close_topic.rb index fc5f84c9a92..3385d63c343 100644 --- a/app/jobs/regular/close_topic.rb +++ b/app/jobs/regular/close_topic.rb @@ -22,7 +22,7 @@ module Jobs return end - # this handles deleting the topic timer as wel, see TopicStatusUpdater + # this handles deleting the topic timer as well, see TopicStatusUpdater topic.update_status('autoclosed', true, user, { silent: silent }) MessageBus.publish("/topic/#{topic.id}", reload_topic: true) diff --git a/app/jobs/regular/open_topic.rb b/app/jobs/regular/open_topic.rb index 30bddfcb08c..f1e9fe0d2ff 100644 --- a/app/jobs/regular/open_topic.rb +++ b/app/jobs/regular/open_topic.rb @@ -26,7 +26,7 @@ module Jobs else # autoclosed, false is just another way of saying open. - # this handles deleting the topic timer as wel, see TopicStatusUpdater + # this handles deleting the topic timer as well, see TopicStatusUpdater topic.update_status('autoclosed', false, user) end diff --git a/app/models/concerns/has_custom_fields.rb b/app/models/concerns/has_custom_fields.rb index ee1eedb9f1d..31b096dcee8 100644 --- a/app/models/concerns/has_custom_fields.rb +++ b/app/models/concerns/has_custom_fields.rb @@ -257,7 +257,7 @@ module HasCustomFields end end - # We support unique indexes on certain fields. In the event two concurrenct processes attempt to + # We support unique indexes on certain fields. In the event two concurrent processes attempt to # update the same custom field we should catch the error and perform an update instead. def create_singular(name, value, field_type = nil) write_value = value.is_a?(Hash) || field_type == :json ? value.to_json : value diff --git a/app/models/topic_embed.rb b/app/models/topic_embed.rb index d3ed0f1a311..69279394d26 100644 --- a/app/models/topic_embed.rb +++ b/app/models/topic_embed.rb @@ -240,7 +240,7 @@ class TopicEmbed < ActiveRecord::Base end return result unless result.blank? - # If there is no first paragaph, return the first div (onebox) + # If there is no first paragraph, return the first div (onebox) doc.css('div').first.to_s end diff --git a/app/models/topic_link_click.rb b/app/models/topic_link_click.rb index 32526189050..ab42037769e 100644 --- a/app/models/topic_link_click.rb +++ b/app/models/topic_link_click.rb @@ -78,7 +78,7 @@ class TopicLinkClick < ActiveRecord::Base # Find the forum topic link link = link.where(post_id: args[:post_id]) if args[:post_id].present? - # If we don't have a post, just find the first occurance of the link + # If we don't have a post, just find the first occurrence of the link link = link.where(topic_id: args[:topic_id]) if args[:topic_id].present? link = link.first diff --git a/app/models/topic_tracking_state.rb b/app/models/topic_tracking_state.rb index 75c2e9d9745..52dba4823d6 100644 --- a/app/models/topic_tracking_state.rb +++ b/app/models/topic_tracking_state.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # this class is used to mirror unread and new status back to end users -# in JavaScript there is a mirror class that is kept in-sync using the mssage bus +# in JavaScript there is a mirror class that is kept in-sync using the massage bus # the allows end users to always know which topics have unread posts in them # and which topics are new diff --git a/app/models/topic_user.rb b/app/models/topic_user.rb index bcc24d979f6..f86d99ffac2 100644 --- a/app/models/topic_user.rb +++ b/app/models/topic_user.rb @@ -303,7 +303,7 @@ class TopicUser < ActiveRecord::Base threshold: SiteSetting.default_other_auto_track_topics_after_msecs } - # In case anyone seens "highest_seen_post_number" and gets confused, like I do. + # In case anyone sees "highest_seen_post_number" and gets confused, like I do. # highest_seen_post_number represents the highest_post_number of the topic when # the user visited it. It may be out of alignment with last_read, meaning # ... user visited the topic but did not read the posts diff --git a/app/models/user_auth_token.rb b/app/models/user_auth_token.rb index 48079e351d7..99dc33978ba 100644 --- a/app/models/user_auth_token.rb +++ b/app/models/user_auth_token.rb @@ -52,7 +52,7 @@ class UserAuthToken < ActiveRecord::Base return false unless User.find_by(id: user_id)&.staff? ips = UserAuthTokenLog.where(user_id: user_id).pluck(:client_ip) - ips.delete_at(ips.index(user_ip) || ips.length) # delete one occurance (current) + ips.delete_at(ips.index(user_ip) || ips.length) # delete one occurrence (current) ips.uniq! return false if ips.empty? # first login is never suspicious diff --git a/app/models/user_history.rb b/app/models/user_history.rb index 78b87c04aba..c84b326653b 100644 --- a/app/models/user_history.rb +++ b/app/models/user_history.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # UserHistory stores information about actions that users have taken, -# like deleting users, changing site settings, dimissing notifications, etc. +# like deleting users, changing site settings, dismissing notifications, etc. # Use other classes, like StaffActionLogger, to log records to this table. class UserHistory < ActiveRecord::Base belongs_to :acting_user, class_name: 'User' diff --git a/app/models/user_search.rb b/app/models/user_search.rb index 7498b230beb..13d74df0690 100644 --- a/app/models/user_search.rb +++ b/app/models/user_search.rb @@ -68,7 +68,7 @@ class UserSearch if @term.present? exact_matches = scoped_users.where(username_lower: @term) - # don't polute mentions with users who haven't shown up in over a year + # don't pollute mentions with users who haven't shown up in over a year exact_matches = exact_matches.where('last_seen_at > ?', 1.year.ago) if @topic_id || @category_id exact_matches diff --git a/app/models/user_stat.rb b/app/models/user_stat.rb index 2921233b2a2..d2963fba8d6 100644 --- a/app/models/user_stat.rb +++ b/app/models/user_stat.rb @@ -161,7 +161,7 @@ class UserStat < ActiveRecord::Base X.c <> topics_entered SQL - # Update denormalzied posts_read_count + # Update denormalized posts_read_count DB.exec(<<~SQL, seen_at: last_seen) UPDATE user_stats SET posts_read_count = X.c FROM diff --git a/app/serializers/topic_view_details_serializer.rb b/app/serializers/topic_view_details_serializer.rb index 0a3077c9ce5..02fd53bcdfd 100644 --- a/app/serializers/topic_view_details_serializer.rb +++ b/app/serializers/topic_view_details_serializer.rb @@ -93,7 +93,7 @@ class TopicViewDetailsSerializer < ApplicationSerializer # NOTE: A Category Group Moderator moving a topic to a different category # may result in the 'can_edit?' result changing from `true` to `false`. - # Explictly returning a `false` value is required to update the client UI. + # Explicitly returning a `false` value is required to update the client UI. def can_edit scope.can_edit?(object.topic) end diff --git a/app/services/search_indexer.rb b/app/services/search_indexer.rb index d8a970f1bea..de3553daaba 100644 --- a/app/services/search_indexer.rb +++ b/app/services/search_indexer.rb @@ -103,7 +103,7 @@ class SearchIndexer end def self.update_topics_index(topic_id, title, cooked) - # a bit inconsitent that we use title as A and body as B when in + # a bit inconsistent that we use title as A and body as B when in # the post index body is D update_index( table: 'topic', diff --git a/config/application.rb b/config/application.rb index 3b382095719..5f61cbbef54 100644 --- a/config/application.rb +++ b/config/application.rb @@ -93,7 +93,7 @@ module Discourse require_dependency 'lib/highlight_js/highlight_js' # we skip it cause we configure it in the initializer - # the railstie for message_bus would insert it in the + # the railtie for message_bus would insert it in the # wrong position config.skip_message_bus_middleware = true config.skip_multisite_middleware = true @@ -138,7 +138,7 @@ module Discourse config.assets.paths += %W(#{config.root}/config/locales #{config.root}/public/javascripts) - # Allows us to skip minifincation on some files + # Allows us to skip minification on some files config.assets.skip_minification = [] # explicitly precompile any images in plugins ( /assets/images ) path @@ -292,7 +292,7 @@ module Discourse # our setup does not use rack cache and instead defers to nginx config.action_dispatch.rack_cache = nil - # ember stuff only used for asset precompliation, production variant plays up + # ember stuff only used for asset precompilation, production variant plays up config.ember.variant = :development config.ember.ember_location = "#{Rails.root}/vendor/assets/javascripts/production/ember.js" config.ember.handlebars_location = "#{Rails.root}/vendor/assets/javascripts/handlebars.js" diff --git a/config/database.yml b/config/database.yml index be92da494de..456b8752f18 100644 --- a/config/database.yml +++ b/config/database.yml @@ -6,7 +6,7 @@ development: pool: 5 timeout: 5000 checkout_timeout: <%= ENV['CHECKOUT_TIMEOUT'] || 5 %> - advisory_locks: false # Disable until https://github.com/rails/rails/issues/40029 has beeen resolved. + advisory_locks: false # Disable until https://github.com/rails/rails/issues/40029 has been resolved. host_names: ### Don't include the port number here. Change the "port" site setting instead, at /admin/site_settings. ### If you change this setting you will need to @@ -40,7 +40,7 @@ test: min_messages: warning pool: 5 timeout: 5000 - advisory_locks: false # Disable until https://github.com/rails/rails/issues/40029 has beeen resolved. + advisory_locks: false # Disable until https://github.com/rails/rails/issues/40029 has been resolved. host_names: - test.localhost diff --git a/config/discourse_defaults.conf b/config/discourse_defaults.conf index b7c10ed9668..fbca7c499b0 100644 --- a/config/discourse_defaults.conf +++ b/config/discourse_defaults.conf @@ -173,7 +173,7 @@ message_bus_redis_skip_client_commands = false enable_cors = false cors_origin = '' -# enable if you really need to serve assets in prd +# enable if you really need to serve assets in prod serve_static_assets = false # number of sidekiq workers (launched via unicorn master) @@ -210,7 +210,7 @@ secret_key_base = fallback_assets_path = # S3 settings used for serving ALL public files -# be sure to configre a CDN as well per cdn_url +# be sure to configure a CDN as well per cdn_url s3_bucket = s3_region = s3_access_key_id = @@ -315,7 +315,7 @@ anon_cache_store_threshold = 2 # you may restrict it so only specific themes are approved # in allowlist mode all theme updates must happen via git repos # themes missing from the list are automatically disallowed -# list is a comma seperated list of git repos eg: +# list is a comma separated list of git repos eg: # https://github.com/discourse/discourse-custom-header-links.git,https://github.com/discourse/discourse-simple-theme.git allowed_theme_repos = diff --git a/config/environments/test.rb b/config/environments/test.rb index 0d753f4ed8b..502ae6b376d 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -12,7 +12,7 @@ Discourse::Application.configure do # Configure static asset server for tests with Cache-Control for performance config.public_file_server.enabled = true - # don't consider reqs local so we can properly handle exceptions like we do in prd + # don't consider reqs local so we can properly handle exceptions like we do in prod config.consider_all_requests_local = false # disable caching diff --git a/config/initializers/100-watch_for_restart.rb b/config/initializers/100-watch_for_restart.rb index bb18758cf9d..922380cf675 100644 --- a/config/initializers/100-watch_for_restart.rb +++ b/config/initializers/100-watch_for_restart.rb @@ -5,7 +5,7 @@ # It simply drains all the requests (waits up to 4 seconds) and issues a HUP # if you need a more sophisticated cycling restart for multiple thins it will need to be written # -# This works fine for Discourse.org cause we host our app accross multiple machines, if you hosting +# This works fine for Discourse.org cause we host our app across multiple machines, if you hosting # on a single machine you have a trickier problem at hand as you need to cycle the processes in order # diff --git a/config/nginx.sample.conf b/config/nginx.sample.conf index 3993ff8cc9a..27863393346 100644 --- a/config/nginx.sample.conf +++ b/config/nginx.sample.conf @@ -9,7 +9,7 @@ upstream discourse { } # inactive means we keep stuff around for 1440m minutes regardless of last access (1 week) -# levels means it is a 2 deep heirarchy cause we can have lots of files +# levels means it is a 2 deep hierarchy cause we can have lots of files # max_size limits the size of the cache proxy_cache_path /var/nginx/cache inactive=1440m levels=1:2 keys_zone=one:10m max_size=600m; @@ -131,7 +131,7 @@ server { } # some minimal caching here so we don't keep asking - # longer term we should increas probably to 1y + # longer term we should increase probably to 1y location ~ ^/javascripts/ { expires 1d; add_header Cache-Control public,immutable; diff --git a/db/fixtures/001_refresh.rb b/db/fixtures/001_refresh.rb index 514789616dc..3e0d603b93c 100644 --- a/db/fixtures/001_refresh.rb +++ b/db/fixtures/001_refresh.rb @@ -9,7 +9,7 @@ class SeedData::Refresher @mutex.synchronize do return if @refreshed # Fix any bust caches post initial migration - # Not that reset_column_information is not thread safe so we have to becareful + # Not that reset_column_information is not thread safe so we have to be careful # not to run it concurrently within the same process. ActiveRecord::Base.connection.tables.each do |table| table.classify.constantize.reset_column_information rescue nil diff --git a/docs/SECURITY.md b/docs/SECURITY.md index cd44bf92b4a..29225d0c3e9 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -12,7 +12,7 @@ For a list of recent security commits, check [our GitHub commits prefixed with S Discourse uses the PBKDF2 algorithm to encrypt salted passwords. This algorithm is blessed by NIST. Security experts on the web [tend to agree that PBKDF2 is a secure choice](https://security.stackexchange.com/questions/4781/do-any-security-experts-recommend-bcrypt-for-password-storage). -**options you can customise in your production.rb file** +**options you can customize in your production.rb file** - `pbkdf2_algorithm`: the hashing algorithm used (default "sha256") - `pbkdf2_iterations`: the number of iterations to run (default 64000) @@ -43,7 +43,7 @@ Discourse extends the built-in Rails CSRF protection in the following ways: 2. API calls using the secret API bypass CSRF checks. -3. Certain pages are "cachable", we do not render the CSRF token (` 1 || specs == "spec" # Only paralellize multiple files + multiple_files = specs.split.count > 1 || specs == "spec" # Only parallelize multiple files if ENV["PARALLEL_SPEC"] == '1' && multiple_files && !line_specified "bin/turbo_rspec #{args.join(" ")} #{specs.split.join(" ")}" else diff --git a/lib/badge_queries.rb b/lib/badge_queries.rb index a8cf8a91711..e59476c3f80 100644 --- a/lib/badge_queries.rb +++ b/lib/badge_queries.rb @@ -93,7 +93,7 @@ module BadgeQueries JOIN post_actions pa1 on pa1.id = x.id SQL - # Incorrect, but good enough - (earlies post edited vs first edit) + # Incorrect, but good enough - (earliest post edited vs first edit) Editor = <<~SQL SELECT p.user_id, min(p.id) post_id, min(p.created_at) granted_at FROM badge_posts p diff --git a/lib/base62.rb b/lib/base62.rb index 70728c6a52d..e282f221a00 100644 --- a/lib/base62.rb +++ b/lib/base62.rb @@ -14,7 +14,7 @@ module Base62 str = "" while num > 0 - # prepend base62 charaters + # prepend base62 characters str = KEYS[num % BASE] + str num = num / BASE end diff --git a/lib/discourse_tagging.rb b/lib/discourse_tagging.rb index 4c9aa5c06ce..0699cf7e3c3 100644 --- a/lib/discourse_tagging.rb +++ b/lib/discourse_tagging.rb @@ -32,7 +32,7 @@ module DiscourseTagging # tag names which are visible, but not usable, by *some users* readonly_tags = DiscourseTagging.readonly_tag_names(guardian) - # tags names which are not visibile or usuable by this user + # tags names which are not visible or usable by this user hidden_tags = DiscourseTagging.hidden_tag_names(guardian) # tag names which ARE permitted by *this user* diff --git a/lib/file_store/s3_store.rb b/lib/file_store/s3_store.rb index 968c673af43..ab6e56bb69f 100644 --- a/lib/file_store/s3_store.rb +++ b/lib/file_store/s3_store.rb @@ -93,7 +93,7 @@ module FileStore begin parsed_url = URI.parse(UrlHelper.encode(url)) rescue - # There are many exceptions possible here including Addressable::URI:: excpetions + # There are many exceptions possible here including Addressable::URI:: exceptions # and URI:: exceptions, catch all may seem wide, but it makes no sense to raise ever # on an invalid url here return false diff --git a/lib/freedom_patches/active_record_attribute_methods.rb b/lib/freedom_patches/active_record_attribute_methods.rb index 815159ff4ef..8144cba19b4 100644 --- a/lib/freedom_patches/active_record_attribute_methods.rb +++ b/lib/freedom_patches/active_record_attribute_methods.rb @@ -19,7 +19,7 @@ module ActiveRecord BLANK_ARRAY = [].freeze - # this patch just allows everyting in Rails 6 + # this patch just allows everything in Rails 6 def disallow_raw_sql!(args, permit: nil) # we may consider moving to https://github.com/rails/rails/pull/33330 # once all frozen string hints are in place diff --git a/lib/guardian/category_guardian.rb b/lib/guardian/category_guardian.rb index 9f37b7cf99c..4e9050f29a3 100644 --- a/lib/guardian/category_guardian.rb +++ b/lib/guardian/category_guardian.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -#mixin for all guardian methods dealing with category permisions +#mixin for all guardian methods dealing with category permissions module CategoryGuardian # Creating Method diff --git a/lib/guardian/tag_guardian.rb b/lib/guardian/tag_guardian.rb index e1b5a211e27..59e370cc8f9 100644 --- a/lib/guardian/tag_guardian.rb +++ b/lib/guardian/tag_guardian.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -#mixin for all guardian methods dealing with tagging permisions +#mixin for all guardian methods dealing with tagging permissions module TagGuardian def can_create_tag? return is_admin? if SiteSetting.min_trust_to_create_tag.to_s == 'admin' diff --git a/lib/guardian/topic_guardian.rb b/lib/guardian/topic_guardian.rb index 81d36c02c28..8539138003c 100644 --- a/lib/guardian/topic_guardian.rb +++ b/lib/guardian/topic_guardian.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -#mixin for all guardian methods dealing with topic permisions +#mixin for all guardian methods dealing with topic permissions module TopicGuardian def can_remove_allowed_users?(topic, target_user = nil) diff --git a/lib/imap/sync.rb b/lib/imap/sync.rb index 96e85ba746d..5f034270dcc 100644 --- a/lib/imap/sync.rb +++ b/lib/imap/sync.rb @@ -42,7 +42,7 @@ module Imap if @status[:uid_validity] != @group.imap_uid_validity # If UID validity changes, the whole mailbox must be synchronized (all # emails are considered new and will be associated to existent topics - # in Email::Reciever by matching Message-Ids). + # in Email::Receiver by matching Message-Ids). ImapSyncLog.warn("UIDVALIDITY = #{@status[:uid_validity]} does not match expected #{@group.imap_uid_validity}, invalidating IMAP cache and resyncing emails for mailbox #{@group.imap_mailbox_name}", @group) @group.imap_last_uid = 0 end diff --git a/lib/javascripts/messageformat.js b/lib/javascripts/messageformat.js index 04f5be94a70..6626d51a168 100644 --- a/lib/javascripts/messageformat.js +++ b/lib/javascripts/messageformat.js @@ -10,7 +10,7 @@ */ (function ( root ) { - // Create the contructor function + // Create the constructor function function MessageFormat ( locale, pluralFunc ) { var fallbackLocale; @@ -133,7 +133,7 @@ var result = { /* - * Parses the input with a generated parser. If the parsing is successfull, + * Parses the input with a generated parser. If the parsing is successful, * returns a value explicitly or implicitly specified by the grammar from * which the parser was generated (see |PEG.buildParser|). If the parsing is * unsuccessful, throws |PEG.parser.SyntaxError| describing the error. diff --git a/lib/javascripts/widget-hbs-compiler.js b/lib/javascripts/widget-hbs-compiler.js index 58c911a1970..e36aa3549c5 100644 --- a/lib/javascripts/widget-hbs-compiler.js +++ b/lib/javascripts/widget-hbs-compiler.js @@ -125,7 +125,7 @@ function mustacheValue(node, state) { return `${useHelper(state, "iconNode")}(${valueOf(node.params[0])})`; break; default: - // Shortcut: If our mustach has hash arguments, we can assume it's attaching. + // Shortcut: If our mustache has hash arguments, we can assume it's attaching. // For example `{{home-logo count=123}}` can become `this.attach('home-logo, { "count": 123 });` let hash = node.hash; if (hash.pairs.length) { diff --git a/lib/js_locale_helper.rb b/lib/js_locale_helper.rb index fbf1fc1bdb3..c51a8812291 100644 --- a/lib/js_locale_helper.rb +++ b/lib/js_locale_helper.rb @@ -242,7 +242,7 @@ module JsLocaleHelper return locale_data if locale_data end - # English should alyways work + # English should always work ["en", File.join(path, "en.js")] if fallback_to_english end diff --git a/lib/letter_avatar.rb b/lib/letter_avatar.rb index 6c4aa1d2f9d..cdd054626a2 100644 --- a/lib/letter_avatar.rb +++ b/lib/letter_avatar.rb @@ -121,7 +121,7 @@ class LetterAvatar end end - # palette of optimally disctinct colors + # palette of optimally distinct colors # cf. http://tools.medialab.sciences-po.fr/iwanthue/index.php # parameters used: # - H: 0 - 360 diff --git a/lib/middleware/enforce_hostname.rb b/lib/middleware/enforce_hostname.rb index c462e5b7bcc..486753c7d7f 100644 --- a/lib/middleware/enforce_hostname.rb +++ b/lib/middleware/enforce_hostname.rb @@ -10,7 +10,7 @@ module Middleware # enforces hostname to match the hostname of our connection # this middleware lives after rails multisite so at this point # Discourse.current_hostname MUST be canonical, enforce it so - # all Rails helpers are guarenteed to use it unconditionally and + # all Rails helpers are guaranteed to use it unconditionally and # never generate incorrect links env[Rack::Request::HTTP_X_FORWARDED_HOST] = nil diff --git a/lib/pbkdf2.rb b/lib/pbkdf2.rb index 59317ed5cfb..62551d052f4 100644 --- a/lib/pbkdf2.rb +++ b/lib/pbkdf2.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Note: This logic was originaly extracted from the Pbkdf2 gem to fix Ruby 2.0 +# Note: This logic was originally extracted from the Pbkdf2 gem to fix Ruby 2.0 # issues, but that gem has gone stale so we won't be returning to it. require 'openssl' diff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rb index 784a028ce7e..6bf2fe0b53e 100644 --- a/lib/plugin/instance.rb +++ b/lib/plugin/instance.rb @@ -591,7 +591,7 @@ class Plugin::Instance end end - # note, we need to be able to parse seperately to activation. + # note, we need to be able to parse separately to activation. # this allows us to present information about a plugin in the UI # prior to activations def activate! @@ -816,7 +816,7 @@ class Plugin::Instance end # Register a new UserApiKey scope, and its allowed routes. Scope will be prefixed - # with the (parametetized) plugin name followed by a colon. + # with the (parameterized) plugin name followed by a colon. # # For example, if discourse-awesome-plugin registered this: # diff --git a/lib/post_action_creator.rb b/lib/post_action_creator.rb index a07c0e7b7dc..559aaaf23ec 100644 --- a/lib/post_action_creator.rb +++ b/lib/post_action_creator.rb @@ -127,7 +127,7 @@ class PostActionCreator end rescue ActiveRecord::RecordNotUnique - # If the user already performed this action, it's proably due to a different browser tab + # If the user already performed this action, it's probably due to a different browser tab # or non-debounced clicking. We can ignore. result.success = true result.post_action = PostAction.find_by( diff --git a/lib/post_creator.rb b/lib/post_creator.rb index bb28f3cdd24..abc8dc445b0 100644 --- a/lib/post_creator.rb +++ b/lib/post_creator.rb @@ -32,7 +32,7 @@ class PostCreator # skip_jobs - Don't enqueue jobs when creation succeeds. This is needed if you # wrap `PostCreator` in a transaction, as the sidekiq jobs could # dequeue before the commit finishes. If you do this, be sure to - # call `enqueue_jobs` after the transaction is comitted. + # call `enqueue_jobs` after the transaction is committed. # hidden_reason_id - Reason for hiding the post (optional) # skip_validations - Do not validate any of the content in the post # draft_key - the key of the draft we are creating (will be deleted on success) diff --git a/lib/post_jobs_enqueuer.rb b/lib/post_jobs_enqueuer.rb index 1fbbe0183af..4809fdc1e86 100644 --- a/lib/post_jobs_enqueuer.rb +++ b/lib/post_jobs_enqueuer.rb @@ -10,7 +10,7 @@ class PostJobsEnqueuer def enqueue_jobs # We need to enqueue jobs after the transaction. - # Otherwise they might begin before the data has been comitted. + # Otherwise they might begin before the data has been committed. enqueue_post_alerts unless @opts[:import_mode] feature_topic_users unless @opts[:import_mode] trigger_post_post_process diff --git a/lib/rate_limiter.rb b/lib/rate_limiter.rb index bea535b7fac..12f565bf17b 100644 --- a/lib/rate_limiter.rb +++ b/lib/rate_limiter.rb @@ -187,7 +187,7 @@ class RateLimiter # number of events in buffer less than max allowed? OR (redis.llen(prefixed_key) < @max) || - # age bigger than silding window size? + # age bigger than sliding window size? (age_of_oldest(now) >= @secs) end diff --git a/lib/search.rb b/lib/search.rb index fdc064bfd3d..4efdbff9caf 100644 --- a/lib/search.rb +++ b/lib/search.rb @@ -76,7 +76,7 @@ class Search data.force_encoding("UTF-8") if purpose != :topic # TODO cppjieba_rb is designed for chinese, we need something else for Japanese - # Korean appears to be safe cause words are already space seperated + # Korean appears to be safe cause words are already space separated # For Japanese we should investigate using kakasi if segment_cjk? require 'cppjieba_rb' unless defined? CppjiebaRb diff --git a/lib/tasks/admin.rake b/lib/tasks/admin.rake index 80c403616dc..d730ed66fe3 100644 --- a/lib/tasks/admin.rake +++ b/lib/tasks/admin.rake @@ -39,7 +39,7 @@ task "admin:create" => :environment do email = ask("Email: ") existing_user = User.find_by_email(email) - # check if user account already exixts + # check if user account already exists if existing_user # user already exists, ask for password reset admin = existing_user diff --git a/lib/tasks/autospec.rake b/lib/tasks/autospec.rake index 895eb6da20b..0a6c9fadd5c 100644 --- a/lib/tasks/autospec.rake +++ b/lib/tasks/autospec.rake @@ -1,7 +1,7 @@ # frozen_string_literal: true # I like guard, don't get me wrong, but it is just not working right -# architectually it can not do what I want it to do, this is how I want +# architecturally it can not do what I want it to do, this is how I want # it to behave desc "Run all specs automatically as needed" diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake index 0e6bd415929..feafbfc2343 100644 --- a/lib/tasks/docker.rake +++ b/lib/tasks/docker.rake @@ -8,7 +8,7 @@ # => SKIP_TESTS set to 1 to skip all tests # => SKIP_CORE set to 1 to skip core tests (rspec and qunit) # => SKIP_PLUGINS set to 1 to skip plugin tests (rspec and qunit) -# => SKIP_INSTALL_PLUGINS comma seperated list of plugins you want to skip installing +# => SKIP_INSTALL_PLUGINS comma separated list of plugins you want to skip installing # => INSTALL_OFFICIAL_PLUGINS set to 1 to install all core plugins before running tests # => RUBY_ONLY set to 1 to skip all qunit tests # => JS_ONLY set to 1 to skip all rspec tests diff --git a/lib/tasks/emails.rake b/lib/tasks/emails.rake index 1ea427a21a9..2cd3e8e4fd6 100644 --- a/lib/tasks/emails.rake +++ b/lib/tasks/emails.rake @@ -111,7 +111,7 @@ task 'emails:test', [:email] => [:environment] do |_, args| STR elsif e.to_s.match(/530.*STARTTLS/) - # We can't run a prelimary test with STARTTLS, we'll just try sending the test email. + # We can't run a preliminary test with STARTTLS, we'll just try sending the test email. message = "OK" elsif e.to_s.match(/535/) diff --git a/lib/tasks/uploads.rake b/lib/tasks/uploads.rake index a085e0e1b54..42d089fcef6 100644 --- a/lib/tasks/uploads.rake +++ b/lib/tasks/uploads.rake @@ -46,7 +46,7 @@ def gather_uploads `cp --link '#{source}' '#{destination}'` end - # ensure file has been succesfuly copied over + # ensure file has been successfully copied over raise unless file_exists?(destination) # remap links in db diff --git a/lib/text_cleaner.rb b/lib/text_cleaner.rb index 179ec5f70d9..09160f3f3ef 100644 --- a/lib/text_cleaner.rb +++ b/lib/text_cleaner.rb @@ -4,7 +4,7 @@ # Clean up a text # -# Whe use ActiveSupport mb_chars from here to properly support non ascii downcase +# We use ActiveSupport mb_chars from here to properly support non ascii downcase require 'active_support/core_ext/string/multibyte' class TextCleaner diff --git a/lib/text_sentinel.rb b/lib/text_sentinel.rb index f720e1b5032..1cd7e8d5913 100644 --- a/lib/text_sentinel.rb +++ b/lib/text_sentinel.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -# Whe use ActiveSupport mb_chars from here to properly support non ascii downcase +# We use ActiveSupport mb_chars from here to properly support non ascii downcase # TODO remove when ruby 2.4 lands require 'active_support/core_ext/string/multibyte' diff --git a/lib/topic_query_sql.rb b/lib/topic_query_sql.rb index 93a2b9a8625..c96f46c68c6 100644 --- a/lib/topic_query_sql.rb +++ b/lib/topic_query_sql.rb @@ -14,7 +14,7 @@ module TopicQuerySQL -"CASE WHEN categories.id = #{SiteSetting.uncategorized_category_id.to_i} THEN '' ELSE categories.name END #{dir}" end - # If you've clearned the pin, use bumped_at, otherwise put it at the top + # If you've cleared the pin, use bumped_at, otherwise put it at the top def order_with_pinned_sql -"CASE WHEN (COALESCE(topics.pinned_at, '#{lowest_date}') > COALESCE(tu.cleared_pinned_at, '#{lowest_date}')) @@ -23,7 +23,7 @@ module TopicQuerySQL END DESC" end - # If you've clearned the pin, use bumped_at, otherwise put it at the top + # If you've cleared the pin, use bumped_at, otherwise put it at the top def order_nocategory_with_pinned_sql -"CASE WHEN topics.pinned_globally diff --git a/lib/url_helper.rb b/lib/url_helper.rb index be75c5d0a29..4bbafe331f3 100644 --- a/lib/url_helper.rb +++ b/lib/url_helper.rb @@ -87,7 +87,7 @@ class UrlHelper # to avoid asset_host mixups return schemaless(url) if secure - # PERF: avoid parsing url excpet for extreme conditions + # PERF: avoid parsing url except for extreme conditions # this is a hot path used on home page filename = url if url.include?("?") diff --git a/plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js.es6 b/plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js.es6 index d82cfa4d0d4..0f4abe2cd53 100644 --- a/plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js.es6 +++ b/plugins/discourse-local-dates/assets/javascripts/lib/date-with-zone-helper.js.es6 @@ -6,11 +6,11 @@ const { getProperties } = Ember; - add(count unit) adds a COUNT of UNITS to a date - subtract(count unit) subtracts a COUNT of UNITS to a date - - format(format) formats a date with zone in a consitent way, optional moment format + - format(format) formats a date with zone in a consistent way, optional moment format - isDST() allows to know if a date in a specified timezone is currently under DST - datetimeWithZone(timezone) returns a new moment object with timezone applied - datetime returns the moment object - - unitRepetitionsBetweenDates(duration, date) return the number of repertitions of + - unitRepetitionsBetweenDates(duration, date) return the number of repetitions of duration between two dates, eg for duration: "1.weeks", "2.months"... */ export default class DateWithZoneHelper { diff --git a/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb b/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb index 35b9c1e4b31..e249d98a441 100644 --- a/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb +++ b/plugins/discourse-narrative-bot/spec/discourse_narrative_bot/new_user_narrative_spec.rb @@ -637,7 +637,7 @@ describe DiscourseNarrativeBot::NewUserNarrative do end end - describe 'fomatting tutorial' do + describe 'formatting tutorial' do before do narrative.set_data(user, state: :tutorial_formatting, topic_id: topic.id) end diff --git a/plugins/discourse-presence/spec/requests/presence_controller_spec.rb b/plugins/discourse-presence/spec/requests/presence_controller_spec.rb index 8df3086aef8..9f374dbd404 100644 --- a/plugins/discourse-presence/spec/requests/presence_controller_spec.rb +++ b/plugins/discourse-presence/spec/requests/presence_controller_spec.rb @@ -406,7 +406,7 @@ describe ::Presence::PresencesController do ) end - it 'publises the right message when closing composer in public topic' do + it 'publishes the right message when closing composer in public topic' do messages = MessageBus.track_publish do post '/presence/publish.json', params: { topic_id: public_topic.id, @@ -424,7 +424,7 @@ describe ::Presence::PresencesController do expect(message.user_ids).to eq(nil) end - it 'publises the right message when closing composer in private topic' do + it 'publishes the right message when closing composer in private topic' do messages = MessageBus.track_publish do post '/presence/publish.json', params: { topic_id: private_topic.id, @@ -442,7 +442,7 @@ describe ::Presence::PresencesController do expect(message.user_ids).to eq(nil) end - it 'publises the right message when closing composer in private message' do + it 'publishes the right message when closing composer in private message' do post = Fabricate(:post, topic: private_message, user: user) messages = MessageBus.track_publish do diff --git a/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js.es6 b/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js.es6 index e004aefa759..061ccceaf97 100644 --- a/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js.es6 +++ b/plugins/poll/assets/javascripts/lib/discourse-markdown/poll.js.es6 @@ -292,7 +292,7 @@ export function setup(helper) { /*! * Joseph Myer's md5() algorithm wrapped in a self-invoked function to prevent - * global namespace polution, modified to hash unicode characters as UTF-8. + * global namespace pollution, modified to hash unicode characters as UTF-8. * * Copyright 1999-2010, Joseph Myers, Paul Johnston, Greg Holt, Will BondAfter speaking with a number of our younger employees I think tutition reimbursement is really key to retaining them. Many of them are looking to earn advanced degrees. If we can setup a plan that accomplishes this effectively we can really grow our staff\'s ability and knowledge.
After speaking with a number of our younger employees I think tuition reimbursement is really key to retaining them. Many of them are looking to earn advanced degrees. If we can setup a plan that accomplishes this effectively we can really grow our staff\'s ability and knowledge.