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