From 90d37a63a669c0bd2081c5d7c90430cff1d00a4f Mon Sep 17 00:00:00 2001 From: Martin Schoeler Date: Thu, 22 Nov 2018 10:57:37 -0200 Subject: [PATCH] Update dependencies. (#969) * update dependencies * fix linting * igonre rule 004 * exclude rule 004 on travis * more linting fixes * more linting --- .travis.yml | 2 +- Gemfile.lock | 224 ++++----- .../create-the-first-admin/README.md | 18 +- .../database-migration/README.md | 20 +- .../email/direct-reply/README.md | 32 +- .../file-upload/minio/README.md | 42 +- administrator-guides/import/csv/README.md | 32 +- .../integrations/github/README.md | 2 +- .../remote-video-monitoring/README.md | 4 +- .../markdown-styleguide/README.md | 430 +++++++++++------- .../branches-and-releases/README.md | 78 ++-- .../iframe-integration/events/README.md | 10 +- developer-guides/mobile-apps/README.md | 46 +- .../method-calls/register-user/README.md | 32 +- .../rest-api/users/getavatar/README.md | 4 +- .../ui-and-theming/themes/README.md | 64 ++- .../windows-server/README.md | 113 +++-- .../README.md | 164 +++---- installation/paas-deployments/aws/README.md | 222 ++++----- markdown-style.rb | 4 +- 20 files changed, 879 insertions(+), 664 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ddf909fef..48ace85867 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,5 +12,5 @@ env: global: - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer script: - - bundle exec mdl ./ -i -g + - bundle exec mdl ./ -r ~MD004 -i -g - bundle exec "rake test" diff --git a/Gemfile.lock b/Gemfile.lock index cac8e706fa..19050d6d6d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (4.2.9) + activesupport (4.2.10) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) @@ -17,115 +17,124 @@ GEM coffee-script-source (1.11.1) colorator (1.1.0) colorize (0.8.1) - commonmarker (0.17.7.1) + commonmarker (0.17.13) ruby-enum (~> 0.5) concurrent-ruby (1.0.5) + dnsruby (1.61.2) + addressable (~> 2.5) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) ethon (0.11.0) ffi (>= 1.3.0) + eventmachine (1.2.7) execjs (2.7.0) - faraday (0.14.0) + faraday (0.15.3) multipart-post (>= 1.2, < 3) - ffi (1.9.18) + ffi (1.9.25) forwardable-extended (2.6.0) gemoji (3.0.0) - github-pages (175) - activesupport (= 4.2.9) - github-pages-health-check (= 1.3.5) - jekyll (= 3.6.2) - jekyll-avatar (= 0.5.0) - jekyll-coffeescript (= 1.0.2) - jekyll-commonmark-ghpages (= 0.1.3) + github-pages (192) + activesupport (= 4.2.10) + github-pages-health-check (= 1.8.1) + jekyll (= 3.7.4) + jekyll-avatar (= 0.6.0) + jekyll-coffeescript (= 1.1.1) + jekyll-commonmark-ghpages (= 0.1.5) jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.9.2) - jekyll-gist (= 1.4.1) - jekyll-github-metadata (= 2.9.3) - jekyll-mentions (= 1.2.0) + jekyll-feed (= 0.10.0) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.9.4) + jekyll-mentions (= 1.4.1) jekyll-optional-front-matter (= 0.3.0) jekyll-paginate (= 1.1.0) jekyll-readme-index (= 0.2.0) - jekyll-redirect-from (= 0.12.1) - jekyll-relative-links (= 0.5.2) - jekyll-remote-theme (= 0.2.3) - jekyll-sass-converter (= 1.5.0) - jekyll-seo-tag (= 2.3.0) - jekyll-sitemap (= 1.1.1) + jekyll-redirect-from (= 0.14.0) + jekyll-relative-links (= 0.5.3) + jekyll-remote-theme (= 0.3.1) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.5.0) + jekyll-sitemap (= 1.2.0) jekyll-swiss (= 0.4.0) - jekyll-theme-architect (= 0.1.0) - jekyll-theme-cayman (= 0.1.0) - jekyll-theme-dinky (= 0.1.0) - jekyll-theme-hacker (= 0.1.0) - jekyll-theme-leap-day (= 0.1.0) - jekyll-theme-merlot (= 0.1.0) - jekyll-theme-midnight (= 0.1.0) - jekyll-theme-minimal (= 0.1.0) - jekyll-theme-modernist (= 0.1.0) - jekyll-theme-primer (= 0.5.2) - jekyll-theme-slate (= 0.1.0) - jekyll-theme-tactile (= 0.1.0) - jekyll-theme-time-machine (= 0.1.0) - jekyll-titles-from-headings (= 0.5.0) - jemoji (= 0.8.1) - kramdown (= 1.16.2) + jekyll-theme-architect (= 0.1.1) + jekyll-theme-cayman (= 0.1.1) + jekyll-theme-dinky (= 0.1.1) + jekyll-theme-hacker (= 0.1.1) + jekyll-theme-leap-day (= 0.1.1) + jekyll-theme-merlot (= 0.1.1) + jekyll-theme-midnight (= 0.1.1) + jekyll-theme-minimal (= 0.1.1) + jekyll-theme-modernist (= 0.1.1) + jekyll-theme-primer (= 0.5.3) + jekyll-theme-slate (= 0.1.1) + jekyll-theme-tactile (= 0.1.1) + jekyll-theme-time-machine (= 0.1.1) + jekyll-titles-from-headings (= 0.5.1) + jemoji (= 0.10.1) + kramdown (= 1.17.0) liquid (= 4.0.0) - listen (= 3.0.6) + listen (= 3.1.5) mercenary (~> 0.3) - minima (= 2.1.1) + minima (= 2.5.0) + nokogiri (>= 1.8.2, < 2.0) rouge (= 2.2.1) terminal-table (~> 1.4) - github-pages-health-check (1.3.5) + github-pages-health-check (1.8.1) addressable (~> 2.3) - net-dns (~> 0.8) + dnsruby (~> 1.60) octokit (~> 4.0) public_suffix (~> 2.0) - typhoeus (~> 0.7) - html-pipeline (2.7.1) + typhoeus (~> 1.3) + html-pipeline (2.8.4) activesupport (>= 2) nokogiri (>= 1.4) - html-proofer (3.7.6) + html-proofer (3.9.2) activesupport (>= 4.2, < 6.0) addressable (~> 2.3) colorize (~> 0.8) mercenary (~> 0.3.2) nokogiri (~> 1.8.1) parallel (~> 1.3) - typhoeus (~> 0.7) + typhoeus (~> 1.3) yell (~> 2.0) - i18n (0.9.3) + http_parser.rb (0.6.0) + i18n (0.9.5) concurrent-ruby (~> 1.0) - jekyll (3.6.2) + jekyll (3.7.4) addressable (~> 2.4) colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 1.1) + jekyll-watch (~> 2.0) kramdown (~> 1.14) liquid (~> 4.0) mercenary (~> 0.3.3) pathutil (~> 0.9) - rouge (>= 1.7, < 3) + rouge (>= 1.7, < 4) safe_yaml (~> 1.0) - jekyll-avatar (0.5.0) + jekyll-avatar (0.6.0) jekyll (~> 3.0) - jekyll-coffeescript (1.0.2) + jekyll-coffeescript (1.1.1) coffee-script (~> 2.2) coffee-script-source (~> 1.11.1) - jekyll-commonmark (1.1.0) + jekyll-commonmark (1.2.0) commonmarker (~> 0.14) jekyll (>= 3.0, < 4.0) - jekyll-commonmark-ghpages (0.1.3) + jekyll-commonmark-ghpages (0.1.5) commonmarker (~> 0.17.6) jekyll-commonmark (~> 1) rouge (~> 2) jekyll-default-layout (0.1.4) jekyll (~> 3.0) - jekyll-feed (0.9.2) + jekyll-feed (0.10.0) jekyll (~> 3.3) - jekyll-gist (1.4.1) + jekyll-gist (1.5.0) octokit (~> 4.2) - jekyll-github-metadata (2.9.3) + jekyll-github-metadata (2.9.4) jekyll (~> 3.1) octokit (~> 4.0, != 4.4.0) - jekyll-mentions (1.2.0) - activesupport (~> 4.0) + jekyll-mentions (1.4.1) html-pipeline (~> 2.3) jekyll (~> 3.0) jekyll-optional-front-matter (0.3.0) @@ -133,107 +142,109 @@ GEM jekyll-paginate (1.1.0) jekyll-readme-index (0.2.0) jekyll (~> 3.0) - jekyll-redirect-from (0.12.1) + jekyll-redirect-from (0.14.0) jekyll (~> 3.3) - jekyll-relative-links (0.5.2) + jekyll-relative-links (0.5.3) jekyll (~> 3.3) - jekyll-remote-theme (0.2.3) + jekyll-remote-theme (0.3.1) jekyll (~> 3.5) rubyzip (>= 1.2.1, < 3.0) - typhoeus (>= 0.7, < 2.0) - jekyll-sass-converter (1.5.0) + jekyll-sass-converter (1.5.2) sass (~> 3.4) - jekyll-seo-tag (2.3.0) + jekyll-seo-tag (2.5.0) jekyll (~> 3.3) - jekyll-sitemap (1.1.1) + jekyll-sitemap (1.2.0) jekyll (~> 3.3) jekyll-swiss (0.4.0) - jekyll-theme-architect (0.1.0) + jekyll-theme-architect (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-cayman (0.1.0) + jekyll-theme-cayman (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-dinky (0.1.0) + jekyll-theme-dinky (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.1.0) + jekyll-theme-hacker (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-leap-day (0.1.0) + jekyll-theme-leap-day (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-merlot (0.1.0) + jekyll-theme-merlot (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-midnight (0.1.0) + jekyll-theme-midnight (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-minimal (0.1.0) + jekyll-theme-minimal (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-modernist (0.1.0) + jekyll-theme-modernist (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.5.2) + jekyll-theme-primer (0.5.3) jekyll (~> 3.5) jekyll-github-metadata (~> 2.9) - jekyll-seo-tag (~> 2.2) - jekyll-theme-slate (0.1.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-tactile (0.1.0) + jekyll-theme-tactile (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-time-machine (0.1.0) + jekyll-theme-time-machine (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.0) + jekyll-titles-from-headings (0.5.1) jekyll (~> 3.3) - jekyll-watch (1.5.1) + jekyll-watch (2.1.2) listen (~> 3.0) - jemoji (0.8.1) - activesupport (~> 4.0, >= 4.2.9) + jemoji (0.10.1) gemoji (~> 3.0) html-pipeline (~> 2.2) - jekyll (>= 3.0) - kramdown (1.16.2) + jekyll (~> 3.0) + kramdown (1.17.0) liquid (4.0.0) - listen (3.0.6) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9.7) - mdl (0.4.0) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + mdl (0.5.0) kramdown (~> 1.12, >= 1.12.0) mixlib-cli (~> 1.7, >= 1.7.0) mixlib-config (~> 2.2, >= 2.2.1) mercenary (0.3.6) mini_portile2 (2.3.0) - minima (2.1.1) - jekyll (~> 3.3) + minima (2.5.0) + jekyll (~> 3.5) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) minitest (5.11.3) mixlib-cli (1.7.0) - mixlib-config (2.2.4) + mixlib-config (2.2.13) + tomlrb multipart-post (2.0.0) - net-dns (0.8.0) - nokogiri (1.8.2) + nokogiri (1.8.5) mini_portile2 (~> 2.3.0) - octokit (4.8.0) + octokit (4.13.0) sawyer (~> 0.8.0, >= 0.5.3) parallel (1.12.1) - pathutil (0.16.1) + pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (2.0.5) - rake (12.3.0) - rb-fsevent (0.10.2) + rake (12.3.1) + rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) robotex (1.0.0) rouge (2.2.1) - ruby-enum (0.7.1) + ruby-enum (0.7.2) i18n - rubyzip (1.2.1) + ruby_dep (1.5.0) + rubyzip (1.2.2) safe_yaml (1.0.4) - sass (3.5.5) + sass (3.6.0) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) @@ -244,11 +255,12 @@ GEM terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) - typhoeus (0.8.0) - ethon (>= 0.8.0) - tzinfo (1.2.4) + tomlrb (1.2.7) + typhoeus (1.3.0) + ethon (>= 0.9.0) + tzinfo (1.2.5) thread_safe (~> 0.1) - unicode-display_width (1.3.0) + unicode-display_width (1.4.0) yell (2.0.7) PLATFORMS @@ -262,4 +274,4 @@ DEPENDENCIES rake BUNDLED WITH - 1.16.1 + 1.16.2 diff --git a/administrator-guides/create-the-first-admin/README.md b/administrator-guides/create-the-first-admin/README.md index 91a6275a78..3aaaf239b6 100644 --- a/administrator-guides/create-the-first-admin/README.md +++ b/administrator-guides/create-the-first-admin/README.md @@ -4,11 +4,13 @@ After you deploy your server, the first user to register becomes the administrat In case your server has no administrators, you can create the first admin account by defining the environment variables ADMIN_PASS and ADMIN_EMAIL once. - export ROOT_URL=http://your-host-name.com-as-accessed-from-internet:3000/ - export MONGO_URL=mongodb://localhost:27017/rocketchat - export PORT=3000 - export ADMIN_USERNAME=admin - export ADMIN_PASS=supersecret - export ADMIN_EMAIL=admin@example.com - - node main.js +```bash +export ROOT_URL=http://your-host-name.com-as-accessed-from-internet:3000/ +export MONGO_URL=mongodb://localhost:27017/rocketchat +export PORT=3000 +export ADMIN_USERNAME=admin +export ADMIN_PASS=supersecret +export ADMIN_EMAIL=admin@example.com + +node main.js +``` \ No newline at end of file diff --git a/administrator-guides/database-migration/README.md b/administrator-guides/database-migration/README.md index 03a88223de..b9684131c4 100644 --- a/administrator-guides/database-migration/README.md +++ b/administrator-guides/database-migration/README.md @@ -12,19 +12,23 @@ Database migration may fail in these scenarios. A typical failure message is similar to: - | Your database migration failed: | - | Object [object Object] has no method 'addUsersToRoles' | - (...) - | This Rocket.Chat version: 0.39.0 | - | Database locked at version: 18 | - | Database target version: 58 | +```bash +| Your database migration failed: | +| Object [object Object] has no method 'addUsersToRoles' | +(...) +| This Rocket.Chat version: 0.39.0 | +| Database locked at version: 18 | +| Database target version: 58 | +``` As an example, the above migration is locked and stuck on 18. We need a target of 19 before migration to 58. One way to force migration is to manually unlock the migration in mongo and also increase database version to the target version (19). - use rocketchat - db.migrations.update({_id: 'control'},{$set:{locked:false,version:19}}) +```js +use rocketchat +db.migrations.update({_id: 'control'},{$set:{locked:false,version:19}}) +``` Restart Rocket.Chat and the migration should succeed now to the latest version. diff --git a/administrator-guides/email/direct-reply/README.md b/administrator-guides/email/direct-reply/README.md index a7c947ba6e..71bb260209 100644 --- a/administrator-guides/email/direct-reply/README.md +++ b/administrator-guides/email/direct-reply/README.md @@ -54,9 +54,11 @@ Email body in languages **other than English** may also work until and unless `O Quoted headers aren't picked up if the email client breaks it up into multiple lines. GMail breaks up any lines over 80 characters for you. - On , - wrote: - > blah +``` +On , +wrote: +> blah +``` Not to mention that we're searching for "on" and "wrote". It won't work with other languages. @@ -68,22 +70,26 @@ Possible solution: While replying, remove everything else than your actual messa Lines starting with `-` or `_` sometimes mark the beginning of signatures: - Hello +``` +Hello - -- - Rick +-- +Rick +``` Not everyone follows this convention: - Hello +``` +Hello - Mr Rick Olson - Galactic President Superstar Mc Awesomeville - GitHub +Mr Rick Olson +Galactic President Superstar Mc Awesomeville +GitHub - **********************DISCLAIMER*********************************** - * Note: blah blah blah * - **********************DISCLAIMER*********************************** +**********************DISCLAIMER*********************************** +* Note: blah blah blah * +**********************DISCLAIMER*********************************** +``` ## Problem? diff --git a/administrator-guides/file-upload/minio/README.md b/administrator-guides/file-upload/minio/README.md index c6ab895e80..0c785c433b 100644 --- a/administrator-guides/file-upload/minio/README.md +++ b/administrator-guides/file-upload/minio/README.md @@ -9,26 +9,28 @@ alternative to AWS S3. You can [download and install](https://minio.io/downloads Once you install and deploy Minio server, you can get the AccessKey and SecretKey from the startup message. - 2017-01-24T19:53:21.141689279Z - 2017-01-24T19:53:21.141730078Z Endpoint: http://172.17.0.2:9000 http://127.0.0.1:9000 - 2017-01-24T19:53:21.141735582Z AccessKey: 5fD3434325fDaGE77BNJlSoV1xGp - 2017-01-24T19:53:21.141738933Z SecretKey: Quie2teech4oofoo9Dahsoo7aithauja - 2017-01-24T19:53:21.141742292Z Region: us-east-1 - 2017-01-24T19:53:21.141745405Z SQS ARNs: - 2017-01-24T19:53:21.141749472Z - 2017-01-24T19:53:21.141752499Z Browser Access: - 2017-01-24T19:53:21.141755711Z http://172.17.0.2:9000 http://127.0.0.1:9000 - 2017-01-24T19:53:21.141758830Z - 2017-01-24T19:53:21.141762000Z Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide - 2017-01-24T19:53:21.141765638Z $ mc config host add myminio http://172.17.0.2:9000 1H2MI5BCU45990DZ3WRL flJlSoV1xGp+u2fhfDaGE77BNE6OdyvAsdI15kPq - 2017-01-24T19:53:21.141768751Z - 2017-01-24T19:53:21.141771631Z Object API (Amazon S3 compatible): - 2017-01-24T19:53:21.141774638Z Go: https://docs.minio.io/docs/golang-client-quickstart-guide - 2017-01-24T19:53:21.142003548Z Java: https://docs.minio.io/docs/java-client-quickstart-guide - 2017-01-24T19:53:21.142019474Z Python: https://docs.minio.io/docs/python-client-quickstart-guide - 2017-01-24T19:53:21.142024004Z JavaScript: https://docs.minio.io/docs/javascript-client-quickstart-guide - 2017-01-24T19:53:21.142027614Z - 2017-01-24T19:53:21.142030994Z Drive Capacity: 262 GiB Free, 303 GiB Total +```bash +2017-01-24T19:53:21.141689279Z +2017-01-24T19:53:21.141730078Z Endpoint: http://172.17.0.2:9000 http://127.0.0.1:9000 +2017-01-24T19:53:21.141735582Z AccessKey: 5fD3434325fDaGE77BNJlSoV1xGp +2017-01-24T19:53:21.141738933Z SecretKey: Quie2teech4oofoo9Dahsoo7aithauja +2017-01-24T19:53:21.141742292Z Region: us-east-1 +2017-01-24T19:53:21.141745405Z SQS ARNs: +2017-01-24T19:53:21.141749472Z +2017-01-24T19:53:21.141752499Z Browser Access: +2017-01-24T19:53:21.141755711Z http://172.17.0.2:9000 http://127.0.0.1:9000 +2017-01-24T19:53:21.141758830Z +2017-01-24T19:53:21.141762000Z Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide +2017-01-24T19:53:21.141765638Z $ mc config host add myminio http://172.17.0.2:9000 1H2MI5BCU45990DZ3WRL flJlSoV1xGp+u2fhfDaGE77BNE6OdyvAsdI15kPq +2017-01-24T19:53:21.141768751Z +2017-01-24T19:53:21.141771631Z Object API (Amazon S3 compatible): +2017-01-24T19:53:21.141774638Z Go: https://docs.minio.io/docs/golang-client-quickstart-guide +2017-01-24T19:53:21.142003548Z Java: https://docs.minio.io/docs/java-client-quickstart-guide +2017-01-24T19:53:21.142019474Z Python: https://docs.minio.io/docs/python-client-quickstart-guide +2017-01-24T19:53:21.142024004Z JavaScript: https://docs.minio.io/docs/javascript-client-quickstart-guide +2017-01-24T19:53:21.142027614Z +2017-01-24T19:53:21.142030994Z Drive Capacity: 262 GiB Free, 303 GiB Total +``` To override Minio's auto-generated keys, you may pass secret and access keys explicitly as environment variables. Explained [here](https://docs.minio.io/docs/minio-docker-quickstart-guide) diff --git a/administrator-guides/import/csv/README.md b/administrator-guides/import/csv/README.md index a3defb4cb7..607b3e1b37 100644 --- a/administrator-guides/import/csv/README.md +++ b/administrator-guides/import/csv/README.md @@ -6,21 +6,23 @@ The CSV importer allows you to import your own plain text files, however it does The zip file must be a **flat zip**, which means there can **not** be a "root" or "sub" folder in which the items reside in the zip file. The importer looks for the files `channels.csv` and `users.csv` immediately inside the zip and not inside of any folder. If you have any questions about this, please ask in [#support channel on the Community server](https://open.rocket.chat/channel/support). - fileToImport.zip - ├── channels.csv - ├── users.csv - ├── general - │   └── messages.csv - ├── otherChannelName - │   ├── canBeAnyNameButHasToHave.csv - │   ├── theDotCSV.csv - │   └── asTheFileExt.csv - ├── privateArea - │   └── messages.csv - └── random -    ├── dateTimeStamp1.csv -    ├── dateTimeStamp2.csv -    └── dateTimeStamp3.csv +``` +fileToImport.zip +├── channels.csv +├── users.csv +├── general +│   └── messages.csv +├── otherChannelName +│   ├── canBeAnyNameButHasToHave.csv +│   ├── theDotCSV.csv +│   └── asTheFileExt.csv +├── privateArea +│   └── messages.csv +└── random +   ├── dateTimeStamp1.csv +   ├── dateTimeStamp2.csv +   └── dateTimeStamp3.csv +``` ## channels.csv Format diff --git a/administrator-guides/integrations/github/README.md b/administrator-guides/integrations/github/README.md index dadf0b1428..405f40f9f6 100644 --- a/administrator-guides/integrations/github/README.md +++ b/administrator-guides/integrations/github/README.md @@ -542,7 +542,7 @@ The Handlebars template used by Rocket.Chat to render messages from a JSON objec ### Send commands to GitHub - This script only works for public repositories +`This script only works for public repositories` - Create a new **Outgoing WebHook** - Select the channel where you will use the commands and receive the responses diff --git a/community-cookbook/remote-video-monitoring/README.md b/community-cookbook/remote-video-monitoring/README.md index a1050f767a..c485a0f849 100644 --- a/community-cookbook/remote-video-monitoring/README.md +++ b/community-cookbook/remote-video-monitoring/README.md @@ -39,11 +39,11 @@ This feature is implemented within the webrtc in-band signaling driver. The driver is not installed by default. To install the driver, and the feature, you need to first remove the production webrtc driver: - meteor remove rocketchat:webrtc +`meteor remove rocketchat:webrtc` Then install the in-band driver: - meteor add rocketchat:webrtc-ib +`meteor add rocketchat:webrtc-ib` ### Create location 'users' diff --git a/contributing/documentation/markdown-styleguide/README.md b/contributing/documentation/markdown-styleguide/README.md index 1a14369c93..fd91f46042 100644 --- a/contributing/documentation/markdown-styleguide/README.md +++ b/contributing/documentation/markdown-styleguide/README.md @@ -20,25 +20,29 @@ Headers should not be skipped, instead incremented one by one **Wrong**: - # Header 1 +```markdown +# Header 1 - ### Header 3 +### Header 3 - We skipped out a 2nd level header in this document +We skipped out a 2nd level header in this document +``` **Correct**: - # Header 1 +```markdown +# Header 1 - ## Header 2 +## Header 2 - ### Header 3 +### Header 3 - #### Header 4 +#### Header 4 - ## Another Header 2 +## Another Header 2 - ### Another Header 3 +### Another Header 3 +``` ### MD002 - First header should be a top level header @@ -46,15 +50,19 @@ The first header of the document should be a top level header (H1). **Wrong**: - ## This isn't a H1 header +```markdown +## This isn't a H1 header - ### Another header +### Another header +``` **Correct**: - # Start with a H1 header +```markdown +# Start with a H1 header - ## Then use a H2 for subsections +## Then use a H2 for subsections +``` ### MD003 - Header style @@ -62,19 +70,23 @@ The header style used on documents should be `atx`. **Wrong**: - Setext style H1 - =============== +```markdown +Setext style H1 +=============== - Setext style H2 - --------------- +Setext style H2 +--------------- +``` - ### ATX style H3 +### ATX style H3 **Correct**: - # ATX style H1 +```markdown +# ATX style H1 - ## ATX style H2 +## ATX style H2 +``` ### MD004 - Unordered list style @@ -82,15 +94,19 @@ Lists should be created using dashes. **Wrong**: - * Item 1 - + Item 2 - - Item 3 +```markdown +* Item 1 ++ Item 2 +- Item 3 +``` **Correct**: - - Item 1 - - Item 2 - - Item 3 +```markdown +- Item 1 +- Item 2 +- Item 3 +``` ### MD005 - No inconsistent indentation for list items at the same level @@ -98,17 +114,21 @@ Lists should have consistent indentation, usually this rule will be triggered be **Wrong**: - - Item 1 - - Nested Item 1 - - Nested Item 2 - - A misaligned item +```markdown +- Item 1 + - Nested Item 1 + - Nested Item 2 + - A misaligned item +``` **Correct**: - - Item 1 - - Nested Item 1 - - Nested Item 2 - - Nested Item 3 +```markdown +- Item 1 + - Nested Item 1 + - Nested Item 2 + - Nested Item 3 +``` ### MD006 - Consider starting bulleted lists at the beginning of the line @@ -116,17 +136,21 @@ Bulleted lists should start on the beginning of the line. **Wrong**: - Some text +```markdown +Some text - * List item - * List item + * List item + * List item +``` **Correct**: - Some test +```markdown +Some test - * List item - * List item +* List item +* List item +``` ### MD007 - Unordered list indentation @@ -134,13 +158,17 @@ List items should be indented using 4 spaces. **Wrong**: - * List item - * Nested list item indented by 3 spaces +```markdown +* List item + * Nested list item indented by 3 spaces +``` **Correct**: - * List item - * Nested list item indented by 4 spaces +```markdown +* List item + * Nested list item indented by 4 spaces +``` ### MD009 - No trailing spaces @@ -160,11 +188,15 @@ When creating links you should use the `[]` surrounding the text and `()` surrou **Wrong**: - (Incorrect link syntax)[http://www.example.com/] +```markdown +(Incorrect link syntax)[http://www.example.com/] +``` **Correct**: +```markdown [Correct link syntax](http://www.example.com/) +``` ### MD012 - No multiple consecutive blank lines @@ -172,16 +204,20 @@ There should not have more than one consecutive blank line on the document. **Wrong**: - Some text here +```markdown +Some text here - Some more text here +Some more text here +``` **Correct**: - Some text here +```markdown +Some text here - Some more text here +Some more text here +``` ### MD018 - Use space after hash on atx style header @@ -189,15 +225,19 @@ There should be a space after the hashes on atx style headers. **Wrong**: - #Header 1 +```markdown +#Header 1 - ##Header 2 +##Header 2 +``` **Correct**: - # Header 1 +```markdown +# Header 1 - ## Header 2 +## Header 2 +``` ### MD019 - No multiple spaces after hash on atx style header @@ -205,15 +245,19 @@ There shouldn't have more than 1 space after the hash on atx style headers. **Wrong**: - # Header 1 +```markdown +# Header 1 - ## Header 2 +## Header 2 +``` **Correct**: - # Header 1 +```markdown +# Header 1 - ## Header 2 +## Header 2 +``` ### MD022 - Headers should be surrounded by blank lines @@ -221,35 +265,43 @@ All headers should have a blank line both before and after (except where the hea **Wrong**: - # Header 1 - Some text +```markdown +# Header 1 +Some text - Some more text - ## Header 2 +Some more text +## Header 2 +``` **Correct**: - # Header 1 +```markdown +# Header 1 - Some text +Some text - Some more text +Some more text - ## Header 2 +## Header 2 +``` ### MD023 - Headers must start at the beginning of the line **Wrong**: - Some text +```markdown +Some text - # Indented header + # Indented header +``` **Correct**: - Some text +```markdown +Some text - # Header +# Header +``` ### MD025 - No multiple top level headers in the same document @@ -257,17 +309,21 @@ There should only have one top level header (`h1`) on a document. **Wrong**: - # Top level header +```markdown +# Top level header - # Another top level header +# Another top level header +``` **Correct**: - # Title +```markdown +# Title - ## Header +## Header - ## Another header +## Another header +``` ### MD027 - No multiple spaces after blockquote symbol @@ -275,13 +331,17 @@ Blockquote should not have more than one space after the blockquote symbol ( `>` **Wrong**: - > This is a block quote with bad indentation - > there should only be one. +```markdown +> This is a block quote with bad indentation +> there should only be one. +``` **Correct**: - > This is a block quote with bad indentation - > there should only be one. +```markdown +> This is a block quote with bad indentation +> there should only be one. +``` ### MD028 - No blank line inside blockquote @@ -289,25 +349,31 @@ There shouldn't have a blank line inside the same blockquote. **Wrong**: - > This is a blockquote - > which is immediately followed by +```markdown +> This is a blockquote +> which is immediately followed by - > this blockquote. Unfortunately - > In some parsers, these are treated as the same blockquote. +> this blockquote. Unfortunately +> In some parsers, these are treated as the same blockquote. +``` **Correct**: - > This is a blockquote. +```markdown +> This is a blockquote. - And Jimmy also said: +And Jimmy also said: - > This too is a blockquote. +> This too is a blockquote. +``` Alternatively, if they are supposed to be the same quote, then add the blockquote symbol at the beginning of the blank line - > This is a blockquote. - > - > This is the same blockquote. +```markdown +> This is a blockquote. +> +> This is the same blockquote. +``` ### MD029 - Ordered list item prefix @@ -315,15 +381,19 @@ Ordered lists should be ordered by a prefix that increases in numerical order. **Wrong**: - 1. Do this. - 1. Do that. - 1. Done. +```markdown +1. Do this. +1. Do that. +1. Done. +``` **Correct**: - 1. Do this. - 2. Do that. - 3. Done. +```markdown +1. Do this. +2. Do that. +3. Done. +``` ### MD030 - Space after list markers @@ -331,27 +401,31 @@ There should be only one space after a list marker. **Wrong**: - *Foo - *Bar - *Baz +```markdown +*Foo +*Bar +*Baz - 1. Foo - 1. Bar - 1. Baz +1. Foo +1. Bar +1. Baz +``` **Correct**: - * Foo - * Bar - * Baz +```markdown +* Foo +* Bar +* Baz - 1. Foo - 1. Bar - 1. Baz +1. Foo +1. Bar +1. Baz - 1. Foo - * Bar - 1. Baz +1. Foo +* Bar +1. Baz +``` ### MD031 - Fenced code blocks should be surrounded by blank lines @@ -359,29 +433,33 @@ Fenced code blocks should be surrounded by blank lines. **Wrong**: - Some text - `` ` - Code block - `` ` +```markdown +Some text +`` ` +Code block +`` ` - `` ` - Another code block - `` ` - Some more text +`` ` +Another code block +`` ` +Some more text +``` **Correct**: - Some text +```markdown +Some text - ``` - Code block - ``` +`` ` +Code block +`` ` - ``` - Another code block - ``` +`` ` +Another code block +`` ` - Some more text +Some more text +``` ### MD032 - Lists should be surrounded by blank lines @@ -389,25 +467,29 @@ Lists should be surrounded by blank lines. **Wrong**: - Some text - * Some - * List +```markdown +Some text +* Some +* List - 1. Some - 2. List - Some text +1. Some +2. List +Some text +``` **Correct**: - Some text +```markdown +Some text - * Some - * List +* Some +* List - 1. Some - 2. List +1. Some +2. List - Some text +Some text +``` ### MD034 - No bare URLs @@ -415,11 +497,15 @@ There should no bare urls on the document, surround the links with angle bracket **Wrong**: - For more information, see http://www.example.com/. +```markdown +For more information, see http://www.example.com/. +``` **Correct**: - For more information, see . +```markdown +For more information, see . +``` ### MD035 - Horizontal rule style @@ -427,15 +513,19 @@ Horizontal rules should be created using three slashes (`---`). **Wrong**: - *** +```markdown +*** - * * * +* * * - **** +**** +``` **Correct**: - --- +```markdown +--- +``` ### MD037 - No spaces inside emphasis markers @@ -443,15 +533,19 @@ There shouldn't have spaces inside emphasis markers (bold, italic). **Wrong**: - Here is some ** bold ** text. +```markdown +Here is some ** bold ** text. - Here is some _ italic _ text. +Here is some _ italic _ text. +``` **Correct**: - Here is some **bold** text. +```markdown +Here is some **bold** text. - Here is some _italic_ text. +Here is some _italic_ text. +``` ### MD038 - No spaces inside code span elements @@ -459,15 +553,19 @@ There shouldn't have spaces inside code span elements. **Wrong**: - ` some text ` +```markdown +` some text ` - `some text ` +`some text ` - ` some text` +` some text` +``` **Correct**: - `some text` +```markdown +`some text` +``` ### MD039 - No spaces inside link text @@ -475,8 +573,34 @@ There shouldn't have spaces inside link texts. **Wrong**: - [ a link ](http://www.example.com/) +```markdown +[ a link ](http://www.example.com/) +``` + +**Correct**: + +```markdown +[a link](http://www.example.com/) +``` + +### MD046 - Code block style + +Code blocks should be fenced. + +**Wrong**: + +```markdown + + codeblock using indentation. + +``` **Correct**: - [a link](http://www.example.com/) +```markdown + +` ` ` +codeblock using fences. +` ` ` + +``` \ No newline at end of file diff --git a/developer-guides/branches-and-releases/README.md b/developer-guides/branches-and-releases/README.md index d6960f3563..74046d7386 100644 --- a/developer-guides/branches-and-releases/README.md +++ b/developer-guides/branches-and-releases/README.md @@ -48,28 +48,34 @@ When the state of the `release-candidate` branch is ready to become a real relea The release process is as follows: - $ git checkout master - Switched to branch 'master' - $ git merge --no-ff release-candidate - Merge made by recursive. - (Summary of changes) - $ git tag -a [version number] +```bash +$ git checkout master +Switched to branch 'master' +$ git merge --no-ff release-candidate +Merge made by recursive. +(Summary of changes) +$ git tag -a [version number] +``` To keep the changes made in the release branch, we need to merge those back into develop, though. In Git: - $ git checkout develop - Switched to branch 'develop' - $ git merge --no-ff release-candidate - Merge made by recursive. - (Summary of changes) +```bash +$ git checkout develop +Switched to branch 'develop' +$ git merge --no-ff release-candidate +Merge made by recursive. +(Summary of changes) +``` To create the new `release-candidate` based on `develop`: - $ git checkout release-candidate - Switched to branch 'release-candidate' - $ git merge --no-ff develop - Merge made by recursive. - (Summary of changes) +```bash +$ git checkout release-candidate +Switched to branch 'release-candidate' +$ git merge --no-ff develop +Merge made by recursive. +(Summary of changes) +``` Every team member should strive to thoroughly test the `release-candidate` branch, especially regarding issues they've worked on. Any bug-fixes applied to `release-candidate` should immediately be cherry-picked into `develop`. @@ -81,27 +87,31 @@ Hotfix branches are very much like release branches in that they are also meant Hotfix branches are created from the `master` branch: - $ git checkout -b hotfix-[current-version].[sub-version] master - Switched to a new branch "hotfix-X.X.X" +```bash +$ git checkout -b hotfix-[current-version].[sub-version] master +Switched to a new branch "hotfix-X.X.X" +``` Then, fix the bug and commit the fix. Later, merge the bugfix into `master` and also into `release-candidate` (and `develop` if the bugfix cannot wait for the release branch to be finished). - $ git commit -m "Fixed severe production problem" - [hotfix-X.X.X abc12d3] Fixed severe production problem - 5 files changed, 32 insertions(+), 17 deletions(-) - - $ git checkout master - Switched to branch 'master' - $ git merge --no-ff hotfix-X.X.X - Merge made by recursive. - (Summary of changes) - $ git tag -a [current-version].[sub-version] - - $ git checkout release-candidate - Switched to branch 'release-candidate' - $ git merge --no-ff hotfix-X.X.X - Merge made by recursive. - (Summary of changes) +```bash +$ git commit -m "Fixed severe production problem" +[hotfix-X.X.X abc12d3] Fixed severe production problem +5 files changed, 32 insertions(+), 17 deletions(-) + +$ git checkout master +Switched to branch 'master' +$ git merge --no-ff hotfix-X.X.X +Merge made by recursive. +(Summary of changes) +$ git tag -a [current-version].[sub-version] + +$ git checkout release-candidate +Switched to branch 'release-candidate' +$ git merge --no-ff hotfix-X.X.X +Merge made by recursive. +(Summary of changes) +``` ## Error reporting diff --git a/developer-guides/iframe-integration/events/README.md b/developer-guides/iframe-integration/events/README.md index 9b2417bf0e..72384a2c38 100644 --- a/developer-guides/iframe-integration/events/README.md +++ b/developer-guides/iframe-integration/events/README.md @@ -18,7 +18,9 @@ Here is a list of events triggered from Rocket.Chat when the iframe integration Above there is a sample code that listens to events fired from Rocket.Chat opened on an `iframe`: - window.addEventListener('message', function(e) { - console.log(e.data.eventName); // event name - console.log(e.data.data); // event data - }); +```js +window.addEventListener('message', function(e) { + console.log(e.data.eventName); // event name + console.log(e.data.data); // event data +}); +``` \ No newline at end of file diff --git a/developer-guides/mobile-apps/README.md b/developer-guides/mobile-apps/README.md index d9f066b049..68011c2936 100644 --- a/developer-guides/mobile-apps/README.md +++ b/developer-guides/mobile-apps/README.md @@ -39,36 +39,48 @@ Since this app is built with Cordova, the same requirements apply: ### Install Cordova - $ sudo npm install -g cordova +```bash +$ sudo npm install -g cordova +``` Additional information here: ### Install dependencies - $ sudo npm install -g underscore - $ sudo npm install -g coffee +```bash +$ sudo npm install -g underscore +$ sudo npm install -g coffee +``` ### Get the App Clone the `Rocket.Chat.Cordova` repo: - $ git clone https://github.com/RocketChat/Rocket.Chat.Cordova - $ cd Rocket.Chat.Cordova +```bash +$ git clone https://github.com/RocketChat/Rocket.Chat.Cordova +$ cd Rocket.Chat.Cordova +``` ### Create/Edit conf files - $ echo 'Bugsnag.apiKey = "YOUR-API-KEY-HERE";' > www/js/bugsnag_apikey.js - $ echo 'window.ANDROID_SENDER_ID = "YOUR-ANDROID-ID-HERE";' > www/shared/js/android_sender_id.js +```bash +$ echo 'Bugsnag.apiKey = "YOUR-API-KEY-HERE";' > www/js/bugsnag_apikey.js +$ echo 'window.ANDROID_SENDER_ID = "YOUR-ANDROID-ID-HERE";' > www/shared/js/android_sender_id.js +``` ### Install app dependencies - $ sudo npm install +```bash +$ sudo npm install +``` ### Build the Android App In theory this is as simple as: - $ cordova build android +```bash +$ cordova build android +``` But if you get some errors (which seems kinda normal), make sure you have installed the SDK or tools in the Requirements section. Even though meteor may install it's own version of the SDK or tools, you still need the standalone version installed and the environment variables set for the Cordova build to succeed. @@ -76,14 +88,18 @@ But if you get some errors (which seems kinda normal), make sure you have instal If there are a lot of `cannot find module` build problems, try adding and removing the cordova android platform: - $ cordova platform remove android - $ cordova platform add android +```bash +$ cordova platform remove android +$ cordova platform add android +``` ### Test the App on an Emulator or Device SDKs for mobile platforms often come bundled with emulators that execute a device image, so that you can launch the app from the home screen and see how it interacts with many platform features. This command rebuilds the app and views it within android's emulator: - $ cordova emulate android +```bash +$ cordova emulate android +``` You may need to first associate a device with an emulator. @@ -91,7 +107,9 @@ You may need to first associate a device with an emulator. Alternately, you can plug the handset into your computer and test the app directly: - $ cordova run android +```bash +$ cordova run android +``` You would have to enable a USB debugging option on the device, and perhaps add a USB driver depending on your development environment. @@ -110,7 +128,7 @@ You must have at least 4GB of RAM (16 GB recommended) and 10 GB of disk space av Then: ```shell - $ docker pull rocketchat/meteor12androidbuilder +$ docker pull rocketchat/meteor12androidbuilder ``` Follow the instructions [of the docker image](https://hub.docker.com/r/rocketchat/meteor12androidbuilder/). diff --git a/developer-guides/realtime-api/method-calls/register-user/README.md b/developer-guides/realtime-api/method-calls/register-user/README.md index c99294828a..b8ad7db712 100644 --- a/developer-guides/realtime-api/method-calls/register-user/README.md +++ b/developer-guides/realtime-api/method-calls/register-user/README.md @@ -49,28 +49,32 @@ In the case there's an error on the request, a possible error response would be ### Possible errors - "reason": "error-user-registration-disabled", - "message": "User registration is disabled [403]", +``` +"reason": "error-user-registration-disabled", +"message": "User registration is disabled [403]", - "reason": "error-user-registration-secret", - "message": "User registration is only allowed via Secret URL [403]", +"reason": "error-user-registration-secret", +"message": "User registration is only allowed via Secret URL [403]", - "reason": "error-invalid-customfield-json", - "message": "Invalid JSON for Custom Fields [403]", +"reason": "error-invalid-customfield-json", +"message": "Invalid JSON for Custom Fields [403]", +``` #### Custom Fields related - "reason": "error-user-registration-custom-field", - "message": "Field ${ fieldName } is required [403]", +``` +"reason": "error-user-registration-custom-field", +"message": "Field ${ fieldName } is required [403]", - "reason": "error-user-registration-custom-field", - "message": "Value for field ${ fieldName } is invalid [403]", +"reason": "error-user-registration-custom-field", +"message": "Value for field ${ fieldName } is invalid [403]", - "reason": "error-user-registration-custom-field", - "message": "Max length of field ${ fieldName } ${ field.maxLength } [403]", +"reason": "error-user-registration-custom-field", +"message": "Max length of field ${ fieldName } ${ field.maxLength } [403]", - "reason": "error-user-registration-custom-field", - "message": "Min length of field ${ fieldName } ${ field.minLength } [403]", +"reason": "error-user-registration-custom-field", +"message": "Min length of field ${ fieldName } ${ field.minLength } [403]", +``` ## Accounts_CustomFields diff --git a/developer-guides/rest-api/users/getavatar/README.md b/developer-guides/rest-api/users/getavatar/README.md index b358d3e782..b5dd308a6a 100644 --- a/developer-guides/rest-api/users/getavatar/README.md +++ b/developer-guides/rest-api/users/getavatar/README.md @@ -18,7 +18,9 @@ curl http://localhost:3000/api/v1/users.getAvatar?userId=BsNr28znDkG8aeo7W ## Example Result - http://localhost:3000/avatar/bobsmith +``` +http://localhost:3000/avatar/bobsmith +``` _N.B. the response is a 307 temporary redirect_ diff --git a/developer-guides/ui-and-theming/themes/README.md b/developer-guides/ui-and-theming/themes/README.md index 6848571110..24c6126326 100644 --- a/developer-guides/ui-and-theming/themes/README.md +++ b/developer-guides/ui-and-theming/themes/README.md @@ -14,23 +14,27 @@ Private themes would need to be maintained on your own fork of Rocket.Chat, but The minimum contents for a theme package would be a `package.js` file containing the description, e.g: - Package.describe({ - name: 'author:mytheme', - version: '0.0.1', - summary: 'My theme customisations.', - git: 'https://github.com/author/my-rocket.chat-theme' - }); +```js +Package.describe({ + name: 'author:mytheme', + version: '0.0.1', + summary: 'My theme customisations.', + git: 'https://github.com/author/my-rocket.chat-theme' +}); +``` Then include dependent packages and your custom theme files. e.g: - Package.onUse(function(api) { - api.versionsFrom('1.2'); - api.use([ - 'templating', - 'rocketchat:lib', - 'rocketchat:theme' - ]); - api.use('templating', 'client'); +```js +Package.onUse(function(api) { + api.versionsFrom('1.2'); + api.use([ + 'templating', + 'rocketchat:lib', + 'rocketchat:theme' + ]); + api.use('templating', 'client'); +``` - - - @@ -38,16 +42,20 @@ Then include dependent packages and your custom theme files. e.g: The `rocketchat-theme` package has methods for including [Less](http://lesscss.org/) asset files in the build. Less files (and the a server.coffee or .js file to load them) must first be included in the `package.js` manifest (within the `Package.onUse` function), e.g.: - api.addAssets([ - 'assets/theme.less' - ], 'server'); - api.addFiles([ - 'server.coffee' - ], 'server'); +```js + api.addAssets([ + 'assets/theme.less' + ], 'server'); + api.addFiles([ + 'server.coffee' + ], 'server'); +``` Then in `server.coffee`... - RocketChat.theme.addPackageAsset -> Assets.getText 'assets/theme.less' +```js +RocketChat.theme.addPackageAsset -> Assets.getText 'assets/theme.less' +``` That will read in any styles and variables from your custom less file and compile it with the rest of the css. @@ -61,16 +69,22 @@ Here's an example replacing the unauthorized page template: ** In `package.js` ** +```js api.addFiles(['views/notAuthorized.html', 'client.coffee'], 'client'); +``` ** In `views/notAuthorized.html` ** - +```html + +``` ** In `client.coffee` ** - Template.myNotAuthorized.replaces 'notAuthorized' +```coffee +Template.myNotAuthorized.replaces 'notAuthorized' +``` See the [docs for that package](https://github.com/aldeed/meteor-template-extension) for more info on inheriting and overwriting templates and helpers. diff --git a/installation/community-supported-installation/windows-server/README.md b/installation/community-supported-installation/windows-server/README.md index 3bcb87bd38..e19824c032 100644 --- a/installation/community-supported-installation/windows-server/README.md +++ b/installation/community-supported-installation/windows-server/README.md @@ -31,42 +31,42 @@ Then, download and install each of the following **in order**: ### MongoDB -1. Download [MongoDB](https://www.mongodb.org/downloads#production). (Note: This can be done on a separate computer) -2. Run the installer and choose `Custom` -3. Click the `Browse` button to select desired install path, such as `C:\MongoDB` -4. Continue through the rest of the installer. -5. Now open NotePad and enter the following, replacing [Data Path] with where the database will be stored, such as `C:\MongoDB\data` - - ``` - systemLog: - destination: file - path: [Data Path]\logs\mongod.log - storage: - dbPath: [Data Path]\data - replication: - replSetName: rs1 - ``` - -6. Save the file as `[Installation Path]\mongod.cfg` where [Installation Path] is the location you installed Mongo -7. Open the Command Prompt by pressing `Windows Key + R` and then entering `cmd`, right click on Command Prompt and select `Run as administrator` -8. Now enter the following: - - ``` - > mkdir [Data Path] - > cd [Data Path] - > mkdir [Data Path]\db - > mkdir [Data Path]\logs - - > cd [Installation Path]\bin - > mongod.exe --config "[Installation Path]\mongod.cfg" --install - > net start MongoDB - - > mongo.exe - > rs.initiate() - > exit - ``` - - _Note: Do not include the `>`_ +- Download [MongoDB](https://www.mongodb.org/downloads#production). (Note: This can be done on a separate computer) +- Run the installer and choose `Custom` +- Click the `Browse` button to select desired install path, such as `C:\MongoDB` +- Continue through the rest of the installer. +- Now open NotePad and enter the following, replacing [Data Path] with where the database will be stored, such as `C:\MongoDB\data` + +``` +systemLog: + destination: file + path: [Data Path]\logs\mongod.log +storage: + dbPath: [Data Path]\data +replication: + replSetName: rs1 +``` + +- Save the file as `[Installation Path]\mongod.cfg` where [Installation Path] is the location you installed Mongo +- Open the Command Prompt by pressing `Windows Key + R` and then entering `cmd`, right click on Command Prompt and select `Run as administrator` +- Now enter the following: + +``` +> mkdir [Data Path] +> cd [Data Path] +> mkdir [Data Path]\db +> mkdir [Data Path]\logs + +> cd [Installation Path]\bin +> mongod.exe --config "[Installation Path]\mongod.cfg" --install +> net start MongoDB + +> mongo.exe +> rs.initiate() +> exit +``` + +> _Note: Do not include the `>`_ ### Rocket.Chat files @@ -91,32 +91,31 @@ Rocket.Chat is built on top of Node.js v8.9.3. So we need to install this first. - [Address to MongoDB] with the IP Address of your MongoDB. (NOTE: If you didn't install Mongo on another computer, use `localhost`) - [MongoDB Database] with the name of the database you would like to use, such as `rocketchat` - ``` - > SetEnv /x86 - > cd [Installation Path] - > npm install nave -g - > npm install node-windows +``` +> SetEnv /x86 +> cd [Installation Path] +> npm install nave -g +> npm install node-windows - > npm config set python /Python27/python.exe --global - > npm config set msvs_version 2010 --global +> npm config set python /Python27/python.exe --global +> npm config set msvs_version 2010 --global - > set PORT=[Port to Use] - > set ROOT_URL=[Rocket.Chat URL] - > set MONGO_URL=mongodb://[Address to Mongo]:27017/[MongoDB Database] - > set MONGO_OPLOG_URL=mongodb://[Address to Mongo]:27017/local - > set SCRIPT_PATH=[Installation Path]\main.js +> set PORT=[Port to Use] +> set ROOT_URL=[Rocket.Chat URL] +> set MONGO_URL=mongodb://[Address to Mongo]:27017/[MongoDB Database] +> set MONGO_OPLOG_URL=mongodb://[Address to Mongo]:27017/local +> set SCRIPT_PATH=[Installation Path]\main.js - > cd programs\server - > npm install +> cd programs\server +> npm install - > cd ../.. - > node rocket.service.js install - > net start Rocket.Chat - ``` +> cd ../.. +> node rocket.service.js install +> net start Rocket.Chat +``` - Note: If missing, rocket.service.js can be found [here](https://github.com/Sing-Li/bbug/blob/master/images/rocket.service.js) - - _Note: Do not include the `>`_ +> Note: If missing, rocket.service.js can be found [here](https://github.com/Sing-Li/bbug/blob/master/images/rocket.service.js) +> _Note: Do not include the `>`_ ### Verifying the Install diff --git a/installation/manual-installation/multiple-instances-to-improve-performance/README.md b/installation/manual-installation/multiple-instances-to-improve-performance/README.md index 29c2e52853..349b593451 100644 --- a/installation/manual-installation/multiple-instances-to-improve-performance/README.md +++ b/installation/manual-installation/multiple-instances-to-improve-performance/README.md @@ -27,62 +27,66 @@ simultaneously, we need to run at least two services. The only difference is the If you don't have a service yet, the easiest way to do this for Rocket.Chat is to create a file in /usr/lib/systemd/system/ and call it rocketchat.service - [Unit] - Description=Rocket.Chat Server - After=syslog.target - After=network.target - - [Service] - Type=simple - Restart=always - StandardOutput=syslog - SyslogIdentifier=RocketChat - User=rocketchat - Group=rocketchat - Environment=MONGO_URL=mongodb://your_mongodb:27017/your_database?replicaSet=your_replica_set_name - Environment=MONGO_OPLOG_URL=mongodb://your_mongodb1:27017/local?replicaSet=your_replica_set_name - Environment=ROOT_URL=https://your_rocketchat_domain.com - Environment=PORT=3000 - WorkingDirectory=/path.to.rocketchat/rocket.chat - ExecStart=/usr/local/bin/node /path.to.rocketchat/rocket.chat/bundle/main.js - - [Install] - WantedBy=multi-user.target +``` +[Unit] +Description=Rocket.Chat Server +After=syslog.target +After=network.target + +[Service] +Type=simple +Restart=always +StandardOutput=syslog +SyslogIdentifier=RocketChat +User=rocketchat +Group=rocketchat +Environment=MONGO_URL=mongodb://your_mongodb:27017/your_database?replicaSet=your_replica_set_name +Environment=MONGO_OPLOG_URL=mongodb://your_mongodb1:27017/local?replicaSet=your_replica_set_name +Environment=ROOT_URL=https://your_rocketchat_domain.com +Environment=PORT=3000 +WorkingDirectory=/path.to.rocketchat/rocket.chat +ExecStart=/usr/local/bin/node /path.to.rocketchat/rocket.chat/bundle/main.js + +[Install] +WantedBy=multi-user.target +``` Make sure the User and Group exist and both have read/write/execute Permissions for the rocketchat. Now you can run start, stop, restart, and status your rocketchat service. If you want multiple Services create another file in /usr/lib/systemd/system and call it rocketchat@.service with the following content: - [Unit] - Description=Rocket.Chat Server - After=syslog.target - After=network.target - - [Service] - Type=simple - Restart=always - StandardOutput=syslog - SyslogIdentifier=RocketChat - User=rocketchat - Group=rocketchat - Environment=MONGO_URL=mongodb://your_mongodb:27017/your_database?replicaSet=your_replica_set_name - Environment=MONGO_OPLOG_URL=mongodb://your_mongodb1:27017/local?replicaSet=your_replica_set_name - Environment=ROOT_URL=https://your_rocketchat_domain.com - Environment=PORT=%I - WorkingDirectory=/path.to.rocketchat/rocket.chat - ExecStart=/usr/local/bin/node /path.to.rocketchat/rocket.chat/bundle/main.js - - [Install] +``` +[Unit] +Description=Rocket.Chat Server +After=syslog.target +After=network.target + +[Service] +Type=simple +Restart=always +StandardOutput=syslog +SyslogIdentifier=RocketChat +User=rocketchat +Group=rocketchat +Environment=MONGO_URL=mongodb://your_mongodb:27017/your_database?replicaSet=your_replica_set_name +Environment=MONGO_OPLOG_URL=mongodb://your_mongodb1:27017/local?replicaSet=your_replica_set_name +Environment=ROOT_URL=https://your_rocketchat_domain.com +Environment=PORT=%I +WorkingDirectory=/path.to.rocketchat/rocket.chat +ExecStart=/usr/local/bin/node /path.to.rocketchat/rocket.chat/bundle/main.js + +[Install] WantedBy=rocketchat.service +``` Start the other Rocket.Chat Services with - systemctl start rocketchat@3001 (or any other desired port after the @) +`systemctl start rocketchat@3001 (or any other desired port after the @)` If you want to run rocketchat at boot just enable the services with - systemctl enable rocketchat +`systemctl enable rocketchat` The other Services will be enable since they are "WantedBy"=RocketChat.service @@ -111,48 +115,52 @@ Then swap out the host listed in the proxy section for the backend you defined w Continuing the example, we'll update our Nginx config to point to the two Rocket.Chat instances that we started running on ports 3001 and 3002. - # Upstreams - upstream backend { - server 127.0.0.1:3000; - server 127.0.0.1:3001; - #server 127.0.0.1:3002; - #server 127.0.0.1:3003; - . - . - . - } +``` +# Upstreams +upstream backend { + server 127.0.0.1:3000; + server 127.0.0.1:3001; + #server 127.0.0.1:3002; + #server 127.0.0.1:3003; + . + . + . +} +``` Now just replace `proxy_pass http://IP:3000/;` with `proxy_pass http://backend;`. Updating the [sample Nginx configuration](https://rocket.chat/docs/installation/manual-installation/configuring-ssl-reverse-proxy#running-behind-a-nginx-ssl-reverse-proxy) would result in a config like this: +``` # HTTPS Server - server { - listen 443; - server_name your_hostname.com; - - error_log /var/log/nginx/rocketchat.access.log; - - ssl on; - ssl_certificate /etc/nginx/certificate.crt; - ssl_certificate_key /etc/nginx/certificate.key; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE - - location / { - proxy_pass http://backend; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $http_host; - - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forward-Proto http; - proxy_set_header X-Nginx-Proxy true; - - proxy_redirect off; - } +server { + listen 443; + server_name your_hostname.com; + + error_log /var/log/nginx/rocketchat.access.log; + + ssl on; + ssl_certificate /etc/nginx/certificate.crt; + ssl_certificate_key /etc/nginx/certificate.key; + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE + + location / { + proxy_pass http://backend; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $http_host; + + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forward-Proto http; + proxy_set_header X-Nginx-Proxy true; + + proxy_redirect off; } +} +``` Now restart Nginx: `service nginx restart` diff --git a/installation/paas-deployments/aws/README.md b/installation/paas-deployments/aws/README.md index b5d3ae3a12..64aa75aeab 100644 --- a/installation/paas-deployments/aws/README.md +++ b/installation/paas-deployments/aws/README.md @@ -61,28 +61,30 @@ This guide covers the following: #### We will use **Let's Encrypt** to get a free & open-source SSL certificate -1. SSH to your instance: +- SSH to your instance: `ssh -i ubuntu@` Note: You may replace with domain name if your DNS has resolved. -2. Clone the **letsencrypt** repository from github. (If it is available via a package manager, you may use that). +- Clone the **letsencrypt** repository from github. (If it is available via a package manager, you may use that). `sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt` This will copy the **letsencypt** repository to `/opt/letsencrypt` -3. Confirm no applications are listening to port 80: +- Confirm no applications are listening to port 80: `netstat -na | grep ':80.*LISTEN'` If any processes are returned, kill them. -4. Get Certificate from Let's Encrypt +- Get Certificate from Let's Encrypt Change to Let's Encrypt repository location `cd /opt/letsencrypt` Run the Standalone plugin. (This will open a web server listening on port 80 to validate the server). - ``` - ./letsencrypt-auto certonly --standalone --email -d -d - ``` +``` +./letsencrypt-auto certonly --standalone --email -d -d +``` - Note: Second (or more) domain is optional. -5. If you would like to restrict traffic to your instance on AWS, you may now restrict the security groups. Make sure you allow **TCP/22** from your current location for the SSH connection, as well as **TCP/443** from the location you wish to use to access from. -6. Check for certificates and keys +_Note: Second (or more) domain is optional._ + +- If you would like to restrict traffic to your instance on AWS, you may now restrict the security groups. Make sure you allow **TCP/22** from your current location for the SSH connection, as well as **TCP/443** from the location you wish to use to access from. +- Check for certificates and keys The following files will be created in `/etc/letsencrypt/archive` with symbolic links placed in `/etc/letsencrypt/live/` + - **cert.pem** - domain certificate - **chain.pem** - Let's Encrypt chain certificate - **fullchain.pem** - both the above certs (This will be your **certificate file**) @@ -102,50 +104,52 @@ This guide covers the following: `sudo nano /etc/nginx/sites-available/default` - ```bash - server { - listen 443 ssl; - server_name ; - ssl_certificate /etc/letsencrypt/live//fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live//privkey.pem; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_prefer_server_ciphers on; - ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; - root /usr/share/nginx/html; - index index.html index.htm; - # Make site accessible from http://localhost/ - server_name localhost; - location / { - proxy_pass http://localhost:3000/; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forward-Proto http; - proxy_set_header X-Nginx-Proxy true; - proxy_redirect off; - } - } - server { - listen 80; - server_name ; - return 301 https://$host$request_uri; - } - ``` - - - Explanation: remove the listen to port 80 by default and replace with port 443 ssl as well as giving the path to the certificate. Restrict to certain SSL protocols and ciphers (you may add more if you like). In the location section, use Nginx as a proxy to forward to port 3000 (where Rocket.Chat is set up. Create a second server block listening on port 80 that will redirect to https." - - Write & exit - - Stop Nginx: - `sudo service nginx stop` - - Test starting Nginx to make sure there are no syntax errors in your configuration file. If there are errors in your file, it will give you a clue as to the issue. - `sudo nginx -t` - - If the syntax test is successful, Start Nginx: - `sudo service nginx start` - - Confirm that it is running properly by opening a web browser and going to your domain name. You will get a page stating **502 Bad Gateway** This is expected. Look above, next to the domain name, you should see a lock icon. If you click this, you should be able to see the certificates, where your browser will verify that Let's Encrypt Authority X1 issued this website's certificate, as well as a report of which cipher is being used. - - Note: The certificate will expire in 90 days - - ** TODO: Add script for auto-renewal of certificate. +```bash +server { +listen 443 ssl; +server_name ; +ssl_certificate /etc/letsencrypt/live//fullchain.pem; +ssl_certificate_key /etc/letsencrypt/live//privkey.pem; +ssl_protocols TLSv1 TLSv1.1 TLSv1.2; +ssl_prefer_server_ciphers on; +ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; +root /usr/share/nginx/html; +index index.html index.htm; +# Make site accessible from http://localhost/ +server_name localhost; +location / { + proxy_pass http://localhost:3000/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forward-Proto http; + proxy_set_header X-Nginx-Proxy true; + proxy_redirect off; +} +} +server { +listen 80; +server_name ; +return 301 https://$host$request_uri; +} +``` + +``` +- Explanation: remove the listen to port 80 by default and replace with port 443 ssl as well as giving the path to the certificate. Restrict to certain SSL protocols and ciphers (you may add more if you like). In the location section, use Nginx as a proxy to forward to port 3000 (where Rocket.Chat is set up. Create a second server block listening on port 80 that will redirect to https." +- Write & exit +- Stop Nginx: +`sudo service nginx stop` +- Test starting Nginx to make sure there are no syntax errors in your configuration file. If there are errors in your file, it will give you a clue as to the issue. +`sudo nginx -t` +- If the syntax test is successful, Start Nginx: +`sudo service nginx start` +- Confirm that it is running properly by opening a web browser and going to your domain name. You will get a page stating **502 Bad Gateway** This is expected. Look above, next to the domain name, you should see a lock icon. If you click this, you should be able to see the certificates, where your browser will verify that Let's Encrypt Authority X1 issued this website's certificate, as well as a report of which cipher is being used. +- Note: The certificate will expire in 90 days +- ** TODO: Add script for auto-renewal of certificate. +``` ### 6. Install Docker & Docker Compose @@ -173,77 +177,77 @@ This guide covers the following: 2. Create docker-compose.yml, **replacing the ROOT_URL of ABC.DOMAIN.COM with your site** `sudo nano /var/www/rocket.chat/docker-compose.yml` - ``` - db: - image: mongo:3.0 - volumes: - - ./data/runtime/db:/data/db - - ./data/dump:/dump - command: mongod --smallfiles - - rocketchat: - image: rocketchat/rocket.chat:latest - environment: - - MONGO_URL=mongodb://db:27017/rocketchat - - ROOT_URL=https:// - links: - - db:db - ports: - - 3000:3000 - ``` - - - Write & Exit +``` +db: + image: mongo:3.0 + volumes: + - ./data/runtime/db:/data/db + - ./data/dump:/dump + command: mongod --smallfiles + +rocketchat: + image: rocketchat/rocket.chat:latest + environment: + - MONGO_URL=mongodb://db:27017/rocketchat + - ROOT_URL=https:// + links: + - db:db + ports: + - 3000:3000 +``` + +- Write & Exit ### 8. Automatic start & restarting with Upstart -1. Create upstart job for MongoDB +- Create upstart job for MongoDB - `sudo nano /etc/init/rocketchat_mongo.conf` +`sudo nano /etc/init/rocketchat_mongo.conf` - ```bash - description "MongoDB service manager for Rocket.Chat" +```bash +description "MongoDB service manager for Rocket.Chat" - # Start MongoDB after docker is running - start on (started docker) - stop on runlevel [!2345] +# Start MongoDB after docker is running +start on (started docker) +stop on runlevel [!2345] - # Automatically Respawn with finite limits - respawn - respawn limit 99 5 +# Automatically Respawn with finite limits +respawn +respawn limit 99 5 - # Path to our app - chdir /var/www/rocket.chat +# Path to our app +chdir /var/www/rocket.chat - script - # Showtime - exec /usr/local/bin/docker-compose up db - end script - ``` +script + # Showtime + exec /usr/local/bin/docker-compose up db +end script +``` -2. Save and Exit. -3. Create the upstart job for Rocket.Chat +- Save and Exit. +- Create the upstart job for Rocket.Chat - `sudo nano /etc/init/rocketchat_app.conf` +`sudo nano /etc/init/rocketchat_app.conf` - ``` - description "Rocket.Chat service manager" +``` +description "Rocket.Chat service manager" - # Start Rocket.Chat only after mongo job is running - start on (started rocketchat_mongo) - stop on runlevel [!2345] +# Start Rocket.Chat only after mongo job is running +start on (started rocketchat_mongo) +stop on runlevel [!2345] - # Automatically Respawn with finite limits - respawn - respawn limit 99 5 +# Automatically Respawn with finite limits +respawn +respawn limit 99 5 - # Path to our app - chdir /var/www/rocket.chat +# Path to our app +chdir /var/www/rocket.chat - script - # Bring up Rocket.Chat app - exec /usr/local/bin/docker-compose up rocketchat - end script - ``` +script + # Bring up Rocket.Chat app + exec /usr/local/bin/docker-compose up rocketchat +end script +``` ### 9. Reboot & Test diff --git a/markdown-style.rb b/markdown-style.rb index 1ca79df3ba..70b1426d4a 100644 --- a/markdown-style.rb +++ b/markdown-style.rb @@ -1,5 +1,6 @@ all +exclude_rule 'MD004' exclude_rule 'MD013' exclude_rule 'MD014' exclude_rule 'MD020' @@ -12,8 +13,9 @@ exclude_rule 'MD041' rule 'MD003', :style => :atx -rule 'MD004', :style => :dash rule 'MD007', :indent => 4 rule 'MD029', :style => :ordered rule 'MD035', :style => "- - -" +rule 'MD004', :style => :fenced +