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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gemstash/authorization.rb +0 -2
  3. data/lib/gemstash/cache.rb +5 -4
  4. data/lib/gemstash/cli/base.rb +9 -2
  5. data/lib/gemstash/cli/setup.rb +1 -1
  6. data/lib/gemstash/cli/start.rb +4 -0
  7. data/lib/gemstash/configuration.rb +71 -1
  8. data/lib/gemstash/db/upstream.rb +30 -2
  9. data/lib/gemstash/dependencies.rb +28 -5
  10. data/lib/gemstash/env.rb +4 -2
  11. data/lib/gemstash/gem_fetcher.rb +1 -2
  12. data/lib/gemstash/gem_pusher.rb +24 -20
  13. data/lib/gemstash/gem_source/private_source.rb +22 -6
  14. data/lib/gemstash/gem_source/upstream_source.rb +129 -34
  15. data/lib/gemstash/http_client.rb +167 -8
  16. data/lib/gemstash/logging.rb +3 -1
  17. data/lib/gemstash/man/gemstash-authorize.1 +29 -48
  18. data/lib/gemstash/man/gemstash-authorize.1.txt +14 -14
  19. data/lib/gemstash/man/gemstash-configuration.5 +231 -154
  20. data/lib/gemstash/man/gemstash-configuration.5.txt +208 -93
  21. data/lib/gemstash/man/gemstash-customize.7 +150 -168
  22. data/lib/gemstash/man/gemstash-customize.7.txt +80 -86
  23. data/lib/gemstash/man/gemstash-debugging.7 +20 -33
  24. data/lib/gemstash/man/gemstash-debugging.7.txt +5 -7
  25. data/lib/gemstash/man/gemstash-deploy.7 +31 -53
  26. data/lib/gemstash/man/gemstash-deploy.7.txt +17 -18
  27. data/lib/gemstash/man/gemstash-mirror.7 +24 -37
  28. data/lib/gemstash/man/gemstash-mirror.7.txt +14 -9
  29. data/lib/gemstash/man/gemstash-multiple-sources.7 +105 -110
  30. data/lib/gemstash/man/gemstash-multiple-sources.7.txt +62 -41
  31. data/lib/gemstash/man/gemstash-private-gems.7 +87 -136
  32. data/lib/gemstash/man/gemstash-private-gems.7.txt +30 -30
  33. data/lib/gemstash/man/gemstash-readme.7 +105 -127
  34. data/lib/gemstash/man/gemstash-readme.7.txt +43 -49
  35. data/lib/gemstash/man/gemstash-setup.1 +22 -42
  36. data/lib/gemstash/man/gemstash-setup.1.txt +12 -12
  37. data/lib/gemstash/man/gemstash-start.1 +9 -27
  38. data/lib/gemstash/man/gemstash-start.1.txt +5 -5
  39. data/lib/gemstash/man/gemstash-status.1 +9 -27
  40. data/lib/gemstash/man/gemstash-status.1.txt +5 -5
  41. data/lib/gemstash/man/gemstash-stop.1 +9 -27
  42. data/lib/gemstash/man/gemstash-stop.1.txt +5 -5
  43. data/lib/gemstash/man/gemstash-version.1 +8 -28
  44. data/lib/gemstash/man/gemstash-version.1.txt +2 -2
  45. data/lib/gemstash/rack_env_rewriter.rb +3 -0
  46. data/lib/gemstash/upstream.rb +83 -6
  47. data/lib/gemstash/version.rb +1 -1
  48. data/lib/gemstash/web.rb +12 -0
  49. metadata +7 -7
@@ -1,4 +1,4 @@
1
- 4mgemstash-customize24m(7) 4mgemstash-customize24m(7)
1
+ 4mgemstash-customize24m(7) Miscellaneous Information Manual 4mgemstash-customize24m(7)
2
2
 
3
3
  1mCustomizing the Server0m
4
4
  Although Gemstash is designed for as minimal setup as possible, there
@@ -9,7 +9,7 @@
9
9
 
10
10
  1mSetup0m
11
11
  Several customizable options are available via an interactive Gemstash
