Commit c1d314ea authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'docs-dollar-signs' into 'master'

Start linting for unneeded dollar signs

See merge request gitlab-org/gitlab-ce!32803
parents a52dbbbc 78d09e3e
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"style": "dash" "style": "dash"
}, },
"line-length": false, "line-length": false,
"commands-show-output": false,
"no-duplicate-header": { "no-duplicate-header": {
"allow_different_nesting": true "allow_different_nesting": true
}, },
......
...@@ -99,7 +99,7 @@ automatically. ...@@ -99,7 +99,7 @@ automatically.
Its simplest usage is to provide the value for `title`: Its simplest usage is to provide the value for `title`:
```text ```text
$ bin/changelog 'Hey DZ, I added a feature to GitLab!' bin/changelog 'Hey DZ, I added a feature to GitLab!'
``` ```
At this point the script would ask you to select the category of the change (mapped to the `type` field in the entry): At this point the script would ask you to select the category of the change (mapped to the `type` field in the entry):
......
...@@ -27,7 +27,7 @@ no overhead at all. ...@@ -27,7 +27,7 @@ no overhead at all.
To enable `GITLAB_TRACING`, a valid _"configuration-string"_ value should be set, with a URL-like To enable `GITLAB_TRACING`, a valid _"configuration-string"_ value should be set, with a URL-like
form: form:
```console ```sh
GITLAB_TRACING=opentracing://<driver>?<param_name>=<param_value>&<param_name_2>=<param_value_2> GITLAB_TRACING=opentracing://<driver>?<param_name>=<param_value>&<param_name_2>=<param_value_2>
``` ```
...@@ -90,7 +90,7 @@ documentation](https://www.jaegertracing.io/docs/1.9/getting-started/). ...@@ -90,7 +90,7 @@ documentation](https://www.jaegertracing.io/docs/1.9/getting-started/).
If you have Docker available, the easier approach to running the Jaeger all-in-one is through If you have Docker available, the easier approach to running the Jaeger all-in-one is through
Docker, using the following command: Docker, using the following command:
```console ```sh
$ docker run \ $ docker run \
--rm \ --rm \
-e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \ -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
...@@ -121,8 +121,8 @@ appropriate configuration string. ...@@ -121,8 +121,8 @@ appropriate configuration string.
**TL;DR:** If you are running everything on the same host, use the following value: **TL;DR:** If you are running everything on the same host, use the following value:
```console ```sh
$ export GITLAB_TRACING="opentracing://jaeger?http_endpoint=http%3A%2F%2Flocalhost%3A14268%2Fapi%2Ftraces&sampler=const&sampler_param=1" export GITLAB_TRACING="opentracing://jaeger?http_endpoint=http%3A%2F%2Flocalhost%3A14268%2Fapi%2Ftraces&sampler=const&sampler_param=1"
``` ```
This configuration string uses the Jaeger driver `opentracing://jaeger` with the following options: This configuration string uses the Jaeger driver `opentracing://jaeger` with the following options:
...@@ -152,7 +152,7 @@ application. ...@@ -152,7 +152,7 @@ application.
When `GITLAB_TRACING` is configured properly, the application will log this on startup: When `GITLAB_TRACING` is configured properly, the application will log this on startup:
```console ```sh
13:41:53 gitlab-workhorse.1 | 2019/02/12 13:41:53 Tracing enabled 13:41:53 gitlab-workhorse.1 | 2019/02/12 13:41:53 Tracing enabled
... ...
13:41:54 gitaly.1 | 2019/02/12 13:41:54 Tracing enabled 13:41:54 gitaly.1 | 2019/02/12 13:41:54 Tracing enabled
...@@ -161,7 +161,7 @@ When `GITLAB_TRACING` is configured properly, the application will log this on s ...@@ -161,7 +161,7 @@ When `GITLAB_TRACING` is configured properly, the application will log this on s
If `GITLAB_TRACING` is not configured correctly, this will also be logged: If `GITLAB_TRACING` is not configured correctly, this will also be logged:
```console ```sh
13:43:45 gitaly.1 | 2019/02/12 13:43:45 skipping tracing configuration step: tracer: unable to load driver mytracer 13:43:45 gitaly.1 | 2019/02/12 13:43:45 skipping tracing configuration step: tracer: unable to load driver mytracer
``` ```
......
...@@ -81,9 +81,7 @@ If you're using Pry you can use the `$` command to display the source code of a ...@@ -81,9 +81,7 @@ If you're using Pry you can use the `$` command to display the source code of a
method (along with its source location), this is easier than running the above method (along with its source location), this is easier than running the above
Ruby code. In case of the above snippet you'd run the following: Ruby code. In case of the above snippet you'd run the following:
``` - `$ Banzai::Renderer.render`
$ Banzai::Renderer.render
```
This will print out something along the lines of: This will print out something along the lines of:
......
...@@ -123,7 +123,7 @@ Keeping that in mind, to create a profile, identify (or create) a spec that ...@@ -123,7 +123,7 @@ Keeping that in mind, to create a profile, identify (or create) a spec that
exercises the troublesome code path, then run it using the `bin/rspec-stackprof` exercises the troublesome code path, then run it using the `bin/rspec-stackprof`
helper, e.g.: helper, e.g.:
``` ```sh
$ LIMIT=10 bin/rspec-stackprof spec/policies/project_policy_spec.rb $ LIMIT=10 bin/rspec-stackprof spec/policies/project_policy_spec.rb
8/8 |====== 100 ======>| Time: 00:00:18 8/8 |====== 100 ======>| Time: 00:00:18
...@@ -157,22 +157,22 @@ it calls, were being executed. ...@@ -157,22 +157,22 @@ it calls, were being executed.
To create a graphical view of the call stack: To create a graphical view of the call stack:
```shell ```sh
$ stackprof tmp/project_policy_spec.rb.dump --graphviz > project_policy_spec.dot stackprof tmp/project_policy_spec.rb.dump --graphviz > project_policy_spec.dot
$ dot -Tsvg project_policy_spec.dot > project_policy_spec.svg dot -Tsvg project_policy_spec.dot > project_policy_spec.svg
``` ```
To load the profile in [kcachegrind](https://kcachegrind.github.io/): To load the profile in [kcachegrind](https://kcachegrind.github.io/):
``` ```sh
$ stackprof tmp/project_policy_spec.dump --callgrind > project_policy_spec.callgrind stackprof tmp/project_policy_spec.dump --callgrind > project_policy_spec.callgrind
$ kcachegrind project_policy_spec.callgrind # Linux kcachegrind project_policy_spec.callgrind # Linux
$ qcachegrind project_policy_spec.callgrind # Mac qcachegrind project_policy_spec.callgrind # Mac
``` ```
It may be useful to zoom in on a specific method, e.g.: It may be useful to zoom in on a specific method, e.g.:
``` ```sh
$ stackprof tmp/project_policy_spec.rb.dump --method warm_asset_cache $ stackprof tmp/project_policy_spec.rb.dump --method warm_asset_cache
TestEnv#warm_asset_cache (/Users/lupine/dev/gitlab.com/gitlab-org/gitlab-development-kit/gitlab/spec/support/test_env.rb:164) TestEnv#warm_asset_cache (/Users/lupine/dev/gitlab.com/gitlab-org/gitlab-development-kit/gitlab/spec/support/test_env.rb:164)
samples: 0 self (0.0%) / 6288 total (36.9%) samples: 0 self (0.0%) / 6288 total (36.9%)
...@@ -225,9 +225,9 @@ may have changed over time. ...@@ -225,9 +225,9 @@ may have changed over time.
To activate profiling in your local environment, run the following: To activate profiling in your local environment, run the following:
``` ```sh
$ export RSPEC_PROFILING=yes export RSPEC_PROFILING=yes
$ rake rspec_profiling:install rake rspec_profiling:install
``` ```
This creates an SQLite3 database in `tmp/rspec_profiling`, into which statistics This creates an SQLite3 database in `tmp/rspec_profiling`, into which statistics
...@@ -237,7 +237,7 @@ variable set. ...@@ -237,7 +237,7 @@ variable set.
Ad-hoc investigation of the collected results can be performed in an interactive Ad-hoc investigation of the collected results can be performed in an interactive
shell: shell:
``` ```sh
$ rake rspec_profiling:console $ rake rspec_profiling:console
irb(main):001:0> results.count irb(main):001:0> results.count
=> 231 => 231
......
...@@ -47,14 +47,14 @@ to avoid getting this error, you need to remove all instances of the ...@@ -47,14 +47,14 @@ to avoid getting this error, you need to remove all instances of the
**Omnibus Installation** **Omnibus Installation**
``` ```sh
$ sudo gitlab-rails runner "Service.where(type: ['JenkinsService', 'JenkinsDeprecatedService', 'GithubService']).delete_all" sudo gitlab-rails runner "Service.where(type: ['JenkinsService', 'JenkinsDeprecatedService', 'GithubService']).delete_all"
``` ```
**Source Installation** **Source Installation**
``` ```sh
$ bundle exec rails runner "Service.where(type: ['JenkinsService', 'JenkinsDeprecatedService', 'GithubService']).delete_all" production bundle exec rails runner "Service.where(type: ['JenkinsService', 'JenkinsDeprecatedService', 'GithubService']).delete_all" production
``` ```
### Variables environment scopes ### Variables environment scopes
...@@ -89,10 +89,10 @@ To downgrade a source installation, you need to replace the current remote of ...@@ -89,10 +89,10 @@ To downgrade a source installation, you need to replace the current remote of
your GitLab installation with the Community Edition's remote, fetch the latest your GitLab installation with the Community Edition's remote, fetch the latest
changes, and checkout the latest stable branch: changes, and checkout the latest stable branch:
``` ```sh
$ git remote set-url origin git@gitlab.com:gitlab-org/gitlab-ce.git git remote set-url origin git@gitlab.com:gitlab-org/gitlab-ce.git
$ git fetch --all git fetch --all
$ git checkout 8-x-stable git checkout 8-x-stable
``` ```
Remember to follow the correct [update guides](../update/README.md) to make Remember to follow the correct [update guides](../update/README.md) to make
......
...@@ -225,7 +225,7 @@ First, we will create a new project to host our application. You can do this ...@@ -225,7 +225,7 @@ First, we will create a new project to host our application. You can do this
either by running the CLI client: either by running the CLI client:
```bash ```bash
$ oc new-project gitlab oc new-project gitlab
``` ```
or by using the web interface: or by using the web interface:
......
...@@ -158,7 +158,7 @@ For installation from source: ...@@ -158,7 +158,7 @@ For installation from source:
You will also need to disable Git SSL verification on the server hosting GitLab. You will also need to disable Git SSL verification on the server hosting GitLab.
``` ```
$ git config --global http.sslVerify false git config --global http.sslVerify false
``` ```
For the changes to take effect, [reconfigure GitLab] if you installed For the changes to take effect, [reconfigure GitLab] if you installed
......
...@@ -42,17 +42,17 @@ If you are using an installation from source, replace `/var/opt/gitlab/` with `/ ...@@ -42,17 +42,17 @@ If you are using an installation from source, replace `/var/opt/gitlab/` with `/
#### Omnibus Installation #### Omnibus Installation
``` ```sh
$ sudo gitlab-rake gitlab:import:repos['/var/opt/gitlab/git-data/repository-import-<date>'] sudo gitlab-rake gitlab:import:repos['/var/opt/gitlab/git-data/repository-import-<date>']
``` ```
#### Installation from source #### Installation from source
Before running this command you need to change the directory to where your GitLab installation is located: Before running this command you need to change the directory to where your GitLab installation is located:
``` ```sh
$ cd /home/git/gitlab cd /home/git/gitlab
$ sudo -u git -H bundle exec rake gitlab:import:repos['/var/opt/gitlab/git-data/repository-import-<date>'] RAILS_ENV=production sudo -u git -H bundle exec rake gitlab:import:repos['/var/opt/gitlab/git-data/repository-import-<date>'] RAILS_ENV=production
``` ```
#### Example output #### Example output
......
...@@ -53,9 +53,9 @@ write in the `.gitlab-ci.yml` the script you want to run so ...@@ -53,9 +53,9 @@ write in the `.gitlab-ci.yml` the script you want to run so
GitLab Runner will do it for you. It looks more complicated than it GitLab Runner will do it for you. It looks more complicated than it
is. What you need to tell the Runner: is. What you need to tell the Runner:
``` ```sh
$ gem install jekyll gem install jekyll
$ jekyll build jekyll build
``` ```
### Script ### Script
......
...@@ -134,13 +134,13 @@ There are two ways to manually do the same thing as automatic uploading (describ ...@@ -134,13 +134,13 @@ There are two ways to manually do the same thing as automatic uploading (describ
**Option 1: rake task** **Option 1: rake task**
``` ```sh
$ rake gitlab:lfs:migrate rake gitlab:lfs:migrate
``` ```
**Option 2: rails console** **Option 2: rails console**
``` ```sh
$ sudo gitlab-rails console # Login to rails console $ sudo gitlab-rails console # Login to rails console
> # Upload LFS files manually > # Upload LFS files manually
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment