gemstash 2.0.0 → 2.1.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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/exe/gemstash +3 -0
  3. data/lib/gemstash.rb +2 -0
  4. data/lib/gemstash/api_key_authorization.rb +3 -0
  5. data/lib/gemstash/authorization.rb +7 -3
  6. data/lib/gemstash/cache.rb +5 -2
  7. data/lib/gemstash/cli.rb +2 -0
  8. data/lib/gemstash/cli/authorize.rb +3 -3
  9. data/lib/gemstash/cli/base.rb +4 -1
  10. data/lib/gemstash/cli/setup.rb +8 -1
  11. data/lib/gemstash/cli/start.rb +4 -1
  12. data/lib/gemstash/cli/status.rb +2 -0
  13. data/lib/gemstash/cli/stop.rb +2 -0
  14. data/lib/gemstash/config.ru +3 -3
  15. data/lib/gemstash/configuration.rb +7 -1
  16. data/lib/gemstash/db.rb +3 -0
  17. data/lib/gemstash/db/authorization.rb +2 -0
  18. data/lib/gemstash/db/cached_rubygem.rb +3 -0
  19. data/lib/gemstash/db/dependency.rb +2 -0
  20. data/lib/gemstash/db/rubygem.rb +3 -0
  21. data/lib/gemstash/db/upstream.rb +3 -0
  22. data/lib/gemstash/db/version.rb +3 -0
  23. data/lib/gemstash/dependencies.rb +4 -0
  24. data/lib/gemstash/env.rb +22 -4
  25. data/lib/gemstash/gem_fetcher.rb +2 -0
  26. data/lib/gemstash/gem_pusher.rb +5 -3
  27. data/lib/gemstash/gem_source.rb +2 -0
  28. data/lib/gemstash/gem_source/dependency_caching.rb +4 -4
  29. data/lib/gemstash/gem_source/private_source.rb +3 -0
  30. data/lib/gemstash/gem_source/rack_middleware.rb +3 -0
  31. data/lib/gemstash/gem_source/upstream_source.rb +9 -3
  32. data/lib/gemstash/gem_yanker.rb +4 -0
  33. data/lib/gemstash/health.rb +2 -0
  34. data/lib/gemstash/http_client.rb +4 -1
  35. data/lib/gemstash/logging.rb +2 -0
  36. data/lib/gemstash/man/gemstash-authorize.1 +51 -0
  37. data/lib/gemstash/man/gemstash-authorize.1.txt +33 -53
  38. data/lib/gemstash/man/gemstash-configuration.5 +229 -0
  39. data/lib/gemstash/man/gemstash-configuration.5.txt +150 -6
  40. data/lib/gemstash/man/gemstash-customize.7 +301 -0
  41. data/lib/gemstash/man/gemstash-customize.7.txt +183 -62
  42. data/lib/gemstash/man/gemstash-debugging.7 +34 -0
  43. data/lib/gemstash/man/gemstash-debugging.7.txt +17 -54
  44. data/lib/gemstash/man/gemstash-deploy.7 +72 -0
  45. data/lib/gemstash/man/gemstash-deploy.7.txt +44 -51
  46. data/lib/gemstash/man/gemstash-mirror.7 +40 -0
  47. data/lib/gemstash/man/gemstash-mirror.7.txt +20 -53
  48. data/lib/gemstash/man/gemstash-multiple-sources.7 +89 -0
  49. data/lib/gemstash/man/gemstash-multiple-sources.7.txt +53 -48
  50. data/lib/gemstash/man/gemstash-private-gems.7 +227 -0
  51. data/lib/gemstash/man/gemstash-private-gems.7.txt +108 -18
  52. data/lib/gemstash/man/gemstash-readme.7 +233 -0
  53. data/lib/gemstash/man/gemstash-readme.7.txt +126 -10
  54. data/lib/gemstash/man/gemstash-setup.1 +43 -0
  55. data/lib/gemstash/man/gemstash-setup.1.txt +28 -54
  56. data/lib/gemstash/man/gemstash-start.1 +26 -0
  57. data/lib/gemstash/man/gemstash-start.1.txt +16 -56
  58. data/lib/gemstash/man/gemstash-status.1 +20 -0
  59. data/lib/gemstash/man/gemstash-status.1.txt +13 -57
  60. data/lib/gemstash/man/gemstash-stop.1 +20 -0
  61. data/lib/gemstash/man/gemstash-stop.1.txt +13 -57
  62. data/lib/gemstash/man/gemstash-version.1 +22 -0
  63. data/lib/gemstash/man/gemstash-version.1.txt +12 -57
  64. data/lib/gemstash/migrations/01_gem_dependencies.rb +2 -0
  65. data/lib/gemstash/migrations/02_authorizations.rb +2 -0
  66. data/lib/gemstash/migrations/03_cached_gems.rb +2 -0
  67. data/lib/gemstash/migrations/04_health_tests.rb +2 -0
  68. data/lib/gemstash/puma.rb +2 -0
  69. data/lib/gemstash/rack_env_rewriter.rb +11 -2
  70. data/lib/gemstash/specs_builder.rb +5 -1
  71. data/lib/gemstash/storage.rb +12 -3
  72. data/lib/gemstash/upstream.rb +2 -0
  73. data/lib/gemstash/version.rb +3 -1
  74. data/lib/gemstash/web.rb +2 -0
  75. metadata +69 -22
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "gemstash"
2
4
  require "set"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "gemstash"
