Skip to content

Commit

Permalink
Merge pull request #128 from bundler/touch-up-docs
Browse files Browse the repository at this point in the history
Touch up docs and update CHANGELOG
  • Loading branch information
smellsblue authored Jan 23, 2017
2 parents 04372d8 + 8e8a1a4 commit af0fd04
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
- Gracefully handle empty configuration files ([#97](https://github.com/bundler/gemstash/pull/97), [@rjocoleman](https://github.com/rjocoleman))
- Remove bundler-audit since we don't commit our Gemfile.lock ([#98](https://github.com/bundler/gemstash/pull/98), [@smellsblue](https://github.com/smellsblue))
- Clarify what is being cached for 30 minutes ([#108](https://github.com/bundler/gemstash/pull/108), [@Nowaker](https://github.com/Nowaker))
- Update documentation ([#112](https://github.com/bundler/gemstash/pull/112), [@smellsblue](https://github.com/smellsblue))
- Integration tests for searching for gems ([#113](https://github.com/bundler/gemstash/pull/113), [@smellsblue](https://github.com/smellsblue))
- Add `ruby-head` Gemfile for Travis ([#121](https://github.com/bundler/gemstash/pull/121), [@olleolleolle](https://github.com/olleolleolle))
- Make all Pandoc filters executable ([#122](https://github.com/bundler/gemstash/pull/122), [@olleolleolle](https://github.com/olleolleolle))
- Fix `rake doc` to work with newer versions of Pandoc ([#124](https://github.com/bundler/gemstash/pull/124), [@smellsblue](https://github.com/smellsblue))
- Use `curl` since `unyank` is removed in newer RubyGems versions ([#125](https://github.com/bundler/gemstash/pull/125), [@smellsblue](https://github.com/smellsblue))

### Features

Expand All @@ -17,6 +23,8 @@
- Improve code climate ([#92](https://github.com/bundler/gemstash/pull/92), [@smellsblue](https://github.com/smellsblue))
- Refactor authorization ([#93](https://github.com/bundler/gemstash/pull/93), [@smellsblue](https://github.com/smellsblue), [@rjocoleman](https://github.com/rjocoleman))
- Add protected fetch for private gems ([#94](https://github.com/bundler/gemstash/pull/94), [@rjocoleman](https://github.com/rjocoleman))
- Add Ruby Together call to action ([#116](https://github.com/bundler/gemstash/pull/116), [@mrb](https://github.com/mrb))
- Configurable options to `Sequel.connect` ([#123](https://github.com/bundler/gemstash/pull/123), [@olleolleolle](https://github.com/olleolleolle))

## 1.0.3 (2016-10-15)

Expand Down
38 changes: 38 additions & 0 deletions docs/gemstash-configuration.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ Synopsis
: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
:puma_threads: 32
:bind: tcp://0.0.0.0:4242
:protected_fetch: true
:fetch_timeout: 10
Expand Down Expand Up @@ -107,6 +111,23 @@ 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
============

Expand All @@ -124,6 +145,23 @@ Valid values

A valid gem source URL

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
============

Expand Down
6 changes: 6 additions & 0 deletions docs/gemstash-customize.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ You may also use [`postgres`](http://www.postgresql.org/), [`mysql`](http://www.
---
:db_adapter: postgres
:db_url: postgres:///gemstash
:db_connection_options: # Sequel.connect options
:connect_timeout: 10
:read_timeout: 5
:timeout: 30
```

Regardless of the adapter you choose, the database will automatically migrate to your version of Gemstash whenever the database is needed. You only need to ensure the database exists and Gemstash will do the rest, except for `sqlite3` (for which Gemstash will also create the database for you).
Expand Down Expand Up @@ -90,6 +94,8 @@ While the server is not customizable, the way Gemstash binds the port can be cha

This maps directly to the [Puma bind flag](https://github.com/puma/puma#binding-tcp--sockets), and will support anything valid for that flag.

The number of threads Puma uses is also customizable via the `:puma_threads` configuration key. The default is `16`.

Protected Fetch
---------------

Expand Down
1 change: 1 addition & 0 deletions lib/gemstash/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Configuration
rubygems_url: "https://rubygems.org",
protected_fetch: false,
fetch_timeout: 20,
# Actual default for db_connection_options is dynamic based on the adapter
db_connection_options: {},
puma_threads: 16
}.freeze
Expand Down
27 changes: 24 additions & 3 deletions man/gemstash-configuration.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ gemstash-configuration
: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
:puma_threads: 32
:bind: tcp://0.0.0.0:4242
:protected_fetch: true
:fetch_timeout: 10
Expand Down Expand Up @@ -113,15 +117,18 @@ A valid database URL for the [Sequel gem][SEQUEL]

`:db_connection_options`

Specifies additional `Sequel.connect` options to use.
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

None
`{ 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](SEQUEL_CONNECT) method.
A valid connection options Hash for the [Sequel.connect][SEQUEL_CONNECT] method.

# Rubygems URL

Expand All @@ -140,6 +147,20 @@ for the previous value.

A valid gem source URL

# 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`
Expand Down
3 changes: 3 additions & 0 deletions man/gemstash-customize.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ changed. To change the binding, update the `:bind` configuration key:
This maps directly to the [Puma bind flag][PUMA_BIND], and will support
anything valid for that flag.

The number of threads Puma uses is also customizable via the `:puma_threads`
configuration key. The default is `16`.

## Protected Fetch

Gemstash by default allows unauthenticated access for private
Expand Down

0 comments on commit af0fd04

Please sign in to comment.