Skip to content

Commit

Permalink
Re-run the rake doc task
Browse files Browse the repository at this point in the history
This regenerates the doc/ content.
  • Loading branch information
olleolleolle committed Sep 28, 2023
1 parent 3f99383 commit 7cb1d42
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions docs/gemstash-multiple-sources.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,18 @@ you want. The `/upstream` prefix tells Gemstash to use a gem source
other than the default source. You can now bundle with the additional
source.

Notice that the third source doesn't need to be escaped.
This is because the `https://` is used by default when no scheme is set,
and the source URL does not contain any chars that need to be escaped.
Notice that the third source doesnt need to be escaped. This is because
the `https://` is used by default when no scheme is set, and the source
URL does not contain any characters that need to be escaped.

## Authentication with Multiple Sources

You can use basic authentication or API keys on sources directly in Gemfile
or using ENV variables on the Gemstash instance.
You can use basic authentication or API keys on sources directly in
Gemfile or using ENV variables on the Gemstash instance.

Example `Gemfile`:
```ruby

``` ruby
# ./Gemfile
require "cgi"
source "http://localhost:9292"
Expand All @@ -85,10 +86,10 @@ source "http://localhost:9292/upstream/#{CGI.escape("[email protected]
end
```

If you set `GEMSTASH_<HOST>` ENV variable with your authentication information,
you can omit it from the `Gemfile`:
If you set `GEMSTASH_<HOST>` ENV variable with your authentication
information, you can omit it from the `Gemfile`:

```ruby
``` ruby
# ./Gemfile
source "http://localhost:9292"
Expand All @@ -99,15 +100,16 @@ end

And run the Gemstash with the credentials set in an ENV variable:

```bash
``` bash
GEMSTASH_MY__GEM___SOURCE__LOCAL=user:password gemstash start --no-daemonize --config-file config.yml.erb
```

The name of the ENV variable is the uppercase version of the host name,
with all `.` characters replaced with `__`, all `-` with `___` and a `GEMSTASH_` prefix
(it uses the same syntax as [Bundler](https://bundler.io/v2.4/man/bundle-config.1.html#CREDENTIALS-FOR-GEM-SOURCES)).
with all `.` characters replaced with `__`, all `-` with `___` and a
`GEMSTASH_` prefix (it uses the same syntax as
[Bundler](https://bundler.io/v2.4/man/bundle-config.1.html#CREDENTIALS-FOR-GEM-SOURCES)).

Example: `my.gem-source.local` => `GEMSTASH_MY__GEM___SOURCE__LOCAL`
Example: `my.gem-source.local` =\> `GEMSTASH_MY__GEM___SOURCE__LOCAL`

## Redirecting

Expand Down

0 comments on commit 7cb1d42

Please sign in to comment.