2
4
  require "rubygems/package"
3
5
  require "stringio"
@@ -56,9 +58,7 @@ module Gemstash
56
58
  resource_exist = storage.resource(full_name).exist?
57
59
  resource_is_indexed = storage.resource(full_name).properties[:indexed] if resource_exist
58
60
 
59
- if resource_exist && resource_is_indexed
60
- raise ExistingVersionError, "Cannot push to an existing version!"
61
- end
61
+ raise ExistingVersionError, "Cannot push to an existing version!" if resource_exist && resource_is_indexed
62
62
 
63
63
  storage.resource(full_name).save({ gem: @content }, indexed: true)
64
64
  end
@@ -78,6 +78,7 @@ module Gemstash
78
78
  existing = Gemstash::DB::Version.find_by_spec(gem_id, spec)
79
79
  raise ExistingVersionError, "Cannot push to an existing version!" if existing && existing.indexed
80
80
  raise YankedVersionError, "Cannot push to a yanked version!" if existing && !existing.indexed
81
+
81
82
  version_id = Gemstash::DB::Version.insert_by_spec(gem_id, spec)
82
83
  Gemstash::DB::Dependency.insert_by_spec(version_id, spec)
83
84
  end
@@ -120,6 +121,7 @@ module Gemstash
120
121
 
121
122
  def cleanup
122
123
  return unless @tempfile
124
+
123
125
  @tempfile.close
124
126
  @tempfile.unlink
125
127
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "gemstash"
2
4
  require "forwardable"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Gemstash
2
4
  module GemSource
3
5
  # Module for caching dependencies in a GemSource.
@@ -7,9 +9,7 @@ module Gemstash
7
9
  def serve_dependencies
8
10
  gems = gems_from_params
9
11
 
10
- if gems.length > API_REQUEST_LIMIT
11
- halt 422, "Too many gems (use --full-index instead)"
12
- end
12
+ halt 422, "Too many gems (use --full-index instead)" if gems.length > API_REQUEST_LIMIT
13
13
 
14
14
  content_type "application/octet-stream"
15
15
  Marshal.dump dependencies.fetch(gems)
@@ -21,7 +21,7 @@ module Gemstash
21
21
  if gems.length > API_REQUEST_LIMIT
22
22
  halt 422, {
23
23
  "error" => "Too many gems (use --full-index instead)",
24
- "code" => 422
24
+ "code" => 422
25
25
  }.to_json
