gemstash-configuration(5)
π gemstash-configuration(5) β the config manual, bestie π
Okay so welcome to gemstash-configuration(5): this is the manual page for the Gemstash configuration file, and we are gonna make it make sense. No cap, every key is here, and the defaults are staying exactly where they are.
π SYNOPSIS π
Here's the whole config vibe at a glance β exact keys, exact values, exact code:
# ~/.gemstash/config.yml
---
:base_path: "/var/gemstash"
:cache_type: memcached
:memcached_servers: localhost:11211
:db_adapter: postgres
:db_url: postgres:///gemstash
:db_connection_options:
:test: true
:pool_timeout: 2
:rubygems_url: https://my.gem-source.local
:ignore_gemfile_source: false
:puma_threads: 32
:bind: tcp://0.0.0.0:4242
:protected_fetch: true
:fetch_timeout: 10
:open_timeout: 2
:log_file: gemstash.log
ποΈ Base Path ποΈ
The key is :base_path, and it specifies where to store local files like the server log, cached gem files, and the database (when using SQLite). If the default is being used, the directory will be created if it does not exist. Any other directory needs to be created ahead of time and be writable to the Gemstash server process. Specifying the :base_path via gemstash setup will create the directory for you.
Default value
~/.gemstash
Valid values
Any valid path
π§Ί Cache Type π§Ί
:cache_type specifies how to cache values other than gem files (such as gem dependencies). memory will use an in memory cache while memcached will point to 1 or more Memcached servers. Use the :memcached_servers configuration key for specifying where the Memcached server(s) are.
Default value
memory
Valid values
memory, memcached
π Memcached Servers π
:memcached_servers specifies the Memcached servers to connect to when using memcached for the :cache_type. Only used when memcached is used for :cache_type.
Default value
localhost:11211
Valid values
A comma delimited list of Memcached servers
ποΈ DB Adapter ποΈ
:db_adapter specifies what database adapter to use. When sqlite3 is used, the database will be located at gemstash.db within the directory specified by :base_path. The database will automatically be created when using sqlite3. When postgres, mysql, or mysql2 is used, the database to connect to must be specified in the :db_url configuration key. The database must already be created when using anything other than sqlite3.
Default value
sqlite3
Valid values
sqlite3, postgres, mysql, mysql2
π DB URL π
:db_url specifies the database to connect to when using postgres, mysql, or mysql2 for the :db_adapter. Only used when the :db_adapter is not sqlite3.
Default value
None
Valid values
A valid database URL for the Sequel gem (http://sequel.jeremyevans.net/)
π§΅ DB Connection Options π§΅
:db_connection_options specifies additional Sequel.connect options to use. Note that any options here are merged in with the default options, so you need not specify the max_connections if you customize this option.
Default value
{ max_connections: 1 } for sqlite3 adapter, { max_connections: config[:puma_threads] + 1 } for any other adapter.
Valid values
A valid connection options Hash for the Sequel.connect (http://sequel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-General+connection+options) method.
π Rubygems URL π
:rubygems_url specifies the default gem source URL. When any API endpoint is called without a /private or /upstream/<url> prefix, this URL will be used to fetch the result. This value can be safely changed even if there are already gems stashed for the previous value.
Default value
Valid values
A valid gem source URL
π Ignore Gemfile source π
:ignore_gemfile_source says: ignore the source specified in Gemfile and always use :rubygems_url as gems upstream.
Default value
false
Valid values
Boolean: true or false
π§ Puma Threads π§
:puma_threads specifies the number of threads used for the Gemstash server.
Default value
16
Valid values
Integer value with a minimum of 1
π Bind Address π
:bind specifies the binding used to start the Gemstash server. Keep in mind the user starting Gemstash needs to have access to bind in this manner. For example, if you use a port below 1024, you will need to run Gemstash as the root user.
Default value
tcp://0.0.0.0:9292
Valid values
Any valid binding that is supported by Puma (https://github.com/puma/puma#binding-tcp--sockets)
π Protected Fetch π
:protected_fetch tells Gemstash to authenticate via an API key before allowing the fetching of private gems and specs. The default behavior is to allow unauthenticated download of private gems and specs.
Default value
false
Valid values
Boolean values true or false
β³ Fetch Timeout β³
:fetch_timeout is the number of seconds to allow for fetching a gem from upstream. It covers establishing the connection and receiving the response. Fetching gems over a slow connection may cause timeout errors. If you experience timeout errors, you may want to increase this value. The default is 20 seconds.
Default value
20
Valid values
Integer value with a minimum of 1
πͺ Open Timeout πͺ
:open_timeout is the timeout setting for opening the connection to an upstream gem server. On high-latency networks, even establishing the connection to an upstream gem server can take a while. If you experience connection failures instead of timeout errors, you may want to increase this value. The default is 2 seconds.
Default value
2
Valid values
Integer value with a minimum of 1
π Log File π
:log_file indicates the name of the file to use for logging. The file will be placed in the base path.
Default value
server.log
Valid values
Any valid file name, or :stdout to log to $stdout
That's the whole gemstash-configuration(5) vibe, bestie β last updated October 13, 2015. Go forth and config-slay π
β¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: gemstash 2.8.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms