gemstash 2.2.2 → 2.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +61 -17
- data/lib/gemstash/authorization.rb +5 -2
- data/lib/gemstash/cli/authorize.rb +42 -1
- data/lib/gemstash/cli/setup.rb +2 -2
- data/lib/gemstash/cli/start.rb +5 -25
- data/lib/gemstash/cli.rb +6 -2
- data/lib/gemstash/config.ru +0 -2
- data/lib/gemstash/configuration.rb +5 -0
- data/lib/gemstash/db/authorization.rb +3 -3
- data/lib/gemstash/env.rb +0 -11
- data/lib/gemstash/gem_source/upstream_source.rb +15 -0
- data/lib/gemstash/logging.rb +14 -2
- data/lib/gemstash/man/gemstash-authorize.1 +21 -33
- data/lib/gemstash/man/gemstash-authorize.1.txt +20 -16
- data/lib/gemstash/man/gemstash-configuration.5 +61 -119
- data/lib/gemstash/man/gemstash-configuration.5.txt +58 -65
- data/lib/gemstash/man/gemstash-customize.7 +60 -103
- data/lib/gemstash/man/gemstash-customize.7.txt +52 -56
- data/lib/gemstash/man/gemstash-debugging.7 +11 -31
- data/lib/gemstash/man/gemstash-debugging.7.txt +8 -13
- data/lib/gemstash/man/gemstash-deploy.7 +15 -39
- data/lib/gemstash/man/gemstash-deploy.7.txt +18 -22
- data/lib/gemstash/man/gemstash-mirror.7 +10 -31
- data/lib/gemstash/man/gemstash-mirror.7.txt +6 -10
- data/lib/gemstash/man/gemstash-multiple-sources.7 +72 -44
- data/lib/gemstash/man/gemstash-multiple-sources.7.txt +66 -22
- data/lib/gemstash/man/gemstash-private-gems.7 +51 -102
- data/lib/gemstash/man/gemstash-private-gems.7.txt +35 -39
- data/lib/gemstash/man/gemstash-readme.7 +42 -88
- data/lib/gemstash/man/gemstash-readme.7.txt +43 -48
- data/lib/gemstash/man/gemstash-setup.1 +13 -33
- data/lib/gemstash/man/gemstash-setup.1.txt +13 -17
- data/lib/gemstash/man/gemstash-start.1 +5 -29
- data/lib/gemstash/man/gemstash-start.1.txt +6 -14
- data/lib/gemstash/man/gemstash-status.1 +5 -23
- data/lib/gemstash/man/gemstash-status.1.txt +6 -10
- data/lib/gemstash/man/gemstash-stop.1 +5 -23
- data/lib/gemstash/man/gemstash-stop.1.txt +6 -10
- data/lib/gemstash/man/gemstash-version.1 +4 -24
- data/lib/gemstash/man/gemstash-version.1.txt +3 -7
- data/lib/gemstash/migrations/05_authorization_names.rb +10 -0
- data/lib/gemstash/upstream.rb +33 -2
- data/lib/gemstash/version.rb +1 -1
- data/lib/gemstash.rb +1 -0
- metadata +35 -14
@@ -1,34 +1,17 @@
|
|
1
1
|
<!-- Automatically generated by Pandoc -->
|
2
|
-
.\" Automatically generated by Pandoc 3.1
|
2
|
+
.\" Automatically generated by Pandoc 3.1.8
|
3
3
|
.\"
|
4
|
-
.\" Define V font for inline verbatim, using C font in formats
|
5
|
-
.\" that render this, and otherwise B font.
|
6
|
-
.ie "\f[CB]x\f[]"x" \{\
|
7
|
-
. ftr V B
|
8
|
-
. ftr VI BI
|
9
|
-
. ftr VB B
|
10
|
-
. ftr VBI BI
|
11
|
-
.\}
|
12
|
-
.el \{\
|
13
|
-
. ftr V CR
|
14
|
-
. ftr VI CI
|
15
|
-
. ftr VB CB
|
16
|
-
. ftr VBI CBI
|
17
|
-
.\}
|
18
4
|
.TH "gemstash-customize" "7" "October 28, 2015" "" ""
|
19
|
-
.hy
|
20
5
|
.SH Customizing the Server
|
21
|
-
.PP
|
22
6
|
Although Gemstash is designed for as minimal setup as possible, there
|
23
7
|
may be times you will want to change some of the default configuration.
|
24
8
|
By the end of this guide, you will be able to customize some of the
|
25
9
|
Gemstash behavior, including where files are stored, what database
|
26
10
|
Gemstash uses, and how Gemstash caches certain requests.
|
27
11
|
.SS Setup
|
28
|
-
.PP
|
29
12
|
Several customizable options are available via an interactive Gemstash
|
30
13
|
command.
|
31
|
-
Run \f[
|
14
|
+
Run \f[CR]gemstash setup\f[R] and answer the questions it provides (a
|
32
15
|
blank answer will use the default value):
|
33
16
|
.RS
|
34
17
|
.PP
|
@@ -79,11 +62,11 @@ Once you\[cq]ve answered the questions, some checks will be made to
|
|
79
62
|
ensure the configuration will work.
|
80
63
|
For example, the database didn\[cq]t exist in the previous example, so
|
81
64
|
the command failed and the configuration wasn\[cq]t saved.
|
82
|
-
If the command passes, you may provide the \f[
|
65
|
+
If the command passes, you may provide the \f[CR]--redo\f[R] option to
|
83
66
|
force configuration to be redone:
|
84
67
|
.RS
|
85
68
|
.PP
|
86
|
-
\f[
|
69
|
+
\f[CR]$ gemstash setup --redo\f[R]
|
87
70
|
.PD 0
|
88
71
|
.P
|
89
72
|
.PD
|
@@ -122,46 +105,41 @@ You are all setup!
|
|
122
105
|
.RE
|
123
106
|
.PP
|
124
107
|
Once all checks have passed, Gemstash will store your answers in the
|
125
|
-
configuration file located at \f[
|
108
|
+
configuration file located at \f[CR]\[ti]/.gemstash/config.yml\f[R].
|
126
109
|
.SS Files
|
127
|
-
|
128
|
-
Storage in Gemstash defaults to \f[V]\[ti]/.gemstash\f[R] unless
|
110
|
+
Storage in Gemstash defaults to \f[CR]\[ti]/.gemstash\f[R] unless
|
129
111
|
otherwise specified.
|
130
|
-
You can change this in your config file via the \f[
|
112
|
+
You can change this in your config file via the \f[CR]:base_path\f[R]
|
131
113
|
key:
|
132
114
|
.IP
|
133
|
-
.
|
134
|
-
\f[C]
|
115
|
+
.EX
|
135
116
|
# \[ti]/.gemstash/config.yml
|
136
117
|
---
|
137
118
|
:base_path: \[dq]/var/gemstash\[dq]
|
138
|
-
|
139
|
-
.fi
|
119
|
+
.EE
|
140
120
|
.PP
|
141
|
-
When customizing the \f[
|
121
|
+
When customizing the \f[CR]base_path\f[R], the directory must exist,
|
142
122
|
otherwise Gemstash will fail to run.
|
143
|
-
Thus, if you want to use \f[
|
144
|
-
example, make sure to \f[
|
123
|
+
Thus, if you want to use \f[CR]/var/gemstash\f[R] like in the previous
|
124
|
+
example, make sure to \f[CR]mkdir /var/gemstash\f[R] and grant access to
|
145
125
|
the directory for the user you run Gemstash with.
|
146
126
|
.SS Database
|
147
|
-
|
148
|
-
The \f[V]:db_adapter\f[R] configuration key specifies what database you
|
127
|
+
The \f[CR]:db_adapter\f[R] configuration key specifies what database you
|
149
128
|
will be using.
|
150
|
-
The default \f[
|
151
|
-
\f[
|
152
|
-
file located within your \f[
|
153
|
-
The database file will always be named \f[
|
129
|
+
The default \f[CR]:db_adapter\f[R] is
|
130
|
+
\f[CR]sqlite3\f[R] (https://www.sqlite.org/), which will use a database
|
131
|
+
file located within your \f[CR]:base_path\f[R].
|
132
|
+
The database file will always be named \f[CR]gemstash.db\f[R].
|
154
133
|
.PP
|
155
|
-
You may also use \f[
|
156
|
-
\f[
|
157
|
-
\f[
|
158
|
-
for your \f[
|
134
|
+
You may also use \f[CR]postgres\f[R] (http://www.postgresql.org/),
|
135
|
+
\f[CR]mysql\f[R] (http://www.mysql.com/), or
|
136
|
+
\f[CR]mysql2\f[R] (http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-mysql2)
|
137
|
+
for your \f[CR]:db_adapter\f[R].
|
159
138
|
When using any of these options, you need to specify the
|
160
|
-
\f[
|
161
|
-
Here is an example configuration to use the \f[
|
139
|
+
\f[CR]:db_url\f[R] to point to an existing database.
|
140
|
+
Here is an example configuration to use the \f[CR]postgres\f[R] adapter:
|
162
141
|
.IP
|
163
|
-
.
|
164
|
-
\f[C]
|
142
|
+
.EX
|
165
143
|
# \[ti]/.gemstash/config.yml
|
166
144
|
---
|
167
145
|
:db_adapter: postgres
|
@@ -170,57 +148,50 @@ Here is an example configuration to use the \f[V]postgres\f[R] adapter:
|
|
170
148
|
:connect_timeout: 10
|
171
149
|
:read_timeout: 5
|
172
150
|
:timeout: 30
|
173
|
-
|
174
|
-
.fi
|
151
|
+
.EE
|
175
152
|
.PP
|
176
153
|
Regardless of the adapter you choose, the database will automatically
|
177
154
|
migrate to your version of Gemstash whenever the database is needed.
|
178
155
|
You only need to ensure the database exists and Gemstash will do the
|
179
|
-
rest, except for \f[
|
156
|
+
rest, except for \f[CR]sqlite3\f[R] (for which Gemstash will also create
|
180
157
|
the database for you).
|
181
158
|
.SS Cache
|
182
|
-
.PP
|
183
159
|
Certain things (like dependencies) are cached in memory.
|
184
160
|
This avoids web calls to the gem source, and database calls for private
|
185
161
|
gems.
|
186
162
|
.IP
|
187
|
-
.
|
188
|
-
\f[C]
|
163
|
+
.EX
|
189
164
|
# \[ti]/.gemstash/config.yml
|
190
165
|
---
|
191
166
|
:cache_type: memory
|
192
167
|
:cache_max_size: 2000
|
193
|
-
|
194
|
-
.fi
|
168
|
+
.EE
|
195
169
|
.PP
|
196
|
-
This configuration uses the default \f[
|
197
|
-
increased the \f[
|
170
|
+
This configuration uses the default \f[CR]memory\f[R] cache, and has
|
171
|
+
increased the \f[CR]cache_max_size\f[R] setting from its default of 500
|
198
172
|
items.
|
199
173
|
.PP
|
200
174
|
The memory cache can optionally be swapped out with a
|
201
175
|
Memcached (http://memcached.org/) server (or cluster of servers).
|
202
176
|
.PP
|
203
|
-
To use Memcached, use the \f[
|
177
|
+
To use Memcached, use the \f[CR]memcached\f[R] \f[CR]:cache_type\f[R]
|
204
178
|
configuration.
|
205
179
|
.PP
|
206
180
|
Provide the servers as a comma-separated list to the
|
207
|
-
\f[
|
181
|
+
\f[CR]:memcached_servers\f[R] configuration key:
|
208
182
|
.IP
|
209
|
-
.
|
210
|
-
\f[C]
|
183
|
+
.EX
|
211
184
|
# \[ti]/.gemstash/config.yml
|
212
185
|
---
|
213
186
|
:cache_type: memcached
|
214
187
|
:memcached_servers: memcached1.local:11211,memcached2.local:11211
|
215
188
|
:cache_expiration: 1800
|
216
|
-
|
217
|
-
.fi
|
189
|
+
.EE
|
218
190
|
.PP
|
219
|
-
All caching expires in \f[
|
191
|
+
All caching expires in \f[CR]cache_expiration\f[R] number of seconds.
|
220
192
|
Default is 1800 seconds (30 minutes).
|
221
193
|
This option applies to all caching.
|
222
194
|
.SS Server
|
223
|
-
.PP
|
224
195
|
Gemstash uses Puma (http://puma.io/) and Rack (http://rack.github.io/)
|
225
196
|
as the server.
|
226
197
|
Alternate server configurations are not currently supported, but you can
|
@@ -232,85 +203,71 @@ for inspiration.
|
|
232
203
|
.PP
|
233
204
|
While the server is not customizable, the way Gemstash binds the port
|
234
205
|
can be changed.
|
235
|
-
To change the binding, update the \f[
|
206
|
+
To change the binding, update the \f[CR]:bind\f[R] configuration key:
|
236
207
|
.IP
|
237
|
-
.
|
238
|
-
\f[C]
|
208
|
+
.EX
|
239
209
|
# \[ti]/.gemstash/config.yml
|
240
210
|
---
|
241
211
|
:bind: tcp://0.0.0.0:4242
|
242
|
-
|
243
|
-
.fi
|
212
|
+
.EE
|
244
213
|
.PP
|
245
214
|
This maps directly to the Puma bind
|
246
215
|
flag (https://github.com/puma/puma#binding-tcp--sockets), and will
|
247
216
|
support anything valid for that flag.
|
248
217
|
.PP
|
249
218
|
The number of threads Puma uses is also customizable via the
|
250
|
-
\f[
|
251
|
-
The default is \f[
|
219
|
+
\f[CR]:puma_threads\f[R] configuration key.
|
220
|
+
The default is \f[CR]16\f[R].
|
252
221
|
.SS Protected Fetch
|
253
|
-
.PP
|
254
222
|
Gemstash by default allows unauthenticated access for private gems.
|
255
|
-
Authenticated access is available via the \f[
|
223
|
+
Authenticated access is available via the \f[CR]:protected_fetch\f[R]
|
256
224
|
configuration key.
|
257
225
|
.IP
|
258
|
-
.
|
259
|
-
\f[C]
|
226
|
+
.EX
|
260
227
|
# \[ti]/.gemstash/config.yml
|
261
228
|
---
|
262
229
|
:protected_fetch: true
|
263
|
-
|
264
|
-
.fi
|
230
|
+
.EE
|
265
231
|
.PP
|
266
232
|
More details on protected_fetch are here.
|
267
233
|
.SS Fetch Timeout
|
268
|
-
.PP
|
269
234
|
The default fetch timeout is 20 seconds.
|
270
|
-
Use the \f[
|
235
|
+
Use the \f[CR]:fetch_timeout\f[R] configuration key to change it.
|
271
236
|
.IP
|
272
|
-
.
|
273
|
-
\f[C]
|
237
|
+
.EX
|
274
238
|
---
|
275
239
|
:fetch_timeout: 20
|
276
|
-
|
277
|
-
.fi
|
240
|
+
.EE
|
278
241
|
.SS Config File Location
|
279
|
-
.PP
|
280
242
|
By default, configuration for Gemstash will be at
|
281
|
-
\f[
|
282
|
-
This can be changed by providing the \f[
|
243
|
+
\f[CR]\[ti]/.gemstash/config.yml\f[R].
|
244
|
+
This can be changed by providing the \f[CR]--config-file\f[R] option to
|
283
245
|
the various Gemstash commands:
|
284
246
|
.IP
|
285
|
-
.
|
286
|
-
\f[C]
|
247
|
+
.EX
|
287
248
|
$ gemstash setup --config-file ./gemstash-config.yml
|
288
249
|
$ gemstash authorize --config-file ./gemstash-config.yml
|
289
250
|
$ gemstash start --config-file ./gemstash-config.yml
|
290
251
|
$ gemstash stop --config-file ./gemstash-config.yml
|
291
252
|
$ gemstash status --config-file ./gemstash-config.yml
|
292
|
-
|
293
|
-
.fi
|
253
|
+
.EE
|
294
254
|
.PP
|
295
|
-
When providing \f[
|
296
|
-
provided file will be output to with the provided configuration.
|
255
|
+
When providing \f[CR]--config-file\f[R] to \f[CR]gemstash setup\f[R],
|
256
|
+
the provided file will be output to with the provided configuration.
|
297
257
|
\f[B]This will overwrite\f[R] any existing configuration.
|
298
|
-
If the file doesn\[cq]t exist when providing \f[
|
299
|
-
\f[
|
300
|
-
\f[
|
301
|
-
configuration will be used.
|
258
|
+
If the file doesn\[cq]t exist when providing \f[CR]--config-file\f[R] to
|
259
|
+
\f[CR]gemstash start\f[R], \f[CR]gemstash stop\f[R],
|
260
|
+
\f[CR]gemstash status\f[R], and \f[CR]gemstash authorize\f[R], the
|
261
|
+
default configuration will be used.
|
302
262
|
.SS ERB parsed config
|
303
|
-
.
|
304
|
-
You may also create a \f[V]\[ti]/.gemstash/config.yml.erb\f[R] file.
|
263
|
+
You may also create a \f[CR]\[ti]/.gemstash/config.yml.erb\f[R] file.
|
305
264
|
If present, this will be used instead of
|
306
|
-
\f[
|
265
|
+
\f[CR]\[ti]/.gemstash/config.yml\f[R].
|
307
266
|
For example, with this you can use environment variables in the config:
|
308
267
|
.IP
|
309
|
-
.
|
310
|
-
\f[C]
|
268
|
+
.EX
|
311
269
|
# \[ti]/.gemstash/config.yml.erb
|
312
270
|
---
|
313
271
|
:db_adapter: postgres
|
314
272
|
:db_url: <%= ENV[\[dq]DATABASE_URL\[dq]] %>
|
315
|
-
|
316
|
-
.fi
|
273
|
+
.EE
|
@@ -1,19 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
4mgemstash-customize24m(7) 4mgemstash-customize24m(7)
|
4
2
|
|
5
3
|
<!-- Automatically generated by Pandoc -->
|
6
4
|
|
7
5
|
1mCustomizing the Server0m
|
8
6
|
Although Gemstash is designed for as minimal setup as possible, there
|
9
7
|
may be times you will want to change some of the default configuration.
|
10
|
-
By
|
8
|
+
By the end of this guide, you will be able to customize some of the
|
11
9
|
Gemstash behavior, including where files are stored, what database Gem-
|
12
10
|
stash uses, and how Gemstash caches certain requests.
|
13
11
|
|
14
12
|
1mSetup0m
|
15
13
|
Several customizable options are available via an interactive Gemstash
|
16
|
-
command. Run
|
14
|
+
command. Run gemstash setup and answer the questions it provides (a
|
17
15
|
blank answer will use the default value):
|
18
16
|
|
19
17
|
$ gemstash setup
|
@@ -27,49 +25,49 @@ gemstash-customize(7) gemstash-customize(7)
|
|
27
25
|
Checking that the cache is available
|
28
26
|
Checking that the database is available
|
29
27
|
The database is not available
|
30
|
-
Once
|
28
|
+
Once you've answered the questions, some checks will be made to ensure
|
31
29
|
the configuration will work. For example, the database didn't exist in
|
32
30
|
the previous example, so the command failed and the configuration
|
33
|
-
wasn't saved. If the command passes, you may provide the
|
31
|
+
wasn't saved. If the command passes, you may provide the --redo option
|
34
32
|
to force configuration to be redone:
|
35
33
|
|
36
|
-
|
34
|
+
$ gemstash setup --redo
|
37
35
|
Where should files go? [~/.gemstash]
|
38
36
|
Cache with what? [MEMORY, memcached] 1mmemcached0m
|
39
|
-
What
|
37
|
+
What is the comma separated Memcached servers? [local-
|
40
38
|
host:11211]
|
41
39
|
What database adapter? [SQLITE3, postgres, mysql, mysql2]
|
42
40
|
Checking that the cache is available
|
43
41
|
Checking that the database is available
|
44
42
|
You are all setup!
|
45
|
-
Once
|
46
|
-
configuration file located at
|
43
|
+
Once all checks have passed, Gemstash will store your answers in the
|
44
|
+
configuration file located at ~/.gemstash/config.yml.
|
47
45
|
|
48
46
|
1mFiles0m
|
49
|
-
Storage in Gemstash defaults to
|
50
|
-
You can change this in your config file via the
|
47
|
+
Storage in Gemstash defaults to ~/.gemstash unless otherwise specified.
|
48
|
+
You can change this in your config file via the :base_path key:
|
51
49
|
|
52
50
|
# ~/.gemstash/config.yml
|
53
51
|
---
|
54
52
|
:base_path: "/var/gemstash"
|
55
53
|
|
56
|
-
When customizing the
|
57
|
-
Gemstash will fail to run. Thus, if you want to use
|
58
|
-
in the previous example, make sure to
|
54
|
+
When customizing the base_path, the directory must exist, otherwise
|
55
|
+
Gemstash will fail to run. Thus, if you want to use /var/gemstash like
|
56
|
+
in the previous example, make sure to mkdir /var/gemstash and grant ac-
|
59
57
|
cess to the directory for the user you run Gemstash with.
|
60
58
|
|
61
59
|
1mDatabase0m
|
62
|
-
The
|
63
|
-
using. The default
|
64
|
-
which will use a database file located within your
|
65
|
-
database file will always be named
|
60
|
+
The :db_adapter configuration key specifies what database you will be
|
61
|
+
using. The default :db_adapter is sqlite3 (https://www.sqlite.org/),
|
62
|
+
which will use a database file located within your :base_path. The
|
63
|
+
database file will always be named gemstash.db.
|
66
64
|
|
67
|
-
You may also use
|
68
|
-
(http://www.mysql.com/), or
|
65
|
+
You may also use postgres (http://www.postgresql.org/), mysql
|
66
|
+
(http://www.mysql.com/), or mysql2 (http://sequel.jeremye-
|
69
67
|
vans.net/rdoc/files/doc/opening_databases_rdoc.html#label-mysql2) for
|
70
|
-
your
|
71
|
-
the
|
72
|
-
figuration to use the
|
68
|
+
your :db_adapter. When using any of these options, you need to specify
|
69
|
+
the :db_url to point to an existing database. Here is an example con-
|
70
|
+
figuration to use the postgres adapter:
|
73
71
|
|
74
72
|
# ~/.gemstash/config.yml
|
75
73
|
---
|
@@ -80,10 +78,10 @@ gemstash-customize(7) gemstash-customize(7)
|
|
80
78
|
:read_timeout: 5
|
81
79
|
:timeout: 30
|
82
80
|
|
83
|
-
Regardless
|
84
|
-
migrate
|
85
|
-
You
|
86
|
-
rest, except for
|
81
|
+
Regardless of the adapter you choose, the database will automatically
|
82
|
+
migrate to your version of Gemstash whenever the database is needed.
|
83
|
+
You only need to ensure the database exists and Gemstash will do the
|
84
|
+
rest, except for sqlite3 (for which Gemstash will also create the data-
|
87
85
|
base for you).
|
88
86
|
|
89
87
|
1mCache0m
|
@@ -95,15 +93,15 @@ gemstash-customize(7) gemstash-customize(7)
|
|
95
93
|
:cache_type: memory
|
96
94
|
:cache_max_size: 2000
|
97
95
|
|
98
|
-
This configuration uses the default
|
99
|
-
|
96
|
+
This configuration uses the default memory cache, and has increased the
|
97
|
+
cache_max_size setting from its default of 500 items.
|
100
98
|
|
101
|
-
The
|
99
|
+
The memory cache can optionally be swapped out with a Memcached
|
102
100
|
(http://memcached.org/) server (or cluster of servers).
|
103
101
|
|
104
|
-
To use Memcached, use the
|
102
|
+
To use Memcached, use the memcached :cache_type configuration.
|
105
103
|
|
106
|
-
Provide the servers as a comma-separated list to the
|
104
|
+
Provide the servers as a comma-separated list to the :memcached_servers
|
107
105
|
configuration key:
|
108
106
|
|
109
107
|
# ~/.gemstash/config.yml
|
@@ -112,7 +110,7 @@ gemstash-customize(7) gemstash-customize(7)
|
|
112
110
|
:memcached_servers: memcached1.local:11211,memcached2.local:11211
|
113
111
|
:cache_expiration: 1800
|
114
112
|
|
115
|
-
All caching expires in
|
113
|
+
All caching expires in cache_expiration number of seconds. Default is
|
116
114
|
1800 seconds (30 minutes). This option applies to all caching.
|
117
115
|
|
118
116
|
1mServer0m
|
@@ -123,24 +121,24 @@ gemstash-customize(7) gemstash-customize(7)
|
|
123
121
|
and the rackup file (https://github.com/rubygems/gemstash/blob/mas-
|
124
122
|
ter/lib/gemstash/config.ru) for inspiration.
|
125
123
|
|
126
|
-
While
|
127
|
-
can
|
124
|
+
While the server is not customizable, the way Gemstash binds the port
|
125
|
+
can be changed. To change the binding, update the :bind configuration
|
128
126
|
key:
|
129
127
|
|
130
128
|
# ~/.gemstash/config.yml
|
131
129
|
---
|
132
130
|
:bind: tcp://0.0.0.0:4242
|
133
131
|
|
134
|
-
This
|
135
|
-
(https://github.com/puma/puma#binding-tcp--sockets),
|
132
|
+
This maps directly to the Puma bind flag
|
133
|
+
(https://github.com/puma/puma#binding-tcp--sockets), and will support
|
136
134
|
anything valid for that flag.
|
137
135
|
|
138
|
-
The
|
139
|
-
|
136
|
+
The number of threads Puma uses is also customizable via the
|
137
|
+
:puma_threads configuration key. The default is 16.
|
140
138
|
|
141
139
|
1mProtected Fetch0m
|
142
|
-
Gemstash
|
143
|
-
Authenticated
|
140
|
+
Gemstash by default allows unauthenticated access for private gems.
|
141
|
+
Authenticated access is available via the :protected_fetch configura-
|
144
142
|
tion key.
|
145
143
|
|
146
144
|
# ~/.gemstash/config.yml
|
@@ -150,15 +148,15 @@ gemstash-customize(7) gemstash-customize(7)
|
|
150
148
|
More details on protected_fetch are here.
|
151
149
|
|
152
150
|
1mFetch Timeout0m
|
153
|
-
The
|
151
|
+
The default fetch timeout is 20 seconds. Use the :fetch_timeout con-
|
154
152
|
figuration key to change it.
|
155
153
|
|
156
154
|
---
|
157
155
|
:fetch_timeout: 20
|
158
156
|
|
159
157
|
1mConfig File Location0m
|
160
|
-
By
|
161
|
-
|
158
|
+
By default, configuration for Gemstash will be at ~/.gemstash/con-
|
159
|
+
fig.yml. This can be changed by providing the --config-file option to
|
162
160
|
the various Gemstash commands:
|
163
161
|
|
164
162
|
$ gemstash setup --config-file ./gemstash-config.yml
|
@@ -167,15 +165,15 @@ gemstash-customize(7) gemstash-customize(7)
|
|
167
165
|
$ gemstash stop --config-file ./gemstash-config.yml
|
168
166
|
$ gemstash status --config-file ./gemstash-config.yml
|
169
167
|
|
170
|
-
When
|
171
|
-
be
|
172
|
-
existing
|
173
|
-
|
174
|
-
|
168
|
+
When providing --config-file to gemstash setup, the provided file will
|
169
|
+
be output to with the provided configuration. 1mThis will overwrite 22many
|
170
|
+
existing configuration. If the file doesn't exist when providing
|
171
|
+
--config-file to gemstash start, gemstash stop, gemstash status, and
|
172
|
+
gemstash authorize, the default configuration will be used.
|
175
173
|
|
176
174
|
1mERB parsed config0m
|
177
|
-
You
|
178
|
-
this will be used instead of
|
175
|
+
You may also create a ~/.gemstash/config.yml.erb file. If present,
|
176
|
+
this will be used instead of ~/.gemstash/config.yml. For example, with
|
179
177
|
this you can use environment variables in the config:
|
180
178
|
|
181
179
|
# ~/.gemstash/config.yml.erb
|
@@ -183,6 +181,4 @@ gemstash-customize(7) gemstash-customize(7)
|
|
183
181
|
:db_adapter: postgres
|
184
182
|
:db_url: <%= ENV["DATABASE_URL"] %>
|
185
183
|
|
186
|
-
|
187
|
-
|
188
|
-
October 28, 2015 gemstash-customize(7)
|
184
|
+
October 28, 2015 4mgemstash-customize24m(7)
|
@@ -1,49 +1,29 @@
|
|
1
1
|
<!-- Automatically generated by Pandoc -->
|
2
|
-
.\" Automatically generated by Pandoc 3.1
|
2
|
+
.\" Automatically generated by Pandoc 3.1.8
|
3
3
|
.\"
|
4
|
-
.\" Define V font for inline verbatim, using C font in formats
|
5
|
-
.\" that render this, and otherwise B font.
|
6
|
-
.ie "\f[CB]x\f[]"x" \{\
|
7
|
-
. ftr V B
|
8
|
-
. ftr VI BI
|
9
|
-
. ftr VB B
|
10
|
-
. ftr VBI BI
|
11
|
-
.\}
|
12
|
-
.el \{\
|
13
|
-
. ftr V CR
|
14
|
-
. ftr VI CI
|
15
|
-
. ftr VB CB
|
16
|
-
. ftr VBI CBI
|
17
|
-
.\}
|
18
4
|
.TH "gemstash-debugging" "7" "October 28, 2015" "" ""
|
19
|
-
.hy
|
20
5
|
.SH Debugging Gemstash
|
21
|
-
.PP
|
22
6
|
If you are finding Gemstash isn\[cq]t behaving as you would expect, you
|
23
7
|
might want to start by looking at the server log.
|
24
|
-
You can find the log at \f[
|
25
|
-
|
8
|
+
You can find the log at \f[CR]server.log\f[R] within your base
|
9
|
+
directory.
|
10
|
+
By default, this will be at \f[CR]\[ti]/.gemstash/server.log\f[R].
|
26
11
|
.PP
|
27
12
|
You might find it easier to view the log directly in your terminal.
|
28
|
-
|
29
|
-
directly to standard out:
|
13
|
+
Gemstash outputs its log directly to standard out:
|
30
14
|
.IP
|
31
|
-
.
|
32
|
-
|
33
|
-
|
34
|
-
\f[R]
|
35
|
-
.fi
|
15
|
+
.EX
|
16
|
+
$ gemstash start
|
17
|
+
.EE
|
36
18
|
.PP
|
37
19
|
You can also check the status of the server:
|
38
20
|
.IP
|
39
|
-
.
|
40
|
-
\f[C]
|
21
|
+
.EX
|
41
22
|
$ gemstash status
|
42
|
-
|
43
|
-
.fi
|
23
|
+
.EE
|
44
24
|
.PP
|
45
25
|
The server status is checked by passing through to
|
46
|
-
pumactl (https://github.com/puma/puma#
|
26
|
+
pumactl (https://github.com/puma/puma#controlstatus-server).
|
47
27
|
.PP
|
48
28
|
If you find a bug, please don\[cq]t hesitate to open a bug
|
49
29
|
report (https://github.com/rubygems/gemstash#contributing)!
|
@@ -1,31 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
4mgemstash-debugging24m(7) 4mgemstash-debugging24m(7)
|
4
2
|
|
5
3
|
<!-- Automatically generated by Pandoc -->
|
6
4
|
|
7
5
|
1mDebugging Gemstash0m
|
8
6
|
If you are finding Gemstash isn't behaving as you would expect, you
|
9
7
|
might want to start by looking at the server log. You can find the log
|
10
|
-
at
|
11
|
-
|
8
|
+
at server.log within your base directory. By default, this will be at
|
9
|
+
~/.gemstash/server.log.
|
12
10
|
|
13
|
-
You
|
14
|
-
|
15
|
-
ly to standard out:
|
11
|
+
You might find it easier to view the log directly in your terminal.
|
12
|
+
Gemstash outputs its log directly to standard out:
|
16
13
|
|
17
|
-
$ gemstash start
|
14
|
+
$ gemstash start
|
18
15
|
|
19
16
|
You can also check the status of the server:
|
20
17
|
|
21
18
|
$ gemstash status
|
22
19
|
|
23
20
|
The server status is checked by passing through to pumactl
|
24
|
-
(https://github.com/puma/puma#
|
21
|
+
(https://github.com/puma/puma#controlstatus-server).
|
25
22
|
|
26
23
|
If you find a bug, please don't hesitate to open a bug report
|
27
24
|
(https://github.com/rubygems/gemstash#contributing)!
|
28
25
|
|
29
|
-
|
30
|
-
|
31
|
-
October 28, 2015 gemstash-debugging(7)
|
26
|
+
October 28, 2015 4mgemstash-debugging24m(7)
|