26
26
  end
27
27
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "gemstash"
2
4
 
3
5
  module Gemstash
@@ -15,6 +17,7 @@ module Gemstash
15
17
  def self.matches?(env)
16
18
  rewriter = rack_env_rewriter.for(env)
17
19
  return false unless rewriter.matches?
20
+
18
21
  rewriter.rewrite
19
22
  true
20
23
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "gemstash"
2
4
 
3
5
  module Gemstash
@@ -11,6 +13,7 @@ module Gemstash
11
13
  def call(env)
12
14
  Gemstash::GemSource.sources.each do |source|
13
15
  next unless source.matches?(env)
16
+
14
17
  env["gemstash.gem_source"] = source
15
18
  break
16
19
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "gemstash"
2
4
  require "cgi"
3
5
 
@@ -12,6 +14,7 @@ module Gemstash
12
14
  def self.matches?(env)
13
15
  rewriter = rack_env_rewriter.for(env)
14
16
  return false unless rewriter.matches?
17
+
15
18
  rewriter.rewrite
16
19
  env["gemstash.upstream"] = rewriter.captures["upstream_url"]
17
20
  capture_user_agent(env)
@@ -90,8 +93,10 @@ module Gemstash
90
93
  private
91
94
 
92
95
  def upstream
93
- @upstream ||= Gemstash::Upstream.new(env["gemstash.upstream"],
94
- user_agent: env["gemstash.user-agent"])
96
+ @upstream ||= Gemstash::Upstream.new(
97
+ env["gemstash.upstream"],
98
+ user_agent: env["gemstash.user-agent"]
99
+ )
95
100
  end
96
101
 
97
102
  def index_upstream
@@ -135,6 +140,7 @@ module Gemstash
135
140
 
136
141
  def set_gem_headers(gem, resource_type)
137
142
  return unless gem.property?(:headers, resource_type)
143
+
138
144
  gem_headers = gem.properties[:headers][resource_type]
139
145
  headers["Content-Type"] = gem_headers["content-type"] if gem_headers.include?("content-type")
140
146
  headers["Last-Modified"] = gem_headers["last-modified"] if gem_headers.include?("last-modified")
@@ -192,7 +198,7 @@ module Gemstash
192
198
  # default upstream).
193
199
  class RubygemsSource < Gemstash::GemSource::UpstreamSource
194
200
  def self.matches?(env)
195
- env["gemstash.upstream"] = if env["HTTP_X_GEMFILE_SOURCE"].to_s.empty?
201
+ env["gemstash.upstream"] = if env["gemstash.env"].config[:ignore_gemfile_source] || env["HTTP_X_GEMFILE_SOURCE"].to_s.empty?
196
202
  env["gemstash.env"].config[:rubygems_url]
197
203
  else
198
204
  env["HTTP_X_GEMFILE_SOURCE"]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "gemstash"
2
4
 
3
5
  module Gemstash
@@ -52,9 +54,11 @@ module Gemstash
52
54
  def update_database
53
55
  gemstash_env.db.transaction do
54
56
  raise UnknownGemError, "Cannot yank an unknown gem!" unless Gemstash::DB::Rubygem[name: @gem_name]
57
+
55
58
  version = Gemstash::DB::Version.find_by_full_name(full_name)
56
59
  raise UnknownVersionError, "Cannot yank an unknown version!" unless version
57
60
  raise YankedVersionError, "Cannot yank an already yanked version!" unless version.indexed
61
+
58
62
  version.deindex
59
63
  storage.resource(version.storage_id).update_properties(indexed: false)
60
64
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "gemstash"
2
4
  require "date"
3
5
  require "server_health_check_rack"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "gemstash"
2
4
  require "faraday"
3
5
  require "faraday_middleware"
@@ -25,7 +27,7 @@ module Gemstash
25
27
  extend Gemstash::Env::Helper
26
28
  include Gemstash::Logging
