gemstash 2.8.2 → 2.9.0
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/lib/gemstash/authorization.rb +0 -2
- data/lib/gemstash/cache.rb +5 -4
- data/lib/gemstash/cli/base.rb +9 -2
- data/lib/gemstash/cli/setup.rb +1 -1
- data/lib/gemstash/cli/start.rb +4 -0
- data/lib/gemstash/configuration.rb +71 -1
- data/lib/gemstash/db/upstream.rb +30 -2
- data/lib/gemstash/dependencies.rb +28 -5
- data/lib/gemstash/env.rb +4 -2
- data/lib/gemstash/gem_fetcher.rb +1 -2
- data/lib/gemstash/gem_pusher.rb +24 -20
- data/lib/gemstash/gem_source/private_source.rb +22 -6
- data/lib/gemstash/gem_source/upstream_source.rb +129 -34
- data/lib/gemstash/http_client.rb +167 -8
- data/lib/gemstash/logging.rb +3 -1
- data/lib/gemstash/man/gemstash-authorize.1 +29 -48
- data/lib/gemstash/man/gemstash-authorize.1.txt +14 -14
- data/lib/gemstash/man/gemstash-configuration.5 +231 -154
- data/lib/gemstash/man/gemstash-configuration.5.txt +208 -93
- data/lib/gemstash/man/gemstash-customize.7 +150 -168
- data/lib/gemstash/man/gemstash-customize.7.txt +80 -86
- data/lib/gemstash/man/gemstash-debugging.7 +20 -33
- data/lib/gemstash/man/gemstash-debugging.7.txt +5 -7
- data/lib/gemstash/man/gemstash-deploy.7 +31 -53
- data/lib/gemstash/man/gemstash-deploy.7.txt +17 -18
- data/lib/gemstash/man/gemstash-mirror.7 +24 -37
- data/lib/gemstash/man/gemstash-mirror.7.txt +14 -9
- data/lib/gemstash/man/gemstash-multiple-sources.7 +105 -110
- data/lib/gemstash/man/gemstash-multiple-sources.7.txt +62 -41
- data/lib/gemstash/man/gemstash-private-gems.7 +87 -136
- data/lib/gemstash/man/gemstash-private-gems.7.txt +30 -30
- data/lib/gemstash/man/gemstash-readme.7 +105 -127
- data/lib/gemstash/man/gemstash-readme.7.txt +43 -49
- data/lib/gemstash/man/gemstash-setup.1 +22 -42
- data/lib/gemstash/man/gemstash-setup.1.txt +12 -12
- data/lib/gemstash/man/gemstash-start.1 +9 -27
- data/lib/gemstash/man/gemstash-start.1.txt +5 -5
- data/lib/gemstash/man/gemstash-status.1 +9 -27
- data/lib/gemstash/man/gemstash-status.1.txt +5 -5
- data/lib/gemstash/man/gemstash-stop.1 +9 -27
- data/lib/gemstash/man/gemstash-stop.1.txt +5 -5
- data/lib/gemstash/man/gemstash-version.1 +8 -28
- data/lib/gemstash/man/gemstash-version.1.txt +2 -2
- data/lib/gemstash/rack_env_rewriter.rb +3 -0
- data/lib/gemstash/upstream.rb +83 -6
- data/lib/gemstash/version.rb +1 -1
- data/lib/gemstash/web.rb +12 -0
- metadata +7 -7
|
@@ -1,52 +1,43 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
|
|
4
|
-
.\" that render this, and otherwise B font.
|
|
5
|
-
.ie "\f[CB]x\f[]"x" \{\
|
|
6
|
-
. ftr V B
|
|
7
|
-
. ftr VI BI
|
|
8
|
-
. ftr VB B
|
|
9
|
-
. ftr VBI BI
|
|
10
|
-
.\}
|
|
11
|
-
.el \{\
|
|
12
|
-
. ftr V CR
|
|
13
|
-
. ftr VI CI
|
|
14
|
-
. ftr VB CB
|
|
15
|
-
. ftr VBI CBI
|
|
16
|
-
.\}
|
|
17
|
-
.TH "gemstash-readme" "7" "November 30, 2015" "" ""
|
|
18
|
-
.hy
|
|
3
|
+
.TH "gemstash\-readme" "7" "November 30, 2015" ""
|
|
19
4
|
.SH Gemstash
|
|
20
5
|
.SS What is Gemstash?
|
|
21
|
-
.PP
|
|
22
6
|
Gemstash is both a cache for remote servers such as
|
|
23
7
|
https://rubygems.org, and a private gem source.
|
|
24
8
|
.PP
|
|
25
|
-
If you are using
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
If you are using \c
|
|
10
|
+
.UR https://bundler.io/
|
|
11
|
+
bundler
|
|
12
|
+
.UE \c
|
|
13
|
+
\ across many machines that have access to a server within your control,
|
|
14
|
+
you might want to use Gemstash.
|
|
28
15
|
.PP
|
|
29
|
-
If you produce gems that you don\
|
|
30
|
-
|
|
16
|
+
If you produce gems that you don\(cqt want everyone in the world to have
|
|
17
|
+
access to, you might want to use Gemstash.
|
|
31
18
|
.PP
|
|
32
19
|
If you frequently bundle the same set of gems across multiple projects,
|
|
33
20
|
you might want to use Gemstash.
|
|
34
21
|
.PP
|
|
35
|
-
Are you only using gems from https://rubygems.org, and don\
|
|
22
|
+
Are you only using gems from https://rubygems.org, and don\(cqt bundle
|
|
36
23
|
the same gems frequently?
|
|
37
|
-
Well, maybe you don\
|
|
24
|
+
Well, maybe you don\(cqt need Gemstash\&...
|
|
38
25
|
yet.
|
|
39
26
|
.PP
|
|
40
|
-
Gemstash is maintained by
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
27
|
+
Gemstash is maintained by \c
|
|
28
|
+
.UR https://rubycentral.org/
|
|
29
|
+
Ruby Central
|
|
30
|
+
.UE \c
|
|
31
|
+
, a non\-profit committed to supporting the critical Ruby infrastructure
|
|
32
|
+
you rely on.
|
|
33
|
+
Contribute today \c
|
|
34
|
+
.UR https://rubycentral.org/#/portal/signup
|
|
35
|
+
as an individual, or even better, as a company
|
|
36
|
+
.UE \c
|
|
37
|
+
, and ensure that Bundler, RubyGems, Gemstash, and other shared tooling
|
|
38
|
+
is around for years to come.
|
|
47
39
|
.SS Quickstart Guide
|
|
48
40
|
.SS Setup
|
|
49
|
-
.PP
|
|
50
41
|
Gemstash is designed to be quick and painless to get set up.
|
|
51
42
|
By the end of this Quickstart Guide, you will be able to bundle stashed
|
|
52
43
|
gems from public sources against a Gemstash server running on your
|
|
@@ -54,56 +45,45 @@ machine.
|
|
|
54
45
|
.PP
|
|
55
46
|
Install Gemstash to get started:
|
|
56
47
|
.IP
|
|
57
|
-
.
|
|
58
|
-
\f[C]
|
|
48
|
+
.EX
|
|
59
49
|
$ gem install gemstash
|
|
60
|
-
|
|
61
|
-
.fi
|
|
50
|
+
.EE
|
|
62
51
|
.PP
|
|
63
52
|
After it is installed, starting Gemstash requires no additional steps.
|
|
64
|
-
Simply start the Gemstash server with the \f[
|
|
53
|
+
Simply start the Gemstash server with the \f[CR]gemstash\f[R] command:
|
|
65
54
|
.IP
|
|
66
|
-
.
|
|
67
|
-
\f[C]
|
|
55
|
+
.EX
|
|
68
56
|
$ gemstash start
|
|
69
|
-
|
|
70
|
-
.fi
|
|
57
|
+
.EE
|
|
71
58
|
.PP
|
|
72
59
|
You may have noticed that the command finished quickly.
|
|
73
60
|
This is because Gemstash will run the server in the background by
|
|
74
61
|
default.
|
|
75
62
|
The server runs on port 9292.
|
|
76
63
|
.SS Bundling
|
|
77
|
-
.PP
|
|
78
64
|
With the server running, you can bundle against it.
|
|
79
65
|
Tell Bundler that you want to use Gemstash to find gems from
|
|
80
66
|
RubyGems.org:
|
|
81
67
|
.IP
|
|
82
|
-
.
|
|
83
|
-
\f[C]
|
|
68
|
+
.EX
|
|
84
69
|
$ bundle config mirror.https://rubygems.org http://localhost:9292
|
|
85
|
-
|
|
86
|
-
.fi
|
|
70
|
+
.EE
|
|
87
71
|
.PP
|
|
88
72
|
Now you can create a Gemfile and install gems through Gemstash:
|
|
89
73
|
.IP
|
|
90
|
-
.
|
|
91
|
-
\f[
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
.PP
|
|
98
|
-
The gems you include should be gems you don\[cq]t yet have installed,
|
|
74
|
+
.EX
|
|
75
|
+
\f[I]# ./Gemfile\f[R]
|
|
76
|
+
source \(dqhttps://rubygems.org\(dq
|
|
77
|
+
gem \(dqrubywarrior\(dq
|
|
78
|
+
.EE
|
|
79
|
+
.PP
|
|
80
|
+
The gems you include should be gems you don\(cqt yet have installed,
|
|
99
81
|
otherwise Gemstash will have nothing to stash.
|
|
100
82
|
Now bundle:
|
|
101
83
|
.IP
|
|
102
|
-
.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
\f[R]
|
|
106
|
-
.fi
|
|
84
|
+
.EX
|
|
85
|
+
$ bundle install \-\-path .bundle
|
|
86
|
+
.EE
|
|
107
87
|
.PP
|
|
108
88
|
Your Gemstash server has fetched the gems from https://rubygems.org and
|
|
109
89
|
cached them for you!
|
|
@@ -113,66 +93,56 @@ Gem dependencies metadata are cached for 30 minutes, so if you bundle
|
|
|
113
93
|
again before that, you can successfully bundle without an Internet
|
|
114
94
|
connection:
|
|
115
95
|
.IP
|
|
116
|
-
.
|
|
117
|
-
\f[C]
|
|
96
|
+
.EX
|
|
118
97
|
$ # Disable your Internet first!
|
|
119
|
-
$ rm
|
|
98
|
+
$ rm \-rf Gemfile.lock .bundle
|
|
120
99
|
$ bundle
|
|
121
|
-
|
|
122
|
-
.fi
|
|
100
|
+
.EE
|
|
123
101
|
.SS Falling back to rubygems.org
|
|
124
|
-
.PP
|
|
125
102
|
If you want to make sure that your bundling from https://rubygems.org
|
|
126
103
|
still works as expected when the Gemstash server is not running, you can
|
|
127
104
|
easily configure Bundler to fallback to https://rubygems.org.
|
|
128
105
|
.IP
|
|
129
|
-
.
|
|
130
|
-
\f[C]
|
|
106
|
+
.EX
|
|
131
107
|
$ bundle config mirror.https://rubygems.org.fallback_timeout true
|
|
132
|
-
|
|
133
|
-
.fi
|
|
108
|
+
.EE
|
|
134
109
|
.PP
|
|
135
110
|
You can also configure this fallback as a number of seconds in case the
|
|
136
111
|
Gemstash server is simply unresponsive.
|
|
137
112
|
This example uses a 3 second timeout:
|
|
138
113
|
.IP
|
|
139
|
-
.
|
|
140
|
-
\f[C]
|
|
114
|
+
.EX
|
|
141
115
|
$ bundle config mirror.https://rubygems.org.fallback_timeout 3
|
|
142
|
-
|
|
143
|
-
.fi
|
|
116
|
+
.EE
|
|
144
117
|
.SS Stopping the Server
|
|
145
|
-
|
|
146
|
-
Once you\[cq]ve finish using your Gemstash server, you can stop it just
|
|
118
|
+
Once you\(cqve finish using your Gemstash server, you can stop it just
|
|
147
119
|
as easily as you started it:
|
|
148
120
|
.IP
|
|
149
|
-
.
|
|
150
|
-
\f[C]
|
|
121
|
+
.EX
|
|
151
122
|
$ gemstash stop
|
|
152
|
-
|
|
153
|
-
.fi
|
|
123
|
+
.EE
|
|
154
124
|
.PP
|
|
155
|
-
You\
|
|
125
|
+
You\(cqll also want to tell Bundler that it can go back to getting gems
|
|
156
126
|
from RubyGems.org directly, instead of going through Gemstash:
|
|
157
127
|
.IP
|
|
158
|
-
.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
\f[R]
|
|
162
|
-
.fi
|
|
128
|
+
.EX
|
|
129
|
+
$ bundle config \-\-delete mirror.https://rubygems.org
|
|
130
|
+
.EE
|
|
163
131
|
.SS Under the Hood
|
|
164
|
-
.PP
|
|
165
132
|
You might wonder where the gems are stored.
|
|
166
133
|
After running the commands above, you will find a new directory at
|
|
167
|
-
\f[
|
|
134
|
+
\f[CR]\(ti/.gemstash\f[R].
|
|
168
135
|
This directory holds all the cached and private gems.
|
|
169
136
|
It also has a server log, the database, and configuration for Gemstash.
|
|
170
137
|
If you prefer, you can point to a different directory.
|
|
171
138
|
.PP
|
|
172
|
-
Gemstash uses
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
139
|
+
Gemstash uses \c
|
|
140
|
+
.UR https://www.sqlite.org/
|
|
141
|
+
SQLite
|
|
142
|
+
.UE \c
|
|
143
|
+
\ to store details about private gems.
|
|
144
|
+
The database will be located in \f[CR]\(ti/.gemstash\f[R], however you
|
|
145
|
+
won\(cqt see the database appear until you start using private gems.
|
|
176
146
|
If you prefer, you can use a different database.
|
|
177
147
|
.PP
|
|
178
148
|
Gemstash temporarily caches things like gem dependencies in memory.
|
|
@@ -180,65 +150,73 @@ Anything cached in memory will last for 30 minutes before being
|
|
|
180
150
|
retrieved again.
|
|
181
151
|
You can use memcached instead of caching in memory.
|
|
182
152
|
Gem files are always cached permanently, so bundling with a
|
|
183
|
-
\f[
|
|
153
|
+
\f[CR]Gemfile.lock\f[R] with all gems cached will never call out to
|
|
184
154
|
https://rubygems.org.
|
|
185
155
|
.PP
|
|
186
|
-
The server you ran is provided via
|
|
187
|
-
|
|
188
|
-
|
|
156
|
+
The server you ran is provided via \c
|
|
157
|
+
.UR https://puma.io/
|
|
158
|
+
Puma
|
|
159
|
+
.UE \c
|
|
160
|
+
\ and \c
|
|
161
|
+
.UR https://github.com/rack/rack
|
|
162
|
+
Rack
|
|
163
|
+
.UE \c
|
|
164
|
+
, however they are not customizable at this point.
|
|
189
165
|
.SS Deep Dive
|
|
190
|
-
.PP
|
|
191
166
|
Deep dive into more subjects:
|
|
192
|
-
.IP \
|
|
167
|
+
.IP \(bu 2
|
|
193
168
|
Private gems
|
|
194
|
-
.IP \
|
|
169
|
+
.IP \(bu 2
|
|
195
170
|
Multiple gem sources
|
|
196
|
-
.IP \
|
|
171
|
+
.IP \(bu 2
|
|
197
172
|
Using Gemstash as a mirror
|
|
198
|
-
.IP \
|
|
173
|
+
.IP \(bu 2
|
|
199
174
|
Customizing the server (database, storage, caching, and more)
|
|
200
|
-
.IP \
|
|
175
|
+
.IP \(bu 2
|
|
201
176
|
Deploying Gemstash
|
|
202
|
-
.IP \
|
|
177
|
+
.IP \(bu 2
|
|
203
178
|
Debugging Gemstash
|
|
204
179
|
.SS Reference
|
|
205
|
-
.PP
|
|
206
180
|
An anatomy of various configuration and commands:
|
|
207
|
-
.IP \
|
|
181
|
+
.IP \(bu 2
|
|
208
182
|
Configuration
|
|
209
|
-
.IP \
|
|
183
|
+
.IP \(bu 2
|
|
210
184
|
Authorize
|
|
211
|
-
.IP \
|
|
185
|
+
.IP \(bu 2
|
|
212
186
|
Start
|
|
213
|
-
.IP \
|
|
187
|
+
.IP \(bu 2
|
|
214
188
|
Stop
|
|
215
|
-
.IP \
|
|
189
|
+
.IP \(bu 2
|
|
216
190
|
Status
|
|
217
|
-
.IP \
|
|
191
|
+
.IP \(bu 2
|
|
218
192
|
Setup
|
|
219
|
-
.IP \
|
|
193
|
+
.IP \(bu 2
|
|
220
194
|
Version
|
|
221
195
|
.PP
|
|
222
|
-
To see what has changed in recent versions of Gemstash, see the
|
|
223
|
-
|
|
196
|
+
To see what has changed in recent versions of Gemstash, see the \c
|
|
197
|
+
.UR https://github.com/rubygems/gemstash/blob/main/CHANGELOG.md
|
|
198
|
+
CHANGELOG
|
|
199
|
+
.UE \c
|
|
200
|
+
\&.
|
|
224
201
|
.SS Development
|
|
225
|
-
|
|
226
|
-
After checking out the repo, run \f[V]bin/setup\f[R] to install
|
|
202
|
+
After checking out the repo, run \f[CR]bin/setup\f[R] to install
|
|
227
203
|
dependencies.
|
|
228
|
-
Then, run \f[
|
|
229
|
-
While developing, you can run \f[
|
|
230
|
-
You can also run \f[
|
|
204
|
+
Then, run \f[CR]rake\f[R] to run RuboCop and the tests.
|
|
205
|
+
While developing, you can run \f[CR]bin/gemstash\f[R] to run Gemstash.
|
|
206
|
+
You can also run \f[CR]bin/console\f[R] for an interactive prompt that
|
|
231
207
|
will allow you to experiment.
|
|
232
208
|
.SS Contributing
|
|
233
|
-
.PP
|
|
234
209
|
Bug reports and pull requests are welcome on GitHub at
|
|
235
210
|
https://github.com/rubygems/gemstash.
|
|
236
211
|
This project is intended to be a safe, welcoming space for
|
|
237
|
-
collaboration, and contributors are expected to adhere to the
|
|
238
|
-
|
|
239
|
-
Covenant
|
|
240
|
-
|
|
212
|
+
collaboration, and contributors are expected to adhere to the \c
|
|
213
|
+
.UR https://github.com/rubygems/gemstash/blob/main/CODE_OF_CONDUCT.md
|
|
214
|
+
Contributor Covenant
|
|
215
|
+
.UE \c
|
|
216
|
+
\ code of conduct.
|
|
241
217
|
.SS License
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
License
|
|
218
|
+
The gem is available as open source under the terms of the \c
|
|
219
|
+
.UR http://opensource.org/licenses/MIT
|
|
220
|
+
MIT License
|
|
221
|
+
.UE \c
|
|
222
|
+
\&.
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
4mgemstash-readme24m(7)
|
|
1
|
+
4mgemstash-readme24m(7) Miscellaneous Information Manual 4mgemstash-readme24m(7)
|
|
2
2
|
|
|
3
3
|
1mGemstash0m
|
|
4
4
|
1mWhat is Gemstash?0m
|
|
5
5
|
Gemstash is both a cache for remote servers such as
|
|
6
6
|
https://rubygems.org, and a private gem source.
|
|
7
7
|
|
|
8
|
-
If you are using
|
|
9
|
-
|
|
10
|
-
Gemstash.
|
|
8
|
+
If you are using 8;;https://bundler.io/bundler8;; across many machines that have access to a
|
|
9
|
+
server within your control, you might want to use Gemstash.
|
|
11
10
|
|
|
12
11
|
If you produce gems that you don't want everyone in the world to have
|
|
13
12
|
access to, you might want to use Gemstash.
|
|
@@ -18,45 +17,44 @@
|
|
|
18
17
|
Are you only using gems from https://rubygems.org, and don't bundle the
|
|
19
18
|
same gems frequently? Well, maybe you don't need Gemstash... yet.
|
|
20
19
|
|
|
21
|
-
Gemstash is maintained by
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Bundler, RubyGems, Gemstash, and other shared tooling is around for
|
|
20
|
+
Gemstash is maintained by 8;;https://rubycentral.org/Ruby Central8;;, a non-profit committed to sup-
|
|
21
|
+
porting the critical Ruby infrastructure you rely on. Contribute today
|
|
22
|
+
8;;https://rubycentral.org/#/portal/signupas an individual, or even better, as a company8;;, and ensure that
|
|
23
|
+
Bundler, RubyGems, Gemstash, and other shared tooling is around for
|
|
26
24
|
years to come.
|
|
27
25
|
|
|
28
26
|
1mQuickstart Guide0m
|
|
29
27
|
1mSetup0m
|
|
30
|
-
Gemstash
|
|
31
|
-
end
|
|
28
|
+
Gemstash is designed to be quick and painless to get set up. By the
|
|
29
|
+
end of this Quickstart Guide, you will be able to bundle stashed gems
|
|
32
30
|
from public sources against a Gemstash server running on your machine.
|
|
33
31
|
|
|
34
32
|
Install Gemstash to get started:
|
|
35
33
|
|
|
36
34
|
$ gem install gemstash
|
|
37
35
|
|
|
38
|
-
After
|
|
39
|
-
Simply start the Gemstash server with the
|
|
36
|
+
After it is installed, starting Gemstash requires no additional steps.
|
|
37
|
+
Simply start the Gemstash server with the gemstash command:
|
|
40
38
|
|
|
41
39
|
$ gemstash start
|
|
42
40
|
|
|
43
|
-
You
|
|
44
|
-
cause
|
|
41
|
+
You may have noticed that the command finished quickly. This is be-
|
|
42
|
+
cause Gemstash will run the server in the background by default. The
|
|
45
43
|
server runs on port 9292.
|
|
46
44
|
|
|
47
45
|
1mBundling0m
|
|
48
|
-
With
|
|
46
|
+
With the server running, you can bundle against it. Tell Bundler that
|
|
49
47
|
you want to use Gemstash to find gems from RubyGems.org:
|
|
50
48
|
|
|
51
49
|
$ bundle config mirror.https://rubygems.org http://localhost:9292
|
|
52
50
|
|
|
53
51
|
Now you can create a Gemfile and install gems through Gemstash:
|
|
54
52
|
|
|
55
|
-
# ./
|
|
53
|
+
4m#24m 4m./Gemfile0m
|
|
56
54
|
source "https://rubygems.org"
|
|
57
55
|
gem "rubywarrior"
|
|
58
56
|
|
|
59
|
-
The
|
|
57
|
+
The gems you include should be gems you don't yet have installed, oth-
|
|
60
58
|
erwise Gemstash will have nothing to stash. Now bundle:
|
|
61
59
|
|
|
62
60
|
$ bundle install --path .bundle
|
|
@@ -65,7 +63,7 @@
|
|
|
65
63
|
cached them for you! To prove this, you can disable your Internet con-
|
|
66
64
|
nection and try again. Gem files (*.gem) are cached indefinitely. Gem
|
|
67
65
|
dependencies metadata are cached for 30 minutes, so if you bundle again
|
|
68
|
-
before
|
|
66
|
+
before that, you can successfully bundle without an Internet connec-
|
|
69
67
|
tion:
|
|
70
68
|
|
|
71
69
|
$ # Disable your Internet first!
|
|
@@ -73,51 +71,50 @@
|
|
|
73
71
|
$ bundle
|
|
74
72
|
|
|
75
73
|
1mFalling back to rubygems.org0m
|
|
76
|
-
If
|
|
77
|
-
still
|
|
74
|
+
If you want to make sure that your bundling from https://rubygems.org
|
|
75
|
+
still works as expected when the Gemstash server is not running, you
|
|
78
76
|
can easily configure Bundler to fallback to https://rubygems.org.
|
|
79
77
|
|
|
80
78
|
$ bundle config mirror.https://rubygems.org.fallback_timeout true
|
|
81
79
|
|
|
82
80
|
You can also configure this fallback as a number of seconds in case the
|
|
83
|
-
Gemstash
|
|
81
|
+
Gemstash server is simply unresponsive. This example uses a 3 second
|
|
84
82
|
timeout:
|
|
85
83
|
|
|
86
84
|
$ bundle config mirror.https://rubygems.org.fallback_timeout 3
|
|
87
85
|
|
|
88
86
|
1mStopping the Server0m
|
|
89
|
-
Once
|
|
87
|
+
Once you've finish using your Gemstash server, you can stop it just as
|
|
90
88
|
easily as you started it:
|
|
91
89
|
|
|
92
90
|
$ gemstash stop
|
|
93
91
|
|
|
94
|
-
You'll
|
|
92
|
+
You'll also want to tell Bundler that it can go back to getting gems
|
|
95
93
|
from RubyGems.org directly, instead of going through Gemstash:
|
|
96
94
|
|
|
97
95
|
$ bundle config --delete mirror.https://rubygems.org
|
|
98
96
|
|
|
99
97
|
1mUnder the Hood0m
|
|
100
98
|
You might wonder where the gems are stored. After running the commands
|
|
101
|
-
above,
|
|
102
|
-
holds
|
|
99
|
+
above, you will find a new directory at ~/.gemstash. This directory
|
|
100
|
+
holds all the cached and private gems. It also has a server log, the
|
|
103
101
|
database, and configuration for Gemstash. If you prefer, you can point
|
|
104
102
|
to a different directory.
|
|
105
103
|
|
|
106
|
-
Gemstash
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
Gemstash uses 8;;https://www.sqlite.org/SQLite8;; to store details about private gems. The database
|
|
105
|
+
will be located in ~/.gemstash, however you won't see the database ap-
|
|
106
|
+
pear until you start using private gems. If you prefer, you can use a
|
|
107
|
+
different database.
|
|
110
108
|
|
|
111
|
-
Gemstash
|
|
112
|
-
Anything
|
|
113
|
-
trieved
|
|
114
|
-
Gem
|
|
115
|
-
|
|
109
|
+
Gemstash temporarily caches things like gem dependencies in memory.
|
|
110
|
+
Anything cached in memory will last for 30 minutes before being re-
|
|
111
|
+
trieved again. You can use memcached instead of caching in memory.
|
|
112
|
+
Gem files are always cached permanently, so bundling with a Gem-
|
|
113
|
+
file.lock with all gems cached will never call out to
|
|
116
114
|
https://rubygems.org.
|
|
117
115
|
|
|
118
|
-
The
|
|
119
|
-
|
|
120
|
-
this point.
|
|
116
|
+
The server you ran is provided via 8;;https://puma.io/Puma8;; and 8;;https://github.com/rack/rackRack8;;, however they are not
|
|
117
|
+
customizable at this point.
|
|
121
118
|
|
|
122
119
|
1mDeep Dive0m
|
|
123
120
|
Deep dive into more subjects:
|
|
@@ -152,24 +149,21 @@
|
|
|
152
149
|
o Version
|
|
153
150
|
|
|
154
151
|
To see what has changed in recent versions of Gemstash, see the
|
|
155
|
-
|
|
156
|
-
OG.md).
|
|
152
|
+
8;;https://github.com/rubygems/gemstash/blob/main/CHANGELOG.mdCHANGELOG8;;.
|
|
157
153
|
|
|
158
154
|
1mDevelopment0m
|
|
159
|
-
After
|
|
160
|
-
Then, run
|
|
161
|
-
run
|
|
155
|
+
After checking out the repo, run bin/setup to install dependencies.
|
|
156
|
+
Then, run rake to run RuboCop and the tests. While developing, you can
|
|
157
|
+
run bin/gemstash to run Gemstash. You can also run bin/console for an
|
|
162
158
|
interactive prompt that will allow you to experiment.
|
|
163
159
|
|
|
164
160
|
1mContributing0m
|
|
165
|
-
Bug
|
|
161
|
+
Bug reports and pull requests are welcome on GitHub at
|
|
166
162
|
https://github.com/rubygems/gemstash. This project is intended to be a
|
|
167
|
-
safe,
|
|
168
|
-
to adhere to the
|
|
169
|
-
stash/blob/main/CODE_OF_CONDUCT.md) code of conduct.
|
|
163
|
+
safe, welcoming space for collaboration, and contributors are expected
|
|
164
|
+
to adhere to the 8;;https://github.com/rubygems/gemstash/blob/main/CODE_OF_CONDUCT.mdContributor Covenant8;; code of conduct.
|
|
170
165
|
|
|
171
166
|
1mLicense0m
|
|
172
|
-
The gem is available as open source under the terms of the
|
|
173
|
-
(http://opensource.org/licenses/MIT).
|
|
167
|
+
The gem is available as open source under the terms of the 8;;http://opensource.org/licenses/MITMIT License8;;.
|
|
174
168
|
|
|
175
169
|
November 30, 2015 4mgemstash-readme24m(7)
|
|
@@ -1,57 +1,37 @@
|
|
|
1
|
-
.\" Automatically generated by Pandoc 3.
|
|
1
|
+
.\" Automatically generated by Pandoc 3.7.0.2
|
|
2
2
|
.\"
|
|
3
|
-
|
|
4
|
-
.\" that render this, and otherwise B font.
|
|
5
|
-
.ie "\f[CB]x\f[]"x" \{\
|
|
6
|
-
. ftr V B
|
|
7
|
-
. ftr VI BI
|
|
8
|
-
. ftr VB B
|
|
9
|
-
. ftr VBI BI
|
|
10
|
-
.\}
|
|
11
|
-
.el \{\
|
|
12
|
-
. ftr V CR
|
|
13
|
-
. ftr VI CI
|
|
14
|
-
. ftr VB CB
|
|
15
|
-
. ftr VBI CBI
|
|
16
|
-
.\}
|
|
17
|
-
.TH "gemstash-setup" "1" "October 9, 2015" "" ""
|
|
18
|
-
.hy
|
|
3
|
+
.TH "gemstash\-setup" "1" "October 9, 2015" ""
|
|
19
4
|
.SH Name
|
|
20
|
-
|
|
21
|
-
gemstash-setup - Customize your Gemstash configuration interactively
|
|
5
|
+
gemstash\-setup \- Customize your Gemstash configuration interactively
|
|
22
6
|
.SH Synopsis
|
|
23
|
-
|
|
24
|
-
\f[V]gemstash setup [--redo] [--debug] [--config-file FILE]\f[R]
|
|
7
|
+
\f[CR]gemstash setup [\-\-redo] [\-\-debug] [\-\-config\-file FILE]\f[R]
|
|
25
8
|
.SH Description
|
|
26
|
-
.PP
|
|
27
9
|
Customize your Gemstash configuration interactively.
|
|
28
10
|
This will save your config file, but only if a few checks pass after
|
|
29
|
-
you\
|
|
11
|
+
you\(cqve provided your answers.
|
|
30
12
|
.SS Usage
|
|
31
13
|
.IP
|
|
32
|
-
.
|
|
33
|
-
\f[C]
|
|
14
|
+
.EX
|
|
34
15
|
gemstash setup
|
|
35
|
-
gemstash setup
|
|
36
|
-
gemstash setup
|
|
37
|
-
|
|
38
|
-
.fi
|
|
16
|
+
gemstash setup \-\-redo
|
|
17
|
+
gemstash setup \-\-config\-file <file>
|
|
18
|
+
.EE
|
|
39
19
|
.SH Options
|
|
40
|
-
.IP \
|
|
41
|
-
\f[
|
|
42
|
-
This does nothing the first time \f[
|
|
43
|
-
If you want to change your configuration using \f[
|
|
44
|
-
after you\
|
|
20
|
+
.IP \(bu 2
|
|
21
|
+
\f[CR]\-\-redo\f[R]: Redo the configuration.
|
|
22
|
+
This does nothing the first time \f[CR]gemstash setup\f[R] is run.
|
|
23
|
+
If you want to change your configuration using \f[CR]gemstash setup\f[R]
|
|
24
|
+
after you\(cqve run it before, you must provide this option, otherwise
|
|
45
25
|
Gemstash will simply indicate your setup is complete.
|
|
46
|
-
.IP \
|
|
47
|
-
\f[
|
|
48
|
-
the end of setup fails.
|
|
26
|
+
.IP \(bu 2
|
|
27
|
+
\f[CR]\-\-debug\f[R]: Output additional information if one of the checks
|
|
28
|
+
at the end of setup fails.
|
|
49
29
|
This will do nothing if all checks pass.
|
|
50
|
-
.IP \
|
|
51
|
-
\f[
|
|
30
|
+
.IP \(bu 2
|
|
31
|
+
\f[CR]\-\-config\-file FILE\f[R]: Specify the config file to write to.
|
|
52
32
|
Without this option, your configuration will be written to
|
|
53
|
-
\f[
|
|
33
|
+
\f[CR]\(ti/.gemstash/config.yml\f[R].
|
|
54
34
|
If you write to a custom location, you will need to pass the
|
|
55
|
-
\f[
|
|
35
|
+
\f[CR]\-\-config\-file\f[R] option to all Gemstash commands.
|
|
56
36
|
If you plan to use ERB in your config file, you might want to use
|
|
57
|
-
\f[
|
|
37
|
+
\f[CR]\(ti/.gemstash/config.yml.erb\f[R].
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
4mgemstash-setup24m(1)
|
|
1
|
+
4mgemstash-setup24m(1) General Commands Manual 4mgemstash-setup24m(1)
|
|
2
2
|
|
|
3
3
|
1mName0m
|
|
4
4
|
gemstash-setup - Customize your Gemstash configuration interactively
|
|
5
5
|
|
|
6
6
|
1mSynopsis0m
|
|
7
|
-
|
|
7
|
+
gemstash setup [--redo] [--debug] [--config-file FILE]
|
|
8
8
|
|
|
9
9
|
1mDescription0m
|
|
10
10
|
Customize your Gemstash configuration interactively. This will save
|
|
@@ -17,20 +17,20 @@
|
|
|
17
17
|
gemstash setup --config-file <file>
|
|
18
18
|
|
|
19
19
|
1mOptions0m
|
|
20
|
-
o
|
|
21
|
-
|
|
22
|
-
ing
|
|
20
|
+
o --redo: Redo the configuration. This does nothing the first time
|
|
21
|
+
gemstash setup is run. If you want to change your configuration us-
|
|
22
|
+
ing gemstash setup after you've run it before, you must provide this
|
|
23
23
|
option, otherwise Gemstash will simply indicate your setup is com-
|
|
24
24
|
plete.
|
|
25
25
|
|
|
26
|
-
o
|
|
26
|
+
o --debug: Output additional information if one of the checks at the
|
|
27
27
|
end of setup fails. This will do nothing if all checks pass.
|
|
28
28
|
|
|
29
|
-
o
|
|
30
|
-
this option, your configuration will be written to
|
|
31
|
-
|
|
32
|
-
the
|
|
33
|
-
use ERB in your config file, you might want to use
|
|
34
|
-
|
|
29
|
+
o --config-file FILE: Specify the config file to write to. Without
|
|
30
|
+
this option, your configuration will be written to ~/.gemstash/con-
|
|
31
|
+
fig.yml. If you write to a custom location, you will need to pass
|
|
32
|
+
the --config-file option to all Gemstash commands. If you plan to
|
|
33
|
+
use ERB in your config file, you might want to use ~/.gemstash/con-
|
|
34
|
+
fig.yml.erb.
|
|
35
35
|
|
|
36
36
|
October 9, 2015 4mgemstash-setup24m(1)
|