12
- command. Run 1mgemstash setup 22mand answer the questions it provides (a
12
+ command. Run gemstash setup and answer the questions it provides (a
13
13
  blank answer will use the default value):
14
14
 
15
15
  $ gemstash setup
@@ -26,10 +26,10 @@
26
26
  Once you've answered the questions, some checks will be made to ensure
27
27
  the configuration will work. For example, the database didn't exist in
28
28
  the previous example, so the command failed and the configuration
29
- wasn't saved. If the command passes, you may provide the 1m--redo 22moption
29
+ wasn't saved. If the command passes, you may provide the --redo option
30
30
  to force configuration to be redone:
31
31
 
32
- 1m$ gemstash setup --redo0m
32
+ $ gemstash setup --redo
33
33
  Where should files go? [~/.gemstash]
34
34
  Cache with what? [MEMORY, memcached] 1mmemcached0m
35
35
  What is the comma separated Memcached servers? [local-
@@ -39,129 +39,123 @@
39
39
  Checking that the database is available
40
40
  You are all setup!
41
41
  Once all checks have passed, Gemstash will store your answers in the
42
- configuration file located at 1m~/.gemstash/config.yml22m.
42
+ configuration file located at ~/.gemstash/config.yml.
43
43
 
44
44
  1mFiles0m
45
- Storage in Gemstash defaults to 1m~/.gemstash 22munless otherwise specified.
46
- You can change this in your config file via the 1m:base_path 22mkey:
45
+ Storage in Gemstash defaults to ~/.gemstash unless otherwise specified.
46
+ You can change this in your config file via the :base_path key:
47
47
 
48
- # ~/.gemstash/config.yml
48
+ 4m#24m 4m~/.gemstash/config.yml0m
49
49
  ---
50
- :base_path: "/var/gemstash"
50
+ :base_path1m: 22m"/var/gemstash"
51
51
 
52
- When customizing the 1mbase_path22m, the directory must exist, otherwise
53
- Gemstash will fail to run. Thus, if you want to use 1m/var/gemstash 22mlike
54
- in the previous example, make sure to 1mmkdir /var/gemstash 22mand grant ac-
52
+ When customizing the base_path, the directory must exist, otherwise
53
+ Gemstash will fail to run. Thus, if you want to use /var/gemstash like
54
+ in the previous example, make sure to mkdir /var/gemstash and grant ac-
55
55
  cess to the directory for the user you run Gemstash with.
56
56
 
57
57
  1mDatabase0m
58
- The 1m:db_adapter 22mconfiguration key specifies what database you will be
59
- using. The default 1m:db_adapter 22mis 1msqlite3 22m(https://www.sqlite.org/),
60
- which will use a database file located within your 1m:base_path22m. The
61
- database file will always be named 1mgemstash.db22m.
62
-
63
- You may also use 1mpostgres 22m(http://www.postgresql.org/), 1mmysql0m
64
- (http://www.mysql.com/), or 1mmysql2 22m(http://sequel.jeremye-
65
- vans.net/rdoc/files/doc/opening_databases_rdoc.html#label-mysql2) for
66
- your 1m:db_adapter22m. When using any of these options, you need to specify
67
- the 1m:db_url 22mto point to an existing database. Here is an example con-
68
- figuration to use the 1mpostgres 22madapter:
69
-
70
- # ~/.gemstash/config.yml
58
+ The :db_adapter configuration key specifies what database you will be
59
+ using. The default :db_adapter is 8;;https://www.sqlite.org/sqlite38;;, which will use a database
60
+ file located within your :base_path. The database file will always be
61
+ named gemstash.db.
62
+
63
+ You may also use 8;;http://www.postgresql.org/postgres8;;, 8;;http://www.mysql.com/mysql8;;, or 8;;http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-mysql2mysql28;; for your :db_adapter. When
64
+ using any of these options, you need to specify the :db_url to point to
65
+ an existing database. Here is an example configuration to use the
66
+ postgres adapter:
67
+
68
+ 4m#24m 4m~/.gemstash/config.yml0m
71
69
  ---
72
- :db_adapter: postgres
73
- :db_url: postgres:///gemstash
74
- :db_connection_options: # Sequel.connect options
75
- :connect_timeout: 10
76
- :read_timeout: 5
77
- :timeout: 30
78
-
79
- Regardless of the adapter you choose, the database will automatically
80
- migrate to your version of Gemstash whenever the database is needed.
81
- You only need to ensure the database exists and Gemstash will do the
82
- rest, except for 1msqlite3 22m(for which Gemstash will also create the data-
70
+ :db_adapter1m: 22mpostgres
71
+ :db_url1m: 22mpostgres:///gemstash
72
+ :db_connection_options1m: 4m22m#24m 4mSequel.connect24m 4moptions0m
73
+ :connect_timeout1m: 22m10
74
+ :read_timeout1m: 22m5
75
+ :timeout1m: 22m30
76
+
77
+ Regardless of the adapter you choose, the database will automatically
78
+ migrate to your version of Gemstash whenever the database is needed.
79
+ You only need to ensure the database exists and Gemstash will do the
80
+ rest, except for sqlite3 (for which Gemstash will also create the data-
83
81
  base for you).
84
82
 
85
83
  1mCache0m
86
- Certain things (like dependencies) are cached in memory. This avoids
84
+ Certain things (like dependencies) are cached in memory. This avoids
87
85
  web calls to the gem source, and database calls for private gems.
88
86
 
89
- # ~/.gemstash/config.yml
87
+ 4m#24m 4m~/.gemstash/config.yml0m
90
88
  ---
91
- :cache_type: memory
92
- :cache_max_size: 2000
89
+ :cache_type1m: 22mmemory
90
+ :cache_max_size1m: 22m2000
93
91
 
94
- This configuration uses the default 1mmemory 22mcache, and has increased the
95
- 1mcache_max_size 22msetting from its default of 500 items.
92
+ This configuration uses the default memory cache, and has increased the
93
+ cache_max_size setting from its default of 500 items.
96
94
 
97
- The memory cache can optionally be swapped out with a Memcached
98
- (http://memcached.org/) server (or cluster of servers).
95
+ The memory cache can optionally be swapped out with a 8;;http://memcached.org/Memcached8;; server
96
+ (or cluster of servers).
99
97
 
100
- To use Memcached, use the 1mmemcached :cache_type 22mconfiguration.
98
+ To use Memcached, use the memcached :cache_type configuration.
101
99
 
102
- Provide the servers as a comma-separated list to the 1m:memcached_servers0m
100
+ Provide the servers as a comma-separated list to the :memcached_servers
103
101
  configuration key:
104
102
 
105
- # ~/.gemstash/config.yml
103
+ 4m#24m 4m~/.gemstash/config.yml0m
106
104
  ---
107
- :cache_type: memcached
108
- :memcached_servers: memcached1.local:11211,memcached2.local:11211
109
- :cache_expiration: 1800
105
+ :cache_type1m: 22mmemcached
106
+ :memcached_servers1m: 22mmemcached1.local:11211,memcached2.local:11211
107
+ :cache_expiration1m: 22m1800
110
108
 
111
- All caching expires in 1mcache_expiration 22mnumber of seconds. Default is
109
+ All caching expires in cache_expiration number of seconds. Default is
112
110
  1800 seconds (30 minutes). This option applies to all caching.
113
111
 
114
112
  1mServer0m
115
- Gemstash uses Puma (http://puma.io/) and Rack (http://rack.github.io/)
116
- as the server. Alternate server configurations are not currently sup-
117
- ported, but you can take a look at the Puma configuration
118
- (https://github.com/rubygems/gemstash/blob/master/lib/gemstash/puma.rb)
119
- and the rackup file (https://github.com/rubygems/gemstash/blob/mas-
120
- ter/lib/gemstash/config.ru) for inspiration.
113
+ Gemstash uses 8;;http://puma.io/Puma8;; and 8;;http://rack.github.io/Rack8;; as the server. Alternate server configura-
114
+ tions are not currently supported, but you can take a look at the 8;;https://github.com/rubygems/gemstash/blob/master/lib/gemstash/puma.rbPuma
115
+ configuration8;; and the 8;;https://github.com/rubygems/gemstash/blob/master/lib/gemstash/config.rurackup file8;; for inspiration.
121
116
 
122
117
  While the server is not customizable, the way Gemstash binds the port
123
- can be changed. To change the binding, update the 1m:bind 22mconfiguration
118
+ can be changed. To change the binding, update the :bind configuration
124
119
  key:
125
120
 
126
- # ~/.gemstash/config.yml
121
+ 4m#24m 4m~/.gemstash/config.yml0m
127
122
  ---
128
- :bind: tcp://0.0.0.0:4242
123
+ :bind1m: 22mtcp://0.0.0.0:4242
129
124
 
130
- This maps directly to the Puma bind flag
131
- (https://github.com/puma/puma#binding-tcp--sockets), and will support
132
- anything valid for that flag.
125
+ This maps directly to the 8;;https://github.com/puma/puma#binding-tcp--socketsPuma bind flag8;;, and will support anything
126
+ valid for that flag.
133
127
 
134
- The number of threads Puma uses is also customizable via the
135
- 1m:puma_threads 22mconfiguration key. The default is 1m1622m.
128
+ The number of threads Puma uses is also customizable via the
129
+ :puma_threads configuration key. The default is 16.
136
130
 
137
131
  1mProtected Fetch0m
138
- Gemstash by default allows unauthenticated access for private gems.
139
- Authenticated access is available via the 1m:protected_fetch 22mconfigura-
132
+ Gemstash by default allows unauthenticated access for private gems.
133
+ Authenticated access is available via the :protected_fetch configura-
140
134
  tion key.
141
135
 
142
- # ~/.gemstash/config.yml
136
+ 4m#24m 4m~/.gemstash/config.yml0m
143
137
  ---
144
- :protected_fetch: true
138
+ :protected_fetch1m: 22mtrue
145
139
 
146
140
  More details on protected_fetch are here.
147
141
 
148
142
  1mFetch Timeout0m
149
- The default fetch timeout is 20 seconds. Use the 1m:fetch_timeout 22mcon-
143
+ The default fetch timeout is 20 seconds. Use the :fetch_timeout con-
150
144
  figuration key to change it.
151
145
 
152
146
  ---
153
- :fetch_timeout: 20
147
+ :fetch_timeout1m: 22m20
154
148
 
155
149
  1mOpen Timeout0m
156
- The default connection open timeout is 2 seconds. Use the 1m:open_time-0m
157
- 1mout 22mconfiguration key to change it.
150
+ The default connection open timeout is 2 seconds. Use the :open_time-
151
+ out configuration key to change it.
158
152
 
159
153
  ---
160
- :open_timeout: 2
154
+ :open_timeout1m: 22m2
161
155
 
162
156
  1mConfig File Location0m
163
- By default, configuration for Gemstash will be at 1m~/.gemstash/con-0m
164
- 1mfig.yml22m. This can be changed by providing the 1m--config-file 22moption to
157
+ By default, configuration for Gemstash will be at ~/.gemstash/con-
158
+ fig.yml. This can be changed by providing the --config-file option to
165
159
  the various Gemstash commands:
166
160
 
167
161
  $ gemstash setup --config-file ./gemstash-config.yml
@@ -170,20 +164,20 @@
170
164
  $ gemstash stop --config-file ./gemstash-config.yml
171
165
  $ gemstash status --config-file ./gemstash-config.yml
172
166
 
173
- When providing 1m--config-file 22mto 1mgemstash setup22m, the provided file will
174
- be output to with the provided configuration. 1mThis will overwrite 22many
175
- existing configuration. If the file doesn't exist when providing
176
- 1m--config-file 22mto 1mgemstash start22m, 1mgemstash stop22m, 1mgemstash status22m, and
177
- 1mgemstash authorize22m, the default configuration will be used.
167
+ When providing --config-file to gemstash setup, the provided file will
168
+ be output to with the provided configuration. 1mThis will overwrite 22many
169
+ existing configuration. If the file doesn't exist when providing
170
+ --config-file to gemstash start, gemstash stop, gemstash status, and
171
+ gemstash authorize, the default configuration will be used.
178
172
 
179
173
  1mERB parsed config0m
180
- You may also create a 1m~/.gemstash/config.yml.erb 22mfile. If present,
181
- this will be used instead of 1m~/.gemstash/config.yml22m. For example, with
174
+ You may also create a ~/.gemstash/config.yml.erb file. If present,
175
+ this will be used instead of ~/.gemstash/config.yml. For example, with
182
176
  this you can use environment variables in the config:
183
177
 
184
- # ~/.gemstash/config.yml.erb
178
+ 4m#24m 4m~/.gemstash/config.yml.erb0m
185
179
  ---
186
- :db_adapter: postgres
187
- :db_url: <%= ENV["DATABASE_URL"] %>
180
+ :db_adapter1m: 22mpostgres
181
+ :db_url1m: 22m<%= ENV1m[22m"DATABASE_URL"1m] 22m%>
188
182
 
189
183
  October 28, 2015 4mgemstash-customize24m(7)
@@ -1,47 +1,34 @@
1
- .\" Automatically generated by Pandoc 3.1.3
1
+ .\" Automatically generated by Pandoc 3.7.0.2
2
2
  .\"
3
- .\" Define V font for inline verbatim, using C font in formats
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-debugging" "7" "October 28, 2015" "" ""
18
- .hy
3
+ .TH "gemstash\-debugging" "7" "October 28, 2015" ""
19
4
  .SH Debugging Gemstash
20
- .PP
21
- If you are finding Gemstash isn\[cq]t behaving as you would expect, you
5
+ If you are finding Gemstash isn\(cqt behaving as you would expect, you
22
6
  might want to start by looking at the server log.
23
- You can find the log at \f[V]server.log\f[R] within your base directory.
24
- By default, this will be at \f[V]\[ti]/.gemstash/server.log\f[R].
7
+ You can find the log at \f[CR]server.log\f[R] within your base
8
+ directory.
9
+ By default, this will be at \f[CR]\(ti/.gemstash/server.log\f[R].
25
10
  .PP
26
11
  You might find it easier to view the log directly in your terminal.
27
12
  Gemstash outputs its log directly to standard out:
28
13
  .IP
29
- .nf
30
- \f[C]
14
+ .EX
31
15
  $ gemstash start
32
- \f[R]
33
- .fi
16
+ .EE
34
17
  .PP
35
18
  You can also check the status of the server:
36
19
  .IP
37
- .nf
38
- \f[C]
20
+ .EX
39
21
  $ gemstash status
40
- \f[R]
41
- .fi
22
+ .EE
42
23
  .PP
43
- The server status is checked by passing through to
44
- pumactl (https://github.com/puma/puma#controlstatus-server).
24
+ The server status is checked by passing through to \c
25
+ .UR https://github.com/puma/puma#controlstatus-server
26
+ pumactl
27
+ .UE \c
28
+ \&.
45
29
  .PP
46
- If you find a bug, please don\[cq]t hesitate to open a bug
47
- report (https://github.com/rubygems/gemstash#contributing)!
30
+ If you find a bug, please don\(cqt hesitate to \c
31
+ .UR https://github.com/rubygems/gemstash#contributing
32
+ open a bug report
33
+ .UE \c
34
+ !
@@ -1,10 +1,10 @@
1
- 4mgemstash-debugging24m(7) 4mgemstash-debugging24m(7)
1
+ 4mgemstash-debugging24m(7) Miscellaneous Information Manual 4mgemstash-debugging24m(7)
2
2
 
3
3
  1mDebugging Gemstash0m
4
4
  If you are finding Gemstash isn't behaving as you would expect, you
5
5
  might want to start by looking at the server log. You can find the log
6
- at 1mserver.log 22mwithin your base directory. By default, this will be at
7
- 1m~/.gemstash/server.log22m.
6
+ at server.log within your base directory. By default, this will be at
7
+ ~/.gemstash/server.log.
8
8
 
9
9
  You might find it easier to view the log directly in your terminal.
10
10
  Gemstash outputs its log directly to standard out:
@@ -15,10 +15,8 @@
15
15
 
16
16
  $ gemstash status
17
17
 
18
- The server status is checked by passing through to pumactl
19
- (https://github.com/puma/puma#controlstatus-server).
18
+ The server status is checked by passing through to 8;;https://github.com/puma/puma#controlstatus-serverpumactl8;;.
20
19
 
21
- If you find a bug, please don't hesitate to open a bug report
22
- (https://github.com/rubygems/gemstash#contributing)!
20
+ If you find a bug, please don't hesitate to 8;;https://github.com/rubygems/gemstash#contributingopen a bug report8;;!
23
21
 
24
22
  October 28, 2015 4mgemstash-debugging24m(7)
@@ -1,39 +1,21 @@
1
- .\" Automatically generated by Pandoc 3.1.3
1
+ .\" Automatically generated by Pandoc 3.7.0.2
2
2
  .\"
3
- .\" Define V font for inline verbatim, using C font in formats
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-deploy" "7" "October 25, 2015" "" ""
18
- .hy
3
+ .TH "gemstash\-deploy" "7" "October 25, 2015" ""
19
4
  .SH Deploying Gemstash
20
- .PP
21
5
  Bundler is here for the rescue to keep Gemstash up to date!
22
- Create a \f[V]Gemfile\f[R] pointing to Gemstash:
6
+ Create a \f[CR]Gemfile\f[R] pointing to Gemstash:
23
7
  .IP
24
- .nf
25
- \f[C]
26
- # ./Gemfile
27
- source \[dq]https://rubygems.org\[dq]
28
- gem \[dq]gemstash\[dq]
29
- \f[R]
30
- .fi
8
+ .EX
9
+ \f[I]# ./Gemfile\f[R]
10
+ source \(dqhttps://rubygems.org\(dq
11
+ gem \(dqgemstash\(dq
12
+ .EE
31
13
  .PP
32
- Then \f[V]bundle\f[R] to create your \f[V]Gemfile.lock\f[R].
33
- When you are ready to upgrade, simply \f[V]bundle update\f[R].
34
- You may need to run \f[V]gemstash\f[R] via \f[V]bundle exec\f[R].
35
- Alternatively, you can \f[V]gem uninstall gemstash\f[R] and
36
- \f[V]gem install gemstash\f[R] when you want to upgrade.
14
+ Then \f[CR]bundle\f[R] to create your \f[CR]Gemfile.lock\f[R].
15
+ When you are ready to upgrade, simply \f[CR]bundle update\f[R].
16
+ You may need to run \f[CR]gemstash\f[R] via \f[CR]bundle exec\f[R].
17
+ Alternatively, you can \f[CR]gem uninstall gemstash\f[R] and
18
+ \f[CR]gem install gemstash\f[R] when you want to upgrade.
37
19
  .PP
38
20
  Gemstash will automatically run any necessary migrations, so updating
39
21
  the gem is all that needs to be done.
@@ -41,46 +23,42 @@ the gem is all that needs to be done.
41
23
  It is probably wise to stop Gemstash before upgrading, then starting
42
24
  again once you are done:
43
25
  .IP
44
- .nf
45
- \f[C]
26
+ .EX
46
27
  $ bundle exec gemstash stop
47
28
  $ bundle update
48
29
  $ bundle exec gemstash start
49
- \f[R]
50
- .fi
30
+ .EE
51
31
  .SS Monitoring
52
- .PP
53
- Health monitoring is built in to Gemstash using the
54
- server_health_check-rack (https://github.com/on-site/server_health_check-rack)
55
- gem.
56
- If you request \f[V]/health\f[R] from your Gemstash instance, you will
32
+ Health monitoring is built in to Gemstash using the \c
33
+ .UR https://github.com/on-site/server_health_check-rack
34
+ server_health_check\-rack
35
+ .UE \c
36
+ \ gem.
37
+ If you request \f[CR]/health\f[R] from your Gemstash instance, you will
57
38
  get a JSON response along with an HTTP status code indicating success or
58
39
  failure.
59
40
  The JSON response will look something like this for a success case:
60
41
  .IP
61
- .nf
62
- \f[C]
42
+ .EX
63
43
  {
64
- \[dq]status\[dq]: {
65
- \[dq]heartbeat\[dq]: \[dq]OK\[dq],
66
- \[dq]storage_read\[dq]: \[dq]OK\[dq],
67
- \[dq]storage_write\[dq]: \[dq]OK\[dq],
68
- \[dq]db_read\[dq]: \[dq]OK\[dq],
69
- \[dq]db_write\[dq]: \[dq]OK\[dq]
44
+ \(dqstatus\(dq: {
45
+ \(dqheartbeat\(dq: \(dqOK\(dq,
46
+ \(dqstorage_read\(dq: \(dqOK\(dq,
47
+ \(dqstorage_write\(dq: \(dqOK\(dq,
48
+ \(dqdb_read\(dq: \(dqOK\(dq,
49
+ \(dqdb_write\(dq: \(dqOK\(dq
70
50
  }
71
51
  }
72
- \f[R]
73
- .fi
52
+ .EE
74
53
  .PP
75
54
  This request will test storage and database access and report on the
76
55
  result.
77
56
  Each key in the status can be requested alone to just report on that
78
57
  status.
79
- For example, if you would like a health check that doesn\[cq]t interact
80
- with storage or the database, you can use \f[V]/health/heartbeat\f[R]
58
+ For example, if you would like a health check that doesn\(cqt interact
59
+ with storage or the database, you can use \f[CR]/health/heartbeat\f[R]
81
60
  which will always respond with a success while your Gemstash server is
82
61
  running.
83
62
  .SS Downgrading
84
- .PP
85
63
  It is not recommended to go backwards in Gemstash versions.
86
64
  Migrations may have run that could leave the database in a bad state.
@@ -1,17 +1,17 @@
1
- 4mgemstash-deploy24m(7) 4mgemstash-deploy24m(7)
1
+ 4mgemstash-deploy24m(7) Miscellaneous Information Manual 4mgemstash-deploy24m(7)
2
2
 
3
3
  1mDeploying Gemstash0m
4
4
  Bundler is here for the rescue to keep Gemstash up to date! Create a
5
- 1mGemfile 22mpointing to Gemstash:
5
+ Gemfile pointing to Gemstash:
6
6
 
7
- # ./Gemfile
7
+ 4m#24m 4m./Gemfile0m
8
8
  source "https://rubygems.org"
9
9
  gem "gemstash"
10
10
 
11
- Then 1mbundle 22mto create your 1mGemfile.lock22m. When you are ready to up-
12
- grade, simply 1mbundle update22m. You may need to run 1mgemstash 22mvia 1mbundle0m
13
- 1mexec22m. Alternatively, you can 1mgem uninstall gemstash 22mand 1mgem install0m
14
- 1mgemstash 22mwhen you want to upgrade.
11
+ Then bundle to create your Gemfile.lock. When you are ready to up-
12
+ grade, simply bundle update. You may need to run gemstash via bundle
13
+ exec. Alternatively, you can gem uninstall gemstash and gem install
14
+ gemstash when you want to upgrade.
15
15
 
16
16
  Gemstash will automatically run any necessary migrations, so updating
17
17
  the gem is all that needs to be done.
@@ -24,12 +24,11 @@
24
24
  $ bundle exec gemstash start
25
25
 
26
26
  1mMonitoring0m
27
- Health monitoring is built in to Gemstash using the serv-
28
- er_health_check-rack (https://github.com/on-site/server_health_check-
29
- rack) gem. If you request 1m/health 22mfrom your Gemstash instance, you
30
- will get a JSON response along with an HTTP status code indicating suc-
31
- cess or failure. The JSON response will look something like this for a
32
- success case:
27
+ Health monitoring is built in to Gemstash using the
28
+ 8;;https://github.com/on-site/server_health_check-rackserver_health_check-rack8;; gem. If you request /health from your Gem-
29
+ stash instance, you will get a JSON response along with an HTTP status
30
+ code indicating success or failure. The JSON response will look some-
31
+ thing like this for a success case:
33
32
 
34
33
  {
35
34
  "status": {
@@ -41,11 +40,11 @@
41
40
  }
42
41
  }
43
42
 
44
- This request will test storage and database access and report on the
45
- result. Each key in the status can be requested alone to just report
46
- on that status. For example, if you would like a health check that
47
- doesn't interact with storage or the database, you can use
48
- 1m/health/heartbeat 22mwhich will always respond with a success while your
43
+ This request will test storage and database access and report on the
44
+ result. Each key in the status can be requested alone to just report
45
+ on that status. For example, if you would like a health check that
46
+ doesn't interact with storage or the database, you can use
47
+ /health/heartbeat which will always respond with a success while your
49
48
  Gemstash server is running.
50
49
 
51
50
  1mDowngrading0m
@@ -1,54 +1,41 @@
1
- .\" Automatically generated by Pandoc 3.1.3
1
+ .\" Automatically generated by Pandoc 3.7.0.2
2
2
  .\"
3
- .\" Define V font for inline verbatim, using C font in formats
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-mirror" "7" "October 25, 2015" "" ""
18
- .hy
3
+ .TH "gemstash\-mirror" "7" "October 25, 2015" ""
19
4
  .SH Using Gemstash as a Mirror
20
- .PP
21
- If you don\[cq]t have control over your \f[V]Gemfile\f[R], or you
22
- don\[cq]t want to force everyone on your team to go through the Gemstash
5
+ If you don\(cqt have control over your \f[CR]Gemfile\f[R], or you
6
+ don\(cqt want to force everyone on your team to go through the Gemstash
23
7
  server, you can use Bundler mirroring to bundle against your Gemstash
24
8
  server.
25
9
  .PP
26
- For each source in your \f[V]Gemfile\f[R], add a mirror pointing to your
27
- Gemstash server:
10
+ For each source in your \f[CR]Gemfile\f[R], add a mirror pointing to
11
+ your Gemstash server.
12
+ Before upgrading, add every source other than the configured
13
+ \f[CR]:rubygems_url\f[R] to \f[CR]:allowed_upstreams\f[R] in
14
+ Gemstash\(cqs configuration.
15
+ Unlisted mirror sources return 403; list any CDN used for redirects in
16
+ \f[CR]:allowed_redirects\f[R].
17
+ The mirror source scheme must match its \f[CR]:allowed_upstreams\f[R]
18
+ entry (or \f[CR]:rubygems_url\f[R] for the default source).
19
+ For example:
28
20
  .IP
29
- .nf
30
- \f[C]
31
- $ bundle config mirror.http://rubygems.org http://localhost:9292
32
- $ bundle config mirror.https://my.gem-source.local http://localhost:9292/upstream/$(ruby -rcgi -e \[aq]puts CGI.escape(\[dq]https://my.gem-source.local\[dq])\[aq])
33
- \f[R]
34
- .fi
21
+ .EX
22
+ $ bundle config mirror.https://rubygems.org http://localhost:9292
23
+ $ bundle config mirror.https://my.gem\-source.local http://localhost:9292/upstream/$(ruby \-rcgi \-e \(aqputs CGI.escape(\(dqhttps://my.gem\-source.local\(dq)\(aq)
24
+ .EE
35
25
  .PP
36
26
  From now on, bundler will fetch gems from those sources via your
37
27
  Gemstash server.
38
28
  .SH Simpler Gemstash Mirrors
39
- .PP
40
29
  \f[B]This feature requires Bundler to be at least version
41
- \f[VB]1.11.0\f[B].\f[R]
30
+ \f[CB]1.11.0\f[B].\f[R]
42
31
  .PP
43
- If you are using Bundler version \f[V]1.11.0\f[R] or greater, the
32
+ If you are using Bundler version \f[CR]1.11.0\f[R] or greater, the
44
33
  mirroring becomes a bit easier:
45
34
  .IP
46
- .nf
47
- \f[C]
48
- $ bundle config mirror.http://rubygems.org http://localhost:9292
49
- $ bundle config mirror.https://my.gem-source.local http://localhost:9292
50
- \f[R]
51
- .fi
35
+ .EX
36
+ $ bundle config mirror.https://rubygems.org http://localhost:9292
37
+ $ bundle config mirror.https://my.gem\-source.local http://localhost:9292
38
+ .EE
52
39
  .PP
53
40
  Bundler will then send headers to Gemstash to indicate the correct
54
41
  upstream.