27
29
 
28
- DEFAULT_USER_AGENT = "Gemstash/#{Gemstash::VERSION}".freeze
30
+ DEFAULT_USER_AGENT = "Gemstash/#{Gemstash::VERSION}"
29
31
 
30
32
  def self.for(upstream)
31
33
  client = Faraday.new(upstream.to_s) do |config|
@@ -71,6 +73,7 @@ module Gemstash
71
73
  rescue Faraday::ConnectionFailed => e
72
74
  log_error("Connection failure", e)
73
75
  raise(ConnectionError, e.message) unless times > 0
76
+
74
77
  log.info "retrying... #{times} more times"
75
78
  end
76
79
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "logger"
2
4
  require "puma/events"
3
5
 
@@ -0,0 +1,51 @@
1
+ .\" Automatically generated by Pandoc 2.5
2
+ .\"
3
+ .TH "gemstash\-authorize" "1" "October 9, 2015" "" ""
4
+ .hy
5
+ .SH NAME
6
+ .PP
7
+ gemstash\-authorize \- Adds or removes authorization to interact with
8
+ privately stored gems
9
+ .SH SYNOPSIS
10
+ .PP
11
+ \f[C]gemstash authorize [permissions] [\-\-remove] [\-\-key SECURE_KEY] [\-\-config\-file FILE]\f[R]
12
+ .SH DESCRIPTION
13
+ .PP
14
+ Adds or removes authorization to interact with privately stored gems.
15
+ .PP
16
+ Any arguments will be used as specific permissions.
17
+ Valid permissions include \f[C]push\f[R], \f[C]yank\f[R], and
18
+ \f[C]fetch\f[R].
19
+ If no permissions are provided, then all permissions will be granted
20
+ (including any that may be added in future versions of Gemstash).
21
+ .SS USAGE
22
+ .IP
23
+ .nf
24
+ \f[C]
25
+ gemstash authorize
26
+ gemstash authorize push yank
27
+ gemstash authorize yank \-\-key <secure\-key>
28
+ gemstash authorize \-\-remove \-\-key <secure\-key>
29
+ \f[R]
30
+ .fi
31
+ .SH OPTIONS
32
+ .IP \[bu] 2
33
+ \f[C]\-\-config\-file FILE\f[R]: Specify the config file to use.
34
+ If you aren\[cq]t using the default config file at
35
+ \f[C]\[ti]/.gemstash/config.yml\f[R] or
36
+ \f[C]\[ti]/.gemstash/config.yml.erb\f[R] (gemstash help customize.7),
37
+ then you must specify the config file via this option.
38
+ .IP \[bu] 2
39
+ \f[C]\-\-key SECURE_KEY\f[R]: Specify the API key to affect.
40
+ This should be the actual key value, not a name.
41
+ This option is required when using \f[C]\-\-remove\f[R] but is optional
42
+ otherwise.
43
+ If adding an authorization, using this will either create or update the
44
+ permissions for the specified API key.
45
+ If missing, a new API key will always be generated.
46
+ Note that a key can only have a maximum length of 255 chars.
47
+ .IP \[bu] 2
48
+ \f[C]\-\-remove\f[R]: Remove an authorization rather than add or update
49
+ one.
50
+ When removing, permission values are not allowed.
51
+ The \f[C]\-\-key <secure\-key>\f[R] option is required.
@@ -1,66 +1,46 @@
1
+ gemstash-authorize(1) gemstash-authorize(1)
1
2
 
2
3
 
3
4
 
5
+ 1mNAME0m
6
+ gemstash-authorize - Adds or removes authorization to interact with
7
+ privately stored gems
4
8
 
9
+ 1mSYNOPSIS0m
10
+ gemstash authorize [permissions] [--remove] [--key SECURE_KEY] [--con-
11
+ fig-file FILE]
5
12
 
13
+ 1mDESCRIPTION0m
14
+ Adds or removes authorization to interact with privately stored gems.
6
15
 
