4mgemstash-configuration24m(5) 4mgemstash-configuration24m(5)

<!– Automatically generated by Pandoc –>

1mName0m

gemstash-configuration

1mSynopsis0m

# ~/.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
:log_file: gemstash.log

1mBase Path0m

    :base_path

    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 Gem-
    stash server process.  Specifying the  :base_path  via  gemstash  setup
    will create the directory for you.

1mDefault value0m
    ~/.gemstash

1mValid values0m
    Any valid path

1mCache Type0m

    :cache_type

    Specifies  how to cache values other than gem files (such as gem depen-
    dencies).  memory will use an in  memory  cache  while  memcached  will
    point  to 1 or more Memcached servers.  Use the :memcached_servers con-
    figuration key for specifying where the Memcached server(s) are.

1mDefault value0m
    memory

1mValid values0m
    memory, memcached

1mMemcached Servers0m

    :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.

1mDefault value0m
    localhost:11211

1mValid values0m
    A comma delimited list of Memcached servers

1mDB Adapter0m

    :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 con-
    nect to must be specified in the :db_url configuration key.  The  data-
    base must already be created when using anything other than sqlite3.

1mDefault value0m
    sqlite3

1mValid values0m
    sqlite3, postgres, mysql, mysql2

1mDB URL0m

    :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.

1mDefault value0m
    None

1mValid values0m
    A  valid  database  URL  for  the  Sequel  gem  (http://sequel.jeremye-
    vans.net/)

1mDB Connection Options0m

    :db_connection_options

    Specifies additional Sequel.connect options to use.  Note that any  op-
    tions  here  are  merged  in  with the default options, so you need not
    specify the max_connections if you customize this option.

1mDefault value0m
    { max_connections: 1 } for sqlite3  adapter,  {  max_connections:  con-
    fig[:puma_threads] + 1 } for any other adapter.

1mValid values0m
    A  valid  connection  options  Hash  for the Sequel.connect (http://se-
    quel.jeremyevans.net/rdoc/files/doc/opening_databases_rdoc.html#label-
    General+connection+options) method.

1mRubygems URL0m

    :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.

1mDefault value0m
    https://rubygems.org

1mValid values0m
    A valid gem source URL

1mIgnore Gemfile source0m

    :ignore_gemfile_source

    Ignore  the source specified in Gemfile and always use :rubygems_url as
    gems upstream.

1mDefault value0m
    false

1mValid values0m
    Boolean: true or false

1mPuma Threads0m

    :puma_threads

    Specifies the number of threads used for the Gemstash server.

1mDefault value0m
    16

1mValid values0m
    Integer value with a minimum of 1

1mBind Address0m

    :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 Gem-
    stash as the root user.

1mDefault value0m
    tcp://0.0.0.0:9292

1mValid values0m
    Any     valid     binding     that     is     supported     by     Puma
    (https://github.com/puma/puma#binding-tcp--sockets)

1mProtected Fetch0m

    :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.

1mDefault value0m
    false

1mValid values0m
    Boolean values true or false

1mFetch Timeout0m

    :fetch_timeout

    The  timeout setting for fetching gems.  Fetching gems over a slow con-
    nection may cause timeout errors.  If you  experience  timeout  errors,
    you may want to increase this value.  The default is 20 seconds.

1mDefault value0m
    20

1mValid values0m
    Integer value with a minimum of 1

1mLog File0m

    :log_file

    Indicates  the  name  of the file to use for logging.  The file will be
    placed in the base path.

1mDefault value0m
    server.log

1mValid values0m
    Any valid file name, or :stdout to log to $stdout

                            October 13, 2015      4mgemstash-configuration24m(5)