16
+ Any arguments will be used as specific permissions. Valid permissions
17
+ include push, yank, and fetch. If no permissions are provided, then
18
+ all permissions will be granted (including any that may be added in fu-
19
+ ture versions of Gemstash).
7
20
 
21
+ 1mUSAGE0m
22
+ gemstash authorize
23
+ gemstash authorize push yank
24
+ gemstash authorize yank --key <secure-key>
25
+ gemstash authorize --remove --key <secure-key>
8
26
 
27
+ 1mOPTIONS0m
28
+ o --config-file FILE: Specify the config file to use. If you aren't
29
+ using the default config file at ~/.gemstash/config.yml or ~/.gem-
30
+ stash/config.yml.erb (gemstash help customize.7), then you must spec-
31
+ ify the config file via this option.
9
32
 
33
+ o --key SECURE_KEY: Specify the API key to affect. This should be the
34
+ actual key value, not a name. This option is required when using
35
+ --remove but is optional otherwise. If adding an authorization, us-
36
+ ing this will either create or update the permissions for the speci-
37
+ fied API key. If missing, a new API key will always be generated.
38
+ Note that a key can only have a maximum length of 255 chars.
10
39
 
40
+ o --remove: Remove an authorization rather than add or update one.
41
+ When removing, permission values are not allowed. The --key <se-
42
+ cure-key> option is required.
11
43
 
12
44
 
13
45
 
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
46
+ October 9, 2015 gemstash-authorize(1)
@@ -0,0 +1,229 @@
1
+ .\" Automatically generated by Pandoc 2.5
2
+ .\"
3
+ .TH "gemstash\-configuration" "5" "October 13, 2015" "" ""
4
+ .hy
5
+ .SH NAME
6
+ .PP
7
+ gemstash\-configuration
8
+ .SH SYNOPSIS
9
+ .IP
10
+ .nf
11
+ \f[C]
12
+ # \[ti]/.gemstash/config.yml
13
+ \-\-\-
14
+ :base_path: \[dq]/var/gemstash\[dq]
15
+ :cache_type: memcached
16
+ :memcached_servers: localhost:11211
17
+ :db_adapter: postgres
18
+ :db_url: postgres:///gemstash
19
+ :db_connection_options:
20
+ :test: true
21
+ :pool_timeout: 2
22
+ :rubygems_url: https://my.gem\-source.local
23
+ :ignore_gemfile_source: false
24
+ :puma_threads: 32
25
+ :bind: tcp://0.0.0.0:4242
26
+ :protected_fetch: true
27
+ :fetch_timeout: 10
28
+ :log_file: gemstash.log
29
+ \f[R]
30
+ .fi
31
+ .SH BASE PATH
32
+ .PP
33
+ \f[C]:base_path\f[R]
34
+ .PP
35
+ Specifies where to store local files like the server log, cached gem
36
+ files, and the database (when using SQLite).
37
+ If the default is being used, the directory will be created if it does
38
+ not exist.
39
+ Any other directory needs to be created ahead of time and be writable to
40
+ the Gemstash server process.
41
+ Specifying the \f[C]:base_path\f[R] via
42
+ \f[C]gemstash setup\f[R] (gemstash help setup.1) will create the
43
+ directory for you.
44
+ .SS DEFAULT VALUE
45
+ .PP
46
+ \f[C]\[ti]/.gemstash\f[R]
47
+ .SS VALID VALUES
48
+ .PP
49
+ Any valid path
50
+ .SH CACHE TYPE
51
+ .PP
52
+ \f[C]:cache_type\f[R]
53
+ .PP
54
+ Specifies how to cache values other than gem files (such as gem
55
+ dependencies).
56
+ \f[C]memory\f[R] will use an in memory cache while \f[C]memcached\f[R]
57
+ will point to 1 or more Memcached servers.
58
+ Use the \f[C]:memcached_servers\f[R] configuration key for specifying
59
+ where the Memcached server(s) are.
60
+ .SS DEFAULT VALUE
61
+ .PP
62
+ \f[C]memory\f[R]
63
+ .SS VALID VALUES
64
+ .PP
65
+ \f[C]memory\f[R], \f[C]memcached\f[R]
66
+ .SH MEMCACHED SERVERS
67
+ .PP
68
+ \f[C]:memcached_servers\f[R]
69
+ .PP
70
+ Specifies the Memcached servers to connect to when using
71
+ \f[C]memcached\f[R] for the \f[C]:cache_type\f[R].
72
+ Only used when \f[C]memcached\f[R] is used for \f[C]:cache_type\f[R].
73
+ .SS DEFAULT VALUE
74
+ .PP
75
+ \f[C]localhost:11211\f[R]
76
+ .SS VALID VALUES
77
+ .PP
78
+ A comma delimited list of Memcached servers
79
+ .SH DB ADAPTER
80
+ .PP
81
+ \f[C]:db_adapter\f[R]
82
+ .PP
83
+ Specifies what database adapter to use.
84
+ When \f[C]sqlite3\f[R] is used, the database will be located at
85
+ \f[C]gemstash.db\f[R] within the directory specified by
86
+ \f[C]:base_path\f[R].
87
+ The database will automatically be created when using \f[C]sqlite3\f[R].
88
+ When \f[C]postgres\f[R], \f[C]mysql\f[R], or \f[C]mysql2\f[R] is used,
89
+ the database to connect to must be specified in the \f[C]:db_url\f[R]
90
+ configuration key.
91
+ The database must already be created when using anything other than
92
+ \f[C]sqlite3\f[R].
93
+ .SS DEFAULT VALUE
94
+ .PP
95
+ \f[C]sqlite3\f[R]
96
+ .SS VALID VALUES
97
+ .PP
98
+ \f[C]sqlite3\f[R], \f[C]postgres\f[R], \f[C]mysql\f[R], \f[C]mysql2\f[R]
99
+ .SH DB URL
100
+ .PP
101
+ \f[C]:db_url\f[R]
102
+ .PP
103
+ Specifies the database to connect to when using \f[C]postgres\f[R],
104
+ \f[C]mysql\f[R], or \f[C]mysql2\f[R] for the \f[C]:db_adapter\f[R].
105
+ Only used when the \f[C]:db_adapter\f[R] is not \f[C]sqlite3\f[R].
106
+ .SS DEFAULT VALUE
107
+ .PP
108
+ None
109
+ .SS VALID VALUES
110
+ .PP
111
+ A valid database URL for the Sequel gem (http://sequel.jeremyevans.net/)
112
+ .SH DB CONNECTION OPTIONS
113
+ .PP
114
+ \f[C]:db_connection_options\f[R]
115
+ .PP
116
+ Specifies additional \f[C]Sequel.connect\f[R] options to use.
117
+ Note that any options here are merged in with the default options, so
118
+ you need not specify the \f[C]max_connections\f[R] if you customize this
119
+ option.
120
+ .SS DEFAULT VALUE
121
+ .PP
122
+ \f[C]{ max_connections: 1 }\f[R] for \f[C]sqlite3\f[R] adapter,
123
+ \f[C]{ max_connections: config[:puma_threads] + 1 }\f[R] for any other
124
+ adapter.
125
+ .SS VALID VALUES
126
+ .PP
127
+ A valid connection options Hash for the
128
+ Sequel.connect (http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-General+connection+options)
129
+ method.
130
+ .SH RUBYGEMS URL
131
+ .PP
132
+ \f[C]:rubygems_url\f[R]
133
+ .PP
134
+ Specifies the default gem source URL.
135
+ When any API endpoint is called without a \f[C]/private\f[R] or
136
+ \f[C]/upstream/<url>\f[R] prefix, this URL will be used to fetch the
137
+ result.
138
+ This value can be safely changed even if there are already gems stashed
139
+ for the previous value.
140
+ .SS DEFAULT VALUE
141
+ .PP
142
+ \f[C]https://rubygems.org\f[R]
143
+ .SS VALID VALUES
144
+ .PP
145
+ A valid gem source URL
146
+ .SH IGNORE GEMFILE SOURCE
147
+ .PP
148
+ \f[C]:ignore_gemfile_source\f[R]
149
+ .PP
150
+ Ignore the source specified in Gemfile and always use
151
+ \f[C]:rubygems_url\f[R] as gems upstream.
152
+ .SS DEFAULT VALUE
153
+ .PP
154
+ \f[C]false\f[R]
155
+ .SS VALID VALUES
156
+ .PP
157
+ Boolean: \f[C]true\f[R] or \f[C]false\f[R]
158
+ .SH PUMA THREADS
159
+ .PP
160
+ \f[C]:puma_threads\f[R]
161
+ .PP
162
+ Specifies the number of threads used for the Gemstash server.
163
+ .SS DEFAULT VALUE
164
+ .PP
165
+ \f[C]16\f[R]
166
+ .SS VALID VALUES
167
+ .PP
168
+ Integer value with a minimum of \f[C]1\f[R]
169
+ .SH BIND ADDRESS
170
+ .PP
171
+ \f[C]:bind\f[R]
172
+ .PP
173
+ Specifies the binding used to start the Gemstash server.
174
+ Keep in mind the user starting Gemstash needs to have access to bind in
175
+ this manner.
176
+ For example, if you use a port below 1024, you will need to run Gemstash
177
+ as the root user.
178
+ .SS DEFAULT VALUE
179
+ .PP
180
+ \f[C]tcp://0.0.0.0:9292\f[R]
181
+ .SS VALID VALUES
182
+ .PP
183
+ Any valid binding that is supported by
184
+ Puma (https://github.com/puma/puma#binding-tcp--sockets)
185
+ .SH PROTECTED FETCH
186
+ .PP
187
+ \f[C]:protected_fetch\f[R]
188
+ .PP
189
+ Tells Gemstash to authenticate via an API key before allowing the
190
+ fetching of private gems and specs.
191
+ The default behavior is to allow unauthenticated download of private
192
+ gems and specs.
193
+ .SS DEFAULT VALUE
194
+ .PP
195
+ \f[C]false\f[R]
196
+ .SS VALID VALUES
197
+ .PP
198
+ Boolean values \f[C]true\f[R] or \f[C]false\f[R]
199
+ .SH FETCH TIMEOUT
200
+ .PP
201
+ \f[C]:fetch_timeout\f[R]
202
+ .PP
203
+ The timeout setting for fetching gems.
204
+ Fetching gems over a slow connection may cause timeout errors.
205
+ If you experience timeout errors, you may want to increase this value.
206
+ The default is \f[C]20\f[R] seconds.
207
+ .SS DEFAULT VALUE
208
+ .PP
209
+ \f[C]20\f[R]
210
+ .SS VALID VALUES
211
+ .PP
212
+ Integer value with a minimum of \f[C]1\f[R]
213
+ .SH LOG FILE
214
+ .PP
215
+ \f[C]:log_file\f[R]
216
+ .PP
217
+ Indicates the name of the file to use for logging.
218
+ The file will be placed in the base
219
+ path (gemstash help configuration.5).
220
+ .SS DEFAULT VALUE
221
+ .PP
222
+ \f[C]server.log\f[R]
223
+ .SS VALID VALUES
224
+ .PP
225
+ Any valid file name, or \f[C]:stdout\f[R] to log to \f[C]$stdout\f[R]
226
+ .PP
227
+ \f[I]Note: Using \f[CI]:stdout\f[I] for the \f[CI]:log_file\f[I]
228
+ requires running with
229
+ \f[CI]\-\-no\-daemonize\f[I] (gemstash help start.1).\f[R]